From ae526b4af594f16295d5763114fe3318184974de Mon Sep 17 00:00:00 2001 From: =?utf8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Tue, 20 Aug 2019 11:49:48 +0200 Subject: [PATCH] New upstream version 5.4.4~repack0 --- .gitlab-ci.yml | 4 + BREAKING-CHANGES.txt | 155 +- ChangeList.txt | 20 +- README.md | 8 +- doxygen/Makefile | 1 - doxygen/README.txt | 25 +- doxygen/make.bat | 2 + doxygen/process_source_files.py | 5 + examples/Assets/AudioLiveScrollingDisplay.h | 2 +- examples/Assets/DSPDemos_Common.h | 6 +- examples/Assets/WavefrontObjParser.h | 2 +- examples/Assets/google-services.json | 30 +- examples/Assets/juce_icon_template.png | Bin 0 -> 18827 bytes examples/Audio/AudioAppDemo.h | 4 +- examples/Audio/AudioLatencyDemo.h | 6 +- examples/Audio/AudioPlaybackDemo.h | 6 +- examples/Audio/AudioRecordingDemo.h | 8 +- examples/Audio/AudioSettingsDemo.h | 4 +- examples/Audio/AudioSynthesiserDemo.h | 10 +- examples/Audio/MPEDemo.h | 29 +- examples/Audio/MidiDemo.h | 50 +- examples/Audio/PluckedStringsDemo.h | 4 +- examples/Audio/SimpleFFTDemo.h | 6 +- examples/BLOCKS/BlocksDrawingDemo.h | 4 +- examples/BLOCKS/BlocksMonitorDemo.h | 8 +- examples/BLOCKS/BlocksSynthDemo.h | 20 +- examples/DSP/ConvolutionDemo.h | 2 +- examples/DSP/FIRFilterDemo.h | 2 +- examples/DSP/GainDemo.h | 2 +- examples/DSP/IIRFilterDemo.h | 2 +- examples/DSP/OscillatorDemo.h | 2 +- examples/DSP/OverdriveDemo.h | 2 +- examples/DSP/SIMDRegisterDemo.h | 2 +- examples/DSP/StateVariableFilterDemo.h | 2 +- examples/DSP/WaveShaperTanhDemo.h | 2 +- .../Builds/Android/app/CMakeLists.txt | 54 +- .../Builds/Android/app/build.gradle | 12 +- .../Android/app/src/main/AndroidManifest.xml | 4 +- .../main/assets/AudioLiveScrollingDisplay.h | 2 +- .../app/src/main/assets/DSPDemos_Common.h | 6 +- .../app/src/main/assets/WavefrontObjParser.h | 2 +- .../app/src/main/assets/google-services.json | 30 +- .../src/main/assets/juce_icon_template.png | Bin 0 -> 18827 bytes .../vending/billing/IInAppBillingService.java | 971 ----- .../java/com/juce/demorunner/DemoRunner.java | 3166 -------------- .../demorunner/SharingContentProvider.java | 138 - .../com/roli/juce/demorunner/DemoRunner.java | 2996 ------------- .../demorunner/SharingContentProvider.java | 138 - .../DemoRunner/Builds/Android/settings.gradle | 1 + .../DemoRunner/Builds/LinuxMakefile/Makefile | 10 +- .../DemoRunner.xcodeproj/project.pbxproj | 36 +- .../DemoRunner/Builds/MacOSX/Info-App.plist | 4 +- .../VisualStudio2015/DemoRunner_App.vcxproj | 54 +- .../DemoRunner_App.vcxproj.filters | 66 +- .../Builds/VisualStudio2015/resources.rc | 6 +- .../VisualStudio2017/DemoRunner_App.vcxproj | 50 +- .../DemoRunner_App.vcxproj.filters | 66 +- .../Builds/VisualStudio2017/resources.rc | 6 +- .../DemoRunner.sln | 2 +- .../DemoRunner_App.vcxproj | 64 +- .../DemoRunner_App.vcxproj.filters | 68 +- .../icon.ico | Bin .../resources.rc | 6 +- .../iOS/DemoRunner.xcodeproj/project.pbxproj | 23 +- examples/DemoRunner/Builds/iOS/Info-App.plist | 4 +- examples/DemoRunner/DemoRunner.jucer | 51 +- .../DemoRunner/JuceLibraryCode/AppConfig.h | 4 +- .../DemoRunner/JuceLibraryCode/JuceHeader.h | 4 +- .../DemoRunner/Source/Demos/DemoPIPs1.cpp | 72 +- .../DemoRunner/Source/Demos/DemoPIPs2.cpp | 52 +- examples/DemoRunner/Source/Demos/JUCEDemos.h | 1 - examples/DemoRunner/Source/Main.cpp | 5 +- .../Source/UI/DemoContentComponent.h | 2 +- .../DemoRunner/Source/UI/MainComponent.cpp | 2 - examples/DemoRunner/Source/UI/MainComponent.h | 2 +- .../DemoRunner/Source/UI/SettingsContent.h | 2 + examples/GUI/AnimationAppDemo.h | 2 +- examples/GUI/AnimationDemo.h | 2 +- examples/GUI/BouncingBallWavetableDemo.h | 6 +- examples/GUI/CameraDemo.h | 4 +- examples/GUI/CodeEditorDemo.h | 4 +- examples/GUI/ComponentDemo.h | 2 +- examples/GUI/ComponentTransformsDemo.h | 2 +- examples/GUI/DialogsDemo.h | 2 +- examples/GUI/FlexBoxDemo.h | 2 +- examples/GUI/FontsDemo.h | 2 +- examples/GUI/GraphicsDemo.h | 12 +- examples/GUI/GridDemo.h | 2 +- examples/GUI/HelloWorldDemo.h | 4 +- examples/GUI/ImagesDemo.h | 4 +- examples/GUI/KeyMappingsDemo.h | 2 +- examples/GUI/LookAndFeelDemo.h | 2 +- examples/GUI/MDIDemo.h | 4 +- examples/GUI/MenusDemo.h | 6 +- examples/GUI/MultiTouchDemo.h | 2 +- examples/GUI/OpenGLAppDemo.h | 4 +- examples/GUI/OpenGLDemo.h | 1638 ++++--- examples/GUI/OpenGLDemo2D.h | 4 +- examples/GUI/PropertiesDemo.h | 2 +- examples/GUI/VideoDemo.h | 6 +- examples/GUI/WebBrowserDemo.h | 2 +- examples/GUI/WidgetsDemo.h | 14 +- examples/GUI/WindowsDemo.h | 4 +- examples/Plugins/AUv3SynthPluginDemo.h | 4 +- examples/Plugins/ArpeggiatorPluginDemo.h | 4 +- examples/Plugins/AudioPluginDemo.h | 16 +- examples/Plugins/DSPModulePluginDemo.h | 8 +- examples/Plugins/GainPluginDemo.h | 4 +- .../Plugins/InterAppAudioEffectPluginDemo.h | 16 +- examples/Plugins/MultiOutSynthPluginDemo.h | 4 +- examples/Plugins/NoiseGatePluginDemo.h | 4 +- examples/Plugins/SamplerPluginDemo.h | 60 +- examples/Plugins/SurroundPluginDemo.h | 6 +- examples/Utilities/AnalyticsCollectionDemo.h | 84 +- examples/Utilities/Box2DDemo.h | 4 +- examples/Utilities/ChildProcessDemo.h | 10 +- examples/Utilities/CryptographyDemo.h | 2 +- examples/Utilities/JavaScriptDemo.h | 2 +- examples/Utilities/LiveConstantDemo.h | 2 +- examples/Utilities/MultithreadingDemo.h | 162 +- examples/Utilities/NetworkingDemo.h | 2 +- examples/Utilities/OSCDemo.h | 4 +- examples/Utilities/PushNotificationsDemo.h | 108 +- examples/Utilities/SystemInfoDemo.h | 2 +- examples/Utilities/TimersAndEventsDemo.h | 4 +- examples/Utilities/UnitTestsDemo.h | 243 +- examples/Utilities/ValueTreesDemo.h | 12 +- examples/Utilities/XMLandJSONDemo.h | 8 +- .../AudioPerformanceTest.jucer | 18 +- .../Builds/Android/app/CMakeLists.txt | 46 +- .../Builds/Android/app/build.gradle | 4 +- .../Android/app/src/main/AndroidManifest.xml | 2 +- .../Builds/Android/settings.gradle | 1 + .../Builds/LinuxMakefile/Makefile | 10 +- .../project.pbxproj | 24 +- .../VisualStudio2015/AudioPerformanceTest.sln | 20 - .../AudioPerformanceTest_App.vcxproj | 2345 ---------- .../AudioPerformanceTest_App.vcxproj.filters | 3845 ----------------- .../AudioPerformanceTest.sln | 2 +- .../AudioPerformanceTest_App.vcxproj | 52 +- .../AudioPerformanceTest_App.vcxproj.filters | 56 +- .../resources.rc | 0 .../project.pbxproj | 11 +- .../JuceLibraryCode/AppConfig.h | 6 +- extras/AudioPluginHost/AudioPluginHost.jucer | 79 +- .../Builds/Android/app/CMakeLists.txt | 64 +- .../Builds/Android/app/build.gradle | 8 +- .../Android/app/src/main/AndroidManifest.xml | 2 +- .../vending/billing/IInAppBillingService.java | 971 ----- .../roli/juce/pluginhost/AudioPluginHost.java | 3166 -------------- .../pluginhost/SharingContentProvider.java | 138 - .../Builds/Android/settings.gradle | 1 + .../Builds/LinuxMakefile/Makefile | 28 +- .../AudioPluginHost.xcodeproj/project.pbxproj | 121 +- .../AudioPluginHost_App.vcxproj | 52 +- .../AudioPluginHost_App.vcxproj.filters | 82 +- .../AudioPluginHost_App.vcxproj | 50 +- .../AudioPluginHost_App.vcxproj.filters | 82 +- .../AudioPluginHost.sln | 14 +- .../AudioPluginHost_App.vcxproj | 100 +- .../AudioPluginHost_App.vcxproj.filters | 84 +- .../icon.ico | Bin .../resources.rc | 0 .../AudioPluginHost.xcodeproj/project.pbxproj | 119 +- .../JuceLibraryCode/AppConfig.h | 6 +- extras/AudioPluginHost/Source/HostStartup.cpp | 10 +- .../IOConfigurationWindow.cpp} | 46 +- .../IOConfigurationWindow.h} | 8 +- .../InternalPlugins.cpp} | 71 +- .../InternalPlugins.h} | 20 +- .../PluginGraph.cpp} | 132 +- .../FilterGraph.h => Plugins/PluginGraph.h} | 18 +- .../Source/UI/GraphEditorPanel.cpp | 53 +- .../Source/UI/GraphEditorPanel.h | 20 +- .../Source/UI/MainHostWindow.cpp | 64 +- .../Source/UI/MainHostWindow.h | 11 +- .../AudioPluginHost/Source/UI/PluginWindow.h | 48 +- extras/BinaryBuilder/BinaryBuilder.jucer | 6 +- .../Builds/LinuxMakefile/Makefile | 4 +- .../BinaryBuilder.xcodeproj/project.pbxproj | 11 +- .../BinaryBuilder.sln | 2 +- .../BinaryBuilder_ConsoleApp.vcxproj | 15 +- .../BinaryBuilder_ConsoleApp.vcxproj.filters | 5 +- .../resources.rc | 0 .../BinaryBuilder/JuceLibraryCode/AppConfig.h | 6 +- .../Builds/Android/app/CMakeLists.txt | 46 +- .../Builds/Android/app/build.gradle | 4 +- .../Android/app/src/main/AndroidManifest.xml | 2 +- .../Builds/Android/settings.gradle | 1 + .../Builds/LinuxMakefile/Makefile | 10 +- .../project.pbxproj | 24 +- .../Builds/VisualStudio2013/resources.rc | 34 - .../VisualStudio2017/NetworkGraphicsDemo.sln | 20 - .../NetworkGraphicsDemo.sln | 2 +- .../NetworkGraphicsDemo_App.vcxproj | 52 +- .../NetworkGraphicsDemo_App.vcxproj.filters | 59 +- .../resources.rc | 0 .../project.pbxproj | 11 +- .../JuceLibraryCode/AppConfig.h | 6 +- .../NetworkGraphicsDemo.jucer | 34 +- extras/NetworkGraphicsDemo/Source/Demos.h | 2 +- extras/Projucer/Builds/LinuxMakefile/Makefile | 10 +- extras/Projucer/Builds/MacOSX/Info-App.plist | 4 +- .../MacOSX/Projucer.xcodeproj/project.pbxproj | 24 +- .../Projucer/Builds/VisualStudio2013/icon.ico | Bin 33530 -> 0 bytes .../VisualStudio2015/Projucer_App.vcxproj | 13 +- .../Projucer_App.vcxproj.filters | 9 +- .../Builds/VisualStudio2015/resources.rc | 6 +- .../VisualStudio2017/Projucer_App.vcxproj | 11 +- .../Projucer_App.vcxproj.filters | 9 +- .../Builds/VisualStudio2017/resources.rc | 6 +- .../Projucer.sln | 2 +- .../Projucer_App.vcxproj | 25 +- .../Projucer_App.vcxproj.filters | 11 +- .../Builds/VisualStudio2019}/icon.ico | Bin .../resources.rc | 6 +- extras/Projucer/JuceLibraryCode/AppConfig.h | 4 +- extras/Projucer/JuceLibraryCode/JuceHeader.h | 4 +- extras/Projucer/Projucer.jucer | 59 +- .../jucer_GlobalPathsWindowComponent.h | 4 +- .../Windows/jucer_PIPCreatorWindowComponent.h | 13 +- .../Source/Application/jucer_Application.cpp | 100 +- .../Source/Application/jucer_Application.h | 4 +- .../Source/Application/jucer_AutoUpdater.cpp | 1003 ++--- .../Source/Application/jucer_AutoUpdater.h | 82 +- .../Source/Application/jucer_CommandIDs.h | 1 + .../Source/Application/jucer_CommandLine.cpp | 52 +- .../Source/Application/jucer_MainWindow.cpp | 4 +- .../Application/jucer_ProjucerAnalytics.cpp | 14 +- .../CodeEditor/jucer_ItemPreviewComponent.h | 2 +- .../CodeEditor/jucer_LiveBuildCodeEditor.h | 27 +- .../CodeEditor/jucer_OpenDocumentManager.cpp | 4 +- .../CodeEditor/jucer_OpenDocumentManager.h | 2 +- .../CodeEditor/jucer_SourceCodeEditor.cpp | 7 +- .../Components/jucer_TabbedComponentHandler.h | 10 +- .../Components/jucer_ViewportHandler.h | 6 +- .../Documents/jucer_ButtonDocument.cpp | 13 +- .../Documents/jucer_ButtonDocument.h | 4 +- .../Documents/jucer_ComponentDocument.cpp | 10 +- .../Documents/jucer_ComponentDocument.h | 2 +- .../PaintElements/jucer_PaintElementImage.cpp | 4 +- .../UI/jucer_JucerDocumentEditor.cpp | 16 +- .../UI/jucer_PaintRoutinePanel.cpp | 2 +- .../ComponentEditor/jucer_BinaryResources.cpp | 4 +- .../ComponentEditor/jucer_ComponentLayout.cpp | 13 +- .../ComponentEditor/jucer_JucerDocument.cpp | 16 +- .../ComponentEditor/jucer_JucerDocument.h | 4 +- .../ComponentEditor/jucer_PaintRoutine.cpp | 7 +- .../Licenses/jucer_LicenseController.cpp | 4 +- .../UI/jucer_ComponentListComponent.h | 2 + .../LiveBuildEngine/jucer_ClassDatabase.h | 37 +- .../jucer_CompileEngineClient.cpp | 14 +- .../UI/Sidebar/jucer_ExporterTreeItems.h | 2 - .../Project/UI/Sidebar/jucer_FileTreeItems.h | 19 +- .../UI/Sidebar/jucer_ProjectTreeItemBase.h | 6 - .../Project/UI/jucer_ContentViewComponents.h | 2 + .../Project/UI/jucer_HeaderComponent.cpp | 20 +- .../Source/Project/UI/jucer_HeaderComponent.h | 3 - .../UI/jucer_ModulesInformationComponent.h | 170 +- .../UI/jucer_ProjectContentComponent.cpp | 8 +- .../Projucer/Source/Project/jucer_Module.cpp | 23 +- .../Projucer/Source/Project/jucer_Project.cpp | 59 +- .../Projucer/Source/Project/jucer_Project.h | 9 +- .../jucer_ProjectExport_Android.h | 244 +- .../ProjectSaving/jucer_ProjectExport_CLion.h | 50 +- .../jucer_ProjectExport_CodeBlocks.h | 17 +- .../ProjectSaving/jucer_ProjectExport_MSVC.h | 115 +- .../ProjectSaving/jucer_ProjectExport_Make.h | 30 +- .../ProjectSaving/jucer_ProjectExport_Xcode.h | 470 +- .../ProjectSaving/jucer_ProjectExporter.cpp | 88 +- .../ProjectSaving/jucer_ProjectExporter.h | 26 +- .../ProjectSaving/jucer_ProjectSaver.cpp | 2 +- .../Source/ProjectSaving/jucer_ProjectSaver.h | 83 +- .../Settings/jucer_AppearanceSettings.cpp | 14 +- .../Source/Settings/jucer_StoredSettings.cpp | 13 +- .../Utility/Helpers/jucer_MiscUtilities.cpp | 8 +- .../Source/Utility/Helpers/jucer_PresetIDs.h | 12 + .../Utility/PIPs/jucer_PIPGenerator.cpp | 21 +- .../Source/Utility/PIPs/jucer_PIPGenerator.h | 5 +- .../jucer_PropertyComponentsWithEnablement.h | 49 +- .../Utility/UI/jucer_JucerTreeViewBase.cpp | 6 +- .../Utility/UI/jucer_ProjucerLookAndFeel.cpp | 6 +- .../Utility/UI/jucer_ProjucerLookAndFeel.h | 7 + .../UI/jucer_SlidingPanelComponent.cpp | 2 + .../Utility/UI/jucer_SlidingPanelComponent.h | 1 - .../jucer_TemplateThumbnailsComponent.h | 6 +- .../Builds/LinuxMakefile/Makefile | 10 +- .../UnitTestRunner.xcodeproj/project.pbxproj | 28 +- .../UnitTestRunner_ConsoleApp.vcxproj | 46 +- .../UnitTestRunner_ConsoleApp.vcxproj.filters | 66 +- .../VisualStudio2019/UnitTestRunner.sln | 20 + .../UnitTestRunner_ConsoleApp.vcxproj} | 335 +- ...UnitTestRunner_ConsoleApp.vcxproj.filters} | 576 ++- .../Builds/VisualStudio2019}/resources.rc | 4 +- .../JuceLibraryCode/AppConfig.h | 6 +- extras/UnitTestRunner/Source/Main.cpp | 44 +- extras/UnitTestRunner/UnitTestRunner.jucer | 37 +- .../WindowsDLL.sln | 2 +- .../WindowsDLL_StaticLibrary.vcxproj | 52 +- .../WindowsDLL_StaticLibrary.vcxproj.filters | 56 +- extras/WindowsDLL/JuceLibraryCode/AppConfig.h | 6 +- extras/WindowsDLL/WindowsDLL.jucer | 6 +- .../juce_ThreadedAnalyticsDestination.cpp | 6 +- modules/juce_analytics/juce_analytics.h | 2 +- .../buffers/juce_AudioChannelSet.cpp | 10 +- .../buffers/juce_AudioDataConverters.cpp | 9 +- .../buffers/juce_AudioDataConverters.h | 48 +- .../buffers/juce_AudioSampleBuffer.h | 10 +- .../buffers/juce_FloatVectorOperations.cpp | 5 +- .../juce_audio_basics/juce_audio_basics.cpp | 1 + modules/juce_audio_basics/juce_audio_basics.h | 4 +- .../midi/juce_MidiBuffer.cpp | 97 +- .../juce_audio_basics/midi/juce_MidiBuffer.h | 3 - .../juce_audio_basics/midi/juce_MidiFile.cpp | 9 +- .../midi/juce_MidiMessageSequence.cpp | 15 +- .../midi/juce_MidiMessageSequence.h | 10 +- .../juce_audio_basics/midi/juce_MidiRPN.cpp | 11 +- .../mpe/juce_MPEInstrument.cpp | 130 +- .../mpe/juce_MPEInstrument.h | 30 +- .../mpe/juce_MPEMessages.cpp | 7 +- .../juce_audio_basics/mpe/juce_MPENote.cpp | 7 +- .../mpe/juce_MPESynthesiser.cpp | 16 +- .../mpe/juce_MPESynthesiser.h | 2 +- .../juce_audio_basics/mpe/juce_MPEUtils.cpp | 28 +- modules/juce_audio_basics/mpe/juce_MPEUtils.h | 5 +- .../juce_audio_basics/mpe/juce_MPEValue.cpp | 7 +- .../mpe/juce_MPEZoneLayout.cpp | 7 +- .../mpe/juce_MPEZoneLayout.h | 5 + .../juce_ChannelRemappingAudioSource.cpp | 4 +- .../juce_ChannelRemappingAudioSource.h | 2 +- .../sources/juce_ResamplingAudioSource.cpp | 11 +- .../sources/juce_ResamplingAudioSource.h | 7 +- .../synthesisers/juce_Synthesiser.h | 5 - .../juce_audio_basics/utilities/juce_ADSR.h | 49 +- .../utilities/juce_LinearSmoothedValue.h | 213 - .../juce_audio_basics/utilities/juce_Reverb.h | 12 +- .../utilities/juce_SmoothedValue.cpp | 92 + .../utilities/juce_SmoothedValue.h | 622 +++ .../audio_io/juce_AudioDeviceManager.cpp | 318 +- .../audio_io/juce_AudioDeviceManager.h | 82 +- .../juce_audio_devices/juce_audio_devices.cpp | 2 +- .../juce_audio_devices/juce_audio_devices.h | 5 +- ...ce_MidiOutput.cpp => juce_MidiDevices.cpp} | 16 +- .../midi_io/juce_MidiDevices.h | 371 ++ .../midi_io/juce_MidiInput.h | 180 - .../midi_io/juce_MidiOutput.h | 145 - .../app/com/roli/juce/JuceMidiSupport.java | 97 +- .../native/juce_MidiDataConcatenator.h | 5 +- .../native/juce_android_Audio.cpp | 16 +- .../native/juce_android_Midi.cpp | 894 ++-- .../native/juce_android_Oboe.cpp | 2 +- .../native/juce_android_OpenSL.cpp | 110 +- .../native/juce_ios_Audio.cpp | 59 +- .../native/juce_linux_ALSA.cpp | 8 +- .../native/juce_linux_Bela.cpp | 119 +- .../native/juce_linux_Midi.cpp | 268 +- .../native/juce_mac_CoreAudio.cpp | 57 +- .../native/juce_mac_CoreMidi.cpp | 551 ++- .../native/juce_win32_ASIO.cpp | 18 +- .../native/juce_win32_DirectSound.cpp | 2 +- .../native/juce_win32_Midi.cpp | 438 +- .../native/juce_win32_WASAPI.cpp | 6 + .../sources/juce_AudioSourcePlayer.cpp | 10 +- .../sources/juce_AudioTransportSource.cpp | 5 +- .../sources/juce_AudioTransportSource.h | 2 +- .../codecs/juce_AiffAudioFormat.cpp | 20 +- .../codecs/juce_AiffAudioFormat.h | 1 + .../codecs/juce_CoreAudioFormat.cpp | 14 +- .../codecs/juce_CoreAudioFormat.h | 1 + .../codecs/juce_FlacAudioFormat.cpp | 15 +- .../codecs/juce_FlacAudioFormat.h | 2 + .../codecs/juce_LAMEEncoderAudioFormat.h | 1 + .../codecs/juce_MP3AudioFormat.cpp | 43 +- .../codecs/juce_MP3AudioFormat.h | 3 +- .../codecs/juce_OggVorbisAudioFormat.cpp | 9 +- .../codecs/juce_OggVorbisAudioFormat.h | 1 + .../codecs/juce_WavAudioFormat.cpp | 36 +- .../codecs/juce_WavAudioFormat.h | 1 + .../codecs/juce_WindowsMediaAudioFormat.cpp | 8 +- .../codecs/juce_WindowsMediaAudioFormat.h | 1 + .../format/juce_AudioFormatManager.h | 13 +- .../format/juce_AudioFormatReader.cpp | 92 +- .../format/juce_AudioFormatReader.h | 59 +- .../format/juce_AudioSubsectionReader.h | 1 + .../juce_audio_formats/juce_audio_formats.h | 2 +- .../juce_audio_formats/sampler/juce_Sampler.h | 1 + .../AAX/juce_AAX_Wrapper.cpp | 205 +- .../RTAS/juce_RTAS_DigiCode1.cpp | 4 +- .../RTAS/juce_RTAS_DigiCode2.cpp | 4 +- .../RTAS/juce_RTAS_DigiCode3.cpp | 2 + .../RTAS/juce_RTAS_DigiCode_Header.h | 2 + .../RTAS/juce_RTAS_MacUtilities.mm | 9 +- .../RTAS/juce_RTAS_WinUtilities.cpp | 19 +- .../RTAS/juce_RTAS_Wrapper.cpp | 89 +- .../Standalone/juce_StandaloneFilterApp.cpp | 3 + .../Standalone/juce_StandaloneFilterWindow.h | 67 +- .../Unity/juce_Unity_Wrapper.cpp | 11 +- .../VST/juce_VST_Wrapper.cpp | 57 +- .../VST3/juce_VST3_Wrapper.cpp | 437 +- .../juce_audio_plugin_client.h | 2 +- .../juce_audio_plugin_client_AU_2.mm | 8 + .../utility/juce_FakeMouseMoveGenerator.h | 2 +- .../utility/juce_PluginHostType.h | 25 +- .../utility/juce_PluginUtilities.cpp | 35 +- .../format/juce_AudioPluginFormat.cpp | 187 +- .../format/juce_AudioPluginFormat.h | 66 +- .../format/juce_AudioPluginFormatManager.cpp | 82 +- .../format/juce_AudioPluginFormatManager.h | 37 +- .../format_types/VST3_SDK/LICENSE.txt | 2 +- .../format_types/VST3_SDK/README.md | 112 +- .../VST3_SDK/VST3_License_Agreement.pdf | Bin 0 -> 160002 bytes .../VST3_SDK/VST3_Usage_Guidelines.pdf | Bin 0 -> 196713 bytes .../format_types/VST3_SDK/base/LICENSE.txt | 2 +- .../format_types/VST3_SDK/base/README.md | 6 + .../VST3_SDK/base/source/baseiids.cpp | 2 +- .../base/source/classfactoryhelpers.h | 2 +- .../VST3_SDK/base/source/fbuffer.cpp | 30 +- .../VST3_SDK/base/source/fbuffer.h | 2 +- .../VST3_SDK/base/source/fdebug.cpp | 2 +- .../VST3_SDK/base/source/fdebug.h | 49 +- .../VST3_SDK/base/source/fobject.cpp | 2 +- .../VST3_SDK/base/source/fobject.h | 2 +- .../VST3_SDK/base/source/fstreamer.cpp | 2 +- .../VST3_SDK/base/source/fstreamer.h | 2 +- .../VST3_SDK/base/source/fstring.cpp | 6 +- .../VST3_SDK/base/source/fstring.h | 2 +- .../VST3_SDK/base/source/updatehandler.cpp | 2 +- .../VST3_SDK/base/source/updatehandler.h | 2 +- .../VST3_SDK/base/thread/include/flock.h | 2 +- .../VST3_SDK/base/thread/source/flock.cpp | 2 +- .../VST3_SDK/pluginterfaces/LICENSE.txt | 2 +- .../VST3_SDK/pluginterfaces/README.md | 7 + .../VST3_SDK/pluginterfaces/base/coreiids.cpp | 10 +- .../VST3_SDK/pluginterfaces/base/falignpop.h | 4 +- .../VST3_SDK/pluginterfaces/base/falignpush.h | 6 +- .../VST3_SDK/pluginterfaces/base/fplatform.h | 29 +- .../VST3_SDK/pluginterfaces/base/funknown.h | 2 +- .../pluginterfaces/base/smartpointer.h | 12 +- .../pluginterfaces/vst/ivstaudioprocessor.h | 3 +- .../pluginterfaces/vst/ivstnoteexpression.h | 4 +- .../pluginterfaces/vst/ivsttestplugprovider.h | 89 + .../VST3_SDK/pluginterfaces/vst/vsttypes.h | 4 +- .../VST3_SDK/public.sdk/LICENSE.txt | 2 +- .../VST3_SDK/public.sdk/README.md | 15 + .../public.sdk/source/common/memorystream.cpp | 2 +- .../public.sdk/source/common/memorystream.h | 2 +- .../public.sdk/source/common/pluginview.cpp | 2 +- .../public.sdk/source/common/pluginview.h | 2 +- .../source/vst/hosting/hostclasses.cpp | 2 +- .../source/vst/hosting/hostclasses.h | 2 +- .../VST3_SDK/public.sdk/source/vst/vstbus.cpp | 2 +- .../VST3_SDK/public.sdk/source/vst/vstbus.h | 2 +- .../public.sdk/source/vst/vstcomponent.cpp | 2 +- .../public.sdk/source/vst/vstcomponent.h | 2 +- .../source/vst/vstcomponentbase.cpp | 2 +- .../public.sdk/source/vst/vstcomponentbase.h | 2 +- .../source/vst/vsteditcontroller.cpp | 2 +- .../public.sdk/source/vst/vsteditcontroller.h | 2 +- .../public.sdk/source/vst/vstinitiids.cpp | 6 +- .../public.sdk/source/vst/vstparameters.cpp | 2 +- .../public.sdk/source/vst/vstparameters.h | 2 +- .../public.sdk/source/vst/vstpresetfile.cpp | 2 +- .../public.sdk/source/vst/vstpresetfile.h | 2 +- .../format_types/juce_AU_Shared.h | 2 +- .../format_types/juce_AudioUnitPluginFormat.h | 20 +- .../juce_AudioUnitPluginFormat.mm | 114 +- .../format_types/juce_LADSPAPluginFormat.cpp | 79 +- .../format_types/juce_LADSPAPluginFormat.h | 16 +- .../juce_LegacyAudioParameter.cpp | 2 +- .../format_types/juce_VST3Common.h | 19 +- .../format_types/juce_VST3Headers.h | 24 +- .../format_types/juce_VST3PluginFormat.cpp | 149 +- .../format_types/juce_VST3PluginFormat.h | 18 +- .../format_types/juce_VSTCommon.h | 4 +- .../format_types/juce_VSTMidiEventList.h | 24 +- .../format_types/juce_VSTPluginFormat.cpp | 199 +- .../format_types/juce_VSTPluginFormat.h | 16 +- .../juce_audio_processors.cpp | 14 +- .../juce_audio_processors.h | 2 +- .../processors/juce_AudioPluginInstance.cpp | 2 + .../processors/juce_AudioPluginInstance.h | 11 +- .../processors/juce_AudioProcessor.cpp | 627 +-- .../processors/juce_AudioProcessor.h | 358 +- .../processors/juce_AudioProcessorGraph.cpp | 43 +- .../processors/juce_AudioProcessorGraph.h | 4 +- .../juce_AudioProcessorParameterGroup.cpp | 165 +- .../juce_AudioProcessorParameterGroup.h | 175 +- .../juce_GenericAudioProcessorEditor.cpp | 177 +- .../juce_GenericAudioProcessorEditor.h | 7 +- .../processors/juce_PluginDescription.cpp | 57 +- .../processors/juce_PluginDescription.h | 20 +- .../scanning/juce_KnownPluginList.cpp | 237 +- .../scanning/juce_KnownPluginList.h | 72 +- .../scanning/juce_PluginListComponent.cpp | 178 +- .../scanning/juce_PluginListComponent.h | 20 +- .../utilities/juce_AudioParameterBool.cpp | 100 + .../utilities/juce_AudioParameterBool.h | 16 +- .../utilities/juce_AudioParameterChoice.cpp | 131 + .../utilities/juce_AudioParameterChoice.h | 16 +- .../utilities/juce_AudioParameterFloat.cpp | 97 + .../utilities/juce_AudioParameterFloat.h | 22 +- .../utilities/juce_AudioParameterInt.cpp | 136 + .../utilities/juce_AudioParameterInt.h | 16 +- .../juce_AudioProcessorParameterWithID.cpp | 41 + .../juce_AudioProcessorParameterWithID.h | 6 +- .../juce_AudioProcessorParameters.cpp | 360 -- .../juce_AudioProcessorValueTreeState.cpp | 135 +- .../juce_AudioProcessorValueTreeState.h | 37 +- .../utilities/juce_RangedAudioParameter.cpp | 60 + .../utilities/juce_RangedAudioParameter.h | 29 +- .../gui/juce_AudioDeviceSelectorComponent.cpp | 79 +- .../gui/juce_AudioDeviceSelectorComponent.h | 1 + .../gui/juce_AudioThumbnail.cpp | 29 +- .../gui/juce_AudioThumbnail.h | 3 +- .../gui/juce_AudioVisualiserComponent.cpp | 13 +- .../juce_BluetoothMidiDevicePairingDialogue.h | 10 +- .../gui/juce_MidiKeyboardComponent.cpp | 22 +- .../gui/juce_MidiKeyboardComponent.h | 10 +- modules/juce_audio_utils/juce_audio_utils.cpp | 1 + modules/juce_audio_utils/juce_audio_utils.h | 4 +- ...oid_BluetoothMidiDevicePairingDialogue.cpp | 2 +- ..._ios_BluetoothMidiDevicePairingDialogue.mm | 4 +- ..._mac_BluetoothMidiDevicePairingDialogue.mm | 157 +- .../players/juce_AudioProcessorPlayer.cpp | 8 +- .../juce_blocks_basics/blocks/juce_Block.cpp | 14 +- .../juce_blocks_basics/blocks/juce_Block.h | 65 +- .../blocks/juce_BlockConfigManager.h | 2 +- .../blocks/juce_BlocksVersion.cpp | 11 +- .../blocks/juce_BlocksVersion.h | 14 +- .../blocks/juce_ControlButton.h | 4 +- .../juce_blocks_basics/blocks/juce_LEDGrid.h | 4 +- .../blocks/juce_StatusLight.h | 2 +- .../blocks/juce_TouchList.h | 2 +- .../blocks/juce_TouchSurface.h | 2 +- .../juce_blocks_basics/juce_blocks_basics.cpp | 1 + .../juce_blocks_basics/juce_blocks_basics.h | 16 +- .../littlefoot/LittleFoot Language README.txt | 16 +- .../littlefoot/juce_LittleFootCompiler.h | 4 +- .../littlefoot/juce_LittleFootRemoteHeap.h | 2 +- .../littlefoot/juce_LittleFootRunner.h | 42 +- .../protocol/juce_BitPackingUtilities.h | 8 +- .../protocol/juce_BlockModels.h | 10 +- .../protocol/juce_BlocksProtocolDefinitions.h | 113 +- .../protocol/juce_HostPacketBuilder.h | 10 +- .../protocol/juce_HostPacketDecoder.h | 19 +- .../internal/juce_BandwidthStatsLogger.cpp | 20 +- .../internal/juce_BlockImplementation.cpp | 276 +- .../internal/juce_ConnectedDeviceGroup.cpp | 618 ++- .../juce_DepreciatedVersionReader.cpp | 27 +- .../topology/internal/juce_Detector.cpp | 468 +- .../topology/internal/juce_DetectorHolder.cpp | 2 +- .../topology/internal/juce_DeviceInfo.cpp | 13 +- .../internal/juce_MIDIDeviceDetector.cpp | 95 +- .../internal/juce_MidiDeviceConnection.cpp | 40 +- .../topology/juce_BlockGraph.cpp | 112 + .../topology/juce_BlockGraph.h | 64 + .../topology/juce_PhysicalTopologySource.cpp | 11 - .../topology/juce_PhysicalTopologySource.h | 4 +- .../topology/juce_RuleBasedTopologySource.cpp | 6 +- .../topology/juce_Topology.h | 51 +- .../topology/juce_TopologySource.h | 17 +- .../visualisers/juce_BitmapLEDProgram.cpp | 12 +- .../visualisers/juce_BitmapLEDProgram.h | 2 +- .../visualisers/juce_DrumPadLEDProgram.cpp | 32 +- .../visualisers/juce_DrumPadLEDProgram.h | 12 +- modules/juce_box2d/juce_box2d.cpp | 16 +- modules/juce_box2d/juce_box2d.h | 29 +- .../containers/juce_AbstractFifo.cpp | 5 +- .../juce_core/containers/juce_AbstractFifo.h | 12 +- modules/juce_core/containers/juce_Array.h | 55 +- .../juce_core/containers/juce_ArrayBase.cpp | 2 +- modules/juce_core/containers/juce_ArrayBase.h | 34 +- modules/juce_core/containers/juce_HashMap.h | 2 +- .../containers/juce_HashMap_test.cpp | 4 +- .../containers/juce_NamedValueSet.cpp | 21 +- .../juce_core/containers/juce_NamedValueSet.h | 21 +- .../juce_core/containers/juce_OwnedArray.cpp | 66 +- .../juce_core/containers/juce_OwnedArray.h | 152 +- .../juce_core/containers/juce_PropertySet.cpp | 39 +- .../juce_core/containers/juce_PropertySet.h | 4 +- .../containers/juce_ReferenceCountedArray.cpp | 67 +- .../containers/juce_ReferenceCountedArray.h | 87 +- modules/juce_core/containers/juce_SortedSet.h | 22 +- .../juce_core/containers/juce_SparseSet.cpp | 4 +- modules/juce_core/containers/juce_Variant.cpp | 2 +- modules/juce_core/containers/juce_Variant.h | 9 +- modules/juce_core/files/juce_File.cpp | 8 +- .../juce_core/files/juce_FileInputStream.cpp | 4 +- .../juce_core/files/juce_FileOutputStream.cpp | 3 + .../juce_core/files/juce_TemporaryFile.cpp | 3 +- .../juce_core/files/juce_WildcardFileFilter.h | 2 +- modules/juce_core/javascript/juce_JSON.cpp | 402 +- modules/juce_core/javascript/juce_JSON.h | 10 +- .../juce_core/javascript/juce_Javascript.cpp | 2 +- modules/juce_core/juce_core.cpp | 78 +- modules/juce_core/juce_core.h | 23 +- modules/juce_core/maths/juce_BigInteger.cpp | 11 +- modules/juce_core/maths/juce_MathsFunctions.h | 15 +- .../juce_core/maths/juce_NormalisableRange.h | 53 +- modules/juce_core/maths/juce_Random.cpp | 8 +- .../memory/juce_ContainerDeletePolicy.h | 6 +- .../juce_HeavyweightLeakedObjectDetector.h | 12 +- modules/juce_core/memory/juce_Memory.h | 2 +- modules/juce_core/memory/juce_MemoryBlock.cpp | 2 +- modules/juce_core/memory/juce_MemoryBlock.h | 25 +- .../memory/juce_OptionalScopedPointer.h | 20 +- modules/juce_core/memory/juce_ScopedPointer.h | 107 +- modules/juce_core/memory/juce_WeakReference.h | 5 +- .../misc/juce_ConsoleApplication.cpp | 303 +- .../juce_core/misc/juce_ConsoleApplication.h | 135 +- .../juce_core/misc/juce_RuntimePermissions.h | 2 +- .../juce_core/misc/juce_StdFunctionCompat.cpp | 4 +- .../juce_core/misc/juce_StdFunctionCompat.h | 4 +- modules/juce_core/native/java/README.txt | 4 +- .../native/juce_BasicNativeHeaders.h | 8 + .../juce_core/native/juce_android_Files.cpp | 14 +- .../native/juce_android_JNIHelpers.cpp | 34 +- .../native/juce_android_JNIHelpers.h | 65 +- .../juce_core/native/juce_android_Network.cpp | 18 +- .../juce_android_RuntimePermissions.cpp | 4 +- .../juce_core/native/juce_android_Threads.cpp | 2 +- modules/juce_core/native/juce_linux_Files.cpp | 2 +- .../juce_core/native/juce_linux_Network.cpp | 68 +- .../native/juce_linux_SystemStats.cpp | 38 +- .../juce_core/native/juce_linux_Threads.cpp | 10 +- .../native/juce_mac_ClangBugWorkaround.h | 90 + modules/juce_core/native/juce_mac_Files.mm | 17 +- modules/juce_core/native/juce_mac_Network.mm | 18 +- .../juce_core/native/juce_mac_SystemStats.mm | 21 +- .../juce_core/native/juce_osx_ObjCHelpers.h | 14 + .../juce_core/native/juce_posix_SharedCode.h | 56 +- modules/juce_core/native/juce_win32_Files.cpp | 13 +- .../native/juce_win32_SystemStats.cpp | 41 +- modules/juce_core/network/juce_IPAddress.cpp | 7 +- modules/juce_core/network/juce_NamedPipe.cpp | 14 +- modules/juce_core/network/juce_Socket.cpp | 113 +- modules/juce_core/network/juce_Socket.h | 72 +- modules/juce_core/network/juce_URL.cpp | 74 +- modules/juce_core/network/juce_URL.h | 25 +- .../streams/juce_BufferedInputStream.cpp | 4 +- .../juce_core/streams/juce_InputStream.cpp | 20 + modules/juce_core/streams/juce_InputStream.h | 2 + .../streams/juce_MemoryInputStream.cpp | 21 +- .../streams/juce_MemoryInputStream.h | 7 +- .../juce_core/streams/juce_OutputStream.cpp | 17 +- .../streams/juce_SubregionStream.cpp | 4 +- .../juce_core/system/juce_CompilerSupport.h | 19 +- .../juce_core/system/juce_StandardHeader.h | 5 +- modules/juce_core/system/juce_SystemStats.cpp | 2 +- modules/juce_core/system/juce_SystemStats.h | 2 + .../juce_core/system/juce_TargetPlatform.h | 15 +- modules/juce_core/text/juce_Base64.cpp | 4 +- .../text/juce_CharacterFunctions.cpp | 20 +- .../juce_core/text/juce_CharacterFunctions.h | 102 +- modules/juce_core/text/juce_String.cpp | 301 +- modules/juce_core/text/juce_String.h | 30 +- modules/juce_core/text/juce_StringArray.cpp | 2 +- modules/juce_core/text/juce_StringArray.h | 15 +- .../juce_core/text/juce_StringPairArray.cpp | 2 +- modules/juce_core/text/juce_StringRef.h | 16 + modules/juce_core/text/juce_TextDiff.cpp | 5 +- .../juce_core/threads/juce_ChildProcess.cpp | 10 +- modules/juce_core/threads/juce_Thread.cpp | 12 +- modules/juce_core/threads/juce_ThreadPool.cpp | 1 + modules/juce_core/time/juce_RelativeTime.cpp | 127 +- modules/juce_core/time/juce_RelativeTime.h | 7 + modules/juce_core/time/juce_Time.cpp | 25 +- .../unit_tests/juce_UnitTestCategories.h | 53 + modules/juce_core/xml/juce_XmlDocument.cpp | 47 +- modules/juce_core/xml/juce_XmlDocument.h | 47 +- modules/juce_core/xml/juce_XmlElement.cpp | 264 +- modules/juce_core/xml/juce_XmlElement.h | 130 +- .../zip/juce_GZIPCompressorOutputStream.cpp | 6 +- .../zip/juce_GZIPDecompressorInputStream.cpp | 16 +- modules/juce_core/zip/juce_ZipFile.cpp | 26 +- .../encryption/juce_BlowFish.cpp | 6 +- .../encryption/juce_RSAKey.h | 2 +- .../juce_cryptography/hashing/juce_MD5.cpp | 176 +- modules/juce_cryptography/hashing/juce_MD5.h | 11 +- .../juce_cryptography/hashing/juce_SHA256.cpp | 140 +- .../juce_cryptography/hashing/juce_SHA256.h | 10 +- .../hashing/juce_Whirlpool.cpp | 644 ++- modules/juce_cryptography/juce_cryptography.h | 2 +- .../app_properties/juce_PropertiesFile.cpp | 39 +- .../juce_data_structures.h | 2 +- .../undomanager/juce_UndoManager.cpp | 2 +- .../values/juce_CachedValue.cpp | 4 +- .../values/juce_CachedValue.h | 4 - .../values/juce_ValueTree.cpp | 107 +- .../values/juce_ValueTree.h | 20 +- .../values/juce_ValueTreeSynchroniser.cpp | 2 - .../values/juce_ValueTreeSynchroniser.h | 1 - .../values/juce_ValueWithDefault.cpp | 16 +- .../values/juce_ValueWithDefault.h | 4 +- modules/juce_dsp/containers/juce_AudioBlock.h | 149 +- .../juce_dsp/containers/juce_SIMDRegister.h | 25 +- .../containers/juce_SIMDRegister_Impl.h | 2 +- .../containers/juce_SIMDRegister_test.cpp | 83 +- .../filter_design/juce_FilterDesign.cpp | 134 +- .../filter_design/juce_FilterDesign.h | 90 +- .../juce_dsp/frequency/juce_Convolution.cpp | 92 +- modules/juce_dsp/frequency/juce_Convolution.h | 20 +- modules/juce_dsp/frequency/juce_FFT.cpp | 10 +- modules/juce_dsp/frequency/juce_FFT_test.cpp | 4 +- modules/juce_dsp/frequency/juce_Windowing.cpp | 18 +- modules/juce_dsp/frequency/juce_Windowing.h | 50 +- modules/juce_dsp/juce_dsp.cpp | 34 +- modules/juce_dsp/juce_dsp.h | 3 +- modules/juce_dsp/maths/juce_LogRampedValue.h | 190 + .../maths/juce_LogRampedValue_test.cpp | 97 + modules/juce_dsp/maths/juce_LookupTable.cpp | 8 +- modules/juce_dsp/maths/juce_LookupTable.h | 10 +- modules/juce_dsp/maths/juce_Matrix.h | 2 +- modules/juce_dsp/maths/juce_Matrix_test.cpp | 4 +- .../juce_dsp/native/juce_avx_SIMDNativeOps.h | 58 +- .../native/juce_fallback_SIMDNativeOps.h | 17 +- .../juce_dsp/native/juce_neon_SIMDNativeOps.h | 14 +- .../juce_dsp/native/juce_sse_SIMDNativeOps.h | 48 +- modules/juce_dsp/processors/juce_Bias.h | 4 +- modules/juce_dsp/processors/juce_FIRFilter.h | 2 +- .../processors/juce_FIRFilter_test.cpp | 8 +- modules/juce_dsp/processors/juce_Gain.h | 4 +- modules/juce_dsp/processors/juce_IIRFilter.h | 8 +- .../juce_dsp/processors/juce_LadderFilter.cpp | 4 +- .../juce_dsp/processors/juce_LadderFilter.h | 10 +- modules/juce_dsp/processors/juce_Oscillator.h | 19 +- .../juce_dsp/processors/juce_Oversampling.cpp | 40 +- .../juce_dsp/processors/juce_Oversampling.h | 57 +- .../juce_dsp/processors/juce_ProcessContext.h | 26 +- .../processors/juce_ProcessorDuplicator.h | 4 +- .../broadcasters/juce_ChangeBroadcaster.cpp | 5 +- .../broadcasters/juce_ChangeBroadcaster.h | 2 + .../broadcasters/juce_ChangeListener.h | 7 - .../juce_InterprocessConnection.cpp | 11 +- .../juce_InterprocessConnection.h | 3 +- .../juce_NetworkServiceDiscovery.cpp | 2 +- modules/juce_events/juce_events.h | 2 +- .../messages/juce_MessageManager.cpp | 20 +- .../messages/juce_MessageManager.h | 18 +- .../native/juce_android_Messaging.cpp | 8 +- .../juce_events/native/juce_linux_EventLoop.h | 42 +- .../native/juce_linux_Messaging.cpp | 221 +- .../native/juce_mac_MessageManager.mm | 25 +- modules/juce_graphics/colour/juce_FillType.h | 2 +- .../juce_graphics/colour/juce_PixelFormats.h | 34 +- .../contexts/juce_GraphicsContext.cpp | 8 +- .../contexts/juce_GraphicsContext.h | 8 +- .../fonts/juce_AttributedString.cpp | 37 - .../fonts/juce_AttributedString.h | 12 +- .../fonts/juce_GlyphArrangement.cpp | 39 +- .../fonts/juce_GlyphArrangement.h | 19 +- .../juce_graphics/fonts/juce_TextLayout.cpp | 102 +- modules/juce_graphics/fonts/juce_TextLayout.h | 74 +- modules/juce_graphics/fonts/juce_Typeface.h | 2 +- modules/juce_graphics/geometry/juce_Path.h | 2 +- .../juce_graphics/geometry/juce_Rectangle.h | 19 +- .../image_formats/juce_GIFLoader.cpp | 2 +- .../image_formats/juce_JPEGLoader.cpp | 12 +- .../image_formats/juce_PNGLoader.cpp | 52 +- modules/juce_graphics/images/juce_Image.cpp | 29 +- modules/juce_graphics/images/juce_Image.h | 6 +- modules/juce_graphics/juce_graphics.h | 2 +- .../native/juce_RenderingHelpers.h | 54 +- .../native/juce_android_Fonts.cpp | 10 +- .../native/juce_freetype_Fonts.cpp | 6 +- .../native/juce_mac_CoreGraphicsContext.h | 2 +- .../native/juce_mac_CoreGraphicsContext.mm | 181 +- .../juce_graphics/native/juce_mac_Fonts.mm | 70 +- .../juce_win32_DirectWriteTypeLayout.cpp | 6 +- .../juce_gui_basics/buttons/juce_Button.cpp | 8 +- modules/juce_gui_basics/buttons/juce_Button.h | 13 +- .../buttons/juce_DrawableButton.cpp | 51 +- .../buttons/juce_DrawableButton.h | 23 +- .../buttons/juce_HyperlinkButton.h | 6 +- .../buttons/juce_ToolbarButton.cpp | 8 +- .../buttons/juce_ToolbarButton.h | 6 +- .../juce_ApplicationCommandManager.cpp | 9 +- .../commands/juce_KeyPressMappingSet.cpp | 22 +- .../commands/juce_KeyPressMappingSet.h | 2 +- .../components/juce_Component.cpp | 17 +- .../components/juce_Component.h | 13 +- .../components/juce_ModalComponentManager.cpp | 13 +- .../components/juce_ModalComponentManager.h | 8 +- .../juce_gui_basics/desktop/juce_Displays.cpp | 25 +- .../drawables/juce_Drawable.cpp | 35 +- .../juce_gui_basics/drawables/juce_Drawable.h | 16 +- .../drawables/juce_DrawableComposite.cpp | 6 +- .../drawables/juce_DrawableComposite.h | 2 +- .../drawables/juce_DrawableImage.cpp | 4 +- .../drawables/juce_DrawableImage.h | 2 +- .../drawables/juce_DrawablePath.cpp | 4 +- .../drawables/juce_DrawablePath.h | 2 +- .../drawables/juce_DrawableRectangle.cpp | 4 +- .../drawables/juce_DrawableRectangle.h | 2 +- .../drawables/juce_DrawableText.cpp | 13 +- .../drawables/juce_DrawableText.h | 4 +- .../drawables/juce_SVGParser.cpp | 40 +- .../filebrowser/juce_ContentSharer.cpp | 16 +- .../filebrowser/juce_ContentSharer.h | 12 +- .../juce_DirectoryContentsList.cpp | 36 +- .../filebrowser/juce_DirectoryContentsList.h | 6 +- .../filebrowser/juce_FileBrowserComponent.cpp | 6 +- .../filebrowser/juce_FileChooser.cpp | 4 +- .../filebrowser/juce_FileChooser.h | 4 +- .../filebrowser/juce_FileChooserDialogBox.cpp | 8 +- .../filebrowser/juce_FilenameComponent.cpp | 6 +- modules/juce_gui_basics/juce_gui_basics.cpp | 14 +- modules/juce_gui_basics/juce_gui_basics.h | 2 +- .../layout/juce_ConcertinaPanel.cpp | 80 +- modules/juce_gui_basics/layout/juce_Grid.cpp | 247 +- .../layout/juce_GridUnitTests.cpp | 261 -- .../layout/juce_GroupComponent.h | 7 +- .../layout/juce_ResizableBorderComponent.cpp | 20 +- .../layout/juce_ResizableBorderComponent.h | 2 +- .../layout/juce_ResizableCornerComponent.cpp | 35 +- .../layout/juce_ResizableEdgeComponent.cpp | 14 +- .../juce_gui_basics/layout/juce_ScrollBar.cpp | 46 +- .../layout/juce_TabbedButtonBar.cpp | 15 +- .../layout/juce_TabbedButtonBar.h | 2 +- .../juce_gui_basics/layout/juce_Viewport.cpp | 5 +- .../juce_gui_basics/layout/juce_Viewport.h | 12 +- .../lookandfeel/juce_LookAndFeel.cpp | 9 +- .../lookandfeel/juce_LookAndFeel.h | 6 +- .../lookandfeel/juce_LookAndFeel_V2.cpp | 23 +- .../lookandfeel/juce_LookAndFeel_V2.h | 1 + .../lookandfeel/juce_LookAndFeel_V4.cpp | 15 +- .../juce_gui_basics/menus/juce_PopupMenu.cpp | 360 +- .../juce_gui_basics/menus/juce_PopupMenu.h | 152 +- .../misc/juce_JUCESplashScreen.cpp | 13 +- .../misc/juce_JUCESplashScreen.h | 1 - .../mouse/juce_DragAndDropContainer.h | 2 - .../mouse/juce_DragAndDropTarget.h | 12 - .../mouse/juce_MouseCursor.cpp | 12 +- .../mouse/juce_MouseInputSource.cpp | 10 +- .../mouse/juce_MouseInputSource.h | 5 + .../mouse/juce_MouseListener.h | 8 - .../mouse/juce_SelectedItemSet.h | 9 +- .../app/com/roli/juce/ComponentPeerView.java | 2 +- .../app/com/roli/juce/JuceActivity.java | 20 + .../native/juce_MultiTouchMapper.h | 27 +- .../native/juce_android_ContentSharer.cpp | 12 +- .../native/juce_android_FileChooser.cpp | 2 +- .../native/juce_android_Windowing.cpp | 433 +- .../native/juce_ios_ContentSharer.cpp | 2 +- .../native/juce_ios_FileChooser.mm | 2 +- .../native/juce_ios_UIViewComponentPeer.mm | 8 +- .../native/juce_linux_FileChooser.cpp | 10 +- .../juce_gui_basics/native/juce_linux_X11.cpp | 10 +- .../juce_gui_basics/native/juce_linux_X11.h | 35 + .../native/juce_linux_X11_Windowing.cpp | 330 +- .../native/juce_mac_FileChooser.mm | 33 - .../native/juce_mac_MainMenu.mm | 24 +- .../native/juce_mac_MouseCursor.mm | 7 +- .../native/juce_mac_NSViewComponentPeer.mm | 154 +- .../native/juce_mac_Windowing.mm | 34 +- .../native/juce_win32_DragAndDrop.cpp | 10 +- .../native/juce_win32_Windowing.cpp | 162 +- .../juce_RelativeCoordinatePositioner.cpp | 3 - .../juce_RelativeCoordinatePositioner.h | 3 - .../juce_MultiChoicePropertyComponent.cpp | 24 +- .../properties/juce_PropertyPanel.cpp | 4 +- .../properties/juce_PropertyPanel.h | 5 +- .../juce_gui_basics/widgets/juce_ListBox.cpp | 8 +- .../juce_gui_basics/widgets/juce_ListBox.h | 6 - .../juce_gui_basics/widgets/juce_Slider.cpp | 32 +- modules/juce_gui_basics/widgets/juce_Slider.h | 13 +- .../widgets/juce_TableHeaderComponent.cpp | 37 +- .../widgets/juce_TextEditor.cpp | 43 +- .../juce_gui_basics/widgets/juce_TextEditor.h | 8 +- .../juce_gui_basics/widgets/juce_Toolbar.cpp | 5 +- .../juce_gui_basics/widgets/juce_TreeView.cpp | 12 +- .../juce_gui_basics/widgets/juce_TreeView.h | 10 +- .../windows/juce_CallOutBox.cpp | 2 +- .../juce_gui_basics/windows/juce_CallOutBox.h | 1 + .../windows/juce_TooltipWindow.cpp | 73 +- .../windows/juce_TooltipWindow.h | 2 +- .../code_editor/juce_CodeDocument.cpp | 398 +- .../code_editor/juce_CodeDocument.h | 39 +- .../code_editor/juce_CodeEditorComponent.cpp | 38 +- .../code_editor/juce_CodeEditorComponent.h | 18 +- .../embedding/juce_AndroidViewComponent.h | 2 +- .../embedding/juce_UIViewComponent.h | 2 +- .../embedding/juce_XEmbedComponent.h | 2 +- modules/juce_gui_extra/juce_gui_extra.cpp | 35 +- modules/juce_gui_extra/juce_gui_extra.h | 2 +- .../misc/juce_ColourSelector.cpp | 4 +- .../misc/juce_KeyMappingEditorComponent.cpp | 42 +- .../misc/juce_PushNotifications.h | 8 +- .../misc/juce_SystemTrayIconComponent.h | 17 +- .../juce/JuceFirebaseInstanceIdService.java | 16 + .../juce/JuceFirebaseMessagingService.java | 35 + .../native/juce_AndroidViewComponent.cpp | 4 +- .../native/juce_android_PushNotifications.cpp | 194 +- .../juce_android_WebBrowserComponent.cpp | 10 +- .../native/juce_ios_UIViewComponent.mm | 2 +- .../native/juce_linux_X11_SystemTrayIcon.cpp | 6 +- .../juce_linux_X11_WebBrowserComponent.cpp | 9 +- .../native/juce_linux_XEmbedComponent.cpp | 57 +- .../native/juce_mac_SystemTrayIcon.cpp | 211 +- .../native/juce_mac_WebBrowserComponent.mm | 13 +- .../native/juce_win32_SystemTrayIcon.cpp | 6 +- modules/juce_opengl/juce_opengl.h | 17 +- .../native/juce_MissingGLDefinitions.h | 4 + .../juce_opengl/native/juce_OpenGL_android.h | 6 +- .../native/juce_OpenGL_linux_X11.h | 8 +- modules/juce_opengl/native/juce_OpenGL_osx.h | 21 +- .../juce_opengl/native/juce_OpenGL_win32.h | 10 +- .../juce_opengl/opengl/juce_OpenGLContext.cpp | 29 +- .../opengl/juce_OpenGLGraphicsContext.cpp | 12 +- .../opengl/juce_OpenGLGraphicsContext.h | 10 +- .../juce_opengl/opengl/juce_OpenGLImage.cpp | 8 +- .../opengl/juce_OpenGLShaderProgram.cpp | 4 +- .../opengl/juce_OpenGLShaderProgram.h | 2 +- modules/juce_osc/juce_osc.h | 2 +- modules/juce_osc/osc/juce_OSCAddress.cpp | 15 +- modules/juce_osc/osc/juce_OSCArgument.cpp | 7 +- modules/juce_osc/osc/juce_OSCBundle.cpp | 12 +- modules/juce_osc/osc/juce_OSCBundle.h | 10 +- modules/juce_osc/osc/juce_OSCMessage.cpp | 21 +- modules/juce_osc/osc/juce_OSCMessage.h | 14 +- modules/juce_osc/osc/juce_OSCReceiver.cpp | 20 +- modules/juce_osc/osc/juce_OSCReceiver.h | 2 +- modules/juce_osc/osc/juce_OSCSender.cpp | 14 +- modules/juce_osc/osc/juce_OSCTimeTag.cpp | 12 +- .../juce_product_unlocking.h | 2 +- .../marketplace/juce_OnlineUnlockForm.cpp | 2 +- .../marketplace/juce_OnlineUnlockStatus.cpp | 2 +- .../native/juce_android_InAppPurchases.cpp | 6 +- .../native/juce_ios_InAppPurchases.cpp | 11 +- .../juce_video/capture/juce_CameraDevice.cpp | 2 +- .../juce_video/capture/juce_CameraDevice.h | 6 +- modules/juce_video/juce_video.h | 2 +- .../native/juce_android_CameraDevice.h | 54 +- .../juce_video/native/juce_android_Video.h | 12 +- .../juce_video/native/juce_ios_CameraDevice.h | 12 +- .../juce_video/native/juce_mac_CameraDevice.h | 15 +- modules/juce_video/native/juce_mac_Video.h | 22 +- .../native/juce_win32_CameraDevice.h | 4 +- modules/juce_video/native/juce_win32_Video.h | 25 +- .../playback/juce_VideoComponent.cpp | 28 +- .../juce_video/playback/juce_VideoComponent.h | 28 +- 941 files changed, 22316 insertions(+), 32888 deletions(-) create mode 100644 .gitlab-ci.yml create mode 100644 doxygen/make.bat create mode 100644 examples/Assets/juce_icon_template.png create mode 100644 examples/DemoRunner/Builds/Android/app/src/main/assets/juce_icon_template.png delete mode 100644 examples/DemoRunner/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java delete mode 100644 examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/DemoRunner.java delete mode 100644 examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/SharingContentProvider.java delete mode 100644 examples/DemoRunner/Builds/Android/app/src/main/java/com/roli/juce/demorunner/DemoRunner.java delete mode 100644 examples/DemoRunner/Builds/Android/app/src/main/java/com/roli/juce/demorunner/SharingContentProvider.java rename examples/DemoRunner/Builds/{VisualStudio2013 => VisualStudio2019}/DemoRunner.sln (95%) rename examples/DemoRunner/Builds/{VisualStudio2013 => VisualStudio2019}/DemoRunner_App.vcxproj (97%) rename examples/DemoRunner/Builds/{VisualStudio2013 => VisualStudio2019}/DemoRunner_App.vcxproj.filters (97%) rename examples/DemoRunner/Builds/{VisualStudio2013 => VisualStudio2019}/icon.ico (100%) rename examples/DemoRunner/Builds/{VisualStudio2013 => VisualStudio2019}/resources.rc (77%) delete mode 100644 extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.sln delete mode 100644 extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj delete mode 100644 extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj.filters rename extras/AudioPerformanceTest/Builds/{VisualStudio2017 => VisualStudio2019}/AudioPerformanceTest.sln (95%) rename extras/AudioPerformanceTest/Builds/{VisualStudio2017 => VisualStudio2019}/AudioPerformanceTest_App.vcxproj (97%) rename extras/AudioPerformanceTest/Builds/{VisualStudio2017 => VisualStudio2019}/AudioPerformanceTest_App.vcxproj.filters (97%) rename extras/AudioPerformanceTest/Builds/{VisualStudio2015 => VisualStudio2019}/resources.rc (100%) delete mode 100644 extras/AudioPluginHost/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java delete mode 100644 extras/AudioPluginHost/Builds/Android/app/src/main/java/com/roli/juce/pluginhost/AudioPluginHost.java delete mode 100644 extras/AudioPluginHost/Builds/Android/app/src/main/java/com/roli/juce/pluginhost/SharingContentProvider.java rename extras/AudioPluginHost/Builds/{VisualStudio2013 => VisualStudio2019}/AudioPluginHost.sln (54%) rename extras/AudioPluginHost/Builds/{VisualStudio2013 => VisualStudio2019}/AudioPluginHost_App.vcxproj (96%) rename extras/AudioPluginHost/Builds/{VisualStudio2013 => VisualStudio2019}/AudioPluginHost_App.vcxproj.filters (97%) rename extras/AudioPluginHost/Builds/{VisualStudio2013 => VisualStudio2019}/icon.ico (100%) rename extras/AudioPluginHost/Builds/{VisualStudio2013 => VisualStudio2019}/resources.rc (100%) rename extras/AudioPluginHost/Source/{Filters/FilterIOConfiguration.cpp => Plugins/IOConfigurationWindow.cpp} (89%) rename extras/AudioPluginHost/Source/{Filters/FilterIOConfiguration.h => Plugins/IOConfigurationWindow.h} (85%) rename extras/AudioPluginHost/Source/{Filters/InternalFilters.cpp => Plugins/InternalPlugins.cpp} (83%) rename extras/AudioPluginHost/Source/{Filters/InternalFilters.h => Plugins/InternalPlugins.h} (78%) rename extras/AudioPluginHost/Source/{Filters/FilterGraph.cpp => Plugins/PluginGraph.cpp} (76%) rename extras/AudioPluginHost/Source/{Filters/FilterGraph.h => Plugins/PluginGraph.h} (84%) rename extras/BinaryBuilder/Builds/{VisualStudio2017 => VisualStudio2019}/BinaryBuilder.sln (95%) rename extras/BinaryBuilder/Builds/{VisualStudio2017 => VisualStudio2019}/BinaryBuilder_ConsoleApp.vcxproj (96%) rename extras/BinaryBuilder/Builds/{VisualStudio2017 => VisualStudio2019}/BinaryBuilder_ConsoleApp.vcxproj.filters (97%) rename extras/BinaryBuilder/Builds/{VisualStudio2017 => VisualStudio2019}/resources.rc (100%) delete mode 100644 extras/NetworkGraphicsDemo/Builds/VisualStudio2013/resources.rc delete mode 100644 extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo.sln rename extras/NetworkGraphicsDemo/Builds/{VisualStudio2013 => VisualStudio2019}/NetworkGraphicsDemo.sln (95%) rename extras/NetworkGraphicsDemo/Builds/{VisualStudio2017 => VisualStudio2019}/NetworkGraphicsDemo_App.vcxproj (97%) rename extras/NetworkGraphicsDemo/Builds/{VisualStudio2013 => VisualStudio2019}/NetworkGraphicsDemo_App.vcxproj.filters (97%) rename extras/NetworkGraphicsDemo/Builds/{VisualStudio2017 => VisualStudio2019}/resources.rc (100%) delete mode 100644 extras/Projucer/Builds/VisualStudio2013/icon.ico rename extras/Projucer/Builds/{VisualStudio2013 => VisualStudio2019}/Projucer.sln (95%) rename extras/Projucer/Builds/{VisualStudio2013 => VisualStudio2019}/Projucer_App.vcxproj (97%) rename extras/Projucer/Builds/{VisualStudio2013 => VisualStudio2019}/Projucer_App.vcxproj.filters (97%) rename extras/{NetworkGraphicsDemo/Builds/VisualStudio2013 => Projucer/Builds/VisualStudio2019}/icon.ico (100%) rename extras/Projucer/Builds/{VisualStudio2013 => VisualStudio2019}/resources.rc (76%) create mode 100644 extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner.sln rename extras/{NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo_App.vcxproj => UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj} (88%) rename extras/{NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo_App.vcxproj.filters => UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters} (88%) rename extras/{AudioPerformanceTest/Builds/VisualStudio2017 => UnitTestRunner/Builds/VisualStudio2019}/resources.rc (79%) rename extras/WindowsDLL/Builds/{VisualStudio2017 => VisualStudio2019}/WindowsDLL.sln (95%) rename extras/WindowsDLL/Builds/{VisualStudio2017 => VisualStudio2019}/WindowsDLL_StaticLibrary.vcxproj (97%) rename extras/WindowsDLL/Builds/{VisualStudio2017 => VisualStudio2019}/WindowsDLL_StaticLibrary.vcxproj.filters (97%) delete mode 100644 modules/juce_audio_basics/utilities/juce_LinearSmoothedValue.h create mode 100644 modules/juce_audio_basics/utilities/juce_SmoothedValue.cpp create mode 100644 modules/juce_audio_basics/utilities/juce_SmoothedValue.h rename modules/juce_audio_devices/midi_io/{juce_MidiOutput.cpp => juce_MidiDevices.cpp} (88%) create mode 100644 modules/juce_audio_devices/midi_io/juce_MidiDevices.h delete mode 100644 modules/juce_audio_devices/midi_io/juce_MidiInput.h delete mode 100644 modules/juce_audio_devices/midi_io/juce_MidiOutput.h mode change 100644 => 100755 modules/juce_audio_devices/native/juce_linux_Bela.cpp create mode 100644 modules/juce_audio_processors/format_types/VST3_SDK/VST3_License_Agreement.pdf create mode 100644 modules/juce_audio_processors/format_types/VST3_SDK/VST3_Usage_Guidelines.pdf create mode 100644 modules/juce_audio_processors/format_types/VST3_SDK/base/README.md create mode 100644 modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/README.md create mode 100644 modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivsttestplugprovider.h create mode 100644 modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/README.md create mode 100644 modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp create mode 100644 modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp create mode 100644 modules/juce_audio_processors/utilities/juce_AudioParameterFloat.cpp create mode 100644 modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp create mode 100644 modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.cpp delete mode 100644 modules/juce_audio_processors/utilities/juce_AudioProcessorParameters.cpp create mode 100644 modules/juce_audio_processors/utilities/juce_RangedAudioParameter.cpp create mode 100644 modules/juce_blocks_basics/topology/juce_BlockGraph.cpp create mode 100644 modules/juce_blocks_basics/topology/juce_BlockGraph.h mode change 100644 => 100755 modules/juce_core/juce_core.cpp mode change 100644 => 100755 modules/juce_core/native/juce_linux_SystemStats.cpp create mode 100644 modules/juce_core/unit_tests/juce_UnitTestCategories.h create mode 100644 modules/juce_dsp/maths/juce_LogRampedValue.h create mode 100644 modules/juce_dsp/maths/juce_LogRampedValue_test.cpp delete mode 100644 modules/juce_gui_basics/layout/juce_GridUnitTests.cpp create mode 100644 modules/juce_gui_basics/native/javaopt/app/com/roli/juce/JuceActivity.java create mode 100644 modules/juce_gui_extra/native/javaopt/app/com/roli/juce/JuceFirebaseInstanceIdService.java create mode 100644 modules/juce_gui_extra/native/javaopt/app/com/roli/juce/JuceFirebaseMessagingService.java diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..e91a6b17 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,4 @@ +include: + - project: 'juce-repos/JUCE-utils' + file: '/CI/gitlab-ci.yml' + diff --git a/BREAKING-CHANGES.txt b/BREAKING-CHANGES.txt index 79c5bfd2..ef40f8a0 100644 --- a/BREAKING-CHANGES.txt +++ b/BREAKING-CHANGES.txt @@ -1,11 +1,158 @@ JUCE breaking changes ===================== +Version 5.4.4 +============= + +Change +------ +The Visual Studio 2013 exporter has been removed from the Projucer and we will +no longer maintain backwards compatibility with Visual Studio 2013 in JUCE. + +Possible Issues +--------------- +It is no longer possible to create Visual Studio 2013 projects from the +Projucer or compile JUCE-based software using Visual Studio 2013. + +Workaround +---------- +If you are using Visual Studio 2013 to build your projects you will need to +update to a more modern version of Visual Studio. + +Rationale +--------- +Of all the platforms JUCE supports Visual Studio 2013 was holding us back the +most in terms of C++ features we would like to use more broadly across the +codebase. It is still possible to target older versions of Windows with more +modern versions of Visual Studio. Until recently the AAX SDK was distributed as +a Visual Studio 2013 project, but this is now provided as a Visual Studio 2017 +project. + + +Change +------ +JUCE is moving towards using C++11 pointer container types instead of passing +raw pointers as arguments and return values. + +Possible Issues +--------------- +You will need to change your code to pass std::unique_ptr into and out of +various functions across JUCE's API. + +Workaround +---------- +None + +Rationale +--------- +Indicating ownership through the transfer of smart pointer types has been part +of mainstream C++ for a long time and this change enforces memory safety by +default in most situations. + + +Change +------ +SystemTrayIconComponent::setIconImage now takes two arguments, rather than one. +The new argument is a template image for use on macOS where all non-transparent +regions will render in a monochrome colour determined dynamically by the +operating system. + +Possible Issues +--------------- +You will now need to provide two images to display a SystemTrayIconComponent +and the SystemTrayIconComponent will have a different appearance on macOS. + +Workaround +---------- +If you are not targeting macOS then you can provide an empty image, `{}`, for +the second argument. If you are targeting macOS then you will likely need to +design a new monochrome icon. + +Rationale +--------- +The introduction of "Dark Mode" in macOS 10.14 means that menu bar icons must +support several different colours and highlight modes to retain the same +appearance as the native Apple icons. Doing this correctly without delegating +the behaviour to the operating system is extremely cumbersome, and the APIs we +were previously using to interact with menu bar items have been deprecated. + + +Change +------ +The AudioBlock class now differentiates between const and non-const data. + +Possible Issues +--------------- +The return type of the getInputBlock() method of the ProcessContextReplacing +and ProcessContextNonReplacing classes has changed from AudioBlock to +AudioBlock. + +Workaround +---------- +For ProcessContextReplacing you should use getOutputBlock() instead of +getInputBlock(). For ProcessContextNonReplacing attempting to modify the input +block is very likely an error. + +Rationale +--------- +This change makes the intent of the code much clearer and means that we can +remove some const_cast operations. + + +Change +------ +The formatting of floating point numbers written to XML and JSON files has +changed. + +Note that there is no change in precision - the XML and JSON files containing +the new format numbers will parse in exactly the same way, it is only the +string representation that has changed. + +Possible Issues +--------------- +If you rely upon exactly reproducing XML or JSON files then the new files may +be different. + +Workaround +---------- +Update any reference XML or JSON files to use the new format. + +Rationale +--------- +The new format retains full precision, provides a human friendly representation +of values near 1, and uses scientific notation for small and large numbers. +This prevents needless file size bloat from numbers like 0.00000000000000001. + + +Version 5.4.3 +============= + +Change +------ +The global user module path setting in the Projucer can now only contain a +single path. + +Possible Issues +--------------- +Projects that previously relied on using multiple global user module paths +separated by a semicolon will fail to find these modules after re-saving. + +Workaround +---------- +Replace the multiple paths with a single global user module path. + +Rationale +--------- +Using multiple global user module paths did not work when saving a project +which exported to different OSes. Only allowing a single path will prevent this +from silently causing issues. + + Version 5.4.2 ============= Change ------ +------ The return type of Block::getBlockAreaWithinLayout() has been changed from Rectangle to a simpler BlockArea struct. @@ -26,7 +173,7 @@ GPL/Commercial licensed juce_graphics module that contains Rectangle. Change ------ +------ Renaming and deletion of open file handles on Windows is now possible using the FILE_SHARE_DELETE flag. @@ -45,7 +192,7 @@ This unifies the behaviour across OSes as POSIX systems already allow this. Change ------ +------ Multiple changes to low-level, non-public JNI and Android APIs. Possible Issues @@ -64,7 +211,7 @@ See the forum for further details. Change ------ +------ The minimum Android version for a JUCE app is now Android 4.1 Possible Issues diff --git a/ChangeList.txt b/ChangeList.txt index 427a98a3..a1a755f5 100644 --- a/ChangeList.txt +++ b/ChangeList.txt @@ -3,8 +3,26 @@ This file just lists the more notable headline features. For more detailed info about minor changes and bugfixes, please see the git log! +Version 5.4.4 + - Improvements to floating point number printing + - Faster plug-in parameter indexing + - Added support for persisting attachements to MIDI devices + - Refactored Linux event loop handling + - Multiple C++ modernisation improvements to the API + - Added support for macOS 10.55 and iOS 13 + - Added support for Visual Studio 2019 + - Removed support for Visual Studio 2013 + +Version 5.4.3 + - Added a Visual Studio 2019 exporter to the Projucer + - Added options to configure macOS Hardened Runtime in the Projucer + - Fixed a potential memory corruption when drawing on macOS/iOS + - Fixed file drag and drop for Windows 8 + - Multiple DSP module enhancements + - Various bug-fixes, improvements and documentation updates + Version 5.4.2 - - Restructed the low-level Android native code + - Restructured the low-level Android native code - Added an ADSR envelope class - AudioProcessorValueTreeState performance improvements - Improved Xcode 10 support diff --git a/README.md b/README.md index b0d29868..c585655c 100644 --- a/README.md +++ b/README.md @@ -28,13 +28,13 @@ For further help getting started, please refer to the JUCE [documentation](https://juce.com/learn/documentation) and [tutorials](https://juce.com/learn/tutorials). -## System Requirements +## Minimum System Requirements #### Building JUCE Projects - __macOS__: macOS 10.11 and Xcode 7.3.1 -- __Windows__: Windows 8.1 and Visual Studio 2013 64-bit +- __Windows__: Windows 8.1 and Visual Studio 2015 64-bit - __Linux__: GCC 4.8 -#### Minimum Deployment Targets +#### Deployment Targets - __macOS__: macOS 10.7 - __Windows__: Windows Vista - __Linux__: Mainstream Linux distributions @@ -58,6 +58,6 @@ There are multiple commercial licensing tiers for JUCE 5, with different terms f - JUCE Personal (developers or startup businesses with revenue under 50K USD) - free - JUCE Indie (small businesses with revenue under 200K USD) - $35/month - JUCE Pro (no revenue limit) - $65/month -- JUCE Eductational (no revenue limit) - free for bona fide educational institutes +- JUCE Educational (no revenue limit) - free for bona fide educational institutes For full terms see [LICENSE.md](LICENSE.md). diff --git a/doxygen/Makefile b/doxygen/Makefile index 5b17c371..d4f5d3eb 100644 --- a/doxygen/Makefile +++ b/doxygen/Makefile @@ -8,7 +8,6 @@ doc/index.html: build/juce_modules.dox Doxyfile doxygen build/juce_modules.dox: process_source_files.py $(SOURCE_FILES) - rm -rf build python $< ../modules build clean: diff --git a/doxygen/README.txt b/doxygen/README.txt index 60a1511d..ec537aec 100644 --- a/doxygen/README.txt +++ b/doxygen/README.txt @@ -1,10 +1,23 @@ -# The JUCE API Reference +The JUCE API Reference +====================== From here, you can generate an offline HTML version of the JUCE API Reference. -How to: +Dependencies +------------ + +- doxygen +- python +- graphviz (to generate inheritance diagrams) + +Make sure that all the dependencies can be found on your PATH. + +Building +-------- + +- cd into this directory on the command line +- run `make` + +Doxygen will create a new subfolder "doc". Open doc/index.html in your browser +to access the generated HTML documentation. -1. install doxygen -2. cd into this directory on the command line -3. run `make` -4. doxygen will create a new subfolder "doc" - open doc/index.html in your browser to access the generated HTML documentation diff --git a/doxygen/make.bat b/doxygen/make.bat new file mode 100644 index 00000000..1239654b --- /dev/null +++ b/doxygen/make.bat @@ -0,0 +1,2 @@ +python process_source_files.py ..\modules build +doxygen diff --git a/doxygen/process_source_files.py b/doxygen/process_source_files.py index 4ada4eb6..376c97db 100644 --- a/doxygen/process_source_files.py +++ b/doxygen/process_source_files.py @@ -75,6 +75,11 @@ if __name__ == "__main__": "subdirectories") args = parser.parse_args() + try: + shutil.rmtree(args.dest_dir) + except FileNotFoundError: + pass + # Get the list of JUCE modules to include. if args.subdirs: juce_modules = args.subdirs.split(",") diff --git a/examples/Assets/AudioLiveScrollingDisplay.h b/examples/Assets/AudioLiveScrollingDisplay.h index 0b9a1f12..c68f062e 100644 --- a/examples/Assets/AudioLiveScrollingDisplay.h +++ b/examples/Assets/AudioLiveScrollingDisplay.h @@ -65,7 +65,7 @@ public: // We need to clear the output buffers before returning, in case they're full of junk.. for (int j = 0; j < numOutputChannels; ++j) if (float* outputChannel = outputChannelData[j]) - zeromem (outputChannel, sizeof (float) * (size_t) numberOfSamples); + zeromem (outputChannel, (size_t) numberOfSamples * sizeof (float)); } JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveScrollingAudioDisplay) diff --git a/examples/Assets/DSPDemos_Common.h b/examples/Assets/DSPDemos_Common.h index dc9dfcb5..33a54ea6 100644 --- a/examples/Assets/DSPDemos_Common.h +++ b/examples/Assets/DSPDemos_Common.h @@ -104,7 +104,7 @@ public: thumbnail.addChangeListener (this); } - ~AudioThumbnailComponent() + ~AudioThumbnailComponent() override { thumbnail.removeChangeListener (this); } @@ -367,7 +367,7 @@ public: setSize (800, 250); } - ~AudioFileReaderComponent() + ~AudioFileReaderComponent() override { signalThreadShouldExit(); stop(); @@ -551,7 +551,7 @@ private: loopButton.getToggleStateValue().referTo (audioFileReader.loopState); } - ~AudioPlayerHeader() + ~AudioPlayerHeader() override { audioFileReader.playState.removeListener (this); } diff --git a/examples/Assets/WavefrontObjParser.h b/examples/Assets/WavefrontObjParser.h index 696214ce..e97d8968 100644 --- a/examples/Assets/WavefrontObjParser.h +++ b/examples/Assets/WavefrontObjParser.h @@ -243,7 +243,7 @@ private: }; static Shape* parseFaceGroup (const Mesh& srcMesh, - const Array& faceGroup, + Array& faceGroup, const Material& material, const String& name) { diff --git a/examples/Assets/google-services.json b/examples/Assets/google-services.json index 9d83a3dc..b4e36531 100644 --- a/examples/Assets/google-services.json +++ b/examples/Assets/google-services.json @@ -1,39 +1,37 @@ { "project_info": { - "project_number": "3137221487", - "firebase_url": "https://pushnotificationsdemo-1c714.firebaseio.com", - "project_id": "pushnotificationsdemo-1c714", - "storage_bucket": "pushnotificationsdemo-1c714.appspot.com" + "project_number": "50526851168", + "firebase_url": "https://pushnotificationsdemorunner.firebaseio.com", + "project_id": "pushnotificationsdemorunner", + "storage_bucket": "pushnotificationsdemorunner.appspot.com" }, "client": [ { "client_info": { - "mobilesdk_app_id": "1:3137221487:android:8fdcd861a33b035c", + "mobilesdk_app_id": "1:50526851168:android:6fa3f0d4b79f1940", "android_client_info": { - "package_name": "com.juce.pushnotificationsdemo" + "package_name": "com.juce.demorunner" } }, "oauth_client": [ { - "client_id": "3137221487-uftk61ukltbi07dmejslgt0d6qnml0oo.apps.googleusercontent.com", + "client_id": "50526851168-vgn4rv0vimpc8kdm7ecmb3g95t1et0t5.apps.googleusercontent.com", "client_type": 3 } ], "api_key": [ { - "current_key": "AIzaSyDPpqphjiEEYI3sJGptrebN5Z52GkOG4Wo" + "current_key": "AIzaSyAMwLOFACFo7_SHm9iiVhoa0zCjFyMsgFc" } ], "services": { - "analytics_service": { - "status": 1 - }, "appinvite_service": { - "status": 1, - "other_platform_oauth_client": [] - }, - "ads_service": { - "status": 2 + "other_platform_oauth_client": [ + { + "client_id": "50526851168-vgn4rv0vimpc8kdm7ecmb3g95t1et0t5.apps.googleusercontent.com", + "client_type": 3 + } + ] } } } diff --git a/examples/Assets/juce_icon_template.png b/examples/Assets/juce_icon_template.png new file mode 100644 index 0000000000000000000000000000000000000000..e2964f1c3435da578d24b3940167d51b05d8914f GIT binary patch literal 18827 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 literal 0 HcmV?d00001 diff --git a/examples/Audio/AudioAppDemo.h b/examples/Audio/AudioAppDemo.h index fed02dbb..fa3eb203 100644 --- a/examples/Audio/AudioAppDemo.h +++ b/examples/Audio/AudioAppDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -64,7 +64,7 @@ public: setSize (800, 600); } - ~AudioAppDemo() + ~AudioAppDemo() override { shutdownAudio(); } diff --git a/examples/Audio/AudioLatencyDemo.h b/examples/Audio/AudioLatencyDemo.h index 45bc329d..b7e16ea6 100644 --- a/examples/Audio/AudioLatencyDemo.h +++ b/examples/Audio/AudioLatencyDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -175,7 +175,7 @@ public: // We need to clear the output buffers, in case they're full of junk.. for (int i = 0; i < numOutputChannels; ++i) if (outputChannelData[i] != nullptr) - zeromem (outputChannelData[i], sizeof (float) * (size_t) numSamples); + zeromem (outputChannelData[i], (size_t) numSamples * sizeof (float)); } } @@ -345,7 +345,7 @@ public: setSize (500, 500); } - ~AudioLatencyDemo() + ~AudioLatencyDemo() override { audioDeviceManager.removeAudioCallback (liveAudioScroller.get()); audioDeviceManager.removeAudioCallback (latencyTester .get()); diff --git a/examples/Audio/AudioPlaybackDemo.h b/examples/Audio/AudioPlaybackDemo.h index 2650cd49..33d48f36 100644 --- a/examples/Audio/AudioPlaybackDemo.h +++ b/examples/Audio/AudioPlaybackDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone type: Component mainClass: AudioPlaybackDemo @@ -75,7 +75,7 @@ public: addAndMakeVisible (currentPositionMarker); } - ~DemoThumbnailComp() + ~DemoThumbnailComp() override { scrollbar.removeListener (this); thumbnail.removeChangeListener (this); @@ -342,7 +342,7 @@ public: setSize (500, 500); } - ~AudioPlaybackDemo() + ~AudioPlaybackDemo() override { transportSource .setSource (nullptr); audioSourcePlayer.setSource (nullptr); diff --git a/examples/Audio/AudioRecordingDemo.h b/examples/Audio/AudioRecordingDemo.h index 159ee16f..ceaecba3 100644 --- a/examples/Audio/AudioRecordingDemo.h +++ b/examples/Audio/AudioRecordingDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -64,7 +64,7 @@ public: backgroundThread.startThread(); } - ~AudioRecorder() + ~AudioRecorder() override { stop(); } @@ -178,7 +178,7 @@ public: thumbnail.addChangeListener (this); } - ~RecordingThumbnail() + ~RecordingThumbnail() override { thumbnail.removeChangeListener (this); } @@ -272,7 +272,7 @@ public: setSize (500, 500); } - ~AudioRecordingDemo() + ~AudioRecordingDemo() override { audioDeviceManager.removeAudioCallback (&recorder); audioDeviceManager.removeAudioCallback (&liveAudioScroller); diff --git a/examples/Audio/AudioSettingsDemo.h b/examples/Audio/AudioSettingsDemo.h index 5118b6b6..9bd5f330 100644 --- a/examples/Audio/AudioSettingsDemo.h +++ b/examples/Audio/AudioSettingsDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -88,7 +88,7 @@ public: setSize (500, 600); } - ~AudioSettingsDemo() + ~AudioSettingsDemo() override { audioDeviceManager.removeChangeListener (this); } diff --git a/examples/Audio/AudioSynthesiserDemo.h b/examples/Audio/AudioSynthesiserDemo.h index ddb90b1b..644f061f 100644 --- a/examples/Audio/AudioSynthesiserDemo.h +++ b/examples/Audio/AudioSynthesiserDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -149,6 +149,8 @@ struct SineWaveVoice : public SynthesiserVoice } } + using SynthesiserVoice::renderNextBlock; + private: double currentAngle = 0.0, angleDelta = 0.0, level = 0.0, tailOff = 0.0; }; @@ -270,16 +272,16 @@ public: #endif audioDeviceManager.addAudioCallback (&audioSourcePlayer); - audioDeviceManager.addMidiInputCallback ({}, &(synthAudioSource.midiCollector)); + audioDeviceManager.addMidiInputDeviceCallback ({}, &(synthAudioSource.midiCollector)); setOpaque (true); setSize (640, 480); } - ~AudioSynthesiserDemo() + ~AudioSynthesiserDemo() override { audioSourcePlayer.setSource (nullptr); - audioDeviceManager.removeMidiInputCallback ({}, &(synthAudioSource.midiCollector)); + audioDeviceManager.removeMidiInputDeviceCallback ({}, &(synthAudioSource.midiCollector)); audioDeviceManager.removeAudioCallback (&audioSourcePlayer); audioDeviceManager.removeAudioCallback (&liveAudioDisplayComp); } diff --git a/examples/Audio/MPEDemo.h b/examples/Audio/MPEDemo.h index b7ef91e8..0987328d 100644 --- a/examples/Audio/MPEDemo.h +++ b/examples/Audio/MPEDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -48,7 +48,6 @@ #pragma once - //============================================================================== class ZoneColourPicker { @@ -263,7 +262,7 @@ public: private: //============================================================================== - MPENote* findActiveNote (int noteID) const noexcept + const MPENote* findActiveNote (int noteID) const noexcept { for (auto& note : activeNotes) if (note.noteID == noteID) @@ -722,9 +721,9 @@ public: jassert (currentlyPlayingNote.keyState == MPENote::keyDown || currentlyPlayingNote.keyState == MPENote::keyDownAndSustained); - level.setValue (currentlyPlayingNote.pressure.asUnsignedFloat()); - frequency.setValue (currentlyPlayingNote.getFrequencyInHertz()); - timbre.setValue (currentlyPlayingNote.timbre.asUnsignedFloat()); + level .setTargetValue (currentlyPlayingNote.pressure.asUnsignedFloat()); + frequency.setTargetValue (currentlyPlayingNote.getFrequencyInHertz()); + timbre .setTargetValue (currentlyPlayingNote.timbre.asUnsignedFloat()); phase = 0.0; auto cyclesPerSample = frequency.getNextValue() / currentSampleRate; @@ -756,17 +755,17 @@ public: void notePressureChanged() override { - level.setValue (currentlyPlayingNote.pressure.asUnsignedFloat()); + level.setTargetValue (currentlyPlayingNote.pressure.asUnsignedFloat()); } void notePitchbendChanged() override { - frequency.setValue (currentlyPlayingNote.getFrequencyInHertz()); + frequency.setTargetValue (currentlyPlayingNote.getFrequencyInHertz()); } void noteTimbreChanged() override { - timbre.setValue (currentlyPlayingNote.timbre.asUnsignedFloat()); + timbre.setTargetValue (currentlyPlayingNote.timbre.asUnsignedFloat()); } void noteKeyStateChanged() override {} @@ -828,6 +827,8 @@ public: } } + using MPESynthesiserVoice::renderNextBlock; + private: //============================================================================== float getNextSample() noexcept @@ -851,7 +852,7 @@ private: } //============================================================================== - LinearSmoothedValue level, timbre, frequency; + SmoothedValue level, timbre, frequency; double phase = 0.0; double phaseDelta = 0.0; @@ -876,10 +877,10 @@ public: visualiserComp (colourPicker) { #ifndef JUCE_DEMO_RUNNER - audioDeviceManager.initialise (0, 2, 0, true, {}, 0); + audioDeviceManager.initialise (0, 2, nullptr, true, {}, nullptr); #endif - audioDeviceManager.addMidiInputCallback ({}, this); + audioDeviceManager.addMidiInputDeviceCallback ({}, this); audioDeviceManager.addAudioCallback (this); addAndMakeVisible (audioSetupComp); @@ -902,9 +903,9 @@ public: setSize (880, 720); } - ~MPEDemo() + ~MPEDemo() override { - audioDeviceManager.removeMidiInputCallback ({}, this); + audioDeviceManager.removeMidiInputDeviceCallback ({}, this); audioDeviceManager.removeAudioCallback (this); } diff --git a/examples/Audio/MidiDemo.h b/examples/Audio/MidiDemo.h index c12776c7..b871fd55 100644 --- a/examples/Audio/MidiDemo.h +++ b/examples/Audio/MidiDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -52,9 +52,9 @@ //============================================================================== struct MidiDeviceListEntry : ReferenceCountedObject { - MidiDeviceListEntry (const String& deviceName) : name (deviceName) {} + MidiDeviceListEntry (MidiDeviceInfo info) : deviceInfo (info) {} - String name; + MidiDeviceInfo deviceInfo; std::unique_ptr inDevice; std::unique_ptr outDevice; @@ -116,7 +116,7 @@ public: startTimer (500); } - ~MidiDemo() + ~MidiDemo() override { stopTimer(); midiInputs .clear(); @@ -187,7 +187,7 @@ public: if (isInput) { jassert (midiInputs[index]->inDevice.get() == nullptr); - midiInputs[index]->inDevice.reset (MidiInput::openDevice (index, this)); + midiInputs[index]->inDevice = MidiInput::openDevice (midiInputs[index]->deviceInfo.identifier, this); if (midiInputs[index]->inDevice.get() == nullptr) { @@ -200,7 +200,7 @@ public: else { jassert (midiOutputs[index]->outDevice.get() == nullptr); - midiOutputs[index]->outDevice.reset (MidiOutput::openDevice (index)); + midiOutputs[index]->outDevice = MidiOutput::openDevice (midiOutputs[index]->deviceInfo.identifier); if (midiOutputs[index]->outDevice.get() == nullptr) { @@ -278,14 +278,14 @@ private: if (isInput) { if (rowNumber < parent.getNumMidiInputs()) - g.drawText (parent.getMidiDevice (rowNumber, true)->name, + g.drawText (parent.getMidiDevice (rowNumber, true)->deviceInfo.name, 5, 0, width, height, Justification::centredLeft, true); } else { if (rowNumber < parent.getNumMidiOutputs()) - g.drawText (parent.getMidiDevice (rowNumber, false)->name, + g.drawText (parent.getMidiDevice (rowNumber, false)->deviceInfo.name, 5, 0, width, height, Justification::centredLeft, true); } @@ -368,34 +368,34 @@ private: } //============================================================================== - bool hasDeviceListChanged (const StringArray& deviceNames, bool isInputDevice) + bool hasDeviceListChanged (const Array& availableDevices, bool isInputDevice) { ReferenceCountedArray& midiDevices = isInputDevice ? midiInputs : midiOutputs; - if (deviceNames.size() != midiDevices.size()) + if (availableDevices.size() != midiDevices.size()) return true; - for (auto i = 0; i < deviceNames.size(); ++i) - if (deviceNames[i] != midiDevices[i]->name) + for (auto i = 0; i < availableDevices.size(); ++i) + if (availableDevices[i] != midiDevices[i]->deviceInfo) return true; return false; } - ReferenceCountedObjectPtr findDeviceWithName (const String& name, bool isInputDevice) const + ReferenceCountedObjectPtr findDevice (MidiDeviceInfo device, bool isInputDevice) const { const ReferenceCountedArray& midiDevices = isInputDevice ? midiInputs : midiOutputs; - for (auto midiDevice : midiDevices) - if (midiDevice->name == name) - return midiDevice; + for (auto& d : midiDevices) + if (d->deviceInfo == device) + return d; return nullptr; } - void closeUnpluggedDevices (StringArray& currentlyPluggedInDevices, bool isInputDevice) + void closeUnpluggedDevices (const Array& currentlyPluggedInDevices, bool isInputDevice) { ReferenceCountedArray& midiDevices = isInputDevice ? midiInputs : midiOutputs; @@ -404,7 +404,7 @@ private: { auto& d = *midiDevices[i]; - if (! currentlyPluggedInDevices.contains (d.name)) + if (! currentlyPluggedInDevices.contains (d.deviceInfo)) { if (isInputDevice ? d.inDevice .get() != nullptr : d.outDevice.get() != nullptr) @@ -417,26 +417,26 @@ private: void updateDeviceList (bool isInputDeviceList) { - auto newDeviceNames = isInputDeviceList ? MidiInput::getDevices() - : MidiOutput::getDevices(); + auto availableDevices = isInputDeviceList ? MidiInput::getAvailableDevices() + : MidiOutput::getAvailableDevices(); - if (hasDeviceListChanged (newDeviceNames, isInputDeviceList)) + if (hasDeviceListChanged (availableDevices, isInputDeviceList)) { ReferenceCountedArray& midiDevices = isInputDeviceList ? midiInputs : midiOutputs; - closeUnpluggedDevices (newDeviceNames, isInputDeviceList); + closeUnpluggedDevices (availableDevices, isInputDeviceList); ReferenceCountedArray newDeviceList; // add all currently plugged-in devices to the device list - for (auto newDeviceName : newDeviceNames) + for (auto& newDevice : availableDevices) { - MidiDeviceListEntry::Ptr entry = findDeviceWithName (newDeviceName, isInputDeviceList); + MidiDeviceListEntry::Ptr entry = findDevice (newDevice, isInputDeviceList); if (entry == nullptr) - entry = new MidiDeviceListEntry (newDeviceName); + entry = new MidiDeviceListEntry (newDevice); newDeviceList.add (entry); } diff --git a/examples/Audio/PluckedStringsDemo.h b/examples/Audio/PluckedStringsDemo.h index 86b0b17b..00349109 100644 --- a/examples/Audio/PluckedStringsDemo.h +++ b/examples/Audio/PluckedStringsDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -268,7 +268,7 @@ public: setAudioChannels (numInputChannels, numOutputChannels); } - ~PluckedStringsDemo() + ~PluckedStringsDemo() override { shutdownAudio(); } diff --git a/examples/Audio/SimpleFFTDemo.h b/examples/Audio/SimpleFFTDemo.h index 75a164c7..81609017 100644 --- a/examples/Audio/SimpleFFTDemo.h +++ b/examples/Audio/SimpleFFTDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_dsp, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -78,7 +78,7 @@ public: setSize (700, 500); } - ~SimpleFFTDemo() + ~SimpleFFTDemo() override { shutdownAudio(); } @@ -163,7 +163,7 @@ public: for (auto y = 1; y < imageHeight; ++y) { auto skewedProportionY = 1.0f - std::exp (std::log (y / (float) imageHeight) * 0.2f); - auto fftDataIndex = jlimit (0, fftSize / 2, (int) (skewedProportionY * fftSize / 2)); + auto fftDataIndex = jlimit (0, fftSize / 2, (int) (skewedProportionY * (int) fftSize / 2)); auto level = jmap (fftData[fftDataIndex], 0.0f, jmax (maxLevel.getEnd(), 1e-5f), 0.0f, 1.0f); spectrogramImage.setPixelAt (rightHandEdge, y, Colour::fromHSV (level, 1.0f, level, 1.0f)); diff --git a/examples/BLOCKS/BlocksDrawingDemo.h b/examples/BLOCKS/BlocksDrawingDemo.h index b9d5d119..ed454ebf 100644 --- a/examples/BLOCKS/BlocksDrawingDemo.h +++ b/examples/BLOCKS/BlocksDrawingDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_blocks_basics, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -317,7 +317,7 @@ public: topologyChanged(); } - ~BlocksDrawingDemo() + ~BlocksDrawingDemo() override { if (activeBlock != nullptr) detachActiveBlock(); diff --git a/examples/BLOCKS/BlocksMonitorDemo.h b/examples/BLOCKS/BlocksMonitorDemo.h index 2a8b37d7..3656cccc 100644 --- a/examples/BLOCKS/BlocksMonitorDemo.h +++ b/examples/BLOCKS/BlocksMonitorDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_blocks_basics, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -85,7 +85,7 @@ public: constrainer.setMinimumOnscreenAmounts (50, 50, 50, 50); } - ~BlockComponent() + ~BlockComponent() override { // Remove any listeners if (auto touchSurface = block->getTouchSurface()) @@ -150,7 +150,7 @@ public: { CB::down } }; - for (auto i = 0; i < numElementsInArray (map); ++i) + for (int i = 0; i < numElementsInArray (map); ++i) if (map[i].contains (f)) return i; @@ -609,7 +609,7 @@ public: topologyChanged(); } - ~BlocksMonitorDemo() + ~BlocksMonitorDemo() override { topologySource.removeListener (this); } diff --git a/examples/BLOCKS/BlocksSynthDemo.h b/examples/BLOCKS/BlocksSynthDemo.h index 0b91b4df..aa34dc12 100644 --- a/examples/BLOCKS/BlocksSynthDemo.h +++ b/examples/BLOCKS/BlocksSynthDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_blocks_basics, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -65,8 +65,8 @@ public: void startNote (int midiNoteNumber, float velocity, SynthesiserSound*, int) override { frequency = MidiMessage::getMidiNoteInHertz (midiNoteNumber); - phaseIncrement.setValue (((MathConstants::twoPi) * frequency) / sampleRate); - amplitude.setValue (velocity); + phaseIncrement.setTargetValue (((MathConstants::twoPi) * frequency) / sampleRate); + amplitude.setTargetValue (velocity); // Store the initial note and work out the maximum frequency deviations for pitch bend initialNote = midiNoteNumber; @@ -77,14 +77,14 @@ public: void stopNote (float, bool) override { clearCurrentNote(); - amplitude.setValue (0.0); + amplitude.setTargetValue (0.0); } void pitchWheelMoved (int newValue) override { // Change the phase increment based on pitch bend amount auto frequencyOffset = ((newValue > 0 ? maxFreq : minFreq) * (newValue / 127.0)); - phaseIncrement.setValue (((MathConstants::twoPi) * (frequency + frequencyOffset)) / sampleRate); + phaseIncrement.setTargetValue (((MathConstants::twoPi) * (frequency + frequencyOffset)) / sampleRate); } void controllerMoved (int, int) override {} @@ -92,7 +92,7 @@ public: void channelPressureChanged (int newChannelPressureValue) override { // Set the amplitude based on pressure value - amplitude.setValue (newChannelPressureValue / 127.0); + amplitude.setTargetValue (newChannelPressureValue / 127.0); } void renderNextBlock (AudioBuffer& outputBuffer, int startSample, int numSamples) override @@ -108,6 +108,8 @@ public: } } + using SynthesiserVoice::renderNextBlock; + /** Returns the next sample */ double getSample() { @@ -128,7 +130,7 @@ public: virtual double renderWaveShape (const double currentPhase) = 0; private: - LinearSmoothedValue amplitude, phaseIncrement; + SmoothedValue amplitude, phaseIncrement; double frequency = 0.0; double phasePos = 0.0; @@ -300,7 +302,7 @@ public: synthesiser.addSound (new TriangleSound()); } - ~Audio() + ~Audio() override { audioDeviceManager.removeAudioCallback (this); } @@ -611,7 +613,7 @@ public: topologyChanged(); } - ~BlocksSynthDemo() + ~BlocksSynthDemo() override { if (activeBlock != nullptr) detachActiveBlock(); diff --git a/examples/DSP/ConvolutionDemo.h b/examples/DSP/ConvolutionDemo.h index 2f99f3e0..c27773b1 100644 --- a/examples/DSP/ConvolutionDemo.h +++ b/examples/DSP/ConvolutionDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_dsp, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make + exporters: xcode_mac, vs2019, linux_make moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/DSP/FIRFilterDemo.h b/examples/DSP/FIRFilterDemo.h index 3964271f..3350454b 100644 --- a/examples/DSP/FIRFilterDemo.h +++ b/examples/DSP/FIRFilterDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_dsp, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make + exporters: xcode_mac, vs2019, linux_make moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/DSP/GainDemo.h b/examples/DSP/GainDemo.h index cd4566f4..a888800c 100644 --- a/examples/DSP/GainDemo.h +++ b/examples/DSP/GainDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_dsp, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make + exporters: xcode_mac, vs2019, linux_make moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/DSP/IIRFilterDemo.h b/examples/DSP/IIRFilterDemo.h index 2bad711f..73bc3230 100644 --- a/examples/DSP/IIRFilterDemo.h +++ b/examples/DSP/IIRFilterDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_dsp, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make + exporters: xcode_mac, vs2019, linux_make moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/DSP/OscillatorDemo.h b/examples/DSP/OscillatorDemo.h index 1199242b..6eadf8b4 100644 --- a/examples/DSP/OscillatorDemo.h +++ b/examples/DSP/OscillatorDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_dsp, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make + exporters: xcode_mac, vs2019, linux_make moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/DSP/OverdriveDemo.h b/examples/DSP/OverdriveDemo.h index ba4f19e6..0c9b3d0e 100644 --- a/examples/DSP/OverdriveDemo.h +++ b/examples/DSP/OverdriveDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_dsp, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make + exporters: xcode_mac, vs2019, linux_make moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/DSP/SIMDRegisterDemo.h b/examples/DSP/SIMDRegisterDemo.h index 4b37b5b0..82f6c963 100644 --- a/examples/DSP/SIMDRegisterDemo.h +++ b/examples/DSP/SIMDRegisterDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_dsp, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make + exporters: xcode_mac, vs2019, linux_make moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/DSP/StateVariableFilterDemo.h b/examples/DSP/StateVariableFilterDemo.h index 416a6748..599c8bbb 100644 --- a/examples/DSP/StateVariableFilterDemo.h +++ b/examples/DSP/StateVariableFilterDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_dsp, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make + exporters: xcode_mac, vs2019, linux_make moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/DSP/WaveShaperTanhDemo.h b/examples/DSP/WaveShaperTanhDemo.h index 46a62a21..8c866270 100644 --- a/examples/DSP/WaveShaperTanhDemo.h +++ b/examples/DSP/WaveShaperTanhDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_dsp, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make + exporters: xcode_mac, vs2019, linux_make moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/DemoRunner/Builds/Android/app/CMakeLists.txt b/examples/DemoRunner/Builds/Android/app/CMakeLists.txt index 57863a22..caa7c4a0 100644 --- a/examples/DemoRunner/Builds/Android/app/CMakeLists.txt +++ b/examples/DemoRunner/Builds/Android/app/CMakeLists.txt @@ -8,7 +8,7 @@ SET(BINARY_NAME "juce_jni") add_library("cpufeatures" STATIC "${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c") set_source_files_properties("${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c" PROPERTIES COMPILE_FLAGS "-Wno-sign-conversion -Wno-gnu-statement-expression") -add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=23" "-DJUCE_PUSH_NOTIFICATIONS=1" "-DJUCE_ANDROID_GL_ES_VERSION_3_0=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=5.4.2" "-DJUCE_APP_VERSION_HEX=0x50402") +add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=23" "-DJUCE_PUSH_NOTIFICATIONS=1" "-DJUCE_PUSH_NOTIFICATIONS_ACTIVITY=\"com/roli/juce/JuceActivity\"" "-DJUCE_ANDROID_GL_ES_VERSION_3_0=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=5.4.4" "-DJUCE_APP_VERSION_HEX=0x50404") include_directories( AFTER "../../../JuceLibraryCode" @@ -120,8 +120,9 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_basics/utilities/juce_IIRFilter.h" "../../../../../modules/juce_audio_basics/utilities/juce_LagrangeInterpolator.cpp" "../../../../../modules/juce_audio_basics/utilities/juce_LagrangeInterpolator.h" - "../../../../../modules/juce_audio_basics/utilities/juce_LinearSmoothedValue.h" "../../../../../modules/juce_audio_basics/utilities/juce_Reverb.h" + "../../../../../modules/juce_audio_basics/utilities/juce_SmoothedValue.cpp" + "../../../../../modules/juce_audio_basics/utilities/juce_SmoothedValue.h" "../../../../../modules/juce_audio_basics/juce_audio_basics.cpp" "../../../../../modules/juce_audio_basics/juce_audio_basics.mm" "../../../../../modules/juce_audio_basics/juce_audio_basics.h" @@ -132,11 +133,10 @@ 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/juce_MidiInput.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" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.h" - "../../../../../modules/juce_audio_devices/midi_io/juce_MidiOutput.cpp" - "../../../../../modules/juce_audio_devices/midi_io/juce_MidiOutput.h" "../../../../../modules/juce_audio_devices/native/juce_android_Audio.cpp" "../../../../../modules/juce_audio_devices/native/juce_android_Midi.cpp" "../../../../../modules/juce_audio_devices/native/juce_android_Oboe.cpp" @@ -339,6 +339,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/thread/include/flock.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/thread/source/flock.cpp" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/LICENSE.txt" + "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/README.md" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/conststringtable.cpp" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/conststringtable.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/coreiids.cpp" @@ -384,11 +385,13 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstprefetchablesupport.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstprocesscontext.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstrepresentation.h" + "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivsttestplugprovider.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstunits.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vstpshpack4.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vstspeaker.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vsttypes.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/LICENSE.txt" + "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/README.md" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/memorystream.cpp" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/memorystream.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/pluginview.cpp" @@ -411,6 +414,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstpresetfile.cpp" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstpresetfile.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/LICENSE.txt" + "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/README.md" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/LICENSE.txt" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/README.md" "../../../../../modules/juce_audio_processors/format_types/juce_AU_Shared.h" @@ -449,14 +453,19 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.h" "../../../../../modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp" "../../../../../modules/juce_audio_processors/scanning/juce_PluginListComponent.h" + "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp" "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterBool.h" + "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp" "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h" + "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterFloat.cpp" "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h" + "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp" "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterInt.h" - "../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorParameters.cpp" + "../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.cpp" "../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h" "../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp" "../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h" + "../../../../../modules/juce_audio_processors/utilities/juce_RangedAudioParameter.cpp" "../../../../../modules/juce_audio_processors/utilities/juce_RangedAudioParameter.h" "../../../../../modules/juce_audio_processors/juce_audio_processors.cpp" "../../../../../modules/juce_audio_processors/juce_audio_processors.mm" @@ -525,6 +534,8 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_blocks_basics/topology/internal/juce_DeviceInfo.cpp" "../../../../../modules/juce_blocks_basics/topology/internal/juce_MidiDeviceConnection.cpp" "../../../../../modules/juce_blocks_basics/topology/internal/juce_MIDIDeviceDetector.cpp" + "../../../../../modules/juce_blocks_basics/topology/juce_BlockGraph.cpp" + "../../../../../modules/juce_blocks_basics/topology/juce_BlockGraph.h" "../../../../../modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp" "../../../../../modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h" "../../../../../modules/juce_blocks_basics/topology/juce_RuleBasedTopologySource.cpp" @@ -843,6 +854,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_core/time/juce_Time.h" "../../../../../modules/juce_core/unit_tests/juce_UnitTest.cpp" "../../../../../modules/juce_core/unit_tests/juce_UnitTest.h" + "../../../../../modules/juce_core/unit_tests/juce_UnitTestCategories.h" "../../../../../modules/juce_core/xml/juce_XmlDocument.cpp" "../../../../../modules/juce_core/xml/juce_XmlDocument.h" "../../../../../modules/juce_core/xml/juce_XmlElement.cpp" @@ -927,6 +939,8 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_dsp/frequency/juce_Windowing.cpp" "../../../../../modules/juce_dsp/frequency/juce_Windowing.h" "../../../../../modules/juce_dsp/maths/juce_FastMathApproximations.h" + "../../../../../modules/juce_dsp/maths/juce_LogRampedValue.h" + "../../../../../modules/juce_dsp/maths/juce_LogRampedValue_test.cpp" "../../../../../modules/juce_dsp/maths/juce_LookupTable.cpp" "../../../../../modules/juce_dsp/maths/juce_LookupTable.h" "../../../../../modules/juce_dsp/maths/juce_Matrix.cpp" @@ -1125,6 +1139,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_graphics/image_formats/pnglib/png.c" "../../../../../modules/juce_graphics/image_formats/pnglib/png.h" "../../../../../modules/juce_graphics/image_formats/pnglib/pngconf.h" + "../../../../../modules/juce_graphics/image_formats/pnglib/pngdebug.h" "../../../../../modules/juce_graphics/image_formats/pnglib/pngerror.c" "../../../../../modules/juce_graphics/image_formats/pnglib/pngget.c" "../../../../../modules/juce_graphics/image_formats/pnglib/pnginfo.h" @@ -1288,7 +1303,6 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_gui_basics/layout/juce_Grid.h" "../../../../../modules/juce_gui_basics/layout/juce_GridItem.cpp" "../../../../../modules/juce_gui_basics/layout/juce_GridItem.h" - "../../../../../modules/juce_gui_basics/layout/juce_GridUnitTests.cpp" "../../../../../modules/juce_gui_basics/layout/juce_GroupComponent.cpp" "../../../../../modules/juce_gui_basics/layout/juce_GroupComponent.h" "../../../../../modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp" @@ -1709,8 +1723,9 @@ set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/ set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/juce_IIRFilter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/juce_LagrangeInterpolator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/juce_LagrangeInterpolator.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/juce_LinearSmoothedValue.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/juce_Reverb.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/juce_SmoothedValue.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/juce_SmoothedValue.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/juce_audio_basics.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/juce_audio_basics.mm" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/juce_audio_basics.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1721,11 +1736,10 @@ 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/juce_MidiInput.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) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiOutput.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiOutput.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Audio.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Midi.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Oboe.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1928,6 +1942,7 @@ set_source_files_properties("../../../../../modules/juce_audio_processors/format set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/thread/include/flock.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/thread/source/flock.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/LICENSE.txt" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/README.md" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/conststringtable.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/conststringtable.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/coreiids.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1973,11 +1988,13 @@ set_source_files_properties("../../../../../modules/juce_audio_processors/format set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstprefetchablesupport.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstprocesscontext.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstrepresentation.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivsttestplugprovider.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstunits.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vstpshpack4.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vstspeaker.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vsttypes.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/LICENSE.txt" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/README.md" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/memorystream.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/memorystream.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/pluginview.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -2000,6 +2017,7 @@ set_source_files_properties("../../../../../modules/juce_audio_processors/format set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstpresetfile.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstpresetfile.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/LICENSE.txt" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/README.md" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/LICENSE.txt" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/README.md" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/juce_AU_Shared.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -2038,14 +2056,19 @@ set_source_files_properties("../../../../../modules/juce_audio_processors/scanni set_source_files_properties("../../../../../modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/scanning/juce_PluginListComponent.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterBool.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterFloat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterInt.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorParameters.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_RangedAudioParameter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_RangedAudioParameter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/juce_audio_processors.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/juce_audio_processors.mm" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -2114,6 +2137,8 @@ set_source_files_properties("../../../../../modules/juce_blocks_basics/topology/ set_source_files_properties("../../../../../modules/juce_blocks_basics/topology/internal/juce_DeviceInfo.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_blocks_basics/topology/internal/juce_MidiDeviceConnection.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_blocks_basics/topology/internal/juce_MIDIDeviceDetector.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_blocks_basics/topology/juce_BlockGraph.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_blocks_basics/topology/juce_BlockGraph.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_blocks_basics/topology/juce_RuleBasedTopologySource.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -2432,6 +2457,7 @@ set_source_files_properties("../../../../../modules/juce_core/time/juce_Time.cpp set_source_files_properties("../../../../../modules/juce_core/time/juce_Time.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/unit_tests/juce_UnitTest.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/unit_tests/juce_UnitTest.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_core/unit_tests/juce_UnitTestCategories.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/xml/juce_XmlDocument.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/xml/juce_XmlDocument.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/xml/juce_XmlElement.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -2516,6 +2542,8 @@ set_source_files_properties("../../../../../modules/juce_dsp/frequency/juce_FFT_ set_source_files_properties("../../../../../modules/juce_dsp/frequency/juce_Windowing.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_dsp/frequency/juce_Windowing.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_dsp/maths/juce_FastMathApproximations.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_dsp/maths/juce_LogRampedValue.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_dsp/maths/juce_LogRampedValue_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_dsp/maths/juce_LookupTable.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_dsp/maths/juce_LookupTable.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_dsp/maths/juce_Matrix.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -2714,6 +2742,7 @@ set_source_files_properties("../../../../../modules/juce_graphics/image_formats/ set_source_files_properties("../../../../../modules/juce_graphics/image_formats/pnglib/png.c" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/image_formats/pnglib/png.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/image_formats/pnglib/pngconf.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_graphics/image_formats/pnglib/pngdebug.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/image_formats/pnglib/pngerror.c" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/image_formats/pnglib/pngget.c" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/image_formats/pnglib/pnginfo.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -2877,7 +2906,6 @@ set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_ set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_Grid.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_GridItem.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_GridItem.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_GridUnitTests.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_GroupComponent.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_GroupComponent.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_MultiDocumentPanel.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 749b29c4..0081e10b 100644 --- a/examples/DemoRunner/Builds/Android/app/build.gradle +++ b/examples/DemoRunner/Builds/Android/app/build.gradle @@ -24,8 +24,8 @@ android { externalNativeBuild { cmake { arguments "-DANDROID_TOOLCHAIN=clang", "-DANDROID_PLATFORM=android-23", "-DANDROID_STL=c++_static", "-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_ARM_MODE=arm", "-DANDROID_ARM_NEON=TRUE" - cFlags "-fsigned-char", "-Wall", "-Wno-missing-field-initializers", "-Wshadow-all", "-Wstrict-aliasing", "-Wuninitialized", "-Wunused-parameter", "-Wsign-compare", "-Wint-conversion", "-Wconditional-uninitialized", "-Woverloaded-virtual", "-Wreorder", "-Wconstant-conversion", "-Wunused-private-field", "-Wbool-conversion", "-Wextra-semi", "-Wno-ignored-qualifiers", "-Wunreachable-code" - cppFlags "-fsigned-char", "-std=c++14", "-Wall", "-Wno-missing-field-initializers", "-Wshadow-all", "-Wstrict-aliasing", "-Wuninitialized", "-Wunused-parameter", "-Wsign-compare", "-Wint-conversion", "-Wconditional-uninitialized", "-Woverloaded-virtual", "-Wreorder", "-Wconstant-conversion", "-Wunused-private-field", "-Wbool-conversion", "-Wextra-semi", "-Wno-ignored-qualifiers", "-Wunreachable-code" + cFlags "-fsigned-char" + cppFlags "-fsigned-char", "-std=c++14" } } } @@ -53,7 +53,7 @@ android { } externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGURATION=DEBUG", "-DCMAKE_CXX_FLAGS_DEBUG=-O0", "-DCMAKE_C_FLAGS_DEBUG=-O0" + arguments "-DJUCE_BUILD_CONFIGURATION=DEBUG", "-DCMAKE_CXX_FLAGS_DEBUG=-O0 -Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers", "-DCMAKE_C_FLAGS_DEBUG=-O0" } } @@ -62,7 +62,7 @@ android { release_ { externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGURATION=RELEASE", "-DCMAKE_CXX_FLAGS_RELEASE=-O3", "-DCMAKE_C_FLAGS_RELEASE=-O3" + arguments "-DJUCE_BUILD_CONFIGURATION=RELEASE", "-DCMAKE_CXX_FLAGS_RELEASE=-O3 -Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers", "-DCMAKE_C_FLAGS_RELEASE=-O3" } } @@ -86,7 +86,8 @@ android { main.java.srcDirs += ["../../../../../modules/juce_core/native/javacore/init", "../../../../../modules/juce_core/native/javacore/app", - "../../../../../modules/juce_gui_basics/native/javacore/app"] + "../../../../../modules/juce_gui_basics/native/javacore/app", + "../../../../../modules/juce_gui_basics/native/javaopt/app"] main.res.srcDirs += [] @@ -99,5 +100,6 @@ android { } + } diff --git a/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml b/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml index 5c7dfdbd..5ea204f5 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml +++ b/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ - @@ -13,7 +13,7 @@ - diff --git a/examples/DemoRunner/Builds/Android/app/src/main/assets/AudioLiveScrollingDisplay.h b/examples/DemoRunner/Builds/Android/app/src/main/assets/AudioLiveScrollingDisplay.h index 0b9a1f12..c68f062e 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/assets/AudioLiveScrollingDisplay.h +++ b/examples/DemoRunner/Builds/Android/app/src/main/assets/AudioLiveScrollingDisplay.h @@ -65,7 +65,7 @@ public: // We need to clear the output buffers before returning, in case they're full of junk.. for (int j = 0; j < numOutputChannels; ++j) if (float* outputChannel = outputChannelData[j]) - zeromem (outputChannel, sizeof (float) * (size_t) numberOfSamples); + zeromem (outputChannel, (size_t) numberOfSamples * sizeof (float)); } JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveScrollingAudioDisplay) 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 dc9dfcb5..33a54ea6 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 @@ -104,7 +104,7 @@ public: thumbnail.addChangeListener (this); } - ~AudioThumbnailComponent() + ~AudioThumbnailComponent() override { thumbnail.removeChangeListener (this); } @@ -367,7 +367,7 @@ public: setSize (800, 250); } - ~AudioFileReaderComponent() + ~AudioFileReaderComponent() override { signalThreadShouldExit(); stop(); @@ -551,7 +551,7 @@ private: loopButton.getToggleStateValue().referTo (audioFileReader.loopState); } - ~AudioPlayerHeader() + ~AudioPlayerHeader() override { audioFileReader.playState.removeListener (this); } diff --git a/examples/DemoRunner/Builds/Android/app/src/main/assets/WavefrontObjParser.h b/examples/DemoRunner/Builds/Android/app/src/main/assets/WavefrontObjParser.h index 696214ce..e97d8968 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/assets/WavefrontObjParser.h +++ b/examples/DemoRunner/Builds/Android/app/src/main/assets/WavefrontObjParser.h @@ -243,7 +243,7 @@ private: }; static Shape* parseFaceGroup (const Mesh& srcMesh, - const Array& faceGroup, + Array& faceGroup, const Material& material, const String& name) { diff --git a/examples/DemoRunner/Builds/Android/app/src/main/assets/google-services.json b/examples/DemoRunner/Builds/Android/app/src/main/assets/google-services.json index 9d83a3dc..b4e36531 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/assets/google-services.json +++ b/examples/DemoRunner/Builds/Android/app/src/main/assets/google-services.json @@ -1,39 +1,37 @@ { "project_info": { - "project_number": "3137221487", - "firebase_url": "https://pushnotificationsdemo-1c714.firebaseio.com", - "project_id": "pushnotificationsdemo-1c714", - "storage_bucket": "pushnotificationsdemo-1c714.appspot.com" + "project_number": "50526851168", + "firebase_url": "https://pushnotificationsdemorunner.firebaseio.com", + "project_id": "pushnotificationsdemorunner", + "storage_bucket": "pushnotificationsdemorunner.appspot.com" }, "client": [ { "client_info": { - "mobilesdk_app_id": "1:3137221487:android:8fdcd861a33b035c", + "mobilesdk_app_id": "1:50526851168:android:6fa3f0d4b79f1940", "android_client_info": { - "package_name": "com.juce.pushnotificationsdemo" + "package_name": "com.juce.demorunner" } }, "oauth_client": [ { - "client_id": "3137221487-uftk61ukltbi07dmejslgt0d6qnml0oo.apps.googleusercontent.com", + "client_id": "50526851168-vgn4rv0vimpc8kdm7ecmb3g95t1et0t5.apps.googleusercontent.com", "client_type": 3 } ], "api_key": [ { - "current_key": "AIzaSyDPpqphjiEEYI3sJGptrebN5Z52GkOG4Wo" + "current_key": "AIzaSyAMwLOFACFo7_SHm9iiVhoa0zCjFyMsgFc" } ], "services": { - "analytics_service": { - "status": 1 - }, "appinvite_service": { - "status": 1, - "other_platform_oauth_client": [] - }, - "ads_service": { - "status": 2 + "other_platform_oauth_client": [ + { + "client_id": "50526851168-vgn4rv0vimpc8kdm7ecmb3g95t1et0t5.apps.googleusercontent.com", + "client_type": 3 + } + ] } } } diff --git a/examples/DemoRunner/Builds/Android/app/src/main/assets/juce_icon_template.png b/examples/DemoRunner/Builds/Android/app/src/main/assets/juce_icon_template.png new file mode 100644 index 0000000000000000000000000000000000000000..e2964f1c3435da578d24b3940167d51b05d8914f GIT binary patch literal 18827 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 literal 0 HcmV?d00001 diff --git a/examples/DemoRunner/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java b/examples/DemoRunner/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java deleted file mode 100644 index 0bb31cb5..00000000 --- a/examples/DemoRunner/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java +++ /dev/null @@ -1,971 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. - - JUCE is an open source library subject to commercial or open-source - licensing. - - The code included in this file is provided under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license. Permission - To use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted provided that the above copyright notice and - this permission notice appear in all copies. - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -package com.android.vending.billing; -/** - * InAppBillingService is the service that provides in-app billing version 3 and beyond. - * This service provides the following features: - * 1. Provides a new API to get details of in-app items published for the app including - * price, type, title and description. - * 2. The purchase flow is synchronous and purchase information is available immediately - * after it completes. - * 3. Purchase information of in-app purchases is maintained within the Google Play system - * till the purchase is consumed. - * 4. An API to consume a purchase of an inapp item. All purchases of one-time - * in-app items are consumable and thereafter can be purchased again. - * 5. An API to get current purchases of the user immediately. This will not contain any - * consumed purchases. - * - * All calls will give a response code with the following possible values - * RESULT_OK = 0 - success - * RESULT_USER_CANCELED = 1 - User pressed back or canceled a dialog - * RESULT_SERVICE_UNAVAILABLE = 2 - The network connection is down - * RESULT_BILLING_UNAVAILABLE = 3 - This billing API version is not supported for the type requested - * RESULT_ITEM_UNAVAILABLE = 4 - Requested SKU is not available for purchase - * RESULT_DEVELOPER_ERROR = 5 - Invalid arguments provided to the API - * RESULT_ERROR = 6 - Fatal error during the API action - * RESULT_ITEM_ALREADY_OWNED = 7 - Failure to purchase since item is already owned - * RESULT_ITEM_NOT_OWNED = 8 - Failure to consume since item is not owned - */ -public interface IInAppBillingService extends android.os.IInterface - { - /** Local-side IPC implementation stub class. */ - public static abstract class Stub extends android.os.Binder implements com.android.vending.billing.IInAppBillingService - { - private static final java.lang.String DESCRIPTOR = "com.android.vending.billing.IInAppBillingService"; - /** Construct the stub at attach it to the interface. */ - public Stub() - { - this.attachInterface(this, DESCRIPTOR); - } - /** - * Cast an IBinder object into an com.android.vending.billing.IInAppBillingService interface, - * generating a proxy if needed. - */ - public static com.android.vending.billing.IInAppBillingService asInterface(android.os.IBinder obj) - { - if ((obj==null)) { - return null; - } - android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR); - if (((iin!=null)&&(iin instanceof com.android.vending.billing.IInAppBillingService))) { - return ((com.android.vending.billing.IInAppBillingService)iin); - } - return new com.android.vending.billing.IInAppBillingService.Stub.Proxy(obj); - } - @Override public android.os.IBinder asBinder() - { - return this; - } - @Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException - { - switch (code) - { - case INTERFACE_TRANSACTION: - { - reply.writeString(DESCRIPTOR); - return true; - } - case TRANSACTION_isBillingSupported: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - int _result = this.isBillingSupported(_arg0, _arg1, _arg2); - reply.writeNoException(); - reply.writeInt(_result); - return true; - } - case TRANSACTION_getSkuDetails: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - android.os.Bundle _arg3; - if ((0!=data.readInt())) { - _arg3 = android.os.Bundle.CREATOR.createFromParcel(data); - } - else { - _arg3 = null; - } - android.os.Bundle _result = this.getSkuDetails(_arg0, _arg1, _arg2, _arg3); - reply.writeNoException(); - if ((_result!=null)) { - reply.writeInt(1); - _result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); - } - else { - reply.writeInt(0); - } - return true; - } - case TRANSACTION_getBuyIntent: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - java.lang.String _arg3; - _arg3 = data.readString(); - java.lang.String _arg4; - _arg4 = data.readString(); - android.os.Bundle _result = this.getBuyIntent(_arg0, _arg1, _arg2, _arg3, _arg4); - reply.writeNoException(); - if ((_result!=null)) { - reply.writeInt(1); - _result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); - } - else { - reply.writeInt(0); - } - return true; - } - case TRANSACTION_getPurchases: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - java.lang.String _arg3; - _arg3 = data.readString(); - android.os.Bundle _result = this.getPurchases(_arg0, _arg1, _arg2, _arg3); - reply.writeNoException(); - if ((_result!=null)) { - reply.writeInt(1); - _result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); - } - else { - reply.writeInt(0); - } - return true; - } - case TRANSACTION_consumePurchase: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - int _result = this.consumePurchase(_arg0, _arg1, _arg2); - reply.writeNoException(); - reply.writeInt(_result); - return true; - } - case TRANSACTION_stub: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - int _result = this.stub(_arg0, _arg1, _arg2); - reply.writeNoException(); - reply.writeInt(_result); - return true; - } - case TRANSACTION_getBuyIntentToReplaceSkus: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.util.List _arg2; - _arg2 = data.createStringArrayList(); - java.lang.String _arg3; - _arg3 = data.readString(); - java.lang.String _arg4; - _arg4 = data.readString(); - java.lang.String _arg5; - _arg5 = data.readString(); - android.os.Bundle _result = this.getBuyIntentToReplaceSkus(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); - reply.writeNoException(); - if ((_result!=null)) { - reply.writeInt(1); - _result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); - } - else { - reply.writeInt(0); - } - return true; - } - case TRANSACTION_getBuyIntentExtraParams: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - java.lang.String _arg3; - _arg3 = data.readString(); - java.lang.String _arg4; - _arg4 = data.readString(); - android.os.Bundle _arg5; - if ((0!=data.readInt())) { - _arg5 = android.os.Bundle.CREATOR.createFromParcel(data); - } - else { - _arg5 = null; - } - android.os.Bundle _result = this.getBuyIntentExtraParams(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); - reply.writeNoException(); - if ((_result!=null)) { - reply.writeInt(1); - _result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); - } - else { - reply.writeInt(0); - } - return true; - } - case TRANSACTION_getPurchaseHistory: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - java.lang.String _arg3; - _arg3 = data.readString(); - android.os.Bundle _arg4; - if ((0!=data.readInt())) { - _arg4 = android.os.Bundle.CREATOR.createFromParcel(data); - } - else { - _arg4 = null; - } - android.os.Bundle _result = this.getPurchaseHistory(_arg0, _arg1, _arg2, _arg3, _arg4); - reply.writeNoException(); - if ((_result!=null)) { - reply.writeInt(1); - _result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); - } - else { - reply.writeInt(0); - } - return true; - } - case TRANSACTION_isBillingSupportedExtraParams: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - android.os.Bundle _arg3; - if ((0!=data.readInt())) { - _arg3 = android.os.Bundle.CREATOR.createFromParcel(data); - } - else { - _arg3 = null; - } - int _result = this.isBillingSupportedExtraParams(_arg0, _arg1, _arg2, _arg3); - reply.writeNoException(); - reply.writeInt(_result); - return true; - } - } - return super.onTransact(code, data, reply, flags); - } - private static class Proxy implements com.android.vending.billing.IInAppBillingService - { - private android.os.IBinder mRemote; - Proxy(android.os.IBinder remote) - { - mRemote = remote; - } - @Override public android.os.IBinder asBinder() - { - return mRemote; - } - public java.lang.String getInterfaceDescriptor() - { - return DESCRIPTOR; - } - @Override public int isBillingSupported(int apiVersion, java.lang.String packageName, java.lang.String type) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - int _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(type); - mRemote.transact(Stub.TRANSACTION_isBillingSupported, _data, _reply, 0); - _reply.readException(); - _result = _reply.readInt(); - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - /** - * Provides details of a list of SKUs - * Given a list of SKUs of a valid type in the skusBundle, this returns a bundle - * with a list JSON strings containing the productId, price, title and description. - * This API can be called with a maximum of 20 SKUs. - * @param apiVersion billing API version that the app is using - * @param packageName the package name of the calling app - * @param type of the in-app items ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param skusBundle bundle containing a StringArrayList of SKUs with key "ITEM_ID_LIST" - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - * on failures. - * "DETAILS_LIST" with a StringArrayList containing purchase information - * in JSON format similar to: - * '{ "productId" : "exampleSku", - * "type" : "inapp", - * "price" : "$5.00", - * "price_currency": "USD", - * "price_amount_micros": 5000000, - * "title : "Example Title", - * "description" : "This is an example description" }' - */ - @Override public android.os.Bundle getSkuDetails(int apiVersion, java.lang.String packageName, java.lang.String type, android.os.Bundle skusBundle) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - android.os.Bundle _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(type); - if ((skusBundle!=null)) { - _data.writeInt(1); - skusBundle.writeToParcel(_data, 0); - } - else { - _data.writeInt(0); - } - mRemote.transact(Stub.TRANSACTION_getSkuDetails, _data, _reply, 0); - _reply.readException(); - if ((0!=_reply.readInt())) { - _result = android.os.Bundle.CREATOR.createFromParcel(_reply); - } - else { - _result = null; - } - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - /** - * Returns a pending intent to launch the purchase flow for an in-app item by providing a SKU, - * the type, a unique purchase token and an optional developer payload. - * @param apiVersion billing API version that the app is using - * @param packageName package name of the calling app - * @param sku the SKU of the in-app item as published in the developer console - * @param type of the in-app item being purchased ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param developerPayload optional argument to be sent back with the purchase information - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - * on failures. - * "BUY_INTENT" - PendingIntent to start the purchase flow - * - * The Pending intent should be launched with startIntentSenderForResult. When purchase flow - * has completed, the onActivityResult() will give a resultCode of OK or CANCELED. - * If the purchase is successful, the result data will contain the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response - * codes on failures. - * "INAPP_PURCHASE_DATA" - String in JSON format similar to - * '{"orderId":"12999763169054705758.1371079406387615", - * "packageName":"com.example.app", - * "productId":"exampleSku", - * "purchaseTime":1345678900000, - * "purchaseToken" : "122333444455555", - * "developerPayload":"example developer payload" }' - * "INAPP_DATA_SIGNATURE" - String containing the signature of the purchase data that - * was signed with the private key of the developer - */ - @Override public android.os.Bundle getBuyIntent(int apiVersion, java.lang.String packageName, java.lang.String sku, java.lang.String type, java.lang.String developerPayload) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - android.os.Bundle _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(sku); - _data.writeString(type); - _data.writeString(developerPayload); - mRemote.transact(Stub.TRANSACTION_getBuyIntent, _data, _reply, 0); - _reply.readException(); - if ((0!=_reply.readInt())) { - _result = android.os.Bundle.CREATOR.createFromParcel(_reply); - } - else { - _result = null; - } - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - /** - * Returns the current SKUs owned by the user of the type and package name specified along with - * purchase information and a signature of the data to be validated. - * This will return all SKUs that have been purchased in V3 and managed items purchased using - * V1 and V2 that have not been consumed. - * @param apiVersion billing API version that the app is using - * @param packageName package name of the calling app - * @param type of the in-app items being requested ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param continuationToken to be set as null for the first call, if the number of owned - * skus are too many, a continuationToken is returned in the response bundle. - * This method can be called again with the continuation token to get the next set of - * owned skus. - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - on failures. - * "INAPP_PURCHASE_ITEM_LIST" - StringArrayList containing the list of SKUs - * "INAPP_PURCHASE_DATA_LIST" - StringArrayList containing the purchase information - * "INAPP_DATA_SIGNATURE_LIST"- StringArrayList containing the signatures - * of the purchase information - * "INAPP_CONTINUATION_TOKEN" - String containing a continuation token for the - * next set of in-app purchases. Only set if the - * user has more owned skus than the current list. - */ - @Override public android.os.Bundle getPurchases(int apiVersion, java.lang.String packageName, java.lang.String type, java.lang.String continuationToken) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - android.os.Bundle _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(type); - _data.writeString(continuationToken); - mRemote.transact(Stub.TRANSACTION_getPurchases, _data, _reply, 0); - _reply.readException(); - if ((0!=_reply.readInt())) { - _result = android.os.Bundle.CREATOR.createFromParcel(_reply); - } - else { - _result = null; - } - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - @Override public int consumePurchase(int apiVersion, java.lang.String packageName, java.lang.String purchaseToken) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - int _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(purchaseToken); - mRemote.transact(Stub.TRANSACTION_consumePurchase, _data, _reply, 0); - _reply.readException(); - _result = _reply.readInt(); - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - @Override public int stub(int apiVersion, java.lang.String packageName, java.lang.String type) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - int _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(type); - mRemote.transact(Stub.TRANSACTION_stub, _data, _reply, 0); - _reply.readException(); - _result = _reply.readInt(); - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - /** - * Returns a pending intent to launch the purchase flow for upgrading or downgrading a - * subscription. The existing owned SKU(s) should be provided along with the new SKU that - * the user is upgrading or downgrading to. - * @param apiVersion billing API version that the app is using, must be 5 or later - * @param packageName package name of the calling app - * @param oldSkus the SKU(s) that the user is upgrading or downgrading from, - * if null or empty this method will behave like {@link #getBuyIntent} - * @param newSku the SKU that the user is upgrading or downgrading to - * @param type of the item being purchased, currently must be "subs" - * @param developerPayload optional argument to be sent back with the purchase information - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - * on failures. - * "BUY_INTENT" - PendingIntent to start the purchase flow - * - * The Pending intent should be launched with startIntentSenderForResult. When purchase flow - * has completed, the onActivityResult() will give a resultCode of OK or CANCELED. - * If the purchase is successful, the result data will contain the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response - * codes on failures. - * "INAPP_PURCHASE_DATA" - String in JSON format similar to - * '{"orderId":"12999763169054705758.1371079406387615", - * "packageName":"com.example.app", - * "productId":"exampleSku", - * "purchaseTime":1345678900000, - * "purchaseToken" : "122333444455555", - * "developerPayload":"example developer payload" }' - * "INAPP_DATA_SIGNATURE" - String containing the signature of the purchase data that - * was signed with the private key of the developer - */ - @Override public android.os.Bundle getBuyIntentToReplaceSkus(int apiVersion, java.lang.String packageName, java.util.List oldSkus, java.lang.String newSku, java.lang.String type, java.lang.String developerPayload) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - android.os.Bundle _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeStringList(oldSkus); - _data.writeString(newSku); - _data.writeString(type); - _data.writeString(developerPayload); - mRemote.transact(Stub.TRANSACTION_getBuyIntentToReplaceSkus, _data, _reply, 0); - _reply.readException(); - if ((0!=_reply.readInt())) { - _result = android.os.Bundle.CREATOR.createFromParcel(_reply); - } - else { - _result = null; - } - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - /** - * Returns a pending intent to launch the purchase flow for an in-app item. This method is - * a variant of the {@link #getBuyIntent} method and takes an additional {@code extraParams} - * parameter. This parameter is a Bundle of optional keys and values that affect the - * operation of the method. - * @param apiVersion billing API version that the app is using, must be 6 or later - * @param packageName package name of the calling app - * @param sku the SKU of the in-app item as published in the developer console - * @param type of the in-app item being purchased ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param developerPayload optional argument to be sent back with the purchase information - * @extraParams a Bundle with the following optional keys: - * "skusToReplace" - List - an optional list of SKUs that the user is - * upgrading or downgrading from. - * Pass this field if the purchase is upgrading or downgrading - * existing subscriptions. - * The specified SKUs are replaced with the SKUs that the user is - * purchasing. Google Play replaces the specified SKUs at the start of - * the next billing cycle. - * "replaceSkusProration" - Boolean - whether the user should be credited for any unused - * subscription time on the SKUs they are upgrading or downgrading. - * If you set this field to true, Google Play swaps out the old SKUs - * and credits the user with the unused value of their subscription - * time on a pro-rated basis. - * Google Play applies this credit to the new subscription, and does - * not begin billing the user for the new subscription until after - * the credit is used up. - * If you set this field to false, the user does not receive credit for - * any unused subscription time and the recurrence date does not - * change. - * Default value is true. Ignored if you do not pass skusToReplace. - * "accountId" - String - an optional obfuscated string that is uniquely - * associated with the user's account in your app. - * If you pass this value, Google Play can use it to detect irregular - * activity, such as many devices making purchases on the same - * account in a short period of time. - * Do not use the developer ID or the user's Google ID for this field. - * In addition, this field should not contain the user's ID in - * cleartext. - * We recommend that you use a one-way hash to generate a string from - * the user's ID, and store the hashed string in this field. - * "vr" - Boolean - an optional flag indicating whether the returned intent - * should start a VR purchase flow. The apiVersion must also be 7 or - * later to use this flag. - */ - @Override public android.os.Bundle getBuyIntentExtraParams(int apiVersion, java.lang.String packageName, java.lang.String sku, java.lang.String type, java.lang.String developerPayload, android.os.Bundle extraParams) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - android.os.Bundle _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(sku); - _data.writeString(type); - _data.writeString(developerPayload); - if ((extraParams!=null)) { - _data.writeInt(1); - extraParams.writeToParcel(_data, 0); - } - else { - _data.writeInt(0); - } - mRemote.transact(Stub.TRANSACTION_getBuyIntentExtraParams, _data, _reply, 0); - _reply.readException(); - if ((0!=_reply.readInt())) { - _result = android.os.Bundle.CREATOR.createFromParcel(_reply); - } - else { - _result = null; - } - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - /** - * Returns the most recent purchase made by the user for each SKU, even if that purchase is - * expired, canceled, or consumed. - * @param apiVersion billing API version that the app is using, must be 6 or later - * @param packageName package name of the calling app - * @param type of the in-app items being requested ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param continuationToken to be set as null for the first call, if the number of owned - * skus is too large, a continuationToken is returned in the response bundle. - * This method can be called again with the continuation token to get the next set of - * owned skus. - * @param extraParams a Bundle with extra params that would be appended into http request - * query string. Not used at this moment. Reserved for future functionality. - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value: RESULT_OK(0) if success, - * {@link IabHelper#BILLING_RESPONSE_RESULT_*} response codes on failures. - * - * "INAPP_PURCHASE_ITEM_LIST" - ArrayList containing the list of SKUs - * "INAPP_PURCHASE_DATA_LIST" - ArrayList containing the purchase information - * "INAPP_DATA_SIGNATURE_LIST"- ArrayList containing the signatures - * of the purchase information - * "INAPP_CONTINUATION_TOKEN" - String containing a continuation token for the - * next set of in-app purchases. Only set if the - * user has more owned skus than the current list. - */ - @Override public android.os.Bundle getPurchaseHistory(int apiVersion, java.lang.String packageName, java.lang.String type, java.lang.String continuationToken, android.os.Bundle extraParams) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - android.os.Bundle _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(type); - _data.writeString(continuationToken); - if ((extraParams!=null)) { - _data.writeInt(1); - extraParams.writeToParcel(_data, 0); - } - else { - _data.writeInt(0); - } - mRemote.transact(Stub.TRANSACTION_getPurchaseHistory, _data, _reply, 0); - _reply.readException(); - if ((0!=_reply.readInt())) { - _result = android.os.Bundle.CREATOR.createFromParcel(_reply); - } - else { - _result = null; - } - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - @Override public int isBillingSupportedExtraParams(int apiVersion, java.lang.String packageName, java.lang.String type, android.os.Bundle extraParams) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - int _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(type); - if ((extraParams!=null)) { - _data.writeInt(1); - extraParams.writeToParcel(_data, 0); - } - else { - _data.writeInt(0); - } - mRemote.transact(Stub.TRANSACTION_isBillingSupportedExtraParams, _data, _reply, 0); - _reply.readException(); - _result = _reply.readInt(); - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - } - static final int TRANSACTION_isBillingSupported = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0); - static final int TRANSACTION_getSkuDetails = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1); - static final int TRANSACTION_getBuyIntent = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2); - static final int TRANSACTION_getPurchases = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3); - static final int TRANSACTION_consumePurchase = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4); - static final int TRANSACTION_stub = (android.os.IBinder.FIRST_CALL_TRANSACTION + 5); - static final int TRANSACTION_getBuyIntentToReplaceSkus = (android.os.IBinder.FIRST_CALL_TRANSACTION + 6); - static final int TRANSACTION_getBuyIntentExtraParams = (android.os.IBinder.FIRST_CALL_TRANSACTION + 7); - static final int TRANSACTION_getPurchaseHistory = (android.os.IBinder.FIRST_CALL_TRANSACTION + 8); - static final int TRANSACTION_isBillingSupportedExtraParams = (android.os.IBinder.FIRST_CALL_TRANSACTION + 9); - } - public int isBillingSupported(int apiVersion, java.lang.String packageName, java.lang.String type) throws android.os.RemoteException; - /** - * Provides details of a list of SKUs - * Given a list of SKUs of a valid type in the skusBundle, this returns a bundle - * with a list JSON strings containing the productId, price, title and description. - * This API can be called with a maximum of 20 SKUs. - * @param apiVersion billing API version that the app is using - * @param packageName the package name of the calling app - * @param type of the in-app items ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param skusBundle bundle containing a StringArrayList of SKUs with key "ITEM_ID_LIST" - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - * on failures. - * "DETAILS_LIST" with a StringArrayList containing purchase information - * in JSON format similar to: - * '{ "productId" : "exampleSku", - * "type" : "inapp", - * "price" : "$5.00", - * "price_currency": "USD", - * "price_amount_micros": 5000000, - * "title : "Example Title", - * "description" : "This is an example description" }' - */ - public android.os.Bundle getSkuDetails(int apiVersion, java.lang.String packageName, java.lang.String type, android.os.Bundle skusBundle) throws android.os.RemoteException; - /** - * Returns a pending intent to launch the purchase flow for an in-app item by providing a SKU, - * the type, a unique purchase token and an optional developer payload. - * @param apiVersion billing API version that the app is using - * @param packageName package name of the calling app - * @param sku the SKU of the in-app item as published in the developer console - * @param type of the in-app item being purchased ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param developerPayload optional argument to be sent back with the purchase information - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - * on failures. - * "BUY_INTENT" - PendingIntent to start the purchase flow - * - * The Pending intent should be launched with startIntentSenderForResult. When purchase flow - * has completed, the onActivityResult() will give a resultCode of OK or CANCELED. - * If the purchase is successful, the result data will contain the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response - * codes on failures. - * "INAPP_PURCHASE_DATA" - String in JSON format similar to - * '{"orderId":"12999763169054705758.1371079406387615", - * "packageName":"com.example.app", - * "productId":"exampleSku", - * "purchaseTime":1345678900000, - * "purchaseToken" : "122333444455555", - * "developerPayload":"example developer payload" }' - * "INAPP_DATA_SIGNATURE" - String containing the signature of the purchase data that - * was signed with the private key of the developer - */ - public android.os.Bundle getBuyIntent(int apiVersion, java.lang.String packageName, java.lang.String sku, java.lang.String type, java.lang.String developerPayload) throws android.os.RemoteException; - /** - * Returns the current SKUs owned by the user of the type and package name specified along with - * purchase information and a signature of the data to be validated. - * This will return all SKUs that have been purchased in V3 and managed items purchased using - * V1 and V2 that have not been consumed. - * @param apiVersion billing API version that the app is using - * @param packageName package name of the calling app - * @param type of the in-app items being requested ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param continuationToken to be set as null for the first call, if the number of owned - * skus are too many, a continuationToken is returned in the response bundle. - * This method can be called again with the continuation token to get the next set of - * owned skus. - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - on failures. - * "INAPP_PURCHASE_ITEM_LIST" - StringArrayList containing the list of SKUs - * "INAPP_PURCHASE_DATA_LIST" - StringArrayList containing the purchase information - * "INAPP_DATA_SIGNATURE_LIST"- StringArrayList containing the signatures - * of the purchase information - * "INAPP_CONTINUATION_TOKEN" - String containing a continuation token for the - * next set of in-app purchases. Only set if the - * user has more owned skus than the current list. - */ - public android.os.Bundle getPurchases(int apiVersion, java.lang.String packageName, java.lang.String type, java.lang.String continuationToken) throws android.os.RemoteException; - public int consumePurchase(int apiVersion, java.lang.String packageName, java.lang.String purchaseToken) throws android.os.RemoteException; - public int stub(int apiVersion, java.lang.String packageName, java.lang.String type) throws android.os.RemoteException; - /** - * Returns a pending intent to launch the purchase flow for upgrading or downgrading a - * subscription. The existing owned SKU(s) should be provided along with the new SKU that - * the user is upgrading or downgrading to. - * @param apiVersion billing API version that the app is using, must be 5 or later - * @param packageName package name of the calling app - * @param oldSkus the SKU(s) that the user is upgrading or downgrading from, - * if null or empty this method will behave like {@link #getBuyIntent} - * @param newSku the SKU that the user is upgrading or downgrading to - * @param type of the item being purchased, currently must be "subs" - * @param developerPayload optional argument to be sent back with the purchase information - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - * on failures. - * "BUY_INTENT" - PendingIntent to start the purchase flow - * - * The Pending intent should be launched with startIntentSenderForResult. When purchase flow - * has completed, the onActivityResult() will give a resultCode of OK or CANCELED. - * If the purchase is successful, the result data will contain the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response - * codes on failures. - * "INAPP_PURCHASE_DATA" - String in JSON format similar to - * '{"orderId":"12999763169054705758.1371079406387615", - * "packageName":"com.example.app", - * "productId":"exampleSku", - * "purchaseTime":1345678900000, - * "purchaseToken" : "122333444455555", - * "developerPayload":"example developer payload" }' - * "INAPP_DATA_SIGNATURE" - String containing the signature of the purchase data that - * was signed with the private key of the developer - */ - public android.os.Bundle getBuyIntentToReplaceSkus(int apiVersion, java.lang.String packageName, java.util.List oldSkus, java.lang.String newSku, java.lang.String type, java.lang.String developerPayload) throws android.os.RemoteException; - /** - * Returns a pending intent to launch the purchase flow for an in-app item. This method is - * a variant of the {@link #getBuyIntent} method and takes an additional {@code extraParams} - * parameter. This parameter is a Bundle of optional keys and values that affect the - * operation of the method. - * @param apiVersion billing API version that the app is using, must be 6 or later - * @param packageName package name of the calling app - * @param sku the SKU of the in-app item as published in the developer console - * @param type of the in-app item being purchased ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param developerPayload optional argument to be sent back with the purchase information - * @extraParams a Bundle with the following optional keys: - * "skusToReplace" - List - an optional list of SKUs that the user is - * upgrading or downgrading from. - * Pass this field if the purchase is upgrading or downgrading - * existing subscriptions. - * The specified SKUs are replaced with the SKUs that the user is - * purchasing. Google Play replaces the specified SKUs at the start of - * the next billing cycle. - * "replaceSkusProration" - Boolean - whether the user should be credited for any unused - * subscription time on the SKUs they are upgrading or downgrading. - * If you set this field to true, Google Play swaps out the old SKUs - * and credits the user with the unused value of their subscription - * time on a pro-rated basis. - * Google Play applies this credit to the new subscription, and does - * not begin billing the user for the new subscription until after - * the credit is used up. - * If you set this field to false, the user does not receive credit for - * any unused subscription time and the recurrence date does not - * change. - * Default value is true. Ignored if you do not pass skusToReplace. - * "accountId" - String - an optional obfuscated string that is uniquely - * associated with the user's account in your app. - * If you pass this value, Google Play can use it to detect irregular - * activity, such as many devices making purchases on the same - * account in a short period of time. - * Do not use the developer ID or the user's Google ID for this field. - * In addition, this field should not contain the user's ID in - * cleartext. - * We recommend that you use a one-way hash to generate a string from - * the user's ID, and store the hashed string in this field. - * "vr" - Boolean - an optional flag indicating whether the returned intent - * should start a VR purchase flow. The apiVersion must also be 7 or - * later to use this flag. - */ - public android.os.Bundle getBuyIntentExtraParams(int apiVersion, java.lang.String packageName, java.lang.String sku, java.lang.String type, java.lang.String developerPayload, android.os.Bundle extraParams) throws android.os.RemoteException; - /** - * Returns the most recent purchase made by the user for each SKU, even if that purchase is - * expired, canceled, or consumed. - * @param apiVersion billing API version that the app is using, must be 6 or later - * @param packageName package name of the calling app - * @param type of the in-app items being requested ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param continuationToken to be set as null for the first call, if the number of owned - * skus is too large, a continuationToken is returned in the response bundle. - * This method can be called again with the continuation token to get the next set of - * owned skus. - * @param extraParams a Bundle with extra params that would be appended into http request - * query string. Not used at this moment. Reserved for future functionality. - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value: RESULT_OK(0) if success, - * {@link IabHelper#BILLING_RESPONSE_RESULT_*} response codes on failures. - * - * "INAPP_PURCHASE_ITEM_LIST" - ArrayList containing the list of SKUs - * "INAPP_PURCHASE_DATA_LIST" - ArrayList containing the purchase information - * "INAPP_DATA_SIGNATURE_LIST"- ArrayList containing the signatures - * of the purchase information - * "INAPP_CONTINUATION_TOKEN" - String containing a continuation token for the - * next set of in-app purchases. Only set if the - * user has more owned skus than the current list. - */ - public android.os.Bundle getPurchaseHistory(int apiVersion, java.lang.String packageName, java.lang.String type, java.lang.String continuationToken, android.os.Bundle extraParams) throws android.os.RemoteException; - public int isBillingSupportedExtraParams(int apiVersion, java.lang.String packageName, java.lang.String type, android.os.Bundle extraParams) throws android.os.RemoteException; - } diff --git a/examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/DemoRunner.java b/examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/DemoRunner.java deleted file mode 100644 index b5a9a062..00000000 --- a/examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/DemoRunner.java +++ /dev/null @@ -1,3166 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. - - JUCE is an open source library subject to commercial or open-source - licensing. - - The code included in this file is provided under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license. Permission - To use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted provided that the above copyright notice and - this permission notice appear in all copies. - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -package com.juce.demorunner; - -import android.app.Activity; -import android.app.AlertDialog; -import android.content.DialogInterface; -import android.content.Context; -import android.content.Intent; -import android.content.res.Configuration; -import android.content.pm.PackageInfo; -import android.content.pm.PackageManager; -import android.hardware.camera2.*; -import android.database.ContentObserver; -import android.media.session.*; -import android.media.MediaMetadata; -import android.net.http.SslError; -import android.net.Uri; -import android.os.Bundle; -import android.os.Looper; -import android.os.Handler; -import android.os.Message; -import android.os.ParcelUuid; -import android.os.Environment; -import android.view.*; -import android.view.inputmethod.BaseInputConnection; -import android.view.inputmethod.EditorInfo; -import android.view.inputmethod.InputConnection; -import android.view.inputmethod.InputMethodManager; -import android.graphics.*; -import android.text.ClipboardManager; -import android.text.InputType; -import android.util.DisplayMetrics; -import android.util.Log; -import android.util.Pair; -import android.webkit.SslErrorHandler; -import android.webkit.WebChromeClient; -import android.webkit.WebResourceError; -import android.webkit.WebResourceRequest; -import android.webkit.WebResourceResponse; -import android.webkit.WebView; -import android.webkit.WebViewClient; -import java.lang.Runnable; -import java.lang.ref.WeakReference; -import java.lang.reflect.*; -import java.util.*; -import java.io.*; -import java.net.URL; -import java.net.HttpURLConnection; -import android.media.AudioManager; -import android.Manifest; -import java.util.concurrent.CancellationException; -import java.util.concurrent.Future; -import java.util.concurrent.Executors; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.Callable; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.locks.ReentrantLock; -import java.util.concurrent.atomic.*; - -import android.media.midi.*; -import android.bluetooth.*; -import android.bluetooth.le.*; - - -//============================================================================== -public class DemoRunner extends Activity -{ - //============================================================================== - static - { - System.loadLibrary ("juce_jni"); - } - - //============================================================================== - public boolean isPermissionDeclaredInManifest (int permissionID) - { - return isPermissionDeclaredInManifest (getAndroidPermissionName (permissionID)); - } - - public boolean isPermissionDeclaredInManifest (String permissionToCheck) - { - try - { - PackageInfo info = getPackageManager().getPackageInfo(getApplicationContext().getPackageName(), PackageManager.GET_PERMISSIONS); - - if (info.requestedPermissions != null) - for (String permission : info.requestedPermissions) - if (permission.equals (permissionToCheck)) - return true; - } - catch (PackageManager.NameNotFoundException e) - { - Log.d ("JUCE", "isPermissionDeclaredInManifest: PackageManager.NameNotFoundException = " + e.toString()); - } - - Log.d ("JUCE", "isPermissionDeclaredInManifest: could not find requested permission " + permissionToCheck); - return false; - } - - //============================================================================== - // these have to match the values of enum PermissionID in C++ class RuntimePermissions: - private static final int JUCE_PERMISSIONS_RECORD_AUDIO = 1; - private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2; - private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3; - private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4; - private static final int JUCE_PERMISSIONS_CAMERA = 5; - - private static String getAndroidPermissionName (int permissionID) - { - switch (permissionID) - { - case JUCE_PERMISSIONS_RECORD_AUDIO: return Manifest.permission.RECORD_AUDIO; - case JUCE_PERMISSIONS_BLUETOOTH_MIDI: return Manifest.permission.ACCESS_COARSE_LOCATION; - // use string value as this is not defined in SDKs < 16 - case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE"; - case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE; - case JUCE_PERMISSIONS_CAMERA: return Manifest.permission.CAMERA; - } - - // unknown permission ID! - assert false; - return new String(); - } - - public boolean isPermissionGranted (int permissionID) - { - return getApplicationContext().checkCallingOrSelfPermission (getAndroidPermissionName (permissionID)) == PackageManager.PERMISSION_GRANTED; - } - - private Map permissionCallbackPtrMap; - - public void requestRuntimePermission (int permissionID, long ptrToCallback) - { - String permissionName = getAndroidPermissionName (permissionID); - - if (getApplicationContext().checkCallingOrSelfPermission (permissionName) != PackageManager.PERMISSION_GRANTED) - { - // remember callbackPtr, request permissions, and let onRequestPermissionResult call callback asynchronously - permissionCallbackPtrMap.put (permissionID, ptrToCallback); - requestPermissionsCompat (new String[]{permissionName}, permissionID); - } - else - { - // permissions were already granted before, we can call callback directly - androidRuntimePermissionsCallback (true, ptrToCallback); - } - } - - private native void androidRuntimePermissionsCallback (boolean permissionWasGranted, long ptrToCallback); - - @Override - public void onRequestPermissionsResult (int permissionID, String permissions[], int[] grantResults) - { - boolean permissionsGranted = (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED); - - if (! permissionsGranted) - Log.d ("JUCE", "onRequestPermissionsResult: runtime permission was DENIED: " + getAndroidPermissionName (permissionID)); - - Long ptrToCallback = permissionCallbackPtrMap.get (permissionID); - permissionCallbackPtrMap.remove (permissionID); - androidRuntimePermissionsCallback (permissionsGranted, ptrToCallback); - } - - //============================================================================== - public interface JuceMidiPort - { - boolean isInputPort(); - - // start, stop does nothing on an output port - void start(); - void stop(); - - void close(); - - // send will do nothing on an input port - void sendMidi (byte[] msg, int offset, int count); - } - - //============================================================================== - //============================================================================== - public class BluetoothManager extends ScanCallback - { - BluetoothManager() - { - } - - public String[] getMidiBluetoothAddresses() - { - return bluetoothMidiDevices.toArray (new String[bluetoothMidiDevices.size()]); - } - - public String getHumanReadableStringForBluetoothAddress (String address) - { - BluetoothDevice btDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice (address); - return btDevice.getName(); - } - - public int getBluetoothDeviceStatus (String address) - { - return getAndroidMidiDeviceManager().getBluetoothDeviceStatus (address); - } - - public void startStopScan (boolean shouldStart) - { - BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); - - if (bluetoothAdapter == null) - { - Log.d ("JUCE", "BluetoothManager error: could not get default Bluetooth adapter"); - return; - } - - BluetoothLeScanner bluetoothLeScanner = bluetoothAdapter.getBluetoothLeScanner(); - - if (bluetoothLeScanner == null) - { - Log.d ("JUCE", "BluetoothManager error: could not get Bluetooth LE scanner"); - return; - } - - if (shouldStart) - { - ScanFilter.Builder scanFilterBuilder = new ScanFilter.Builder(); - scanFilterBuilder.setServiceUuid (ParcelUuid.fromString (bluetoothLEMidiServiceUUID)); - - ScanSettings.Builder scanSettingsBuilder = new ScanSettings.Builder(); - scanSettingsBuilder.setCallbackType (ScanSettings.CALLBACK_TYPE_ALL_MATCHES) - .setScanMode (ScanSettings.SCAN_MODE_LOW_POWER) - .setScanMode (ScanSettings.MATCH_MODE_STICKY); - - bluetoothLeScanner.startScan (Arrays.asList (scanFilterBuilder.build()), - scanSettingsBuilder.build(), - this); - } - else - { - bluetoothLeScanner.stopScan (this); - } - } - - public boolean pairBluetoothMidiDevice(String address) - { - BluetoothDevice btDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice (address); - - if (btDevice == null) - { - Log.d ("JUCE", "failed to create buletooth device from address"); - return false; - } - - return getAndroidMidiDeviceManager().pairBluetoothDevice (btDevice); - } - - public void unpairBluetoothMidiDevice (String address) - { - getAndroidMidiDeviceManager().unpairBluetoothDevice (address); - } - - public void onScanFailed (int errorCode) - { - } - - public void onScanResult (int callbackType, ScanResult result) - { - if (callbackType == ScanSettings.CALLBACK_TYPE_ALL_MATCHES - || callbackType == ScanSettings.CALLBACK_TYPE_FIRST_MATCH) - { - BluetoothDevice device = result.getDevice(); - - if (device != null) - bluetoothMidiDevices.add (device.getAddress()); - } - - if (callbackType == ScanSettings.CALLBACK_TYPE_MATCH_LOST) - { - Log.d ("JUCE", "ScanSettings.CALLBACK_TYPE_MATCH_LOST"); - BluetoothDevice device = result.getDevice(); - - if (device != null) - { - bluetoothMidiDevices.remove (device.getAddress()); - unpairBluetoothMidiDevice (device.getAddress()); - } - } - } - - public void onBatchScanResults (List results) - { - for (ScanResult result : results) - onScanResult (ScanSettings.CALLBACK_TYPE_ALL_MATCHES, result); - } - - private BluetoothLeScanner scanner; - private static final String bluetoothLEMidiServiceUUID = "03B80E5A-EDE8-4B33-A751-6CE34EC4C700"; - - private HashSet bluetoothMidiDevices = new HashSet(); - } - - public static class JuceMidiInputPort extends MidiReceiver implements JuceMidiPort - { - private native void handleReceive (long host, byte[] msg, int offset, int count, long timestamp); - - public JuceMidiInputPort (MidiDeviceManager mm, MidiOutputPort actualPort, MidiPortPath portPathToUse, long hostToUse) - { - owner = mm; - androidPort = actualPort; - portPath = portPathToUse; - juceHost = hostToUse; - isConnected = false; - } - - @Override - protected void finalize() throws Throwable - { - close(); - super.finalize(); - } - - @Override - public boolean isInputPort() - { - return true; - } - - @Override - public void start() - { - if (owner != null && androidPort != null && ! isConnected) { - androidPort.connect(this); - isConnected = true; - } - } - - @Override - public void stop() - { - if (owner != null && androidPort != null && isConnected) { - androidPort.disconnect(this); - isConnected = false; - } - } - - @Override - public void close() - { - if (androidPort != null) { - try { - androidPort.close(); - } catch (IOException exception) { - Log.d("JUCE", "IO Exception while closing port"); - } - } - - if (owner != null) - owner.removePort (portPath); - - owner = null; - androidPort = null; - } - - @Override - public void onSend (byte[] msg, int offset, int count, long timestamp) - { - if (count > 0) - handleReceive (juceHost, msg, offset, count, timestamp); - } - - @Override - public void onFlush() - {} - - @Override - public void sendMidi (byte[] msg, int offset, int count) - { - } - - MidiDeviceManager owner; - MidiOutputPort androidPort; - MidiPortPath portPath; - long juceHost; - boolean isConnected; - } - - public static class JuceMidiOutputPort implements JuceMidiPort - { - public JuceMidiOutputPort (MidiDeviceManager mm, MidiInputPort actualPort, MidiPortPath portPathToUse) - { - owner = mm; - androidPort = actualPort; - portPath = portPathToUse; - } - - @Override - protected void finalize() throws Throwable - { - close(); - super.finalize(); - } - - @Override - public boolean isInputPort() - { - return false; - } - - @Override - public void start() - { - } - - @Override - public void stop() - { - } - - @Override - public void sendMidi (byte[] msg, int offset, int count) - { - if (androidPort != null) - { - try { - androidPort.send(msg, offset, count); - } catch (IOException exception) - { - Log.d ("JUCE", "send midi had IO exception"); - } - } - } - - @Override - public void close() - { - if (androidPort != null) { - try { - androidPort.close(); - } catch (IOException exception) { - Log.d("JUCE", "IO Exception while closing port"); - } - } - - if (owner != null) - owner.removePort (portPath); - - owner = null; - androidPort = null; - } - - MidiDeviceManager owner; - MidiInputPort androidPort; - MidiPortPath portPath; - } - - private static class MidiPortPath extends Object - { - public MidiPortPath (int deviceIdToUse, boolean direction, int androidIndex) - { - deviceId = deviceIdToUse; - isInput = direction; - portIndex = androidIndex; - - } - - public int deviceId; - public int portIndex; - public boolean isInput; - - @Override - public int hashCode() - { - Integer i = new Integer ((deviceId * 128) + (portIndex < 128 ? portIndex : 127)); - return i.hashCode() * (isInput ? -1 : 1); - } - - @Override - public boolean equals (Object obj) - { - if (obj == null) - return false; - - if (getClass() != obj.getClass()) - return false; - - MidiPortPath other = (MidiPortPath) obj; - return (portIndex == other.portIndex && isInput == other.isInput && deviceId == other.deviceId); - } - } - - //============================================================================== - public class MidiDeviceManager extends MidiManager.DeviceCallback implements MidiManager.OnDeviceOpenedListener - { - //============================================================================== - private class DummyBluetoothGattCallback extends BluetoothGattCallback - { - public DummyBluetoothGattCallback (MidiDeviceManager mm) - { - super(); - owner = mm; - } - - public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) - { - if (newState == BluetoothProfile.STATE_CONNECTED) - { - gatt.requestConnectionPriority(BluetoothGatt.CONNECTION_PRIORITY_HIGH); - owner.pairBluetoothDeviceStepTwo (gatt.getDevice()); - } - } - public void onServicesDiscovered(BluetoothGatt gatt, int status) {} - public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {} - public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {} - public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {} - public void onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {} - public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {} - public void onReliableWriteCompleted(BluetoothGatt gatt, int status) {} - public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) {} - public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) {} - - private MidiDeviceManager owner; - } - - //============================================================================== - private class MidiDeviceOpenTask extends java.util.TimerTask - { - public MidiDeviceOpenTask (MidiDeviceManager deviceManager, MidiDevice device, BluetoothGatt gattToUse) - { - owner = deviceManager; - midiDevice = device; - btGatt = gattToUse; - } - - @Override - public boolean cancel() - { - synchronized (MidiDeviceOpenTask.class) - { - owner = null; - boolean retval = super.cancel(); - - if (btGatt != null) - { - btGatt.disconnect(); - btGatt.close(); - - btGatt = null; - } - - if (midiDevice != null) - { - try - { - midiDevice.close(); - } - catch (IOException e) - {} - - midiDevice = null; - } - - return retval; - } - } - - public String getBluetoothAddress() - { - synchronized (MidiDeviceOpenTask.class) - { - if (midiDevice != null) - { - MidiDeviceInfo info = midiDevice.getInfo(); - if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH) - { - BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); - if (btDevice != null) - return btDevice.getAddress(); - } - } - } - - return ""; - } - - public BluetoothGatt getGatt() { return btGatt; } - - public int getID() - { - return midiDevice.getInfo().getId(); - } - - @Override - public void run() - { - synchronized (MidiDeviceOpenTask.class) - { - if (owner != null && midiDevice != null) - owner.onDeviceOpenedDelayed (midiDevice); - } - } - - private MidiDeviceManager owner; - private MidiDevice midiDevice; - private BluetoothGatt btGatt; - } - - //============================================================================== - public MidiDeviceManager() - { - manager = (MidiManager) getSystemService (MIDI_SERVICE); - - if (manager == null) - { - Log.d ("JUCE", "MidiDeviceManager error: could not get MidiManager system service"); - return; - } - - openPorts = new HashMap> (); - midiDevices = new ArrayList>(); - openTasks = new HashMap(); - btDevicesPairing = new HashMap(); - - MidiDeviceInfo[] foundDevices = manager.getDevices(); - for (MidiDeviceInfo info : foundDevices) - onDeviceAdded (info); - - manager.registerDeviceCallback (this, null); - } - - protected void finalize() throws Throwable - { - manager.unregisterDeviceCallback (this); - - synchronized (MidiDeviceManager.class) - { - btDevicesPairing.clear(); - - for (Integer deviceID : openTasks.keySet()) - openTasks.get (deviceID).cancel(); - - openTasks = null; - } - - for (MidiPortPath key : openPorts.keySet()) - openPorts.get (key).get().close(); - - openPorts = null; - - for (Pair device : midiDevices) - { - if (device.second != null) - { - device.second.disconnect(); - device.second.close(); - } - - device.first.close(); - } - - midiDevices.clear(); - - super.finalize(); - } - - public String[] getJuceAndroidMidiInputDevices() - { - return getJuceAndroidMidiDevices (MidiDeviceInfo.PortInfo.TYPE_OUTPUT); - } - - public String[] getJuceAndroidMidiOutputDevices() - { - return getJuceAndroidMidiDevices (MidiDeviceInfo.PortInfo.TYPE_INPUT); - } - - private String[] getJuceAndroidMidiDevices (int portType) - { - // only update the list when JUCE asks for a new list - synchronized (MidiDeviceManager.class) - { - deviceInfos = getDeviceInfos(); - } - - ArrayList portNames = new ArrayList(); - - int index = 0; - for (MidiPortPath portInfo = getPortPathForJuceIndex (portType, index); portInfo != null; portInfo = getPortPathForJuceIndex (portType, ++index)) - portNames.add (getPortName (portInfo)); - - String[] names = new String[portNames.size()]; - return portNames.toArray (names); - } - - private JuceMidiPort openMidiPortWithJuceIndex (int index, long host, boolean isInput) - { - synchronized (MidiDeviceManager.class) - { - int portTypeToFind = (isInput ? MidiDeviceInfo.PortInfo.TYPE_OUTPUT : MidiDeviceInfo.PortInfo.TYPE_INPUT); - MidiPortPath portInfo = getPortPathForJuceIndex (portTypeToFind, index); - - if (portInfo != null) - { - // ports must be opened exclusively! - if (openPorts.containsKey (portInfo)) - return null; - - Pair devicePair = getMidiDevicePairForId (portInfo.deviceId); - - if (devicePair != null) - { - MidiDevice device = devicePair.first; - if (device != null) - { - JuceMidiPort juceMidiPort = null; - - if (isInput) - { - MidiOutputPort outputPort = device.openOutputPort(portInfo.portIndex); - - if (outputPort != null) - juceMidiPort = new JuceMidiInputPort(this, outputPort, portInfo, host); - } - else - { - MidiInputPort inputPort = device.openInputPort(portInfo.portIndex); - - if (inputPort != null) - juceMidiPort = new JuceMidiOutputPort(this, inputPort, portInfo); - } - - if (juceMidiPort != null) - { - openPorts.put(portInfo, new WeakReference(juceMidiPort)); - - return juceMidiPort; - } - } - } - } - } - - return null; - } - - public JuceMidiPort openMidiInputPortWithJuceIndex (int index, long host) - { - return openMidiPortWithJuceIndex (index, host, true); - } - - public JuceMidiPort openMidiOutputPortWithJuceIndex (int index) - { - return openMidiPortWithJuceIndex (index, 0, false); - } - - /* 0: unpaired, 1: paired, 2: pairing */ - public int getBluetoothDeviceStatus (String address) - { - synchronized (MidiDeviceManager.class) - { - if (! address.isEmpty()) - { - if (findMidiDeviceForBluetoothAddress (address) != null) - return 1; - - if (btDevicesPairing.containsKey (address)) - return 2; - - if (findOpenTaskForBluetoothAddress (address) != null) - return 2; - } - } - - return 0; - } - - public boolean pairBluetoothDevice (BluetoothDevice btDevice) - { - String btAddress = btDevice.getAddress(); - if (btAddress.isEmpty()) - return false; - - synchronized (MidiDeviceManager.class) - { - if (getBluetoothDeviceStatus (btAddress) != 0) - return false; - - - btDevicesPairing.put (btDevice.getAddress(), null); - BluetoothGatt gatt = btDevice.connectGatt (getApplicationContext(), true, new DummyBluetoothGattCallback (this)); - - if (gatt != null) - { - btDevicesPairing.put (btDevice.getAddress(), gatt); - } - else - { - pairBluetoothDeviceStepTwo (btDevice); - } - } - - return true; - } - - public void pairBluetoothDeviceStepTwo (BluetoothDevice btDevice) - { - manager.openBluetoothDevice(btDevice, this, null); - } - - public void unpairBluetoothDevice (String address) - { - if (address.isEmpty()) - return; - - synchronized (MidiDeviceManager.class) - { - if (btDevicesPairing.containsKey (address)) - { - BluetoothGatt gatt = btDevicesPairing.get (address); - if (gatt != null) - { - gatt.disconnect(); - gatt.close(); - } - - btDevicesPairing.remove (address); - } - - MidiDeviceOpenTask openTask = findOpenTaskForBluetoothAddress (address); - if (openTask != null) - { - int deviceID = openTask.getID(); - openTask.cancel(); - openTasks.remove (deviceID); - } - - Pair midiDevicePair = findMidiDeviceForBluetoothAddress (address); - if (midiDevicePair != null) - { - MidiDevice midiDevice = midiDevicePair.first; - onDeviceRemoved (midiDevice.getInfo()); - - try { - midiDevice.close(); - } - catch (IOException exception) - { - Log.d ("JUCE", "IOException while closing midi device"); - } - } - } - } - - private Pair findMidiDeviceForBluetoothAddress (String address) - { - for (Pair midiDevice : midiDevices) - { - MidiDeviceInfo info = midiDevice.first.getInfo(); - if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH) - { - BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); - if (btDevice != null && btDevice.getAddress().equals (address)) - return midiDevice; - } - } - - return null; - } - - private MidiDeviceOpenTask findOpenTaskForBluetoothAddress (String address) - { - for (Integer deviceID : openTasks.keySet()) - { - MidiDeviceOpenTask openTask = openTasks.get (deviceID); - if (openTask.getBluetoothAddress().equals (address)) - return openTask; - } - - return null; - } - - public void removePort (MidiPortPath path) - { - openPorts.remove (path); - } - - public String getInputPortNameForJuceIndex (int index) - { - MidiPortPath portInfo = getPortPathForJuceIndex (MidiDeviceInfo.PortInfo.TYPE_OUTPUT, index); - if (portInfo != null) - return getPortName (portInfo); - - return ""; - } - - public String getOutputPortNameForJuceIndex (int index) - { - MidiPortPath portInfo = getPortPathForJuceIndex (MidiDeviceInfo.PortInfo.TYPE_INPUT, index); - if (portInfo != null) - return getPortName (portInfo); - - return ""; - } - - public void onDeviceAdded (MidiDeviceInfo info) - { - // only add standard midi devices - if (info.getType() == info.TYPE_BLUETOOTH) - return; - - manager.openDevice (info, this, null); - } - - public void onDeviceRemoved (MidiDeviceInfo info) - { - synchronized (MidiDeviceManager.class) - { - Pair devicePair = getMidiDevicePairForId (info.getId()); - - if (devicePair != null) - { - MidiDevice midiDevice = devicePair.first; - BluetoothGatt gatt = devicePair.second; - - // close all ports that use this device - boolean removedPort = true; - - while (removedPort == true) - { - removedPort = false; - for (MidiPortPath key : openPorts.keySet()) - { - if (key.deviceId == info.getId()) - { - openPorts.get(key).get().close(); - removedPort = true; - break; - } - } - } - - if (gatt != null) - { - gatt.disconnect(); - gatt.close(); - } - - midiDevices.remove (devicePair); - } - } - } - - public void onDeviceStatusChanged (MidiDeviceStatus status) - { - } - - @Override - public void onDeviceOpened (MidiDevice theDevice) - { - synchronized (MidiDeviceManager.class) - { - MidiDeviceInfo info = theDevice.getInfo(); - int deviceID = info.getId(); - BluetoothGatt gatt = null; - boolean isBluetooth = false; - - if (! openTasks.containsKey (deviceID)) - { - if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH) - { - isBluetooth = true; - BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); - if (btDevice != null) - { - String btAddress = btDevice.getAddress(); - if (btDevicesPairing.containsKey (btAddress)) - { - gatt = btDevicesPairing.get (btAddress); - btDevicesPairing.remove (btAddress); - } - else - { - // unpair was called in the mean time - try - { - Pair midiDevicePair = findMidiDeviceForBluetoothAddress (btDevice.getAddress()); - if (midiDevicePair != null) - { - gatt = midiDevicePair.second; - - if (gatt != null) - { - gatt.disconnect(); - gatt.close(); - } - } - - theDevice.close(); - } - catch (IOException e) - {} - - return; - } - } - } - - MidiDeviceOpenTask openTask = new MidiDeviceOpenTask (this, theDevice, gatt); - openTasks.put (deviceID, openTask); - - new java.util.Timer().schedule (openTask, (isBluetooth ? 2000 : 100)); - } - } - } - - public void onDeviceOpenedDelayed (MidiDevice theDevice) - { - synchronized (MidiDeviceManager.class) - { - int deviceID = theDevice.getInfo().getId(); - - if (openTasks.containsKey (deviceID)) - { - if (! midiDevices.contains(theDevice)) - { - BluetoothGatt gatt = openTasks.get (deviceID).getGatt(); - openTasks.remove (deviceID); - midiDevices.add (new Pair (theDevice, gatt)); - } - } - else - { - // unpair was called in the mean time - MidiDeviceInfo info = theDevice.getInfo(); - BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); - if (btDevice != null) - { - String btAddress = btDevice.getAddress(); - Pair midiDevicePair = findMidiDeviceForBluetoothAddress (btDevice.getAddress()); - if (midiDevicePair != null) - { - BluetoothGatt gatt = midiDevicePair.second; - - if (gatt != null) - { - gatt.disconnect(); - gatt.close(); - } - } - } - - try - { - theDevice.close(); - } - catch (IOException e) - {} - } - } - } - - public String getPortName(MidiPortPath path) - { - int portTypeToFind = (path.isInput ? MidiDeviceInfo.PortInfo.TYPE_INPUT : MidiDeviceInfo.PortInfo.TYPE_OUTPUT); - - synchronized (MidiDeviceManager.class) - { - for (MidiDeviceInfo info : deviceInfos) - { - int localIndex = 0; - if (info.getId() == path.deviceId) - { - for (MidiDeviceInfo.PortInfo portInfo : info.getPorts()) - { - int portType = portInfo.getType(); - if (portType == portTypeToFind) - { - int portIndex = portInfo.getPortNumber(); - if (portIndex == path.portIndex) - { - String portName = portInfo.getName(); - if (portName.isEmpty()) - portName = (String) info.getProperties().get(info.PROPERTY_NAME); - - return portName; - } - } - } - } - } - } - - return ""; - } - - public MidiPortPath getPortPathForJuceIndex (int portType, int juceIndex) - { - int portIdx = 0; - for (MidiDeviceInfo info : deviceInfos) - { - for (MidiDeviceInfo.PortInfo portInfo : info.getPorts()) - { - if (portInfo.getType() == portType) - { - if (portIdx == juceIndex) - return new MidiPortPath (info.getId(), - (portType == MidiDeviceInfo.PortInfo.TYPE_INPUT), - portInfo.getPortNumber()); - - portIdx++; - } - } - } - - return null; - } - - private MidiDeviceInfo[] getDeviceInfos() - { - synchronized (MidiDeviceManager.class) - { - MidiDeviceInfo[] infos = new MidiDeviceInfo[midiDevices.size()]; - - int idx = 0; - for (Pair midiDevice : midiDevices) - infos[idx++] = midiDevice.first.getInfo(); - - return infos; - } - } - - private Pair getMidiDevicePairForId (int deviceId) - { - synchronized (MidiDeviceManager.class) - { - for (Pair midiDevice : midiDevices) - if (midiDevice.first.getInfo().getId() == deviceId) - return midiDevice; - } - - return null; - } - - private MidiManager manager; - private HashMap btDevicesPairing; - private HashMap openTasks; - private ArrayList> midiDevices; - private MidiDeviceInfo[] deviceInfos; - private HashMap> openPorts; - } - - public MidiDeviceManager getAndroidMidiDeviceManager() - { - if (getSystemService (MIDI_SERVICE) == null) - return null; - - synchronized (DemoRunner.class) - { - if (midiDeviceManager == null) - midiDeviceManager = new MidiDeviceManager(); - } - - return midiDeviceManager; - } - - public BluetoothManager getAndroidBluetoothManager() - { - BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); - - if (adapter == null) - return null; - - if (adapter.getBluetoothLeScanner() == null) - return null; - - synchronized (DemoRunner.class) - { - if (bluetoothManager == null) - bluetoothManager = new BluetoothManager(); - } - - return bluetoothManager; - } - - //============================================================================== - @Override - public void onCreate (Bundle savedInstanceState) - { - super.onCreate (savedInstanceState); - - isScreenSaverEnabled = true; - hideActionBar(); - viewHolder = new ViewHolder (this); - setContentView (viewHolder); - - setVolumeControlStream (AudioManager.STREAM_MUSIC); - - permissionCallbackPtrMap = new HashMap(); - appPausedResumedListeners = new HashMap(); - } - - @Override - protected void onDestroy() - { - quitApp(); - super.onDestroy(); - - clearDataCache(); - } - - @Override - protected void onPause() - { - suspendApp(); - - Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); - - for (Long k : keys) - appPausedResumedListeners.get (k).appPaused(); - - try - { - Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down - // openGL glitches when pausing/resuming apps.. - } catch (InterruptedException e) {} - - super.onPause(); - } - - @Override - protected void onResume() - { - super.onResume(); - resumeApp(); - - Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); - - for (Long k : keys) - appPausedResumedListeners.get (k).appResumed(); - } - - @Override - public void onConfigurationChanged (Configuration cfg) - { - super.onConfigurationChanged (cfg); - setContentView (viewHolder); - } - - private void callAppLauncher() - { - launchApp (getApplicationInfo().publicSourceDir, - getApplicationInfo().dataDir); - } - - // Need to override this as the default implementation always finishes the activity. - @Override - public void onBackPressed() - { - ComponentPeerView focusedView = getViewWithFocusOrDefaultView(); - - if (focusedView == null) - return; - - focusedView.backButtonPressed(); - } - - private ComponentPeerView getViewWithFocusOrDefaultView() - { - for (int i = 0; i < viewHolder.getChildCount(); ++i) - { - if (viewHolder.getChildAt (i).hasFocus()) - return (ComponentPeerView) viewHolder.getChildAt (i); - } - - if (viewHolder.getChildCount() > 0) - return (ComponentPeerView) viewHolder.getChildAt (0); - - return null; - } - - //============================================================================== - private void hideActionBar() - { - // get "getActionBar" method - java.lang.reflect.Method getActionBarMethod = null; - try - { - getActionBarMethod = this.getClass().getMethod ("getActionBar"); - } - catch (SecurityException e) { return; } - catch (NoSuchMethodException e) { return; } - if (getActionBarMethod == null) return; - - // invoke "getActionBar" method - Object actionBar = null; - try - { - actionBar = getActionBarMethod.invoke (this); - } - catch (java.lang.IllegalArgumentException e) { return; } - catch (java.lang.IllegalAccessException e) { return; } - catch (java.lang.reflect.InvocationTargetException e) { return; } - if (actionBar == null) return; - - // get "hide" method - java.lang.reflect.Method actionBarHideMethod = null; - try - { - actionBarHideMethod = actionBar.getClass().getMethod ("hide"); - } - catch (SecurityException e) { return; } - catch (NoSuchMethodException e) { return; } - if (actionBarHideMethod == null) return; - - // invoke "hide" method - try - { - actionBarHideMethod.invoke (actionBar); - } - catch (java.lang.IllegalArgumentException e) {} - catch (java.lang.IllegalAccessException e) {} - catch (java.lang.reflect.InvocationTargetException e) {} - } - - void requestPermissionsCompat (String[] permissions, int requestCode) - { - Method requestPermissionsMethod = null; - try - { - requestPermissionsMethod = this.getClass().getMethod ("requestPermissions", - String[].class, int.class); - } - catch (SecurityException e) { return; } - catch (NoSuchMethodException e) { return; } - if (requestPermissionsMethod == null) return; - - try - { - requestPermissionsMethod.invoke (this, permissions, requestCode); - } - catch (java.lang.IllegalArgumentException e) {} - catch (java.lang.IllegalAccessException e) {} - catch (java.lang.reflect.InvocationTargetException e) {} - } - - //============================================================================== - private native void launchApp (String appFile, String appDataDir); - private native void quitApp(); - private native void suspendApp(); - private native void resumeApp(); - private native void setScreenSize (int screenWidth, int screenHeight, int dpi); - private native void appActivityResult (int requestCode, int resultCode, Intent data); - private native void appNewIntent (Intent intent); - - //============================================================================== - private ViewHolder viewHolder; - private MidiDeviceManager midiDeviceManager = null; - private BluetoothManager bluetoothManager = null; - private boolean isScreenSaverEnabled; - private java.util.Timer keepAliveTimer; - - public final ComponentPeerView createNewView (boolean opaque, long host) - { - ComponentPeerView v = new ComponentPeerView (this, opaque, host); - viewHolder.addView (v); - addAppPausedResumedListener (v, host); - return v; - } - - public final void deleteView (ComponentPeerView view) - { - removeAppPausedResumedListener (view, view.host); - - view.host = 0; - - ViewGroup group = (ViewGroup) (view.getParent()); - - if (group != null) - group.removeView (view); - } - - public final void deleteNativeSurfaceView (NativeSurfaceView view) - { - ViewGroup group = (ViewGroup) (view.getParent()); - - if (group != null) - group.removeView (view); - } - - final class ViewHolder extends ViewGroup - { - public ViewHolder (Context context) - { - super (context); - setDescendantFocusability (ViewGroup.FOCUS_AFTER_DESCENDANTS); - setFocusable (false); - } - - protected final void onLayout (boolean changed, int left, int top, int right, int bottom) - { - setScreenSize (getWidth(), getHeight(), getDPI()); - - if (isFirstResize) - { - isFirstResize = false; - callAppLauncher(); - } - } - - private final int getDPI() - { - DisplayMetrics metrics = new DisplayMetrics(); - getWindowManager().getDefaultDisplay().getMetrics (metrics); - return metrics.densityDpi; - } - - private boolean isFirstResize = true; - } - - public final void excludeClipRegion (android.graphics.Canvas canvas, float left, float top, float right, float bottom) - { - canvas.clipRect (left, top, right, bottom, android.graphics.Region.Op.DIFFERENCE); - } - - //============================================================================== - public final void setScreenSaver (boolean enabled) - { - if (isScreenSaverEnabled != enabled) - { - isScreenSaverEnabled = enabled; - - if (keepAliveTimer != null) - { - keepAliveTimer.cancel(); - keepAliveTimer = null; - } - - if (enabled) - { - getWindow().clearFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); - } - else - { - getWindow().addFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); - - // If no user input is received after about 3 seconds, the OS will lower the - // task's priority, so this timer forces it to be kept active. - keepAliveTimer = new java.util.Timer(); - - keepAliveTimer.scheduleAtFixedRate (new TimerTask() - { - @Override - public void run() - { - android.app.Instrumentation instrumentation = new android.app.Instrumentation(); - - try - { - instrumentation.sendKeyDownUpSync (KeyEvent.KEYCODE_UNKNOWN); - } - catch (Exception e) - { - } - } - }, 2000, 2000); - } - } - } - - public final boolean getScreenSaver() - { - return isScreenSaverEnabled; - } - - //============================================================================== - public final String getClipboardContent() - { - ClipboardManager clipboard = (ClipboardManager) getSystemService (CLIPBOARD_SERVICE); - - CharSequence content = clipboard.getText(); - return content != null ? content.toString() : new String(); - } - - public final void setClipboardContent (String newText) - { - ClipboardManager clipboard = (ClipboardManager) getSystemService (CLIPBOARD_SERVICE); - clipboard.setText (newText); - } - - //============================================================================== - public final void showMessageBox (String title, String message, final long callback) - { - AlertDialog.Builder builder = new AlertDialog.Builder (this); - builder.setTitle (title) - .setMessage (message) - .setCancelable (true) - .setOnCancelListener (new DialogInterface.OnCancelListener() - { - public void onCancel (DialogInterface dialog) - { - DemoRunner.this.alertDismissed (callback, 0); - } - }) - .setPositiveButton ("OK", new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - DemoRunner.this.alertDismissed (callback, 0); - } - }); - - builder.create().show(); - } - - public final void showOkCancelBox (String title, String message, final long callback, - String okButtonText, String cancelButtonText) - { - AlertDialog.Builder builder = new AlertDialog.Builder (this); - builder.setTitle (title) - .setMessage (message) - .setCancelable (true) - .setOnCancelListener (new DialogInterface.OnCancelListener() - { - public void onCancel (DialogInterface dialog) - { - DemoRunner.this.alertDismissed (callback, 0); - } - }) - .setPositiveButton (okButtonText.isEmpty() ? "OK" : okButtonText, new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - DemoRunner.this.alertDismissed (callback, 1); - } - }) - .setNegativeButton (cancelButtonText.isEmpty() ? "Cancel" : cancelButtonText, new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - DemoRunner.this.alertDismissed (callback, 0); - } - }); - - builder.create().show(); - } - - public final void showYesNoCancelBox (String title, String message, final long callback) - { - AlertDialog.Builder builder = new AlertDialog.Builder (this); - builder.setTitle (title) - .setMessage (message) - .setCancelable (true) - .setOnCancelListener (new DialogInterface.OnCancelListener() - { - public void onCancel (DialogInterface dialog) - { - DemoRunner.this.alertDismissed (callback, 0); - } - }) - .setPositiveButton ("Yes", new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - DemoRunner.this.alertDismissed (callback, 1); - } - }) - .setNegativeButton ("No", new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - DemoRunner.this.alertDismissed (callback, 2); - } - }) - .setNeutralButton ("Cancel", new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - DemoRunner.this.alertDismissed (callback, 0); - } - }); - - builder.create().show(); - } - - public native void alertDismissed (long callback, int id); - - //============================================================================== - public interface AppPausedResumedListener - { - void appPaused(); - void appResumed(); - } - - private Map appPausedResumedListeners; - - public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) - { - appPausedResumedListeners.put (new Long (listenerHost), l); - } - - public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) - { - appPausedResumedListeners.remove (new Long (listenerHost)); - } - - //============================================================================== - public final class ComponentPeerView extends ViewGroup - implements View.OnFocusChangeListener, AppPausedResumedListener - { - public ComponentPeerView (Context context, boolean opaque_, long host) - { - super (context); - this.host = host; - setWillNotDraw (false); - opaque = opaque_; - - setFocusable (true); - setFocusableInTouchMode (true); - setOnFocusChangeListener (this); - - // swap red and blue colours to match internal opengl texture format - ColorMatrix colorMatrix = new ColorMatrix(); - - float[] colorTransform = { 0, 0, 1.0f, 0, 0, - 0, 1.0f, 0, 0, 0, - 1.0f, 0, 0, 0, 0, - 0, 0, 0, 1.0f, 0 }; - - colorMatrix.set (colorTransform); - paint.setColorFilter (new ColorMatrixColorFilter (colorMatrix)); - - java.lang.reflect.Method method = null; - - try - { - method = getClass().getMethod ("setLayerType", int.class, Paint.class); - } - catch (SecurityException e) {} - catch (NoSuchMethodException e) {} - - if (method != null) - { - try - { - int layerTypeNone = 0; - method.invoke (this, layerTypeNone, null); - } - catch (java.lang.IllegalArgumentException e) {} - catch (java.lang.IllegalAccessException e) {} - catch (java.lang.reflect.InvocationTargetException e) {} - } - } - - //============================================================================== - private native void handlePaint (long host, Canvas canvas, Paint paint); - - @Override - public void onDraw (Canvas canvas) - { - if (host == 0) - return; - - handlePaint (host, canvas, paint); - } - - @Override - public boolean isOpaque() - { - return opaque; - } - - private boolean opaque; - private long host; - private Paint paint = new Paint(); - - //============================================================================== - private native void handleMouseDown (long host, int index, float x, float y, long time); - private native void handleMouseDrag (long host, int index, float x, float y, long time); - private native void handleMouseUp (long host, int index, float x, float y, long time); - - @Override - public boolean onTouchEvent (MotionEvent event) - { - if (host == 0) - return false; - - int action = event.getAction(); - long time = event.getEventTime(); - - switch (action & MotionEvent.ACTION_MASK) - { - case MotionEvent.ACTION_DOWN: - handleMouseDown (host, event.getPointerId(0), event.getX(), event.getY(), time); - return true; - - case MotionEvent.ACTION_CANCEL: - case MotionEvent.ACTION_UP: - handleMouseUp (host, event.getPointerId(0), event.getX(), event.getY(), time); - return true; - - case MotionEvent.ACTION_MOVE: - { - int n = event.getPointerCount(); - for (int i = 0; i < n; ++i) - handleMouseDrag (host, event.getPointerId(i), event.getX(i), event.getY(i), time); - - return true; - } - - case MotionEvent.ACTION_POINTER_UP: - { - int i = (action & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT; - handleMouseUp (host, event.getPointerId(i), event.getX(i), event.getY(i), time); - return true; - } - - case MotionEvent.ACTION_POINTER_DOWN: - { - int i = (action & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT; - handleMouseDown (host, event.getPointerId(i), event.getX(i), event.getY(i), time); - return true; - } - - default: - break; - } - - return false; - } - - //============================================================================== - private native void handleKeyDown (long host, int keycode, int textchar); - private native void handleKeyUp (long host, int keycode, int textchar); - private native void handleBackButton (long host); - private native void handleKeyboardHidden (long host); - - public void showKeyboard (String type) - { - InputMethodManager imm = (InputMethodManager) getSystemService (Context.INPUT_METHOD_SERVICE); - - if (imm != null) - { - if (type.length() > 0) - { - imm.showSoftInput (this, android.view.inputmethod.InputMethodManager.SHOW_IMPLICIT); - imm.setInputMethod (getWindowToken(), type); - keyboardDismissListener.startListening(); - } - else - { - imm.hideSoftInputFromWindow (getWindowToken(), 0); - keyboardDismissListener.stopListening(); - } - } - } - - public void backButtonPressed() - { - if (host == 0) - return; - - handleBackButton (host); - } - - @Override - public boolean onKeyDown (int keyCode, KeyEvent event) - { - if (host == 0) - return false; - - switch (keyCode) - { - case KeyEvent.KEYCODE_VOLUME_UP: - case KeyEvent.KEYCODE_VOLUME_DOWN: - return super.onKeyDown (keyCode, event); - case KeyEvent.KEYCODE_BACK: - { - ((Activity) getContext()).onBackPressed(); - return true; - } - - default: - break; - } - - handleKeyDown (host, keyCode, event.getUnicodeChar()); - return true; - } - - @Override - public boolean onKeyUp (int keyCode, KeyEvent event) - { - if (host == 0) - return false; - - handleKeyUp (host, keyCode, event.getUnicodeChar()); - return true; - } - - @Override - public boolean onKeyMultiple (int keyCode, int count, KeyEvent event) - { - if (host == 0) - return false; - - if (keyCode != KeyEvent.KEYCODE_UNKNOWN || event.getAction() != KeyEvent.ACTION_MULTIPLE) - return super.onKeyMultiple (keyCode, count, event); - - if (event.getCharacters() != null) - { - int utf8Char = event.getCharacters().codePointAt (0); - handleKeyDown (host, utf8Char, utf8Char); - return true; - } - - return false; - } - - //============================================================================== - private final class KeyboardDismissListener - { - public KeyboardDismissListener (ComponentPeerView viewToUse) - { - view = viewToUse; - } - - private void startListening() - { - view.getViewTreeObserver().addOnGlobalLayoutListener(viewTreeObserver); - } - - private void stopListening() - { - view.getViewTreeObserver().removeGlobalOnLayoutListener(viewTreeObserver); - } - - private class TreeObserver implements ViewTreeObserver.OnGlobalLayoutListener - { - TreeObserver() - { - keyboardShown = false; - } - - @Override - public void onGlobalLayout() - { - Rect r = new Rect(); - - ViewGroup parentView = (ViewGroup) getParent(); - - if (parentView == null) - return; - - parentView.getWindowVisibleDisplayFrame (r); - - int diff = parentView.getHeight() - (r.bottom - r.top); - - // Arbitrary threshold, surely keyboard would take more than 20 pix. - if (diff < 20 && keyboardShown) - { - keyboardShown = false; - handleKeyboardHidden (view.host); - } - - if (! keyboardShown && diff > 20) - keyboardShown = true; - }; - - private boolean keyboardShown; - }; - - private ComponentPeerView view; - private TreeObserver viewTreeObserver = new TreeObserver(); - } - - private KeyboardDismissListener keyboardDismissListener = new KeyboardDismissListener(this); - - // this is here to make keyboard entry work on a Galaxy Tab2 10.1 - @Override - public InputConnection onCreateInputConnection (EditorInfo outAttrs) - { - outAttrs.actionLabel = ""; - outAttrs.hintText = ""; - outAttrs.initialCapsMode = 0; - outAttrs.initialSelEnd = outAttrs.initialSelStart = -1; - outAttrs.label = ""; - outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_EXTRACT_UI; - outAttrs.inputType = InputType.TYPE_NULL; - - return new BaseInputConnection (this, false); - } - - //============================================================================== - @Override - protected void onSizeChanged (int w, int h, int oldw, int oldh) - { - if (host == 0) - return; - - super.onSizeChanged (w, h, oldw, oldh); - viewSizeChanged (host); - } - - @Override - protected void onLayout (boolean changed, int left, int top, int right, int bottom) - { - for (int i = getChildCount(); --i >= 0;) - requestTransparentRegion (getChildAt (i)); - } - - private native void viewSizeChanged (long host); - - @Override - public void onFocusChange (View v, boolean hasFocus) - { - if (host == 0) - return; - - if (v == this) - focusChanged (host, hasFocus); - } - - private native void focusChanged (long host, boolean hasFocus); - - public void setViewName (String newName) {} - - public void setSystemUiVisibilityCompat (int visibility) - { - Method systemUIVisibilityMethod = null; - try - { - systemUIVisibilityMethod = this.getClass().getMethod ("setSystemUiVisibility", int.class); - } - catch (SecurityException e) { return; } - catch (NoSuchMethodException e) { return; } - if (systemUIVisibilityMethod == null) return; - - try - { - systemUIVisibilityMethod.invoke (this, visibility); - } - catch (java.lang.IllegalArgumentException e) {} - catch (java.lang.IllegalAccessException e) {} - catch (java.lang.reflect.InvocationTargetException e) {} - } - - public boolean isVisible() { return getVisibility() == VISIBLE; } - public void setVisible (boolean b) { setVisibility (b ? VISIBLE : INVISIBLE); } - - public boolean containsPoint (int x, int y) - { - return true; //xxx needs to check overlapping views - } - - //============================================================================== - private native void handleAppPaused (long host); - private native void handleAppResumed (long host); - - @Override - public void appPaused() - { - if (host == 0) - return; - - handleAppPaused (host); - } - - @Override - public void appResumed() - { - if (host == 0) - return; - - // Ensure that navigation/status bar visibility is correctly restored. - handleAppResumed (host); - } - } - - //============================================================================== - public static class NativeSurfaceView extends SurfaceView - implements SurfaceHolder.Callback - { - private long nativeContext = 0; - private boolean forVideo; - - NativeSurfaceView (Context context, long nativeContextPtr, boolean createdForVideo) - { - super (context); - nativeContext = nativeContextPtr; - forVideo = createdForVideo; - } - - public Surface getNativeSurface() - { - Surface retval = null; - - SurfaceHolder holder = getHolder(); - if (holder != null) - retval = holder.getSurface(); - - return retval; - } - - //============================================================================== - @Override - public void surfaceChanged (SurfaceHolder holder, int format, int width, int height) - { - if (forVideo) - surfaceChangedNativeVideo (nativeContext, holder, format, width, height); - else - surfaceChangedNative (nativeContext, holder, format, width, height); - } - - @Override - public void surfaceCreated (SurfaceHolder holder) - { - if (forVideo) - surfaceCreatedNativeVideo (nativeContext, holder); - else - surfaceCreatedNative (nativeContext, holder); - } - - @Override - public void surfaceDestroyed (SurfaceHolder holder) - { - if (forVideo) - surfaceDestroyedNativeVideo (nativeContext, holder); - else - surfaceDestroyedNative (nativeContext, holder); - } - - @Override - protected void dispatchDraw (Canvas canvas) - { - super.dispatchDraw (canvas); - - if (forVideo) - dispatchDrawNativeVideo (nativeContext, canvas); - else - dispatchDrawNative (nativeContext, canvas); - } - - //============================================================================== - @Override - protected void onAttachedToWindow() - { - super.onAttachedToWindow(); - getHolder().addCallback (this); - } - - @Override - protected void onDetachedFromWindow() - { - super.onDetachedFromWindow(); - getHolder().removeCallback (this); - } - - //============================================================================== - private native void dispatchDrawNative (long nativeContextPtr, Canvas canvas); - private native void surfaceCreatedNative (long nativeContextptr, SurfaceHolder holder); - private native void surfaceDestroyedNative (long nativeContextptr, SurfaceHolder holder); - private native void surfaceChangedNative (long nativeContextptr, SurfaceHolder holder, - int format, int width, int height); - - private native void dispatchDrawNativeVideo (long nativeContextPtr, Canvas canvas); - private native void surfaceCreatedNativeVideo (long nativeContextptr, SurfaceHolder holder); - private native void surfaceDestroyedNativeVideo (long nativeContextptr, SurfaceHolder holder); - private native void surfaceChangedNativeVideo (long nativeContextptr, SurfaceHolder holder, - int format, int width, int height); - } - - public NativeSurfaceView createNativeSurfaceView (long nativeSurfacePtr, boolean forVideo) - { - return new NativeSurfaceView (this, nativeSurfacePtr, forVideo); - } - - //============================================================================== - public final int[] renderGlyph (char glyph1, char glyph2, Paint paint, android.graphics.Matrix matrix, Rect bounds) - { - Path p = new Path(); - - char[] str = { glyph1, glyph2 }; - paint.getTextPath (str, 0, (glyph2 != 0 ? 2 : 1), 0.0f, 0.0f, p); - - RectF boundsF = new RectF(); - p.computeBounds (boundsF, true); - matrix.mapRect (boundsF); - - boundsF.roundOut (bounds); - bounds.left--; - bounds.right++; - - final int w = bounds.width(); - final int h = Math.max (1, bounds.height()); - - Bitmap bm = Bitmap.createBitmap (w, h, Bitmap.Config.ARGB_8888); - - Canvas c = new Canvas (bm); - matrix.postTranslate (-bounds.left, -bounds.top); - c.setMatrix (matrix); - c.drawPath (p, paint); - - final int sizeNeeded = w * h; - if (cachedRenderArray.length < sizeNeeded) - cachedRenderArray = new int [sizeNeeded]; - - bm.getPixels (cachedRenderArray, 0, w, 0, 0, w, h); - bm.recycle(); - return cachedRenderArray; - } - - private int[] cachedRenderArray = new int [256]; - - //============================================================================== - public static class NativeInvocationHandler implements InvocationHandler - { - public NativeInvocationHandler (Activity activityToUse, long nativeContextRef) - { - activity = activityToUse; - nativeContext = nativeContextRef; - } - - public void nativeContextDeleted() - { - nativeContext = 0; - } - - @Override - public void finalize() - { - activity.runOnUiThread (new Runnable() - { - @Override - public void run() - { - if (nativeContext != 0) - dispatchFinalize (nativeContext); - } - }); - } - - @Override - public Object invoke (Object proxy, Method method, Object[] args) throws Throwable - { - return dispatchInvoke (nativeContext, proxy, method, args); - } - - //============================================================================== - Activity activity; - private long nativeContext = 0; - - private native void dispatchFinalize (long nativeContextRef); - private native Object dispatchInvoke (long nativeContextRef, Object proxy, Method method, Object[] args); - } - - public InvocationHandler createInvocationHandler (long nativeContextRef) - { - return new NativeInvocationHandler (this, nativeContextRef); - } - - public void invocationHandlerContextDeleted (InvocationHandler handler) - { - ((NativeInvocationHandler) handler).nativeContextDeleted(); - } - - //============================================================================== - public static class HTTPStream - { - public HTTPStream (String address, boolean isPostToUse, byte[] postDataToUse, - String headersToUse, int timeOutMsToUse, - int[] statusCodeToUse, StringBuffer responseHeadersToUse, - int numRedirectsToFollowToUse, String httpRequestCmdToUse) throws IOException - { - isPost = isPostToUse; - postData = postDataToUse; - headers = headersToUse; - timeOutMs = timeOutMsToUse; - statusCode = statusCodeToUse; - responseHeaders = responseHeadersToUse; - totalLength = -1; - numRedirectsToFollow = numRedirectsToFollowToUse; - httpRequestCmd = httpRequestCmdToUse; - - connection = createConnection (address, isPost, postData, headers, timeOutMs, httpRequestCmd); - } - - private final HttpURLConnection createConnection (String address, boolean isPost, byte[] postData, - String headers, int timeOutMs, String httpRequestCmdToUse) throws IOException - { - HttpURLConnection newConnection = (HttpURLConnection) (new URL(address).openConnection()); - - try - { - newConnection.setInstanceFollowRedirects (false); - newConnection.setConnectTimeout (timeOutMs); - newConnection.setReadTimeout (timeOutMs); - - // headers - if not empty, this string is appended onto the headers that are used for the request. It must therefore be a valid set of HTML header directives, separated by newlines. - // So convert headers string to an array, with an element for each line - String headerLines[] = headers.split("\\n"); - - // Set request headers - for (int i = 0; i < headerLines.length; ++i) - { - int pos = headerLines[i].indexOf (":"); - - if (pos > 0 && pos < headerLines[i].length()) - { - String field = headerLines[i].substring (0, pos); - String value = headerLines[i].substring (pos + 1); - - if (value.length() > 0) - newConnection.setRequestProperty (field, value); - } - } - - newConnection.setRequestMethod (httpRequestCmd); - - if (isPost) - { - newConnection.setDoOutput (true); - - if (postData != null) - { - OutputStream out = newConnection.getOutputStream(); - out.write(postData); - out.flush(); - } - } - - return newConnection; - } - catch (Throwable e) - { - newConnection.disconnect(); - throw new IOException ("Connection error"); - } - } - - private final InputStream getCancellableStream (final boolean isInput) throws ExecutionException - { - synchronized (createFutureLock) - { - if (hasBeenCancelled.get()) - return null; - - streamFuture = executor.submit (new Callable() - { - @Override - public BufferedInputStream call() throws IOException - { - return new BufferedInputStream (isInput ? connection.getInputStream() - : connection.getErrorStream()); - } - }); - } - - try - { - return streamFuture.get(); - } - catch (InterruptedException e) - { - return null; - } - catch (CancellationException e) - { - return null; - } - } - - public final boolean connect() - { - boolean result = false; - int numFollowedRedirects = 0; - - while (true) - { - result = doConnect(); - - if (! result) - return false; - - if (++numFollowedRedirects > numRedirectsToFollow) - break; - - int status = statusCode[0]; - - if (status == 301 || status == 302 || status == 303 || status == 307) - { - // Assumes only one occurrence of "Location" - int pos1 = responseHeaders.indexOf ("Location:") + 10; - int pos2 = responseHeaders.indexOf ("\n", pos1); - - if (pos2 > pos1) - { - String currentLocation = connection.getURL().toString(); - String newLocation = responseHeaders.substring (pos1, pos2); - - try - { - // Handle newLocation whether it's absolute or relative - URL baseUrl = new URL (currentLocation); - URL newUrl = new URL (baseUrl, newLocation); - String transformedNewLocation = newUrl.toString(); - - if (transformedNewLocation != currentLocation) - { - // Clear responseHeaders before next iteration - responseHeaders.delete (0, responseHeaders.length()); - - synchronized (createStreamLock) - { - if (hasBeenCancelled.get()) - return false; - - connection.disconnect(); - - try - { - connection = createConnection (transformedNewLocation, isPost, - postData, headers, timeOutMs, - httpRequestCmd); - } - catch (Throwable e) - { - return false; - } - } - } - else - { - break; - } - } - catch (Throwable e) - { - return false; - } - } - else - { - break; - } - } - else - { - break; - } - } - - return result; - } - - private final boolean doConnect() - { - synchronized (createStreamLock) - { - if (hasBeenCancelled.get()) - return false; - - try - { - try - { - inputStream = getCancellableStream (true); - } - catch (ExecutionException e) - { - if (connection.getResponseCode() < 400) - { - statusCode[0] = connection.getResponseCode(); - connection.disconnect(); - return false; - } - } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - try - { - if (statusCode[0] >= 400) - inputStream = getCancellableStream (false); - else - inputStream = getCancellableStream (true); - } - catch (ExecutionException e) - {} - - for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) - { - if (entry.getKey() != null && entry.getValue() != null) - { - responseHeaders.append(entry.getKey() + ": " - + android.text.TextUtils.join(",", entry.getValue()) + "\n"); - - if (entry.getKey().compareTo ("Content-Length") == 0) - totalLength = Integer.decode (entry.getValue().get (0)); - } - } - - return true; - } - catch (IOException e) - { - return false; - } - } - } - - static class DisconnectionRunnable implements Runnable - { - public DisconnectionRunnable (HttpURLConnection theConnection, - InputStream theInputStream, - ReentrantLock theCreateStreamLock, - Object theCreateFutureLock, - Future theStreamFuture) - { - connectionToDisconnect = theConnection; - inputStream = theInputStream; - createStreamLock = theCreateStreamLock; - createFutureLock = theCreateFutureLock; - streamFuture = theStreamFuture; - } - - public void run() - { - try - { - if (! createStreamLock.tryLock()) - { - synchronized (createFutureLock) - { - if (streamFuture != null) - streamFuture.cancel (true); - } - - createStreamLock.lock(); - } - - if (connectionToDisconnect != null) - connectionToDisconnect.disconnect(); - - if (inputStream != null) - inputStream.close(); - } - catch (IOException e) - {} - finally - { - createStreamLock.unlock(); - } - } - - private HttpURLConnection connectionToDisconnect; - private InputStream inputStream; - private ReentrantLock createStreamLock; - private Object createFutureLock; - Future streamFuture; - } - - public final void release() - { - DisconnectionRunnable disconnectionRunnable = new DisconnectionRunnable (connection, - inputStream, - createStreamLock, - createFutureLock, - streamFuture); - - synchronized (createStreamLock) - { - hasBeenCancelled.set (true); - - connection = null; - } - - Thread disconnectionThread = new Thread(disconnectionRunnable); - disconnectionThread.start(); - } - - public final int read (byte[] buffer, int numBytes) - { - int num = 0; - - try - { - synchronized (createStreamLock) - { - if (inputStream != null) - num = inputStream.read (buffer, 0, numBytes); - } - } - catch (IOException e) - {} - - if (num > 0) - position += num; - - return num; - } - - public final long getPosition() { return position; } - public final long getTotalLength() { return totalLength; } - public final boolean isExhausted() { return false; } - public final boolean setPosition (long newPos) { return false; } - - private boolean isPost; - private byte[] postData; - private String headers; - private int timeOutMs; - String httpRequestCmd; - private HttpURLConnection connection; - private int[] statusCode; - private StringBuffer responseHeaders; - private int totalLength; - private int numRedirectsToFollow; - private InputStream inputStream; - private long position; - private final ReentrantLock createStreamLock = new ReentrantLock(); - private final Object createFutureLock = new Object(); - private AtomicBoolean hasBeenCancelled = new AtomicBoolean(); - - private final ExecutorService executor = Executors.newCachedThreadPool (Executors.defaultThreadFactory()); - Future streamFuture; - } - - public static final HTTPStream createHTTPStream (String address, boolean isPost, byte[] postData, - String headers, int timeOutMs, int[] statusCode, - StringBuffer responseHeaders, int numRedirectsToFollow, - String httpRequestCmd) - { - // timeout parameter of zero for HttpUrlConnection is a blocking connect (negative value for juce::URL) - if (timeOutMs < 0) - timeOutMs = 0; - else if (timeOutMs == 0) - timeOutMs = 30000; - - for (;;) - { - try - { - HTTPStream httpStream = new HTTPStream (address, isPost, postData, headers, - timeOutMs, statusCode, responseHeaders, - numRedirectsToFollow, httpRequestCmd); - - return httpStream; - } - catch (Throwable e) {} - - return null; - } - } - - public final void launchURL (String url) - { - startActivity (new Intent (Intent.ACTION_VIEW, Uri.parse (url))); - } - - private native boolean webViewPageLoadStarted (long host, WebView view, String url); - private native void webViewPageLoadFinished (long host, WebView view, String url); - private native void webViewReceivedError (long host, WebView view, WebResourceRequest request, WebResourceError error); private native void webViewReceivedHttpError (long host, WebView view, WebResourceRequest request, WebResourceResponse errorResponse); private native void webViewReceivedSslError (long host, WebView view, SslErrorHandler handler, SslError error); - private native void webViewCloseWindowRequest (long host, WebView view); - private native void webViewCreateWindowRequest (long host, WebView view); - - //============================================================================== - public class JuceWebViewClient extends WebViewClient - { - public JuceWebViewClient (long hostToUse) - { - host = hostToUse; - } - - public void hostDeleted() - { - synchronized (hostLock) - { - host = 0; - } - } - - @Override - public void onPageFinished (WebView view, String url) - { - if (host == 0) - return; - - webViewPageLoadFinished (host, view, url); - } - - @Override - public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) - { - if (host == 0) - return; - - webViewReceivedSslError (host, view, handler, error); - } - - @Override - public void onReceivedError (WebView view, WebResourceRequest request, WebResourceError error) - { - if (host == 0) - return; - - webViewReceivedError (host, view, request, error); - } - - @Override - public void onReceivedHttpError (WebView view, WebResourceRequest request, WebResourceResponse errorResponse) - { - if (host == 0) - return; - - webViewReceivedHttpError (host, view, request, errorResponse); - } - - @Override - public WebResourceResponse shouldInterceptRequest (WebView view, WebResourceRequest request) - { - synchronized (hostLock) - { - if (host != 0) - { - boolean shouldLoad = webViewPageLoadStarted (host, view, request.getUrl().toString()); - - if (shouldLoad) - return null; - } - } - - return new WebResourceResponse ("text/html", null, null); - } - - private long host; - private final Object hostLock = new Object(); - } - - public class JuceWebChromeClient extends WebChromeClient - { - public JuceWebChromeClient (long hostToUse) - { - host = hostToUse; - } - - @Override - public void onCloseWindow (WebView window) - { - webViewCloseWindowRequest (host, window); - } - - @Override - public boolean onCreateWindow (WebView view, boolean isDialog, - boolean isUserGesture, Message resultMsg) - { - webViewCreateWindowRequest (host, view); - return false; - } - - private long host; - private final Object hostLock = new Object(); - } - - - //============================================================================== - public class CameraDeviceStateCallback extends CameraDevice.StateCallback - { - private native void cameraDeviceStateClosed (long host, CameraDevice camera); - private native void cameraDeviceStateDisconnected (long host, CameraDevice camera); - private native void cameraDeviceStateError (long host, CameraDevice camera, int error); - private native void cameraDeviceStateOpened (long host, CameraDevice camera); - - CameraDeviceStateCallback (long hostToUse) - { - host = hostToUse; - } - - @Override - public void onClosed (CameraDevice camera) - { - cameraDeviceStateClosed (host, camera); - } - - @Override - public void onDisconnected (CameraDevice camera) - { - cameraDeviceStateDisconnected (host, camera); - } - - @Override - public void onError (CameraDevice camera, int error) - { - cameraDeviceStateError (host, camera, error); - } - - @Override - public void onOpened (CameraDevice camera) - { - cameraDeviceStateOpened (host, camera); - } - - private long host; - } - - //============================================================================== - public class CameraCaptureSessionStateCallback extends CameraCaptureSession.StateCallback - { - private native void cameraCaptureSessionActive (long host, CameraCaptureSession session); - private native void cameraCaptureSessionClosed (long host, CameraCaptureSession session); - private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session); - private native void cameraCaptureSessionConfigured (long host, CameraCaptureSession session); - private native void cameraCaptureSessionReady (long host, CameraCaptureSession session); - - CameraCaptureSessionStateCallback (long hostToUse) - { - host = hostToUse; - } - - @Override - public void onActive (CameraCaptureSession session) - { - cameraCaptureSessionActive (host, session); - } - - @Override - public void onClosed (CameraCaptureSession session) - { - cameraCaptureSessionClosed (host, session); - } - - @Override - public void onConfigureFailed (CameraCaptureSession session) - { - cameraCaptureSessionConfigureFailed (host, session); - } - - @Override - public void onConfigured (CameraCaptureSession session) - { - cameraCaptureSessionConfigured (host, session); - } - - @Override - public void onReady (CameraCaptureSession session) - { - cameraCaptureSessionReady (host, session); - } - - private long host; - } - - //============================================================================== - public class CameraCaptureSessionCaptureCallback extends CameraCaptureSession.CaptureCallback - { - private native void cameraCaptureSessionCaptureCompleted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, TotalCaptureResult result); - private native void cameraCaptureSessionCaptureFailed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureFailure failure); - private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureResult partialResult); - private native void cameraCaptureSessionCaptureStarted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, long timestamp, long frameNumber); - private native void cameraCaptureSessionCaptureSequenceAborted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId); - private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber); - - CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview) - { - host = hostToUse; - preview = shouldBePreview; - } - - @Override - public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request, - TotalCaptureResult result) - { - cameraCaptureSessionCaptureCompleted (host, preview, session, request, result); - } - - @Override - public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure) - { - cameraCaptureSessionCaptureFailed (host, preview, session, request, failure); - } - - @Override - public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request, - CaptureResult partialResult) - { - cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult); - } - - @Override - public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId) - { - cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId); - } - - @Override - public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber) - { - cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber); - } - - @Override - public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp, - long frameNumber) - { - cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber); - } - - private long host; - private boolean preview; - } - - //============================================================================== - public class JuceOrientationEventListener extends OrientationEventListener - { - private native void deviceOrientationChanged (long host, int orientation); - - public JuceOrientationEventListener (long hostToUse, Context context, int rate) - { - super (context, rate); - - host = hostToUse; - } - - @Override - public void onOrientationChanged (int orientation) - { - deviceOrientationChanged (host, orientation); - } - - private long host; - } - - - //============================================================================== - public class MediaControllerCallback extends MediaController.Callback - { - private native void mediaControllerAudioInfoChanged (long host, MediaController.PlaybackInfo info); - private native void mediaControllerMetadataChanged (long host, MediaMetadata metadata); - private native void mediaControllerPlaybackStateChanged (long host, PlaybackState state); - private native void mediaControllerSessionDestroyed (long host); - - MediaControllerCallback (long hostToUse) - { - host = hostToUse; - } - - @Override - public void onAudioInfoChanged (MediaController.PlaybackInfo info) - { - mediaControllerAudioInfoChanged (host, info); - } - - @Override - public void onMetadataChanged (MediaMetadata metadata) - { - mediaControllerMetadataChanged (host, metadata); - } - - @Override - public void onPlaybackStateChanged (PlaybackState state) - { - mediaControllerPlaybackStateChanged (host, state); - } - - @Override - public void onQueueChanged (List queue) {} - - @Override - public void onSessionDestroyed() - { - mediaControllerSessionDestroyed (host); - } - - private long host; - } - - //============================================================================== - public class MediaSessionCallback extends MediaSession.Callback - { - private native void mediaSessionPause (long host); - private native void mediaSessionPlay (long host); - private native void mediaSessionPlayFromMediaId (long host, String mediaId, Bundle extras); - private native void mediaSessionSeekTo (long host, long pos); - private native void mediaSessionStop (long host); - - - MediaSessionCallback (long hostToUse) - { - host = hostToUse; - } - - @Override - public void onPause() - { - mediaSessionPause (host); - } - - @Override - public void onPlay() - { - mediaSessionPlay (host); - } - - @Override - public void onPlayFromMediaId (String mediaId, Bundle extras) - { - mediaSessionPlayFromMediaId (host, mediaId, extras); - } - - @Override - public void onSeekTo (long pos) - { - mediaSessionSeekTo (host, pos); - } - - @Override - public void onStop() - { - mediaSessionStop (host); - } - - @Override - public void onFastForward() {} - - @Override - public boolean onMediaButtonEvent (Intent mediaButtonIntent) - { - return true; - } - - @Override - public void onRewind() {} - - @Override - public void onSkipToNext() {} - - @Override - public void onSkipToPrevious() {} - - @Override - public void onSkipToQueueItem (long id) {} - - private long host; - } - - //============================================================================== - public class SystemVolumeObserver extends ContentObserver - { - private native void mediaSessionSystemVolumeChanged (long host); - - SystemVolumeObserver (Activity activityToUse, long hostToUse) - { - super (null); - - activity = activityToUse; - host = hostToUse; - } - - void setEnabled (boolean shouldBeEnabled) - { - if (shouldBeEnabled) - activity.getApplicationContext().getContentResolver().registerContentObserver (android.provider.Settings.System.CONTENT_URI, true, this); - else - activity.getApplicationContext().getContentResolver().unregisterContentObserver (this); - } - - @Override - public void onChange (boolean selfChange, Uri uri) - { - if (uri.toString().startsWith ("content://settings/system/volume_music")) - mediaSessionSystemVolumeChanged (host); - } - - private Activity activity; - private long host; - } - - - //============================================================================== - public static final String getLocaleValue (boolean isRegion) - { - java.util.Locale locale = java.util.Locale.getDefault(); - - return isRegion ? locale.getCountry() - : locale.getLanguage(); - } - - private static final String getFileLocation (String type) - { - return Environment.getExternalStoragePublicDirectory (type).getAbsolutePath(); - } - - public static final String getDocumentsFolder() - { - if (getAndroidSDKVersion() >= 19) - return getFileLocation ("Documents"); - - return Environment.getDataDirectory().getAbsolutePath(); - } - - public static final String getPicturesFolder() { return getFileLocation (Environment.DIRECTORY_PICTURES); } - public static final String getMusicFolder() { return getFileLocation (Environment.DIRECTORY_MUSIC); } - public static final String getMoviesFolder() { return getFileLocation (Environment.DIRECTORY_MOVIES); } - public static final String getDownloadsFolder() { return getFileLocation (Environment.DIRECTORY_DOWNLOADS); } - - //============================================================================== - @Override - protected void onActivityResult (int requestCode, int resultCode, Intent data) - { - appActivityResult (requestCode, resultCode, data); - } - - @Override - protected void onNewIntent (Intent intent) - { - super.onNewIntent(intent); - setIntent(intent); - - appNewIntent (intent); - } - - //============================================================================== - public final Typeface getTypeFaceFromAsset (String assetName) - { - try - { - return Typeface.createFromAsset (this.getResources().getAssets(), assetName); - } - catch (Throwable e) {} - - return null; - } - - final protected static char[] hexArray = "0123456789ABCDEF".toCharArray(); - - public static String bytesToHex (byte[] bytes) - { - char[] hexChars = new char[bytes.length * 2]; - - for (int j = 0; j < bytes.length; ++j) - { - int v = bytes[j] & 0xff; - hexChars[j * 2] = hexArray[v >>> 4]; - hexChars[j * 2 + 1] = hexArray[v & 0x0f]; - } - - return new String (hexChars); - } - - final private java.util.Map dataCache = new java.util.HashMap(); - - synchronized private final File getDataCacheFile (byte[] data) - { - try - { - java.security.MessageDigest digest = java.security.MessageDigest.getInstance ("MD5"); - digest.update (data); - - String key = bytesToHex (digest.digest()); - - if (dataCache.containsKey (key)) - return (File) dataCache.get (key); - - File f = new File (this.getCacheDir(), "bindata_" + key); - f.delete(); - FileOutputStream os = new FileOutputStream (f); - os.write (data, 0, data.length); - dataCache.put (key, f); - return f; - } - catch (Throwable e) {} - - return null; - } - - private final void clearDataCache() - { - java.util.Iterator it = dataCache.values().iterator(); - - while (it.hasNext()) - { - File f = (File) it.next(); - f.delete(); - } - } - - public final Typeface getTypeFaceFromByteArray (byte[] data) - { - try - { - File f = getDataCacheFile (data); - - if (f != null) - return Typeface.createFromFile (f); - } - catch (Exception e) - { - Log.e ("JUCE", e.toString()); - } - - return null; - } - - public static final int getAndroidSDKVersion() - { - return android.os.Build.VERSION.SDK_INT; - } - - public final String audioManagerGetProperty (String property) - { - Object obj = getSystemService (AUDIO_SERVICE); - if (obj == null) - return null; - - java.lang.reflect.Method method; - - try - { - method = obj.getClass().getMethod ("getProperty", String.class); - } - catch (SecurityException e) { return null; } - catch (NoSuchMethodException e) { return null; } - - if (method == null) - return null; - - try - { - return (String) method.invoke (obj, property); - } - catch (java.lang.IllegalArgumentException e) {} - catch (java.lang.IllegalAccessException e) {} - catch (java.lang.reflect.InvocationTargetException e) {} - - return null; - } - - public final boolean hasSystemFeature (String property) - { - return getPackageManager().hasSystemFeature (property); - } -} diff --git a/examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/SharingContentProvider.java b/examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/SharingContentProvider.java deleted file mode 100644 index 9afbbaaa..00000000 --- a/examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/SharingContentProvider.java +++ /dev/null @@ -1,138 +0,0 @@ -package com.juce.demorunner; - -import android.content.ContentProvider; -import android.content.ContentValues; -import android.content.res.AssetFileDescriptor; -import android.content.res.Resources; -import android.database.Cursor; -import android.database.MatrixCursor; -import android.net.Uri; -import android.os.FileObserver; -import android.os.ParcelFileDescriptor; -import java.lang.String; - -public final class SharingContentProvider extends ContentProvider -{ - private Object lock = new Object(); - - private native void contentSharerFileObserverEvent (long host, int event, String path); - - private native Cursor contentSharerQuery (Uri uri, String[] projection, String selection, - String[] selectionArgs, String sortOrder); - - private native void contentSharerCursorClosed (long host); - - private native AssetFileDescriptor contentSharerOpenFile (Uri uri, String mode); - private native String[] contentSharerGetStreamTypes (Uri uri, String mimeTypeFilter); - - public final class ProviderFileObserver extends FileObserver - { - public ProviderFileObserver (long hostToUse, String path, int mask) - { - super (path, mask); - - host = hostToUse; - } - - public void onEvent (int event, String path) - { - contentSharerFileObserverEvent (host, event, path); - } - - private long host; - } - - public final class ProviderCursor extends MatrixCursor - { - ProviderCursor (long hostToUse, String[] columnNames) - { - super (columnNames); - - host = hostToUse; - } - - @Override - public void close() - { - super.close(); - - contentSharerCursorClosed (host); - } - - private long host; - } - - @Override - public boolean onCreate() - { - return true; - } - - @Override - public Cursor query (Uri url, String[] projection, String selection, - String[] selectionArgs, String sortOrder) - { - synchronized (lock) - { - return contentSharerQuery (url, projection, selection, selectionArgs, sortOrder); - } - } - - @Override - public Uri insert (Uri uri, ContentValues values) - { - return null; - } - - @Override - public int update (Uri uri, ContentValues values, String selection, - String[] selectionArgs) - { - return 0; - } - - @Override - public int delete (Uri uri, String selection, String[] selectionArgs) - { - return 0; - } - - @Override - public String getType (Uri uri) - { - return null; - } - - @Override - public AssetFileDescriptor openAssetFile (Uri uri, String mode) - { - synchronized (lock) - { - return contentSharerOpenFile (uri, mode); - } - } - - @Override - public ParcelFileDescriptor openFile (Uri uri, String mode) - { - synchronized (lock) - { - AssetFileDescriptor result = contentSharerOpenFile (uri, mode); - - if (result != null) - return result.getParcelFileDescriptor(); - - return null; - } - } - - @Override - public String[] getStreamTypes (Uri uri, String mimeTypeFilter) - { - synchronized (lock) - { - return contentSharerGetStreamTypes (uri, mimeTypeFilter); - } - } - -} diff --git a/examples/DemoRunner/Builds/Android/app/src/main/java/com/roli/juce/demorunner/DemoRunner.java b/examples/DemoRunner/Builds/Android/app/src/main/java/com/roli/juce/demorunner/DemoRunner.java deleted file mode 100644 index 7e4f1ae9..00000000 --- a/examples/DemoRunner/Builds/Android/app/src/main/java/com/roli/juce/demorunner/DemoRunner.java +++ /dev/null @@ -1,2996 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. - - JUCE is an open source library subject to commercial or open-source - licensing. - - The code included in this file is provided under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license. Permission - To use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted provided that the above copyright notice and - this permission notice appear in all copies. - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -package com.roli.juce.demorunner; - -import android.app.Activity; -import android.app.AlertDialog; -import android.content.DialogInterface; -import android.content.Context; -import android.content.Intent; -import android.content.res.Configuration; -import android.content.pm.PackageInfo; -import android.content.pm.PackageManager; -import android.hardware.camera2.*; -import android.net.http.SslError; -import android.net.Uri; -import android.os.Bundle; -import android.os.Looper; -import android.os.Handler; -import android.os.Message; -import android.os.ParcelUuid; -import android.os.Environment; -import android.view.*; -import android.view.inputmethod.BaseInputConnection; -import android.view.inputmethod.EditorInfo; -import android.view.inputmethod.InputConnection; -import android.view.inputmethod.InputMethodManager; -import android.graphics.*; -import android.text.ClipboardManager; -import android.text.InputType; -import android.util.DisplayMetrics; -import android.util.Log; -import android.util.Pair; -import android.webkit.SslErrorHandler; -import android.webkit.WebChromeClient; -import android.webkit.WebResourceError; -import android.webkit.WebResourceRequest; -import android.webkit.WebResourceResponse; -import android.webkit.WebView; -import android.webkit.WebViewClient; -import java.lang.Runnable; -import java.lang.ref.WeakReference; -import java.lang.reflect.*; -import java.util.*; -import java.io.*; -import java.net.URL; -import java.net.HttpURLConnection; -import android.media.AudioManager; -import android.Manifest; -import java.util.concurrent.CancellationException; -import java.util.concurrent.Future; -import java.util.concurrent.Executors; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.Callable; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.locks.ReentrantLock; -import java.util.concurrent.atomic.*; - -import android.media.midi.*; -import android.bluetooth.*; -import android.bluetooth.le.*; - - -//============================================================================== -public class DemoRunner extends Activity -{ - //============================================================================== - static - { - System.loadLibrary ("juce_jni"); - } - - //============================================================================== - public boolean isPermissionDeclaredInManifest (int permissionID) - { - String permissionToCheck = getAndroidPermissionName(permissionID); - - try - { - PackageInfo info = getPackageManager().getPackageInfo(getApplicationContext().getPackageName(), PackageManager.GET_PERMISSIONS); - - if (info.requestedPermissions != null) - for (String permission : info.requestedPermissions) - if (permission.equals (permissionToCheck)) - return true; - } - catch (PackageManager.NameNotFoundException e) - { - Log.d ("JUCE", "isPermissionDeclaredInManifest: PackageManager.NameNotFoundException = " + e.toString()); - } - - Log.d ("JUCE", "isPermissionDeclaredInManifest: could not find requested permission " + permissionToCheck); - return false; - } - - //============================================================================== - // these have to match the values of enum PermissionID in C++ class RuntimePermissions: - private static final int JUCE_PERMISSIONS_RECORD_AUDIO = 1; - private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2; - private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3; - private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4; - private static final int JUCE_PERMISSIONS_CAMERA = 5; - - private static String getAndroidPermissionName (int permissionID) - { - switch (permissionID) - { - case JUCE_PERMISSIONS_RECORD_AUDIO: return Manifest.permission.RECORD_AUDIO; - case JUCE_PERMISSIONS_BLUETOOTH_MIDI: return Manifest.permission.ACCESS_COARSE_LOCATION; - // use string value as this is not defined in SDKs < 16 - case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE"; - case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE; - case JUCE_PERMISSIONS_CAMERA: return Manifest.permission.CAMERA; - } - - // unknown permission ID! - assert false; - return new String(); - } - - public boolean isPermissionGranted (int permissionID) - { - return getApplicationContext().checkCallingOrSelfPermission (getAndroidPermissionName (permissionID)) == PackageManager.PERMISSION_GRANTED; - } - - private Map permissionCallbackPtrMap; - - public void requestRuntimePermission (int permissionID, long ptrToCallback) - { - String permissionName = getAndroidPermissionName (permissionID); - - if (getApplicationContext().checkCallingOrSelfPermission (permissionName) != PackageManager.PERMISSION_GRANTED) - { - // remember callbackPtr, request permissions, and let onRequestPermissionResult call callback asynchronously - permissionCallbackPtrMap.put (permissionID, ptrToCallback); - requestPermissionsCompat (new String[]{permissionName}, permissionID); - } - else - { - // permissions were already granted before, we can call callback directly - androidRuntimePermissionsCallback (true, ptrToCallback); - } - } - - private native void androidRuntimePermissionsCallback (boolean permissionWasGranted, long ptrToCallback); - - @Override - public void onRequestPermissionsResult (int permissionID, String permissions[], int[] grantResults) - { - boolean permissionsGranted = (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED); - - if (! permissionsGranted) - Log.d ("JUCE", "onRequestPermissionsResult: runtime permission was DENIED: " + getAndroidPermissionName (permissionID)); - - Long ptrToCallback = permissionCallbackPtrMap.get (permissionID); - permissionCallbackPtrMap.remove (permissionID); - androidRuntimePermissionsCallback (permissionsGranted, ptrToCallback); - } - - //============================================================================== - public interface JuceMidiPort - { - boolean isInputPort(); - - // start, stop does nothing on an output port - void start(); - void stop(); - - void close(); - - // send will do nothing on an input port - void sendMidi (byte[] msg, int offset, int count); - } - - //============================================================================== - //============================================================================== - public class BluetoothManager extends ScanCallback - { - BluetoothManager() - { - } - - public String[] getMidiBluetoothAddresses() - { - return bluetoothMidiDevices.toArray (new String[bluetoothMidiDevices.size()]); - } - - public String getHumanReadableStringForBluetoothAddress (String address) - { - BluetoothDevice btDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice (address); - return btDevice.getName(); - } - - public int getBluetoothDeviceStatus (String address) - { - return getAndroidMidiDeviceManager().getBluetoothDeviceStatus (address); - } - - public void startStopScan (boolean shouldStart) - { - BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); - - if (bluetoothAdapter == null) - { - Log.d ("JUCE", "BluetoothManager error: could not get default Bluetooth adapter"); - return; - } - - BluetoothLeScanner bluetoothLeScanner = bluetoothAdapter.getBluetoothLeScanner(); - - if (bluetoothLeScanner == null) - { - Log.d ("JUCE", "BluetoothManager error: could not get Bluetooth LE scanner"); - return; - } - - if (shouldStart) - { - ScanFilter.Builder scanFilterBuilder = new ScanFilter.Builder(); - scanFilterBuilder.setServiceUuid (ParcelUuid.fromString (bluetoothLEMidiServiceUUID)); - - ScanSettings.Builder scanSettingsBuilder = new ScanSettings.Builder(); - scanSettingsBuilder.setCallbackType (ScanSettings.CALLBACK_TYPE_ALL_MATCHES) - .setScanMode (ScanSettings.SCAN_MODE_LOW_POWER) - .setScanMode (ScanSettings.MATCH_MODE_STICKY); - - bluetoothLeScanner.startScan (Arrays.asList (scanFilterBuilder.build()), - scanSettingsBuilder.build(), - this); - } - else - { - bluetoothLeScanner.stopScan (this); - } - } - - public boolean pairBluetoothMidiDevice(String address) - { - BluetoothDevice btDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice (address); - - if (btDevice == null) - { - Log.d ("JUCE", "failed to create buletooth device from address"); - return false; - } - - return getAndroidMidiDeviceManager().pairBluetoothDevice (btDevice); - } - - public void unpairBluetoothMidiDevice (String address) - { - getAndroidMidiDeviceManager().unpairBluetoothDevice (address); - } - - public void onScanFailed (int errorCode) - { - } - - public void onScanResult (int callbackType, ScanResult result) - { - if (callbackType == ScanSettings.CALLBACK_TYPE_ALL_MATCHES - || callbackType == ScanSettings.CALLBACK_TYPE_FIRST_MATCH) - { - BluetoothDevice device = result.getDevice(); - - if (device != null) - bluetoothMidiDevices.add (device.getAddress()); - } - - if (callbackType == ScanSettings.CALLBACK_TYPE_MATCH_LOST) - { - Log.d ("JUCE", "ScanSettings.CALLBACK_TYPE_MATCH_LOST"); - BluetoothDevice device = result.getDevice(); - - if (device != null) - { - bluetoothMidiDevices.remove (device.getAddress()); - unpairBluetoothMidiDevice (device.getAddress()); - } - } - } - - public void onBatchScanResults (List results) - { - for (ScanResult result : results) - onScanResult (ScanSettings.CALLBACK_TYPE_ALL_MATCHES, result); - } - - private BluetoothLeScanner scanner; - private static final String bluetoothLEMidiServiceUUID = "03B80E5A-EDE8-4B33-A751-6CE34EC4C700"; - - private HashSet bluetoothMidiDevices = new HashSet(); - } - - public static class JuceMidiInputPort extends MidiReceiver implements JuceMidiPort - { - private native void handleReceive (long host, byte[] msg, int offset, int count, long timestamp); - - public JuceMidiInputPort (MidiDeviceManager mm, MidiOutputPort actualPort, MidiPortPath portPathToUse, long hostToUse) - { - owner = mm; - androidPort = actualPort; - portPath = portPathToUse; - juceHost = hostToUse; - isConnected = false; - } - - @Override - protected void finalize() throws Throwable - { - close(); - super.finalize(); - } - - @Override - public boolean isInputPort() - { - return true; - } - - @Override - public void start() - { - if (owner != null && androidPort != null && ! isConnected) { - androidPort.connect(this); - isConnected = true; - } - } - - @Override - public void stop() - { - if (owner != null && androidPort != null && isConnected) { - androidPort.disconnect(this); - isConnected = false; - } - } - - @Override - public void close() - { - if (androidPort != null) { - try { - androidPort.close(); - } catch (IOException exception) { - Log.d("JUCE", "IO Exception while closing port"); - } - } - - if (owner != null) - owner.removePort (portPath); - - owner = null; - androidPort = null; - } - - @Override - public void onSend (byte[] msg, int offset, int count, long timestamp) - { - if (count > 0) - handleReceive (juceHost, msg, offset, count, timestamp); - } - - @Override - public void onFlush() - {} - - @Override - public void sendMidi (byte[] msg, int offset, int count) - { - } - - MidiDeviceManager owner; - MidiOutputPort androidPort; - MidiPortPath portPath; - long juceHost; - boolean isConnected; - } - - public static class JuceMidiOutputPort implements JuceMidiPort - { - public JuceMidiOutputPort (MidiDeviceManager mm, MidiInputPort actualPort, MidiPortPath portPathToUse) - { - owner = mm; - androidPort = actualPort; - portPath = portPathToUse; - } - - @Override - protected void finalize() throws Throwable - { - close(); - super.finalize(); - } - - @Override - public boolean isInputPort() - { - return false; - } - - @Override - public void start() - { - } - - @Override - public void stop() - { - } - - @Override - public void sendMidi (byte[] msg, int offset, int count) - { - if (androidPort != null) - { - try { - androidPort.send(msg, offset, count); - } catch (IOException exception) - { - Log.d ("JUCE", "send midi had IO exception"); - } - } - } - - @Override - public void close() - { - if (androidPort != null) { - try { - androidPort.close(); - } catch (IOException exception) { - Log.d("JUCE", "IO Exception while closing port"); - } - } - - if (owner != null) - owner.removePort (portPath); - - owner = null; - androidPort = null; - } - - MidiDeviceManager owner; - MidiInputPort androidPort; - MidiPortPath portPath; - } - - private static class MidiPortPath extends Object - { - public MidiPortPath (int deviceIdToUse, boolean direction, int androidIndex) - { - deviceId = deviceIdToUse; - isInput = direction; - portIndex = androidIndex; - - } - - public int deviceId; - public int portIndex; - public boolean isInput; - - @Override - public int hashCode() - { - Integer i = new Integer ((deviceId * 128) + (portIndex < 128 ? portIndex : 127)); - return i.hashCode() * (isInput ? -1 : 1); - } - - @Override - public boolean equals (Object obj) - { - if (obj == null) - return false; - - if (getClass() != obj.getClass()) - return false; - - MidiPortPath other = (MidiPortPath) obj; - return (portIndex == other.portIndex && isInput == other.isInput && deviceId == other.deviceId); - } - } - - //============================================================================== - public class MidiDeviceManager extends MidiManager.DeviceCallback implements MidiManager.OnDeviceOpenedListener - { - //============================================================================== - private class DummyBluetoothGattCallback extends BluetoothGattCallback - { - public DummyBluetoothGattCallback (MidiDeviceManager mm) - { - super(); - owner = mm; - } - - public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) - { - if (newState == BluetoothProfile.STATE_CONNECTED) - { - gatt.requestConnectionPriority(BluetoothGatt.CONNECTION_PRIORITY_HIGH); - owner.pairBluetoothDeviceStepTwo (gatt.getDevice()); - } - } - public void onServicesDiscovered(BluetoothGatt gatt, int status) {} - public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {} - public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {} - public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {} - public void onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {} - public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {} - public void onReliableWriteCompleted(BluetoothGatt gatt, int status) {} - public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) {} - public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) {} - - private MidiDeviceManager owner; - } - - //============================================================================== - private class MidiDeviceOpenTask extends java.util.TimerTask - { - public MidiDeviceOpenTask (MidiDeviceManager deviceManager, MidiDevice device, BluetoothGatt gattToUse) - { - owner = deviceManager; - midiDevice = device; - btGatt = gattToUse; - } - - @Override - public boolean cancel() - { - synchronized (MidiDeviceOpenTask.class) - { - owner = null; - boolean retval = super.cancel(); - - if (btGatt != null) - { - btGatt.disconnect(); - btGatt.close(); - - btGatt = null; - } - - if (midiDevice != null) - { - try - { - midiDevice.close(); - } - catch (IOException e) - {} - - midiDevice = null; - } - - return retval; - } - } - - public String getBluetoothAddress() - { - synchronized (MidiDeviceOpenTask.class) - { - if (midiDevice != null) - { - MidiDeviceInfo info = midiDevice.getInfo(); - if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH) - { - BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); - if (btDevice != null) - return btDevice.getAddress(); - } - } - } - - return ""; - } - - public BluetoothGatt getGatt() { return btGatt; } - - public int getID() - { - return midiDevice.getInfo().getId(); - } - - @Override - public void run() - { - synchronized (MidiDeviceOpenTask.class) - { - if (owner != null && midiDevice != null) - owner.onDeviceOpenedDelayed (midiDevice); - } - } - - private MidiDeviceManager owner; - private MidiDevice midiDevice; - private BluetoothGatt btGatt; - } - - //============================================================================== - public MidiDeviceManager() - { - manager = (MidiManager) getSystemService (MIDI_SERVICE); - - if (manager == null) - { - Log.d ("JUCE", "MidiDeviceManager error: could not get MidiManager system service"); - return; - } - - openPorts = new HashMap> (); - midiDevices = new ArrayList>(); - openTasks = new HashMap(); - btDevicesPairing = new HashMap(); - - MidiDeviceInfo[] foundDevices = manager.getDevices(); - for (MidiDeviceInfo info : foundDevices) - onDeviceAdded (info); - - manager.registerDeviceCallback (this, null); - } - - protected void finalize() throws Throwable - { - manager.unregisterDeviceCallback (this); - - synchronized (MidiDeviceManager.class) - { - btDevicesPairing.clear(); - - for (Integer deviceID : openTasks.keySet()) - openTasks.get (deviceID).cancel(); - - openTasks = null; - } - - for (MidiPortPath key : openPorts.keySet()) - openPorts.get (key).get().close(); - - openPorts = null; - - for (Pair device : midiDevices) - { - if (device.second != null) - { - device.second.disconnect(); - device.second.close(); - } - - device.first.close(); - } - - midiDevices.clear(); - - super.finalize(); - } - - public String[] getJuceAndroidMidiInputDevices() - { - return getJuceAndroidMidiDevices (MidiDeviceInfo.PortInfo.TYPE_OUTPUT); - } - - public String[] getJuceAndroidMidiOutputDevices() - { - return getJuceAndroidMidiDevices (MidiDeviceInfo.PortInfo.TYPE_INPUT); - } - - private String[] getJuceAndroidMidiDevices (int portType) - { - // only update the list when JUCE asks for a new list - synchronized (MidiDeviceManager.class) - { - deviceInfos = getDeviceInfos(); - } - - ArrayList portNames = new ArrayList(); - - int index = 0; - for (MidiPortPath portInfo = getPortPathForJuceIndex (portType, index); portInfo != null; portInfo = getPortPathForJuceIndex (portType, ++index)) - portNames.add (getPortName (portInfo)); - - String[] names = new String[portNames.size()]; - return portNames.toArray (names); - } - - private JuceMidiPort openMidiPortWithJuceIndex (int index, long host, boolean isInput) - { - synchronized (MidiDeviceManager.class) - { - int portTypeToFind = (isInput ? MidiDeviceInfo.PortInfo.TYPE_OUTPUT : MidiDeviceInfo.PortInfo.TYPE_INPUT); - MidiPortPath portInfo = getPortPathForJuceIndex (portTypeToFind, index); - - if (portInfo != null) - { - // ports must be opened exclusively! - if (openPorts.containsKey (portInfo)) - return null; - - Pair devicePair = getMidiDevicePairForId (portInfo.deviceId); - - if (devicePair != null) - { - MidiDevice device = devicePair.first; - if (device != null) - { - JuceMidiPort juceMidiPort = null; - - if (isInput) - { - MidiOutputPort outputPort = device.openOutputPort(portInfo.portIndex); - - if (outputPort != null) - juceMidiPort = new JuceMidiInputPort(this, outputPort, portInfo, host); - } - else - { - MidiInputPort inputPort = device.openInputPort(portInfo.portIndex); - - if (inputPort != null) - juceMidiPort = new JuceMidiOutputPort(this, inputPort, portInfo); - } - - if (juceMidiPort != null) - { - openPorts.put(portInfo, new WeakReference(juceMidiPort)); - - return juceMidiPort; - } - } - } - } - } - - return null; - } - - public JuceMidiPort openMidiInputPortWithJuceIndex (int index, long host) - { - return openMidiPortWithJuceIndex (index, host, true); - } - - public JuceMidiPort openMidiOutputPortWithJuceIndex (int index) - { - return openMidiPortWithJuceIndex (index, 0, false); - } - - /* 0: unpaired, 1: paired, 2: pairing */ - public int getBluetoothDeviceStatus (String address) - { - synchronized (MidiDeviceManager.class) - { - if (! address.isEmpty()) - { - if (findMidiDeviceForBluetoothAddress (address) != null) - return 1; - - if (btDevicesPairing.containsKey (address)) - return 2; - - if (findOpenTaskForBluetoothAddress (address) != null) - return 2; - } - } - - return 0; - } - - public boolean pairBluetoothDevice (BluetoothDevice btDevice) - { - String btAddress = btDevice.getAddress(); - if (btAddress.isEmpty()) - return false; - - synchronized (MidiDeviceManager.class) - { - if (getBluetoothDeviceStatus (btAddress) != 0) - return false; - - - btDevicesPairing.put (btDevice.getAddress(), null); - BluetoothGatt gatt = btDevice.connectGatt (getApplicationContext(), true, new DummyBluetoothGattCallback (this)); - - if (gatt != null) - { - btDevicesPairing.put (btDevice.getAddress(), gatt); - } - else - { - pairBluetoothDeviceStepTwo (btDevice); - } - } - - return true; - } - - public void pairBluetoothDeviceStepTwo (BluetoothDevice btDevice) - { - manager.openBluetoothDevice(btDevice, this, null); - } - - public void unpairBluetoothDevice (String address) - { - if (address.isEmpty()) - return; - - synchronized (MidiDeviceManager.class) - { - if (btDevicesPairing.containsKey (address)) - { - BluetoothGatt gatt = btDevicesPairing.get (address); - if (gatt != null) - { - gatt.disconnect(); - gatt.close(); - } - - btDevicesPairing.remove (address); - } - - MidiDeviceOpenTask openTask = findOpenTaskForBluetoothAddress (address); - if (openTask != null) - { - int deviceID = openTask.getID(); - openTask.cancel(); - openTasks.remove (deviceID); - } - - Pair midiDevicePair = findMidiDeviceForBluetoothAddress (address); - if (midiDevicePair != null) - { - MidiDevice midiDevice = midiDevicePair.first; - onDeviceRemoved (midiDevice.getInfo()); - - try { - midiDevice.close(); - } - catch (IOException exception) - { - Log.d ("JUCE", "IOException while closing midi device"); - } - } - } - } - - private Pair findMidiDeviceForBluetoothAddress (String address) - { - for (Pair midiDevice : midiDevices) - { - MidiDeviceInfo info = midiDevice.first.getInfo(); - if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH) - { - BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); - if (btDevice != null && btDevice.getAddress().equals (address)) - return midiDevice; - } - } - - return null; - } - - private MidiDeviceOpenTask findOpenTaskForBluetoothAddress (String address) - { - for (Integer deviceID : openTasks.keySet()) - { - MidiDeviceOpenTask openTask = openTasks.get (deviceID); - if (openTask.getBluetoothAddress().equals (address)) - return openTask; - } - - return null; - } - - public void removePort (MidiPortPath path) - { - openPorts.remove (path); - } - - public String getInputPortNameForJuceIndex (int index) - { - MidiPortPath portInfo = getPortPathForJuceIndex (MidiDeviceInfo.PortInfo.TYPE_OUTPUT, index); - if (portInfo != null) - return getPortName (portInfo); - - return ""; - } - - public String getOutputPortNameForJuceIndex (int index) - { - MidiPortPath portInfo = getPortPathForJuceIndex (MidiDeviceInfo.PortInfo.TYPE_INPUT, index); - if (portInfo != null) - return getPortName (portInfo); - - return ""; - } - - public void onDeviceAdded (MidiDeviceInfo info) - { - // only add standard midi devices - if (info.getType() == info.TYPE_BLUETOOTH) - return; - - manager.openDevice (info, this, null); - } - - public void onDeviceRemoved (MidiDeviceInfo info) - { - synchronized (MidiDeviceManager.class) - { - Pair devicePair = getMidiDevicePairForId (info.getId()); - - if (devicePair != null) - { - MidiDevice midiDevice = devicePair.first; - BluetoothGatt gatt = devicePair.second; - - // close all ports that use this device - boolean removedPort = true; - - while (removedPort == true) - { - removedPort = false; - for (MidiPortPath key : openPorts.keySet()) - { - if (key.deviceId == info.getId()) - { - openPorts.get(key).get().close(); - removedPort = true; - break; - } - } - } - - if (gatt != null) - { - gatt.disconnect(); - gatt.close(); - } - - midiDevices.remove (devicePair); - } - } - } - - public void onDeviceStatusChanged (MidiDeviceStatus status) - { - } - - @Override - public void onDeviceOpened (MidiDevice theDevice) - { - synchronized (MidiDeviceManager.class) - { - MidiDeviceInfo info = theDevice.getInfo(); - int deviceID = info.getId(); - BluetoothGatt gatt = null; - boolean isBluetooth = false; - - if (! openTasks.containsKey (deviceID)) - { - if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH) - { - isBluetooth = true; - BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); - if (btDevice != null) - { - String btAddress = btDevice.getAddress(); - if (btDevicesPairing.containsKey (btAddress)) - { - gatt = btDevicesPairing.get (btAddress); - btDevicesPairing.remove (btAddress); - } - else - { - // unpair was called in the mean time - try - { - Pair midiDevicePair = findMidiDeviceForBluetoothAddress (btDevice.getAddress()); - if (midiDevicePair != null) - { - gatt = midiDevicePair.second; - - if (gatt != null) - { - gatt.disconnect(); - gatt.close(); - } - } - - theDevice.close(); - } - catch (IOException e) - {} - - return; - } - } - } - - MidiDeviceOpenTask openTask = new MidiDeviceOpenTask (this, theDevice, gatt); - openTasks.put (deviceID, openTask); - - new java.util.Timer().schedule (openTask, (isBluetooth ? 2000 : 100)); - } - } - } - - public void onDeviceOpenedDelayed (MidiDevice theDevice) - { - synchronized (MidiDeviceManager.class) - { - int deviceID = theDevice.getInfo().getId(); - - if (openTasks.containsKey (deviceID)) - { - if (! midiDevices.contains(theDevice)) - { - BluetoothGatt gatt = openTasks.get (deviceID).getGatt(); - openTasks.remove (deviceID); - midiDevices.add (new Pair (theDevice, gatt)); - } - } - else - { - // unpair was called in the mean time - MidiDeviceInfo info = theDevice.getInfo(); - BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); - if (btDevice != null) - { - String btAddress = btDevice.getAddress(); - Pair midiDevicePair = findMidiDeviceForBluetoothAddress (btDevice.getAddress()); - if (midiDevicePair != null) - { - BluetoothGatt gatt = midiDevicePair.second; - - if (gatt != null) - { - gatt.disconnect(); - gatt.close(); - } - } - } - - try - { - theDevice.close(); - } - catch (IOException e) - {} - } - } - } - - public String getPortName(MidiPortPath path) - { - int portTypeToFind = (path.isInput ? MidiDeviceInfo.PortInfo.TYPE_INPUT : MidiDeviceInfo.PortInfo.TYPE_OUTPUT); - - synchronized (MidiDeviceManager.class) - { - for (MidiDeviceInfo info : deviceInfos) - { - int localIndex = 0; - if (info.getId() == path.deviceId) - { - for (MidiDeviceInfo.PortInfo portInfo : info.getPorts()) - { - int portType = portInfo.getType(); - if (portType == portTypeToFind) - { - int portIndex = portInfo.getPortNumber(); - if (portIndex == path.portIndex) - { - String portName = portInfo.getName(); - if (portName.isEmpty()) - portName = (String) info.getProperties().get(info.PROPERTY_NAME); - - return portName; - } - } - } - } - } - } - - return ""; - } - - public MidiPortPath getPortPathForJuceIndex (int portType, int juceIndex) - { - int portIdx = 0; - for (MidiDeviceInfo info : deviceInfos) - { - for (MidiDeviceInfo.PortInfo portInfo : info.getPorts()) - { - if (portInfo.getType() == portType) - { - if (portIdx == juceIndex) - return new MidiPortPath (info.getId(), - (portType == MidiDeviceInfo.PortInfo.TYPE_INPUT), - portInfo.getPortNumber()); - - portIdx++; - } - } - } - - return null; - } - - private MidiDeviceInfo[] getDeviceInfos() - { - synchronized (MidiDeviceManager.class) - { - MidiDeviceInfo[] infos = new MidiDeviceInfo[midiDevices.size()]; - - int idx = 0; - for (Pair midiDevice : midiDevices) - infos[idx++] = midiDevice.first.getInfo(); - - return infos; - } - } - - private Pair getMidiDevicePairForId (int deviceId) - { - synchronized (MidiDeviceManager.class) - { - for (Pair midiDevice : midiDevices) - if (midiDevice.first.getInfo().getId() == deviceId) - return midiDevice; - } - - return null; - } - - private MidiManager manager; - private HashMap btDevicesPairing; - private HashMap openTasks; - private ArrayList> midiDevices; - private MidiDeviceInfo[] deviceInfos; - private HashMap> openPorts; - } - - public MidiDeviceManager getAndroidMidiDeviceManager() - { - if (getSystemService (MIDI_SERVICE) == null) - return null; - - synchronized (DemoRunner.class) - { - if (midiDeviceManager == null) - midiDeviceManager = new MidiDeviceManager(); - } - - return midiDeviceManager; - } - - public BluetoothManager getAndroidBluetoothManager() - { - BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); - - if (adapter == null) - return null; - - if (adapter.getBluetoothLeScanner() == null) - return null; - - synchronized (DemoRunner.class) - { - if (bluetoothManager == null) - bluetoothManager = new BluetoothManager(); - } - - return bluetoothManager; - } - - //============================================================================== - @Override - public void onCreate (Bundle savedInstanceState) - { - super.onCreate (savedInstanceState); - - isScreenSaverEnabled = true; - hideActionBar(); - viewHolder = new ViewHolder (this); - setContentView (viewHolder); - - setVolumeControlStream (AudioManager.STREAM_MUSIC); - - permissionCallbackPtrMap = new HashMap(); - appPausedResumedListeners = new HashMap(); - } - - @Override - protected void onDestroy() - { - quitApp(); - super.onDestroy(); - - clearDataCache(); - } - - @Override - protected void onPause() - { - suspendApp(); - - Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); - - for (Long k : keys) - appPausedResumedListeners.get (k).appPaused(); - - try - { - Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down - // openGL glitches when pausing/resuming apps.. - } catch (InterruptedException e) {} - - super.onPause(); - } - - @Override - protected void onResume() - { - super.onResume(); - resumeApp(); - - Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); - - for (Long k : keys) - appPausedResumedListeners.get (k).appResumed(); - } - - @Override - public void onConfigurationChanged (Configuration cfg) - { - super.onConfigurationChanged (cfg); - setContentView (viewHolder); - } - - private void callAppLauncher() - { - launchApp (getApplicationInfo().publicSourceDir, - getApplicationInfo().dataDir); - } - - // Need to override this as the default implementation always finishes the activity. - @Override - public void onBackPressed() - { - ComponentPeerView focusedView = getViewWithFocusOrDefaultView(); - - if (focusedView == null) - return; - - focusedView.backButtonPressed(); - } - - private ComponentPeerView getViewWithFocusOrDefaultView() - { - for (int i = 0; i < viewHolder.getChildCount(); ++i) - { - if (viewHolder.getChildAt (i).hasFocus()) - return (ComponentPeerView) viewHolder.getChildAt (i); - } - - if (viewHolder.getChildCount() > 0) - return (ComponentPeerView) viewHolder.getChildAt (0); - - return null; - } - - //============================================================================== - private void hideActionBar() - { - // get "getActionBar" method - java.lang.reflect.Method getActionBarMethod = null; - try - { - getActionBarMethod = this.getClass().getMethod ("getActionBar"); - } - catch (SecurityException e) { return; } - catch (NoSuchMethodException e) { return; } - if (getActionBarMethod == null) return; - - // invoke "getActionBar" method - Object actionBar = null; - try - { - actionBar = getActionBarMethod.invoke (this); - } - catch (java.lang.IllegalArgumentException e) { return; } - catch (java.lang.IllegalAccessException e) { return; } - catch (java.lang.reflect.InvocationTargetException e) { return; } - if (actionBar == null) return; - - // get "hide" method - java.lang.reflect.Method actionBarHideMethod = null; - try - { - actionBarHideMethod = actionBar.getClass().getMethod ("hide"); - } - catch (SecurityException e) { return; } - catch (NoSuchMethodException e) { return; } - if (actionBarHideMethod == null) return; - - // invoke "hide" method - try - { - actionBarHideMethod.invoke (actionBar); - } - catch (java.lang.IllegalArgumentException e) {} - catch (java.lang.IllegalAccessException e) {} - catch (java.lang.reflect.InvocationTargetException e) {} - } - - void requestPermissionsCompat (String[] permissions, int requestCode) - { - Method requestPermissionsMethod = null; - try - { - requestPermissionsMethod = this.getClass().getMethod ("requestPermissions", - String[].class, int.class); - } - catch (SecurityException e) { return; } - catch (NoSuchMethodException e) { return; } - if (requestPermissionsMethod == null) return; - - try - { - requestPermissionsMethod.invoke (this, permissions, requestCode); - } - catch (java.lang.IllegalArgumentException e) {} - catch (java.lang.IllegalAccessException e) {} - catch (java.lang.reflect.InvocationTargetException e) {} - } - - //============================================================================== - private native void launchApp (String appFile, String appDataDir); - private native void quitApp(); - private native void suspendApp(); - private native void resumeApp(); - private native void setScreenSize (int screenWidth, int screenHeight, int dpi); - private native void appActivityResult (int requestCode, int resultCode, Intent data); - private native void appNewIntent (Intent intent); - - //============================================================================== - private ViewHolder viewHolder; - private MidiDeviceManager midiDeviceManager = null; - private BluetoothManager bluetoothManager = null; - private boolean isScreenSaverEnabled; - private java.util.Timer keepAliveTimer; - - public final ComponentPeerView createNewView (boolean opaque, long host) - { - ComponentPeerView v = new ComponentPeerView (this, opaque, host); - viewHolder.addView (v); - addAppPausedResumedListener (v, host); - return v; - } - - public final void deleteView (ComponentPeerView view) - { - removeAppPausedResumedListener (view, view.host); - - view.host = 0; - - ViewGroup group = (ViewGroup) (view.getParent()); - - if (group != null) - group.removeView (view); - } - - public final void deleteNativeSurfaceView (NativeSurfaceView view) - { - ViewGroup group = (ViewGroup) (view.getParent()); - - if (group != null) - group.removeView (view); - } - - final class ViewHolder extends ViewGroup - { - public ViewHolder (Context context) - { - super (context); - setDescendantFocusability (ViewGroup.FOCUS_AFTER_DESCENDANTS); - setFocusable (false); - } - - protected final void onLayout (boolean changed, int left, int top, int right, int bottom) - { - setScreenSize (getWidth(), getHeight(), getDPI()); - - if (isFirstResize) - { - isFirstResize = false; - callAppLauncher(); - } - } - - private final int getDPI() - { - DisplayMetrics metrics = new DisplayMetrics(); - getWindowManager().getDefaultDisplay().getMetrics (metrics); - return metrics.densityDpi; - } - - private boolean isFirstResize = true; - } - - public final void excludeClipRegion (android.graphics.Canvas canvas, float left, float top, float right, float bottom) - { - canvas.clipRect (left, top, right, bottom, android.graphics.Region.Op.DIFFERENCE); - } - - //============================================================================== - public final void setScreenSaver (boolean enabled) - { - if (isScreenSaverEnabled != enabled) - { - isScreenSaverEnabled = enabled; - - if (keepAliveTimer != null) - { - keepAliveTimer.cancel(); - keepAliveTimer = null; - } - - if (enabled) - { - getWindow().clearFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); - } - else - { - getWindow().addFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); - - // If no user input is received after about 3 seconds, the OS will lower the - // task's priority, so this timer forces it to be kept active. - keepAliveTimer = new java.util.Timer(); - - keepAliveTimer.scheduleAtFixedRate (new TimerTask() - { - @Override - public void run() - { - android.app.Instrumentation instrumentation = new android.app.Instrumentation(); - - try - { - instrumentation.sendKeyDownUpSync (KeyEvent.KEYCODE_UNKNOWN); - } - catch (Exception e) - { - } - } - }, 2000, 2000); - } - } - } - - public final boolean getScreenSaver() - { - return isScreenSaverEnabled; - } - - //============================================================================== - public final String getClipboardContent() - { - ClipboardManager clipboard = (ClipboardManager) getSystemService (CLIPBOARD_SERVICE); - return clipboard.getText().toString(); - } - - public final void setClipboardContent (String newText) - { - ClipboardManager clipboard = (ClipboardManager) getSystemService (CLIPBOARD_SERVICE); - clipboard.setText (newText); - } - - //============================================================================== - public final void showMessageBox (String title, String message, final long callback) - { - AlertDialog.Builder builder = new AlertDialog.Builder (this); - builder.setTitle (title) - .setMessage (message) - .setCancelable (true) - .setOnCancelListener (new DialogInterface.OnCancelListener() - { - public void onCancel (DialogInterface dialog) - { - DemoRunner.this.alertDismissed (callback, 0); - } - }) - .setPositiveButton ("OK", new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - DemoRunner.this.alertDismissed (callback, 0); - } - }); - - builder.create().show(); - } - - public final void showOkCancelBox (String title, String message, final long callback, - String okButtonText, String cancelButtonText) - { - AlertDialog.Builder builder = new AlertDialog.Builder (this); - builder.setTitle (title) - .setMessage (message) - .setCancelable (true) - .setOnCancelListener (new DialogInterface.OnCancelListener() - { - public void onCancel (DialogInterface dialog) - { - DemoRunner.this.alertDismissed (callback, 0); - } - }) - .setPositiveButton (okButtonText.isEmpty() ? "OK" : okButtonText, new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - DemoRunner.this.alertDismissed (callback, 1); - } - }) - .setNegativeButton (cancelButtonText.isEmpty() ? "Cancel" : cancelButtonText, new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - DemoRunner.this.alertDismissed (callback, 0); - } - }); - - builder.create().show(); - } - - public final void showYesNoCancelBox (String title, String message, final long callback) - { - AlertDialog.Builder builder = new AlertDialog.Builder (this); - builder.setTitle (title) - .setMessage (message) - .setCancelable (true) - .setOnCancelListener (new DialogInterface.OnCancelListener() - { - public void onCancel (DialogInterface dialog) - { - DemoRunner.this.alertDismissed (callback, 0); - } - }) - .setPositiveButton ("Yes", new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - DemoRunner.this.alertDismissed (callback, 1); - } - }) - .setNegativeButton ("No", new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - DemoRunner.this.alertDismissed (callback, 2); - } - }) - .setNeutralButton ("Cancel", new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - DemoRunner.this.alertDismissed (callback, 0); - } - }); - - builder.create().show(); - } - - public native void alertDismissed (long callback, int id); - - //============================================================================== - public interface AppPausedResumedListener - { - void appPaused(); - void appResumed(); - } - - private Map appPausedResumedListeners; - - public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) - { - appPausedResumedListeners.put (new Long (listenerHost), l); - } - - public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) - { - appPausedResumedListeners.remove (new Long (listenerHost)); - } - - //============================================================================== - public final class ComponentPeerView extends ViewGroup - implements View.OnFocusChangeListener, AppPausedResumedListener - { - public ComponentPeerView (Context context, boolean opaque_, long host) - { - super (context); - this.host = host; - setWillNotDraw (false); - opaque = opaque_; - - setFocusable (true); - setFocusableInTouchMode (true); - setOnFocusChangeListener (this); - - // swap red and blue colours to match internal opengl texture format - ColorMatrix colorMatrix = new ColorMatrix(); - - float[] colorTransform = { 0, 0, 1.0f, 0, 0, - 0, 1.0f, 0, 0, 0, - 1.0f, 0, 0, 0, 0, - 0, 0, 0, 1.0f, 0 }; - - colorMatrix.set (colorTransform); - paint.setColorFilter (new ColorMatrixColorFilter (colorMatrix)); - - java.lang.reflect.Method method = null; - - try - { - method = getClass().getMethod ("setLayerType", int.class, Paint.class); - } - catch (SecurityException e) {} - catch (NoSuchMethodException e) {} - - if (method != null) - { - try - { - int layerTypeNone = 0; - method.invoke (this, layerTypeNone, null); - } - catch (java.lang.IllegalArgumentException e) {} - catch (java.lang.IllegalAccessException e) {} - catch (java.lang.reflect.InvocationTargetException e) {} - } - } - - //============================================================================== - private native void handlePaint (long host, Canvas canvas, Paint paint); - - @Override - public void onDraw (Canvas canvas) - { - if (host == 0) - return; - - handlePaint (host, canvas, paint); - } - - @Override - public boolean isOpaque() - { - return opaque; - } - - private boolean opaque; - private long host; - private Paint paint = new Paint(); - - //============================================================================== - private native void handleMouseDown (long host, int index, float x, float y, long time); - private native void handleMouseDrag (long host, int index, float x, float y, long time); - private native void handleMouseUp (long host, int index, float x, float y, long time); - - @Override - public boolean onTouchEvent (MotionEvent event) - { - if (host == 0) - return false; - - int action = event.getAction(); - long time = event.getEventTime(); - - switch (action & MotionEvent.ACTION_MASK) - { - case MotionEvent.ACTION_DOWN: - handleMouseDown (host, event.getPointerId(0), event.getX(), event.getY(), time); - return true; - - case MotionEvent.ACTION_CANCEL: - case MotionEvent.ACTION_UP: - handleMouseUp (host, event.getPointerId(0), event.getX(), event.getY(), time); - return true; - - case MotionEvent.ACTION_MOVE: - { - int n = event.getPointerCount(); - for (int i = 0; i < n; ++i) - handleMouseDrag (host, event.getPointerId(i), event.getX(i), event.getY(i), time); - - return true; - } - - case MotionEvent.ACTION_POINTER_UP: - { - int i = (action & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT; - handleMouseUp (host, event.getPointerId(i), event.getX(i), event.getY(i), time); - return true; - } - - case MotionEvent.ACTION_POINTER_DOWN: - { - int i = (action & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT; - handleMouseDown (host, event.getPointerId(i), event.getX(i), event.getY(i), time); - return true; - } - - default: - break; - } - - return false; - } - - //============================================================================== - private native void handleKeyDown (long host, int keycode, int textchar); - private native void handleKeyUp (long host, int keycode, int textchar); - private native void handleBackButton (long host); - private native void handleKeyboardHidden (long host); - - public void showKeyboard (String type) - { - InputMethodManager imm = (InputMethodManager) getSystemService (Context.INPUT_METHOD_SERVICE); - - if (imm != null) - { - if (type.length() > 0) - { - imm.showSoftInput (this, android.view.inputmethod.InputMethodManager.SHOW_IMPLICIT); - imm.setInputMethod (getWindowToken(), type); - keyboardDismissListener.startListening(); - } - else - { - imm.hideSoftInputFromWindow (getWindowToken(), 0); - keyboardDismissListener.stopListening(); - } - } - } - - public void backButtonPressed() - { - if (host == 0) - return; - - handleBackButton (host); - } - - @Override - public boolean onKeyDown (int keyCode, KeyEvent event) - { - if (host == 0) - return false; - - switch (keyCode) - { - case KeyEvent.KEYCODE_VOLUME_UP: - case KeyEvent.KEYCODE_VOLUME_DOWN: - return super.onKeyDown (keyCode, event); - case KeyEvent.KEYCODE_BACK: - { - ((Activity) getContext()).onBackPressed(); - return true; - } - - default: - break; - } - - handleKeyDown (host, keyCode, event.getUnicodeChar()); - return true; - } - - @Override - public boolean onKeyUp (int keyCode, KeyEvent event) - { - if (host == 0) - return false; - - handleKeyUp (host, keyCode, event.getUnicodeChar()); - return true; - } - - @Override - public boolean onKeyMultiple (int keyCode, int count, KeyEvent event) - { - if (host == 0) - return false; - - if (keyCode != KeyEvent.KEYCODE_UNKNOWN || event.getAction() != KeyEvent.ACTION_MULTIPLE) - return super.onKeyMultiple (keyCode, count, event); - - if (event.getCharacters() != null) - { - int utf8Char = event.getCharacters().codePointAt (0); - handleKeyDown (host, utf8Char, utf8Char); - return true; - } - - return false; - } - - //============================================================================== - private final class KeyboardDismissListener - { - public KeyboardDismissListener (ComponentPeerView viewToUse) - { - view = viewToUse; - } - - private void startListening() - { - view.getViewTreeObserver().addOnGlobalLayoutListener(viewTreeObserver); - } - - private void stopListening() - { - view.getViewTreeObserver().removeGlobalOnLayoutListener(viewTreeObserver); - } - - private class TreeObserver implements ViewTreeObserver.OnGlobalLayoutListener - { - TreeObserver() - { - keyboardShown = false; - } - - @Override - public void onGlobalLayout() - { - Rect r = new Rect(); - - ViewGroup parentView = (ViewGroup) getParent(); - - if (parentView == null) - return; - - parentView.getWindowVisibleDisplayFrame (r); - - int diff = parentView.getHeight() - (r.bottom - r.top); - - // Arbitrary threshold, surely keyboard would take more than 20 pix. - if (diff < 20 && keyboardShown) - { - keyboardShown = false; - handleKeyboardHidden (view.host); - } - - if (! keyboardShown && diff > 20) - keyboardShown = true; - }; - - private boolean keyboardShown; - }; - - private ComponentPeerView view; - private TreeObserver viewTreeObserver = new TreeObserver(); - } - - private KeyboardDismissListener keyboardDismissListener = new KeyboardDismissListener(this); - - // this is here to make keyboard entry work on a Galaxy Tab2 10.1 - @Override - public InputConnection onCreateInputConnection (EditorInfo outAttrs) - { - outAttrs.actionLabel = ""; - outAttrs.hintText = ""; - outAttrs.initialCapsMode = 0; - outAttrs.initialSelEnd = outAttrs.initialSelStart = -1; - outAttrs.label = ""; - outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_EXTRACT_UI; - outAttrs.inputType = InputType.TYPE_NULL; - - return new BaseInputConnection (this, false); - } - - //============================================================================== - @Override - protected void onSizeChanged (int w, int h, int oldw, int oldh) - { - if (host == 0) - return; - - super.onSizeChanged (w, h, oldw, oldh); - viewSizeChanged (host); - } - - @Override - protected void onLayout (boolean changed, int left, int top, int right, int bottom) - { - for (int i = getChildCount(); --i >= 0;) - requestTransparentRegion (getChildAt (i)); - } - - private native void viewSizeChanged (long host); - - @Override - public void onFocusChange (View v, boolean hasFocus) - { - if (host == 0) - return; - - if (v == this) - focusChanged (host, hasFocus); - } - - private native void focusChanged (long host, boolean hasFocus); - - public void setViewName (String newName) {} - - public void setSystemUiVisibilityCompat (int visibility) - { - Method systemUIVisibilityMethod = null; - try - { - systemUIVisibilityMethod = this.getClass().getMethod ("setSystemUiVisibility", int.class); - } - catch (SecurityException e) { return; } - catch (NoSuchMethodException e) { return; } - if (systemUIVisibilityMethod == null) return; - - try - { - systemUIVisibilityMethod.invoke (this, visibility); - } - catch (java.lang.IllegalArgumentException e) {} - catch (java.lang.IllegalAccessException e) {} - catch (java.lang.reflect.InvocationTargetException e) {} - } - - public boolean isVisible() { return getVisibility() == VISIBLE; } - public void setVisible (boolean b) { setVisibility (b ? VISIBLE : INVISIBLE); } - - public boolean containsPoint (int x, int y) - { - return true; //xxx needs to check overlapping views - } - - //============================================================================== - private native void handleAppPaused (long host); - private native void handleAppResumed (long host); - - @Override - public void appPaused() - { - if (host == 0) - return; - - handleAppPaused (host); - } - - @Override - public void appResumed() - { - if (host == 0) - return; - - // Ensure that navigation/status bar visibility is correctly restored. - handleAppResumed (host); - } - } - - //============================================================================== - public static class NativeSurfaceView extends SurfaceView - implements SurfaceHolder.Callback - { - private long nativeContext = 0; - - NativeSurfaceView (Context context, long nativeContextPtr) - { - super (context); - nativeContext = nativeContextPtr; - } - - public Surface getNativeSurface() - { - Surface retval = null; - - SurfaceHolder holder = getHolder(); - if (holder != null) - retval = holder.getSurface(); - - return retval; - } - - //============================================================================== - @Override - public void surfaceChanged (SurfaceHolder holder, int format, int width, int height) - { - surfaceChangedNative (nativeContext, holder, format, width, height); - } - - @Override - public void surfaceCreated (SurfaceHolder holder) - { - surfaceCreatedNative (nativeContext, holder); - } - - @Override - public void surfaceDestroyed (SurfaceHolder holder) - { - surfaceDestroyedNative (nativeContext, holder); - } - - @Override - protected void dispatchDraw (Canvas canvas) - { - super.dispatchDraw (canvas); - dispatchDrawNative (nativeContext, canvas); - } - - //============================================================================== - @Override - protected void onAttachedToWindow () - { - super.onAttachedToWindow(); - getHolder().addCallback (this); - } - - @Override - protected void onDetachedFromWindow () - { - super.onDetachedFromWindow(); - getHolder().removeCallback (this); - } - - //============================================================================== - private native void dispatchDrawNative (long nativeContextPtr, Canvas canvas); - private native void surfaceCreatedNative (long nativeContextptr, SurfaceHolder holder); - private native void surfaceDestroyedNative (long nativeContextptr, SurfaceHolder holder); - private native void surfaceChangedNative (long nativeContextptr, SurfaceHolder holder, - int format, int width, int height); - } - - public NativeSurfaceView createNativeSurfaceView (long nativeSurfacePtr) - { - return new NativeSurfaceView (this, nativeSurfacePtr); - } - - //============================================================================== - public final int[] renderGlyph (char glyph1, char glyph2, Paint paint, android.graphics.Matrix matrix, Rect bounds) - { - Path p = new Path(); - - char[] str = { glyph1, glyph2 }; - paint.getTextPath (str, 0, (glyph2 != 0 ? 2 : 1), 0.0f, 0.0f, p); - - RectF boundsF = new RectF(); - p.computeBounds (boundsF, true); - matrix.mapRect (boundsF); - - boundsF.roundOut (bounds); - bounds.left--; - bounds.right++; - - final int w = bounds.width(); - final int h = Math.max (1, bounds.height()); - - Bitmap bm = Bitmap.createBitmap (w, h, Bitmap.Config.ARGB_8888); - - Canvas c = new Canvas (bm); - matrix.postTranslate (-bounds.left, -bounds.top); - c.setMatrix (matrix); - c.drawPath (p, paint); - - final int sizeNeeded = w * h; - if (cachedRenderArray.length < sizeNeeded) - cachedRenderArray = new int [sizeNeeded]; - - bm.getPixels (cachedRenderArray, 0, w, 0, 0, w, h); - bm.recycle(); - return cachedRenderArray; - } - - private int[] cachedRenderArray = new int [256]; - - //============================================================================== - public static class NativeInvocationHandler implements InvocationHandler - { - public NativeInvocationHandler (Activity activityToUse, long nativeContextRef) - { - activity = activityToUse; - nativeContext = nativeContextRef; - } - - public void nativeContextDeleted() - { - nativeContext = 0; - } - - @Override - public void finalize() - { - activity.runOnUiThread (new Runnable() - { - @Override - public void run() - { - if (nativeContext != 0) - dispatchFinalize (nativeContext); - } - }); - } - - @Override - public Object invoke (Object proxy, Method method, Object[] args) throws Throwable - { - return dispatchInvoke (nativeContext, proxy, method, args); - } - - //============================================================================== - Activity activity; - private long nativeContext = 0; - - private native void dispatchFinalize (long nativeContextRef); - private native Object dispatchInvoke (long nativeContextRef, Object proxy, Method method, Object[] args); - } - - public InvocationHandler createInvocationHandler (long nativeContextRef) - { - return new NativeInvocationHandler (this, nativeContextRef); - } - - public void invocationHandlerContextDeleted (InvocationHandler handler) - { - ((NativeInvocationHandler) handler).nativeContextDeleted(); - } - - //============================================================================== - public static class HTTPStream - { - public HTTPStream (String address, boolean isPostToUse, byte[] postDataToUse, - String headersToUse, int timeOutMsToUse, - int[] statusCodeToUse, StringBuffer responseHeadersToUse, - int numRedirectsToFollowToUse, String httpRequestCmdToUse) throws IOException - { - isPost = isPostToUse; - postData = postDataToUse; - headers = headersToUse; - timeOutMs = timeOutMsToUse; - statusCode = statusCodeToUse; - responseHeaders = responseHeadersToUse; - totalLength = -1; - numRedirectsToFollow = numRedirectsToFollowToUse; - httpRequestCmd = httpRequestCmdToUse; - - connection = createConnection (address, isPost, postData, headers, timeOutMs, httpRequestCmd); - } - - private final HttpURLConnection createConnection (String address, boolean isPost, byte[] postData, - String headers, int timeOutMs, String httpRequestCmdToUse) throws IOException - { - HttpURLConnection newConnection = (HttpURLConnection) (new URL(address).openConnection()); - - try - { - newConnection.setInstanceFollowRedirects (false); - newConnection.setConnectTimeout (timeOutMs); - newConnection.setReadTimeout (timeOutMs); - - // headers - if not empty, this string is appended onto the headers that are used for the request. It must therefore be a valid set of HTML header directives, separated by newlines. - // So convert headers string to an array, with an element for each line - String headerLines[] = headers.split("\\n"); - - // Set request headers - for (int i = 0; i < headerLines.length; ++i) - { - int pos = headerLines[i].indexOf (":"); - - if (pos > 0 && pos < headerLines[i].length()) - { - String field = headerLines[i].substring (0, pos); - String value = headerLines[i].substring (pos + 1); - - if (value.length() > 0) - newConnection.setRequestProperty (field, value); - } - } - - newConnection.setRequestMethod (httpRequestCmd); - - if (isPost) - { - newConnection.setDoOutput (true); - - if (postData != null) - { - OutputStream out = newConnection.getOutputStream(); - out.write(postData); - out.flush(); - } - } - - return newConnection; - } - catch (Throwable e) - { - newConnection.disconnect(); - throw new IOException ("Connection error"); - } - } - - private final InputStream getCancellableStream (final boolean isInput) throws ExecutionException - { - synchronized (createFutureLock) - { - if (hasBeenCancelled.get()) - return null; - - streamFuture = executor.submit (new Callable() - { - @Override - public BufferedInputStream call() throws IOException - { - return new BufferedInputStream (isInput ? connection.getInputStream() - : connection.getErrorStream()); - } - }); - } - - try - { - return streamFuture.get(); - } - catch (InterruptedException e) - { - return null; - } - catch (CancellationException e) - { - return null; - } - } - - public final boolean connect() - { - boolean result = false; - int numFollowedRedirects = 0; - - while (true) - { - result = doConnect(); - - if (! result) - return false; - - if (++numFollowedRedirects > numRedirectsToFollow) - break; - - int status = statusCode[0]; - - if (status == 301 || status == 302 || status == 303 || status == 307) - { - // Assumes only one occurrence of "Location" - int pos1 = responseHeaders.indexOf ("Location:") + 10; - int pos2 = responseHeaders.indexOf ("\n", pos1); - - if (pos2 > pos1) - { - String currentLocation = connection.getURL().toString(); - String newLocation = responseHeaders.substring (pos1, pos2); - - try - { - // Handle newLocation whether it's absolute or relative - URL baseUrl = new URL (currentLocation); - URL newUrl = new URL (baseUrl, newLocation); - String transformedNewLocation = newUrl.toString(); - - if (transformedNewLocation != currentLocation) - { - // Clear responseHeaders before next iteration - responseHeaders.delete (0, responseHeaders.length()); - - synchronized (createStreamLock) - { - if (hasBeenCancelled.get()) - return false; - - connection.disconnect(); - - try - { - connection = createConnection (transformedNewLocation, isPost, - postData, headers, timeOutMs, - httpRequestCmd); - } - catch (Throwable e) - { - return false; - } - } - } - else - { - break; - } - } - catch (Throwable e) - { - return false; - } - } - else - { - break; - } - } - else - { - break; - } - } - - return result; - } - - private final boolean doConnect() - { - synchronized (createStreamLock) - { - if (hasBeenCancelled.get()) - return false; - - try - { - try - { - inputStream = getCancellableStream (true); - } - catch (ExecutionException e) - { - if (connection.getResponseCode() < 400) - { - statusCode[0] = connection.getResponseCode(); - connection.disconnect(); - return false; - } - } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - try - { - if (statusCode[0] >= 400) - inputStream = getCancellableStream (false); - else - inputStream = getCancellableStream (true); - } - catch (ExecutionException e) - {} - - for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) - { - if (entry.getKey() != null && entry.getValue() != null) - { - responseHeaders.append(entry.getKey() + ": " - + android.text.TextUtils.join(",", entry.getValue()) + "\n"); - - if (entry.getKey().compareTo ("Content-Length") == 0) - totalLength = Integer.decode (entry.getValue().get (0)); - } - } - - return true; - } - catch (IOException e) - { - return false; - } - } - } - - static class DisconnectionRunnable implements Runnable - { - public DisconnectionRunnable (HttpURLConnection theConnection, - InputStream theInputStream, - ReentrantLock theCreateStreamLock, - Object theCreateFutureLock, - Future theStreamFuture) - { - connectionToDisconnect = theConnection; - inputStream = theInputStream; - createStreamLock = theCreateStreamLock; - createFutureLock = theCreateFutureLock; - streamFuture = theStreamFuture; - } - - public void run() - { - try - { - if (! createStreamLock.tryLock()) - { - synchronized (createFutureLock) - { - if (streamFuture != null) - streamFuture.cancel (true); - } - - createStreamLock.lock(); - } - - if (connectionToDisconnect != null) - connectionToDisconnect.disconnect(); - - if (inputStream != null) - inputStream.close(); - } - catch (IOException e) - {} - finally - { - createStreamLock.unlock(); - } - } - - private HttpURLConnection connectionToDisconnect; - private InputStream inputStream; - private ReentrantLock createStreamLock; - private Object createFutureLock; - Future streamFuture; - } - - public final void release() - { - DisconnectionRunnable disconnectionRunnable = new DisconnectionRunnable (connection, - inputStream, - createStreamLock, - createFutureLock, - streamFuture); - - synchronized (createStreamLock) - { - hasBeenCancelled.set (true); - - connection = null; - } - - Thread disconnectionThread = new Thread(disconnectionRunnable); - disconnectionThread.start(); - } - - public final int read (byte[] buffer, int numBytes) - { - int num = 0; - - try - { - synchronized (createStreamLock) - { - if (inputStream != null) - num = inputStream.read (buffer, 0, numBytes); - } - } - catch (IOException e) - {} - - if (num > 0) - position += num; - - return num; - } - - public final long getPosition() { return position; } - public final long getTotalLength() { return totalLength; } - public final boolean isExhausted() { return false; } - public final boolean setPosition (long newPos) { return false; } - - private boolean isPost; - private byte[] postData; - private String headers; - private int timeOutMs; - String httpRequestCmd; - private HttpURLConnection connection; - private int[] statusCode; - private StringBuffer responseHeaders; - private int totalLength; - private int numRedirectsToFollow; - private InputStream inputStream; - private long position; - private final ReentrantLock createStreamLock = new ReentrantLock(); - private final Object createFutureLock = new Object(); - private AtomicBoolean hasBeenCancelled = new AtomicBoolean(); - - private final ExecutorService executor = Executors.newCachedThreadPool (Executors.defaultThreadFactory()); - Future streamFuture; - } - - public static final HTTPStream createHTTPStream (String address, boolean isPost, byte[] postData, - String headers, int timeOutMs, int[] statusCode, - StringBuffer responseHeaders, int numRedirectsToFollow, - String httpRequestCmd) - { - // timeout parameter of zero for HttpUrlConnection is a blocking connect (negative value for juce::URL) - if (timeOutMs < 0) - timeOutMs = 0; - else if (timeOutMs == 0) - timeOutMs = 30000; - - for (;;) - { - try - { - HTTPStream httpStream = new HTTPStream (address, isPost, postData, headers, - timeOutMs, statusCode, responseHeaders, - numRedirectsToFollow, httpRequestCmd); - - return httpStream; - } - catch (Throwable e) {} - - return null; - } - } - - public final void launchURL (String url) - { - startActivity (new Intent (Intent.ACTION_VIEW, Uri.parse (url))); - } - - private native boolean webViewPageLoadStarted (long host, WebView view, String url); - private native void webViewPageLoadFinished (long host, WebView view, String url); - private native void webViewReceivedError (long host, WebView view, WebResourceRequest request, WebResourceError error); private native void webViewReceivedHttpError (long host, WebView view, WebResourceRequest request, WebResourceResponse errorResponse); private native void webViewReceivedSslError (long host, WebView view, SslErrorHandler handler, SslError error); - private native void webViewCloseWindowRequest (long host, WebView view); - private native void webViewCreateWindowRequest (long host, WebView view); - - //============================================================================== - public class JuceWebViewClient extends WebViewClient - { - public JuceWebViewClient (long hostToUse) - { - host = hostToUse; - } - - public void hostDeleted() - { - synchronized (hostLock) - { - host = 0; - } - } - - @Override - public void onPageFinished (WebView view, String url) - { - if (host == 0) - return; - - webViewPageLoadFinished (host, view, url); - } - - @Override - public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) - { - if (host == 0) - return; - - webViewReceivedSslError (host, view, handler, error); - } - - @Override - public void onReceivedError (WebView view, WebResourceRequest request, WebResourceError error) - { - if (host == 0) - return; - - webViewReceivedError (host, view, request, error); - } - - @Override - public void onReceivedHttpError (WebView view, WebResourceRequest request, WebResourceResponse errorResponse) - { - if (host == 0) - return; - - webViewReceivedHttpError (host, view, request, errorResponse); - } - - @Override - public WebResourceResponse shouldInterceptRequest (WebView view, WebResourceRequest request) - { - synchronized (hostLock) - { - if (host != 0) - { - boolean shouldLoad = webViewPageLoadStarted (host, view, request.getUrl().toString()); - - if (shouldLoad) - return null; - } - } - - return new WebResourceResponse ("text/html", null, null); - } - - private long host; - private final Object hostLock = new Object(); - } - - public class JuceWebChromeClient extends WebChromeClient - { - public JuceWebChromeClient (long hostToUse) - { - host = hostToUse; - } - - @Override - public void onCloseWindow (WebView window) - { - webViewCloseWindowRequest (host, window); - } - - @Override - public boolean onCreateWindow (WebView view, boolean isDialog, - boolean isUserGesture, Message resultMsg) - { - webViewCreateWindowRequest (host, view); - return false; - } - - private long host; - private final Object hostLock = new Object(); - } - - - //============================================================================== - public class CameraDeviceStateCallback extends CameraDevice.StateCallback - { - private native void cameraDeviceStateClosed (long host, CameraDevice camera); - private native void cameraDeviceStateDisconnected (long host, CameraDevice camera); - private native void cameraDeviceStateError (long host, CameraDevice camera, int error); - private native void cameraDeviceStateOpened (long host, CameraDevice camera); - - CameraDeviceStateCallback (long hostToUse) - { - host = hostToUse; - } - - @Override - public void onClosed (CameraDevice camera) - { - cameraDeviceStateClosed (host, camera); - } - - @Override - public void onDisconnected (CameraDevice camera) - { - cameraDeviceStateDisconnected (host, camera); - } - - @Override - public void onError (CameraDevice camera, int error) - { - cameraDeviceStateError (host, camera, error); - } - - @Override - public void onOpened (CameraDevice camera) - { - cameraDeviceStateOpened (host, camera); - } - - private long host; - } - - //============================================================================== - public class CameraCaptureSessionStateCallback extends CameraCaptureSession.StateCallback - { - private native void cameraCaptureSessionActive (long host, CameraCaptureSession session); - private native void cameraCaptureSessionClosed (long host, CameraCaptureSession session); - private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session); - private native void cameraCaptureSessionConfigured (long host, CameraCaptureSession session); - private native void cameraCaptureSessionReady (long host, CameraCaptureSession session); - - CameraCaptureSessionStateCallback (long hostToUse) - { - host = hostToUse; - } - - @Override - public void onActive (CameraCaptureSession session) - { - cameraCaptureSessionActive (host, session); - } - - @Override - public void onClosed (CameraCaptureSession session) - { - cameraCaptureSessionClosed (host, session); - } - - @Override - public void onConfigureFailed (CameraCaptureSession session) - { - cameraCaptureSessionConfigureFailed (host, session); - } - - @Override - public void onConfigured (CameraCaptureSession session) - { - cameraCaptureSessionConfigured (host, session); - } - - @Override - public void onReady (CameraCaptureSession session) - { - cameraCaptureSessionReady (host, session); - } - - private long host; - } - - //============================================================================== - public class CameraCaptureSessionCaptureCallback extends CameraCaptureSession.CaptureCallback - { - private native void cameraCaptureSessionCaptureCompleted (long host, boolean isPreview, CameraCaptureSession session, - CaptureRequest request, TotalCaptureResult result); - private native void cameraCaptureSessionCaptureFailed (long host, boolean isPreview, CameraCaptureSession session, - CaptureRequest request, CaptureFailure failure); - private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session, - CaptureRequest request, CaptureResult partialResult); - private native void cameraCaptureSessionCaptureSequenceAborted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId); - private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber); - private native void cameraCaptureSessionCaptureStarted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, - long timestamp, long frameNumber); - - CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview) - { - host = hostToUse; - preview = shouldBePreview; - } - - @Override - public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request, - TotalCaptureResult result) - { - cameraCaptureSessionCaptureCompleted (host, preview, session, request, result); - } - - @Override - public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure) - { - cameraCaptureSessionCaptureFailed (host, preview, session, request, failure); - } - - @Override - public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request, - CaptureResult partialResult) - { - cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult); - } - - @Override - public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId) - { - cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId); - } - - @Override - public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber) - { - cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber); - } - - @Override - public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp, - long frameNumber) - { - cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber); - } - - private long host; - private boolean preview; - } - - //============================================================================== - public class JuceOrientationEventListener extends OrientationEventListener - { - private native void deviceOrientationChanged (long host, int orientation); - - public JuceOrientationEventListener (long hostToUse, Context context, int rate) - { - super (context, rate); - - host = hostToUse; - } - - @Override - public void onOrientationChanged (int orientation) - { - deviceOrientationChanged (host, orientation); - } - - private long host; - } - - - //============================================================================== - public static final String getLocaleValue (boolean isRegion) - { - java.util.Locale locale = java.util.Locale.getDefault(); - - return isRegion ? locale.getCountry() - : locale.getLanguage(); - } - - private static final String getFileLocation (String type) - { - return Environment.getExternalStoragePublicDirectory (type).getAbsolutePath(); - } - - public static final String getDocumentsFolder() - { - if (getAndroidSDKVersion() >= 19) - return getFileLocation ("Documents"); - - return Environment.getDataDirectory().getAbsolutePath(); - } - - public static final String getPicturesFolder() { return getFileLocation (Environment.DIRECTORY_PICTURES); } - public static final String getMusicFolder() { return getFileLocation (Environment.DIRECTORY_MUSIC); } - public static final String getMoviesFolder() { return getFileLocation (Environment.DIRECTORY_MOVIES); } - public static final String getDownloadsFolder() { return getFileLocation (Environment.DIRECTORY_DOWNLOADS); } - - //============================================================================== - @Override - protected void onActivityResult (int requestCode, int resultCode, Intent data) - { - appActivityResult (requestCode, resultCode, data); - } - - @Override - protected void onNewIntent (Intent intent) - { - super.onNewIntent(intent); - setIntent(intent); - - appNewIntent (intent); - } - - //============================================================================== - public final Typeface getTypeFaceFromAsset (String assetName) - { - try - { - return Typeface.createFromAsset (this.getResources().getAssets(), assetName); - } - catch (Throwable e) {} - - return null; - } - - final protected static char[] hexArray = "0123456789ABCDEF".toCharArray(); - - public static String bytesToHex (byte[] bytes) - { - char[] hexChars = new char[bytes.length * 2]; - - for (int j = 0; j < bytes.length; ++j) - { - int v = bytes[j] & 0xff; - hexChars[j * 2] = hexArray[v >>> 4]; - hexChars[j * 2 + 1] = hexArray[v & 0x0f]; - } - - return new String (hexChars); - } - - final private java.util.Map dataCache = new java.util.HashMap(); - - synchronized private final File getDataCacheFile (byte[] data) - { - try - { - java.security.MessageDigest digest = java.security.MessageDigest.getInstance ("MD5"); - digest.update (data); - - String key = bytesToHex (digest.digest()); - - if (dataCache.containsKey (key)) - return (File) dataCache.get (key); - - File f = new File (this.getCacheDir(), "bindata_" + key); - f.delete(); - FileOutputStream os = new FileOutputStream (f); - os.write (data, 0, data.length); - dataCache.put (key, f); - return f; - } - catch (Throwable e) {} - - return null; - } - - private final void clearDataCache() - { - java.util.Iterator it = dataCache.values().iterator(); - - while (it.hasNext()) - { - File f = (File) it.next(); - f.delete(); - } - } - - public final Typeface getTypeFaceFromByteArray (byte[] data) - { - try - { - File f = getDataCacheFile (data); - - if (f != null) - return Typeface.createFromFile (f); - } - catch (Exception e) - { - Log.e ("JUCE", e.toString()); - } - - return null; - } - - public static final int getAndroidSDKVersion() - { - return android.os.Build.VERSION.SDK_INT; - } - - public final String audioManagerGetProperty (String property) - { - Object obj = getSystemService (AUDIO_SERVICE); - if (obj == null) - return null; - - java.lang.reflect.Method method; - - try - { - method = obj.getClass().getMethod ("getProperty", String.class); - } - catch (SecurityException e) { return null; } - catch (NoSuchMethodException e) { return null; } - - if (method == null) - return null; - - try - { - return (String) method.invoke (obj, property); - } - catch (java.lang.IllegalArgumentException e) {} - catch (java.lang.IllegalAccessException e) {} - catch (java.lang.reflect.InvocationTargetException e) {} - - return null; - } - - public final boolean hasSystemFeature (String property) - { - return getPackageManager().hasSystemFeature (property); - } -} diff --git a/examples/DemoRunner/Builds/Android/app/src/main/java/com/roli/juce/demorunner/SharingContentProvider.java b/examples/DemoRunner/Builds/Android/app/src/main/java/com/roli/juce/demorunner/SharingContentProvider.java deleted file mode 100644 index e9aaa0f7..00000000 --- a/examples/DemoRunner/Builds/Android/app/src/main/java/com/roli/juce/demorunner/SharingContentProvider.java +++ /dev/null @@ -1,138 +0,0 @@ -package com.roli.juce.demorunner; - -import android.content.ContentProvider; -import android.content.ContentValues; -import android.content.res.AssetFileDescriptor; -import android.content.res.Resources; -import android.database.Cursor; -import android.database.MatrixCursor; -import android.net.Uri; -import android.os.FileObserver; -import android.os.ParcelFileDescriptor; -import java.lang.String; - -public final class SharingContentProvider extends ContentProvider -{ - private Object lock = new Object(); - - private native void contentSharerFileObserverEvent (long host, int event, String path); - - private native Cursor contentSharerQuery (Uri uri, String[] projection, String selection, - String[] selectionArgs, String sortOrder); - - private native void contentSharerCursorClosed (long host); - - private native AssetFileDescriptor contentSharerOpenFile (Uri uri, String mode); - private native String[] contentSharerGetStreamTypes (Uri uri, String mimeTypeFilter); - - public final class ProviderFileObserver extends FileObserver - { - public ProviderFileObserver (long hostToUse, String path, int mask) - { - super (path, mask); - - host = hostToUse; - } - - public void onEvent (int event, String path) - { - contentSharerFileObserverEvent (host, event, path); - } - - private long host; - } - - public final class ProviderCursor extends MatrixCursor - { - ProviderCursor (long hostToUse, String[] columnNames) - { - super (columnNames); - - host = hostToUse; - } - - @Override - public void close() - { - super.close(); - - contentSharerCursorClosed (host); - } - - private long host; - } - - @Override - public boolean onCreate() - { - return true; - } - - @Override - public Cursor query (Uri url, String[] projection, String selection, - String[] selectionArgs, String sortOrder) - { - synchronized (lock) - { - return contentSharerQuery (url, projection, selection, selectionArgs, sortOrder); - } - } - - @Override - public Uri insert (Uri uri, ContentValues values) - { - return null; - } - - @Override - public int update (Uri uri, ContentValues values, String selection, - String[] selectionArgs) - { - return 0; - } - - @Override - public int delete (Uri uri, String selection, String[] selectionArgs) - { - return 0; - } - - @Override - public String getType (Uri uri) - { - return null; - } - - @Override - public AssetFileDescriptor openAssetFile (Uri uri, String mode) - { - synchronized (lock) - { - return contentSharerOpenFile (uri, mode); - } - } - - @Override - public ParcelFileDescriptor openFile (Uri uri, String mode) - { - synchronized (lock) - { - AssetFileDescriptor result = contentSharerOpenFile (uri, mode); - - if (result != null) - return result.getParcelFileDescriptor(); - - return null; - } - } - - @Override - public String[] getStreamTypes (Uri uri, String mimeTypeFilter) - { - synchronized (lock) - { - return contentSharerGetStreamTypes (uri, mimeTypeFilter); - } - } - -} diff --git a/examples/DemoRunner/Builds/Android/settings.gradle b/examples/DemoRunner/Builds/Android/settings.gradle index 9d495b34..f023a56a 100644 --- a/examples/DemoRunner/Builds/Android/settings.gradle +++ b/examples/DemoRunner/Builds/Android/settings.gradle @@ -1 +1,2 @@ +rootProject.name = 'DemoRunner' include ':app' \ No newline at end of file diff --git a/examples/DemoRunner/Builds/LinuxMakefile/Makefile b/examples/DemoRunner/Builds/LinuxMakefile/Makefile index 848f16c7..ae6f7824 100644 --- a/examples/DemoRunner/Builds/LinuxMakefile/Makefile +++ b/examples/DemoRunner/Builds/LinuxMakefile/Makefile @@ -35,13 +35,13 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.4.2 -DJUCE_APP_VERSION_HEX=0x50402 $(shell pkg-config --cflags alsa freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.4.4 -DJUCE_APP_VERSION_HEX=0x50404 $(shell pkg-config --cflags alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0 -DJucePlugin_Build_Unity=0 JUCE_TARGET_APP := DemoRunner JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) - JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -lGL -ldl -lpthread -lrt $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -lrt -ldl -lpthread -lGL $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -56,13 +56,13 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.4.2 -DJUCE_APP_VERSION_HEX=0x50402 $(shell pkg-config --cflags alsa freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.4.4 -DJUCE_APP_VERSION_HEX=0x50404 $(shell pkg-config --cflags alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0 -DJucePlugin_Build_Unity=0 JUCE_TARGET_APP := DemoRunner JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) - JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -lGL -ldl -lpthread -lrt $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -101,7 +101,7 @@ all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : $(OBJECTS_APP) $(RESOURCES) @command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } - @pkg-config --print-errors alsa freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl + @pkg-config --print-errors alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl @echo Linking "DemoRunner - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) -$(V_AT)mkdir -p $(JUCE_LIBDIR) diff --git a/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj b/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj index 30fbaa9c..df5bf5ce 100644 --- a/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj +++ b/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj @@ -37,6 +37,10 @@ isa = PBXBuildFile; fileRef = 4F0A137A4115946A346180E6; }; + 527DA2E6827BAFDDD3E8E80F = { + isa = PBXBuildFile; + fileRef = B4389672DA4CC8E0A531062D; + }; 46071CE2B98B562B7BF27CB1 = { isa = PBXBuildFile; fileRef = 1CFE3935A3B810D5D68A2504; @@ -617,6 +621,13 @@ path = ../../Source/Demos/IntroScreen.h; sourceTree = "SOURCE_ROOT"; }; + B4389672DA4CC8E0A531062D = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = CoreAudioKit.framework; + path = System/Library/Frameworks/CoreAudioKit.framework; + sourceTree = SDKROOT; + }; C1E93FAF6C68A40A664422CD = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; @@ -860,6 +871,7 @@ 440D507FD8F31DB62B1F95C7, 02A2ED58B066B4D119F67913, 4F0A137A4115946A346180E6, + B4389672DA4CC8E0A531062D, 1CFE3935A3B810D5D68A2504, 61AE09C749B007B70A265D9B, 3DC90DA86565B0356B6E5E0B, @@ -909,8 +921,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=5.4.2", - "JUCE_APP_VERSION_HEX=0x50402", + "JUCE_APP_VERSION=5.4.4", + "JUCE_APP_VERSION_HEX=0x50404", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -930,7 +942,7 @@ INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wno-missing-field-initializers -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 -Wno-ignored-qualifiers -Wunreachable-code"; + 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"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner; PRODUCT_NAME = "DemoRunner"; USE_HEADERMAP = NO; @@ -954,8 +966,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=5.4.2", - "JUCE_APP_VERSION_HEX=0x50402", + "JUCE_APP_VERSION=5.4.4", + "JUCE_APP_VERSION_HEX=0x50404", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -977,7 +989,7 @@ INSTALL_PATH = "$(HOME)/Applications"; LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.11; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wno-missing-field-initializers -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 -Wno-ignored-qualifiers -Wunreachable-code"; + 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"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner; PRODUCT_NAME = "DemoRunner"; USE_HEADERMAP = NO; @@ -1006,7 +1018,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; @@ -1025,7 +1037,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "DemoRunner"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Debug; @@ -1052,7 +1064,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; @@ -1069,7 +1081,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "DemoRunner"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Release; @@ -1154,6 +1166,7 @@ 89BC6E2354102D975E08E918, 9F15FD7A7CE83CFD98F07D59, 1351A13E78F38741C6075600, + 527DA2E6827BAFDDD3E8E80F, 46071CE2B98B562B7BF27CB1, 6A61CBB4E39BFD392D97528F, 9BEA1428416CE06BF72FBAB8, @@ -1182,13 +1195,14 @@ AC6F0E9A0809A184B2C2B7DE = { isa = PBXProject; buildConfigurationList = 80E8AD1971F52B06F4D28891; - attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; 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; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1100; ORGANIZATIONNAME = "ROLI Ltd."; 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; projectDirPath = ""; projectRoot = ""; targets = (291E01DCBE746A376DBFA4D1); + knownRegions = (en, Base); }; }; rootObject = AC6F0E9A0809A184B2C2B7DE; diff --git a/examples/DemoRunner/Builds/MacOSX/Info-App.plist b/examples/DemoRunner/Builds/MacOSX/Info-App.plist index bcde4797..3a0f5391 100644 --- a/examples/DemoRunner/Builds/MacOSX/Info-App.plist +++ b/examples/DemoRunner/Builds/MacOSX/Info-App.plist @@ -22,9 +22,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 5.4.2 + 5.4.4 CFBundleVersion - 5.4.2 + 5.4.4 NSHumanReadableCopyright Copyright (c) 2018 - ROLI Ltd. NSHighResolutionCapable diff --git a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj index fb16a1d6..e324a45e 100644 --- a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj +++ b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.2;JUCE_APP_VERSION_HEX=0x50402;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.4;JUCE_APP_VERSION_HEX=0x50404;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 @@ -74,6 +74,7 @@ Level4 true true + /w44265 /w45038 /w44062 /bigobj %(AdditionalOptions) stdcpp14 @@ -105,8 +106,8 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.2;JUCE_APP_VERSION_HEX=0x50402;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 + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.4;JUCE_APP_VERSION_HEX=0x50404;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 $(IntDir)\ @@ -115,6 +116,7 @@ Level4 true true + /w44265 /w45038 /w44062 /bigobj %(AdditionalOptions) stdcpp14 @@ -249,6 +251,9 @@ true + + true + true @@ -261,10 +266,10 @@ true - + true - + true @@ -606,12 +611,27 @@ true - + + true + + + true + + + true + + + true + + true true + + true + true @@ -696,6 +716,9 @@ true + + true + true @@ -1221,6 +1244,9 @@ true + + true + true @@ -1773,9 +1799,6 @@ true - - true - true @@ -2266,16 +2289,15 @@ - + - + - @@ -2430,6 +2452,7 @@ + @@ -2502,6 +2525,7 @@ + @@ -2676,6 +2700,7 @@ + @@ -2718,6 +2743,7 @@ + @@ -2812,6 +2838,7 @@ + @@ -3049,8 +3076,11 @@ + + + diff --git a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters index e6a62f9b..9a2e0bc0 100644 --- a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters @@ -652,6 +652,9 @@ JUCE Modules\juce_audio_basics\utilities + + JUCE Modules\juce_audio_basics\utilities + JUCE Modules\juce_audio_basics @@ -667,10 +670,10 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io - + JUCE Modules\juce_audio_devices\midi_io @@ -1021,12 +1024,27 @@ JUCE Modules\juce_audio_processors\scanning - + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities + JUCE Modules\juce_audio_processors @@ -1129,6 +1147,9 @@ JUCE Modules\juce_blocks_basics\topology\internal + + JUCE Modules\juce_blocks_basics\topology + JUCE Modules\juce_blocks_basics\topology @@ -1678,6 +1699,9 @@ JUCE Modules\juce_dsp\frequency + + JUCE Modules\juce_dsp\maths + JUCE Modules\juce_dsp\maths @@ -2251,9 +2275,6 @@ JUCE Modules\juce_gui_basics\layout - - JUCE Modules\juce_gui_basics\layout - JUCE Modules\juce_gui_basics\layout @@ -2931,10 +2952,10 @@ JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities @@ -2952,15 +2973,12 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io JUCE Modules\juce_audio_devices\midi_io - - JUCE Modules\juce_audio_devices\midi_io - JUCE Modules\juce_audio_devices\native @@ -3423,6 +3441,9 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst @@ -3639,6 +3660,9 @@ JUCE Modules\juce_blocks_basics\protocol + + JUCE Modules\juce_blocks_basics\topology + JUCE Modules\juce_blocks_basics\topology @@ -4161,6 +4185,9 @@ JUCE Modules\juce_core\unit_tests + + JUCE Modules\juce_core\unit_tests + JUCE Modules\juce_core\xml @@ -4287,6 +4314,9 @@ JUCE Modules\juce_dsp\maths + + JUCE Modules\juce_dsp\maths + JUCE Modules\juce_dsp\maths @@ -4569,6 +4599,9 @@ JUCE Modules\juce_graphics\image_formats\pnglib + + JUCE Modules\juce_graphics\image_formats\pnglib + JUCE Modules\juce_graphics\image_formats\pnglib @@ -5276,12 +5309,21 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + JUCE Modules\juce_audio_processors\format_types\VST3_SDK diff --git a/examples/DemoRunner/Builds/VisualStudio2015/resources.rc b/examples/DemoRunner/Builds/VisualStudio2015/resources.rc index e22698f3..eaf88903 100644 --- a/examples/DemoRunner/Builds/VisualStudio2015/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2015/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,4,2,0 +FILEVERSION 5,4,4,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +16,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "Copyright (c) 2018 - ROLI Ltd.\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "5.4.2\0" + VALUE "FileVersion", "5.4.4\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "5.4.2\0" + VALUE "ProductVersion", "5.4.4\0" END END diff --git a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj index 2de25bd4..040005b8 100644 --- a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj +++ b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.2;JUCE_APP_VERSION_HEX=0x50402;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.4;JUCE_APP_VERSION_HEX=0x50404;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.2;JUCE_APP_VERSION_HEX=0x50402;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.4;JUCE_APP_VERSION_HEX=0x50404;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 @@ -251,6 +251,9 @@ true + + true + true @@ -263,10 +266,10 @@ true - + true - + true @@ -608,12 +611,27 @@ true - + + true + + + true + + + true + + + true + + true true + + true + true @@ -698,6 +716,9 @@ true + + true + true @@ -1223,6 +1244,9 @@ true + + true + true @@ -1775,9 +1799,6 @@ true - - true - true @@ -2268,16 +2289,15 @@ - + - + - @@ -2432,6 +2452,7 @@ + @@ -2504,6 +2525,7 @@ + @@ -2678,6 +2700,7 @@ + @@ -2720,6 +2743,7 @@ + @@ -2814,6 +2838,7 @@ + @@ -3051,8 +3076,11 @@ + + + diff --git a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters index 4f9b6922..2ffed545 100644 --- a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters @@ -652,6 +652,9 @@ JUCE Modules\juce_audio_basics\utilities + + JUCE Modules\juce_audio_basics\utilities + JUCE Modules\juce_audio_basics @@ -667,10 +670,10 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io - + JUCE Modules\juce_audio_devices\midi_io @@ -1021,12 +1024,27 @@ JUCE Modules\juce_audio_processors\scanning - + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities + JUCE Modules\juce_audio_processors @@ -1129,6 +1147,9 @@ JUCE Modules\juce_blocks_basics\topology\internal + + JUCE Modules\juce_blocks_basics\topology + JUCE Modules\juce_blocks_basics\topology @@ -1678,6 +1699,9 @@ JUCE Modules\juce_dsp\frequency + + JUCE Modules\juce_dsp\maths + JUCE Modules\juce_dsp\maths @@ -2251,9 +2275,6 @@ JUCE Modules\juce_gui_basics\layout - - JUCE Modules\juce_gui_basics\layout - JUCE Modules\juce_gui_basics\layout @@ -2931,10 +2952,10 @@ JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities @@ -2952,15 +2973,12 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io JUCE Modules\juce_audio_devices\midi_io - - JUCE Modules\juce_audio_devices\midi_io - JUCE Modules\juce_audio_devices\native @@ -3423,6 +3441,9 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst @@ -3639,6 +3660,9 @@ JUCE Modules\juce_blocks_basics\protocol + + JUCE Modules\juce_blocks_basics\topology + JUCE Modules\juce_blocks_basics\topology @@ -4161,6 +4185,9 @@ JUCE Modules\juce_core\unit_tests + + JUCE Modules\juce_core\unit_tests + JUCE Modules\juce_core\xml @@ -4287,6 +4314,9 @@ JUCE Modules\juce_dsp\maths + + JUCE Modules\juce_dsp\maths + JUCE Modules\juce_dsp\maths @@ -4569,6 +4599,9 @@ JUCE Modules\juce_graphics\image_formats\pnglib + + JUCE Modules\juce_graphics\image_formats\pnglib + JUCE Modules\juce_graphics\image_formats\pnglib @@ -5276,12 +5309,21 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + JUCE Modules\juce_audio_processors\format_types\VST3_SDK diff --git a/examples/DemoRunner/Builds/VisualStudio2017/resources.rc b/examples/DemoRunner/Builds/VisualStudio2017/resources.rc index e22698f3..eaf88903 100644 --- a/examples/DemoRunner/Builds/VisualStudio2017/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2017/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,4,2,0 +FILEVERSION 5,4,4,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +16,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "Copyright (c) 2018 - ROLI Ltd.\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "5.4.2\0" + VALUE "FileVersion", "5.4.4\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "5.4.2\0" + VALUE "ProductVersion", "5.4.4\0" END END diff --git a/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner.sln b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner.sln similarity index 95% rename from examples/DemoRunner/Builds/VisualStudio2013/DemoRunner.sln rename to examples/DemoRunner/Builds/VisualStudio2019/DemoRunner.sln index ba7197df..72107b9f 100644 --- a/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner.sln +++ b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2013 +# Visual Studio 2019 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}" EndProject diff --git a/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj similarity index 97% rename from examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj rename to examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj index b4b14776..abf67e40 100644 --- a/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj +++ b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj @@ -1,7 +1,7 @@ @@ -22,16 +22,16 @@ Application false false - v120 - 8.1 + v142 + 10.0 Application false true - v120 - 8.1 + v142 + 10.0 @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.4.2;JUCE_APP_VERSION_HEX=0x50402;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=5.4.4;JUCE_APP_VERSION_HEX=0x50404;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 @@ -74,6 +74,7 @@ Level4 true true + /w44265 /w45038 /w44062 %(AdditionalOptions) stdcpp14 @@ -105,8 +106,8 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.4.2;JUCE_APP_VERSION_HEX=0x50402;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 + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=5.4.4;JUCE_APP_VERSION_HEX=0x50404;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 $(IntDir)\ @@ -115,6 +116,7 @@ Level4 true true + /w44265 /w45038 /w44062 %(AdditionalOptions) stdcpp14 @@ -249,6 +251,9 @@ true + + true + true @@ -261,10 +266,10 @@ true - + true - + true @@ -606,12 +611,27 @@ true - + + true + + + true + + + true + + + true + + true true + + true + true @@ -696,6 +716,9 @@ true + + true + true @@ -1221,6 +1244,9 @@ true + + true + true @@ -1773,9 +1799,6 @@ true - - true - true @@ -2266,16 +2289,15 @@ - + - + - @@ -2430,6 +2452,7 @@ + @@ -2502,6 +2525,7 @@ + @@ -2676,6 +2700,7 @@ + @@ -2718,6 +2743,7 @@ + @@ -2812,6 +2838,7 @@ + @@ -3049,8 +3076,11 @@ + + + diff --git a/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters similarity index 97% rename from examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj.filters rename to examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters index 2c038644..2bcd6278 100644 --- a/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters @@ -1,6 +1,6 @@ - + {747DECFA-60E8-6F38-F8B4-1FC9052FD677} @@ -652,6 +652,9 @@ JUCE Modules\juce_audio_basics\utilities + + JUCE Modules\juce_audio_basics\utilities + JUCE Modules\juce_audio_basics @@ -667,10 +670,10 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io - + JUCE Modules\juce_audio_devices\midi_io @@ -1021,12 +1024,27 @@ JUCE Modules\juce_audio_processors\scanning - + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities + JUCE Modules\juce_audio_processors @@ -1129,6 +1147,9 @@ JUCE Modules\juce_blocks_basics\topology\internal + + JUCE Modules\juce_blocks_basics\topology + JUCE Modules\juce_blocks_basics\topology @@ -1678,6 +1699,9 @@ JUCE Modules\juce_dsp\frequency + + JUCE Modules\juce_dsp\maths + JUCE Modules\juce_dsp\maths @@ -2251,9 +2275,6 @@ JUCE Modules\juce_gui_basics\layout - - JUCE Modules\juce_gui_basics\layout - JUCE Modules\juce_gui_basics\layout @@ -2931,10 +2952,10 @@ JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities @@ -2952,15 +2973,12 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io JUCE Modules\juce_audio_devices\midi_io - - JUCE Modules\juce_audio_devices\midi_io - JUCE Modules\juce_audio_devices\native @@ -3423,6 +3441,9 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst @@ -3639,6 +3660,9 @@ JUCE Modules\juce_blocks_basics\protocol + + JUCE Modules\juce_blocks_basics\topology + JUCE Modules\juce_blocks_basics\topology @@ -4161,6 +4185,9 @@ JUCE Modules\juce_core\unit_tests + + JUCE Modules\juce_core\unit_tests + JUCE Modules\juce_core\xml @@ -4287,6 +4314,9 @@ JUCE Modules\juce_dsp\maths + + JUCE Modules\juce_dsp\maths + JUCE Modules\juce_dsp\maths @@ -4569,6 +4599,9 @@ JUCE Modules\juce_graphics\image_formats\pnglib + + JUCE Modules\juce_graphics\image_formats\pnglib + JUCE Modules\juce_graphics\image_formats\pnglib @@ -5276,12 +5309,21 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + JUCE Modules\juce_audio_processors\format_types\VST3_SDK diff --git a/examples/DemoRunner/Builds/VisualStudio2013/icon.ico b/examples/DemoRunner/Builds/VisualStudio2019/icon.ico similarity index 100% rename from examples/DemoRunner/Builds/VisualStudio2013/icon.ico rename to examples/DemoRunner/Builds/VisualStudio2019/icon.ico diff --git a/examples/DemoRunner/Builds/VisualStudio2013/resources.rc b/examples/DemoRunner/Builds/VisualStudio2019/resources.rc similarity index 77% rename from examples/DemoRunner/Builds/VisualStudio2013/resources.rc rename to examples/DemoRunner/Builds/VisualStudio2019/resources.rc index e22698f3..eaf88903 100644 --- a/examples/DemoRunner/Builds/VisualStudio2013/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2019/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,4,2,0 +FILEVERSION 5,4,4,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +16,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "Copyright (c) 2018 - ROLI Ltd.\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "5.4.2\0" + VALUE "FileVersion", "5.4.4\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "5.4.2\0" + VALUE "ProductVersion", "5.4.4\0" END END diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj b/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj index 8b087fd2..0f01890c 100644 --- a/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj +++ b/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj @@ -920,8 +920,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_IPHONE_5BC26AE3=1", - "JUCE_APP_VERSION=5.4.2", - "JUCE_APP_VERSION_HEX=0x50402", + "JUCE_APP_VERSION=5.4.4", + "JUCE_APP_VERSION_HEX=0x50404", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -940,7 +940,7 @@ INFOPLIST_FILE = Info-App.plist; INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -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 -Wno-ignored-qualifiers -Wunreachable-code"; + 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"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner; PRODUCT_NAME = "DemoRunner"; USE_HEADERMAP = NO; @@ -967,8 +967,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_IPHONE_5BC26AE3=1", - "JUCE_APP_VERSION=5.4.2", - "JUCE_APP_VERSION_HEX=0x50402", + "JUCE_APP_VERSION=5.4.4", + "JUCE_APP_VERSION_HEX=0x50404", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -989,7 +989,7 @@ INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; LLVM_LTO = YES; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -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 -Wno-ignored-qualifiers -Wunreachable-code"; + 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"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner; PRODUCT_NAME = "DemoRunner"; USE_HEADERMAP = NO; @@ -1019,7 +1019,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; @@ -1041,7 +1041,7 @@ PRODUCT_NAME = "DemoRunner"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Debug; @@ -1069,7 +1069,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; @@ -1089,7 +1089,7 @@ PRODUCT_NAME = "DemoRunner"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Release; @@ -1202,13 +1202,14 @@ AC6F0E9A0809A184B2C2B7DE = { isa = PBXProject; buildConfigurationList = 80E8AD1971F52B06F4D28891; - attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; 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.iCloud = { enabled = 1; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1100; ORGANIZATIONNAME = "ROLI Ltd."; 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; projectDirPath = ""; projectRoot = ""; targets = (291E01DCBE746A376DBFA4D1); + knownRegions = (en, Base); }; }; rootObject = AC6F0E9A0809A184B2C2B7DE; diff --git a/examples/DemoRunner/Builds/iOS/Info-App.plist b/examples/DemoRunner/Builds/iOS/Info-App.plist index 594be6ff..483c3852 100644 --- a/examples/DemoRunner/Builds/iOS/Info-App.plist +++ b/examples/DemoRunner/Builds/iOS/Info-App.plist @@ -26,9 +26,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 5.4.2 + 5.4.4 CFBundleVersion - 5.4.2 + 5.4.4 NSHumanReadableCopyright Copyright (c) 2018 - ROLI Ltd. NSHighResolutionCapable diff --git a/examples/DemoRunner/DemoRunner.jucer b/examples/DemoRunner/DemoRunner.jucer index 5d43c491..f661d0ed 100644 --- a/examples/DemoRunner/DemoRunner.jucer +++ b/examples/DemoRunner/DemoRunner.jucer @@ -1,7 +1,7 @@ - @@ -30,12 +30,11 @@ - - + + @@ -88,15 +87,14 @@ - + smallIcon="YyqWd2" bigIcon="YyqWd2" cameraPermissionNeeded="1"> - - + + @@ -123,11 +121,10 @@ + customXcodeResourceFolders="../Assets" smallIcon="YyqWd2" bigIcon="YyqWd2"> - - + + @@ -152,10 +149,11 @@ - + - + @@ -179,11 +177,12 @@ - - + + - + @@ -207,12 +206,12 @@ - - + - - + + @@ -236,7 +235,7 @@ - + diff --git a/examples/DemoRunner/JuceLibraryCode/AppConfig.h b/examples/DemoRunner/JuceLibraryCode/AppConfig.h index 29504625..7c6bfaa7 100644 --- a/examples/DemoRunner/JuceLibraryCode/AppConfig.h +++ b/examples/DemoRunner/JuceLibraryCode/AppConfig.h @@ -195,7 +195,7 @@ #endif #ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL 0 + //#define JUCE_USE_CURL 1 #endif #ifndef JUCE_LOAD_CURL_SYMBOLS_LAZILY @@ -203,7 +203,7 @@ #endif #ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 0 #endif #ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES diff --git a/examples/DemoRunner/JuceLibraryCode/JuceHeader.h b/examples/DemoRunner/JuceLibraryCode/JuceHeader.h index 1a5d8a00..06f7f814 100644 --- a/examples/DemoRunner/JuceLibraryCode/JuceHeader.h +++ b/examples/DemoRunner/JuceLibraryCode/JuceHeader.h @@ -47,7 +47,7 @@ namespace ProjectInfo { const char* const projectName = "DemoRunner"; const char* const companyName = "ROLI Ltd."; - const char* const versionString = "5.4.2"; - const int versionNumber = 0x50402; + const char* const versionString = "5.4.4"; + const int versionNumber = 0x50404; } #endif diff --git a/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp b/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp index dc4577d4..9fe417f9 100644 --- a/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp +++ b/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp @@ -80,50 +80,50 @@ void registerDemos_One() noexcept { - REGISTER_DEMO (AudioAppDemo, Audio, false) - REGISTER_DEMO (AudioLatencyDemo, Audio, false) - REGISTER_DEMO (AudioPlaybackDemo, Audio, false) - REGISTER_DEMO (AudioRecordingDemo, Audio, false) - REGISTER_DEMO (AudioSettingsDemo, Audio, false) - REGISTER_DEMO (AudioSynthesiserDemo, Audio, false) - REGISTER_DEMO (MidiDemo, Audio, false) - REGISTER_DEMO (MPEDemo, Audio, false) - REGISTER_DEMO (PluckedStringsDemo, Audio, false) + REGISTER_DEMO (AudioAppDemo, Audio, false) + REGISTER_DEMO (AudioLatencyDemo, Audio, false) + REGISTER_DEMO (AudioPlaybackDemo, Audio, false) + REGISTER_DEMO (AudioRecordingDemo, Audio, false) + REGISTER_DEMO (AudioSettingsDemo, Audio, false) + REGISTER_DEMO (AudioSynthesiserDemo, Audio, false) + REGISTER_DEMO (MidiDemo, Audio, false) + REGISTER_DEMO (MPEDemo, Audio, false) + REGISTER_DEMO (PluckedStringsDemo, Audio, false) #if JUCE_HAS_CONSTEXPR - REGISTER_DEMO (SimpleFFTDemo, Audio, false) - REGISTER_DEMO (BlocksDrawingDemo, BLOCKS, false) - REGISTER_DEMO (BlocksMonitorDemo, BLOCKS, false) - REGISTER_DEMO (BlocksSynthDemo, BLOCKS, false) - - REGISTER_DEMO (ConvolutionDemo, DSP, false) - REGISTER_DEMO (FIRFilterDemo, DSP, false) - REGISTER_DEMO (GainDemo, DSP, false) - REGISTER_DEMO (IIRFilterDemo, DSP, false) - REGISTER_DEMO (OscillatorDemo, DSP, false) - REGISTER_DEMO (OverdriveDemo, DSP, false) + REGISTER_DEMO (SimpleFFTDemo, Audio, false) + REGISTER_DEMO (BlocksDrawingDemo, BLOCKS, false) + REGISTER_DEMO (BlocksMonitorDemo, BLOCKS, false) + REGISTER_DEMO (BlocksSynthDemo, BLOCKS, false) + + REGISTER_DEMO (ConvolutionDemo, DSP, false) + REGISTER_DEMO (FIRFilterDemo, DSP, false) + REGISTER_DEMO (GainDemo, DSP, false) + REGISTER_DEMO (IIRFilterDemo, DSP, false) + REGISTER_DEMO (OscillatorDemo, DSP, false) + REGISTER_DEMO (OverdriveDemo, DSP, false) #if JUCE_USE_SIMD - REGISTER_DEMO (SIMDRegisterDemo, DSP, false) + REGISTER_DEMO (SIMDRegisterDemo, DSP, false) #endif - REGISTER_DEMO (StateVariableFilterDemo, DSP, false) - REGISTER_DEMO (WaveShaperTanhDemo, DSP, false) + REGISTER_DEMO (StateVariableFilterDemo, DSP, false) + REGISTER_DEMO (WaveShaperTanhDemo, DSP, false) #endif - REGISTER_DEMO (Box2DDemo, Utilities, false) + REGISTER_DEMO (Box2DDemo, Utilities, false) #if JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX - REGISTER_DEMO (ChildProcessDemo, Utilities, false) + REGISTER_DEMO (ChildProcessDemo, Utilities, false) #endif - REGISTER_DEMO (CryptographyDemo, Utilities, false) - REGISTER_DEMO (JavaScriptDemo, Utilities, false) - REGISTER_DEMO (LiveConstantDemo, Utilities, false) - REGISTER_DEMO (MultithreadingDemo, Utilities, false) - REGISTER_DEMO (NetworkingDemo, Utilities, false) - REGISTER_DEMO (OSCDemo, Utilities, false) - REGISTER_DEMO (SystemInfoDemo, Utilities, false) - REGISTER_DEMO (TimersAndEventsDemo, Utilities, false) - REGISTER_DEMO_WITH_FILENAME (UnitTestClasses::UnitTestsDemo, Utilities, UnitTestsDemo, false) - REGISTER_DEMO (ValueTreesDemo, Utilities, false) - REGISTER_DEMO (XMLandJSONDemo, Utilities, false) + REGISTER_DEMO (CryptographyDemo, Utilities, false) + REGISTER_DEMO (JavaScriptDemo, Utilities, false) + REGISTER_DEMO (LiveConstantDemo, Utilities, false) + REGISTER_DEMO (MultithreadingDemo, Utilities, false) + REGISTER_DEMO (NetworkingDemo, Utilities, false) + REGISTER_DEMO (OSCDemo, Utilities, false) + REGISTER_DEMO (SystemInfoDemo, Utilities, false) + REGISTER_DEMO (TimersAndEventsDemo, Utilities, false) + REGISTER_DEMO (UnitTestsDemo, Utilities, false) + REGISTER_DEMO (ValueTreesDemo, Utilities, false) + REGISTER_DEMO (XMLandJSONDemo, Utilities, false) } Component* createIntroDemo() diff --git a/examples/DemoRunner/Source/Demos/DemoPIPs2.cpp b/examples/DemoRunner/Source/Demos/DemoPIPs2.cpp index 51074e13..b7d95de8 100644 --- a/examples/DemoRunner/Source/Demos/DemoPIPs2.cpp +++ b/examples/DemoRunner/Source/Demos/DemoPIPs2.cpp @@ -70,42 +70,42 @@ void registerDemos_Two() noexcept { - REGISTER_DEMO (AnimationAppDemo, GUI, false) - REGISTER_DEMO (AnimationDemo, GUI, false) - REGISTER_DEMO (BouncingBallWavetableDemo, GUI, false) + REGISTER_DEMO (AnimationAppDemo, GUI, false) + REGISTER_DEMO (AnimationDemo, GUI, false) + REGISTER_DEMO (BouncingBallWavetableDemo, GUI, false) #if JUCE_USE_CAMERA && ! JUCE_LINUX - REGISTER_DEMO (CameraDemo, GUI, true) + REGISTER_DEMO (CameraDemo, GUI, true) #endif #if ! JUCE_ANDROID - REGISTER_DEMO (CodeEditorDemo, GUI, false) + REGISTER_DEMO (CodeEditorDemo, GUI, false) #endif - REGISTER_DEMO (ComponentDemo, GUI, false) - REGISTER_DEMO (ComponentTransformsDemo, GUI, false) - REGISTER_DEMO (DialogsDemo, GUI, false) - REGISTER_DEMO (FlexBoxDemo, GUI, false) - REGISTER_DEMO (FontsDemo, GUI, false) - REGISTER_DEMO (GraphicsDemo, GUI, false) + REGISTER_DEMO (ComponentDemo, GUI, false) + REGISTER_DEMO (ComponentTransformsDemo, GUI, false) + REGISTER_DEMO (DialogsDemo, GUI, false) + REGISTER_DEMO (FlexBoxDemo, GUI, false) + REGISTER_DEMO (FontsDemo, GUI, false) + REGISTER_DEMO (GraphicsDemo, GUI, false) #if JUCE_HAS_CONSTEXPR - REGISTER_DEMO (GridDemo, GUI, false) + REGISTER_DEMO (GridDemo, GUI, false) #endif - REGISTER_DEMO (ImagesDemo, GUI, false) - REGISTER_DEMO (KeyMappingsDemo, GUI, false) - REGISTER_DEMO (LookAndFeelDemo, GUI, false) - REGISTER_DEMO (MDIDemo, GUI, false) - REGISTER_DEMO (MenusDemo, GUI, false) - REGISTER_DEMO (MultiTouchDemo, GUI, false) + REGISTER_DEMO (ImagesDemo, GUI, false) + REGISTER_DEMO (KeyMappingsDemo, GUI, false) + REGISTER_DEMO (LookAndFeelDemo, GUI, false) + REGISTER_DEMO (MDIDemo, GUI, false) + REGISTER_DEMO (MenusDemo, GUI, false) + REGISTER_DEMO (MultiTouchDemo, GUI, false) #if JUCE_OPENGL - REGISTER_DEMO (OpenGLAppDemo, GUI, true) - REGISTER_DEMO (OpenGLDemo2D, GUI, true) - REGISTER_DEMO_WITH_FILENAME (OpenGLDemoClasses::OpenGLDemo, GUI, OpenGLDemo, true) + REGISTER_DEMO (OpenGLAppDemo, GUI, true) + REGISTER_DEMO (OpenGLDemo2D, GUI, true) + REGISTER_DEMO (OpenGLDemo, GUI, true) #endif - REGISTER_DEMO (PropertiesDemo, GUI, false) + REGISTER_DEMO (PropertiesDemo, GUI, false) #if ! JUCE_LINUX - REGISTER_DEMO (VideoDemo, GUI, true) + REGISTER_DEMO (VideoDemo, GUI, true) #endif - REGISTER_DEMO (WebBrowserDemo, GUI, true) - REGISTER_DEMO (WidgetsDemo, GUI, false) - REGISTER_DEMO (WindowsDemo, GUI, false) + REGISTER_DEMO (WebBrowserDemo, GUI, true) + REGISTER_DEMO (WidgetsDemo, GUI, false) + REGISTER_DEMO (WindowsDemo, GUI, false) } CodeEditorComponent::ColourScheme getDarkColourScheme() diff --git a/examples/DemoRunner/Source/Demos/JUCEDemos.h b/examples/DemoRunner/Source/Demos/JUCEDemos.h index 53db349e..a7bc07c1 100644 --- a/examples/DemoRunner/Source/Demos/JUCEDemos.h +++ b/examples/DemoRunner/Source/Demos/JUCEDemos.h @@ -34,7 +34,6 @@ #define CREATE_FILEPATH(DemoName, category) JUCE_STRINGIFY(EXPAND(category)/EXPAND(DemoName)EXPAND(FILE_EXT)) #define REGISTER_DEMO(DemoName, category, heavyweight) JUCEDemos::registerDemo ([] { return new DemoName(); }, CREATE_FILEPATH(DemoName, category), JUCE_STRINGIFY (category), heavyweight); -#define REGISTER_DEMO_WITH_FILENAME(DemoName, category, fileName, heavyweight) JUCEDemos::registerDemo ([] { return new DemoName(); }, CREATE_FILEPATH(fileName, category), JUCE_STRINGIFY (category), heavyweight); //============================================================================== struct JUCEDemos diff --git a/examples/DemoRunner/Source/Main.cpp b/examples/DemoRunner/Source/Main.cpp index 4d8a120e..3f58c792 100644 --- a/examples/DemoRunner/Source/Main.cpp +++ b/examples/DemoRunner/Source/Main.cpp @@ -37,7 +37,8 @@ { DemoTaskbarComponent() { - setIconImage (getImageFromAssets ("juce_icon.png")); + setIconImage (getImageFromAssets ("juce_icon.png"), + getImageFromAssets ("juce_icon_template.png")); setIconTooltip ("JUCE demo runner!"); } @@ -82,7 +83,7 @@ public: //============================================================================== DemoRunnerApplication() {} - ~DemoRunnerApplication() + ~DemoRunnerApplication() override { sharedAudioDeviceManager.reset(); } diff --git a/examples/DemoRunner/Source/UI/DemoContentComponent.h b/examples/DemoRunner/Source/UI/DemoContentComponent.h index 680996c1..b4daee11 100644 --- a/examples/DemoRunner/Source/UI/DemoContentComponent.h +++ b/examples/DemoRunner/Source/UI/DemoContentComponent.h @@ -37,7 +37,7 @@ class DemoContentComponent : public TabbedComponent { public: DemoContentComponent (Component& mainComponent, std::function demoChangedCallback); - ~DemoContentComponent(); + ~DemoContentComponent() override; void resized() override; diff --git a/examples/DemoRunner/Source/UI/MainComponent.cpp b/examples/DemoRunner/Source/UI/MainComponent.cpp index 32244a2e..e7b54fc9 100644 --- a/examples/DemoRunner/Source/UI/MainComponent.cpp +++ b/examples/DemoRunner/Source/UI/MainComponent.cpp @@ -245,9 +245,7 @@ MainComponent::MainComponent() { contentComponent.reset (new DemoContentComponent (*this, [this] (bool isHeavyweight) { - #if (JUCE_ANDROID || JUCE_IOS) demosPanel.showOrHide (false); - #endif if (isHeavyweight) { diff --git a/examples/DemoRunner/Source/UI/MainComponent.h b/examples/DemoRunner/Source/UI/MainComponent.h index 30a89805..5833cb91 100644 --- a/examples/DemoRunner/Source/UI/MainComponent.h +++ b/examples/DemoRunner/Source/UI/MainComponent.h @@ -35,7 +35,7 @@ class MainComponent : public Component public: //============================================================================== MainComponent(); - ~MainComponent(); + ~MainComponent() override; //============================================================================== void paint (Graphics&) override; diff --git a/examples/DemoRunner/Source/UI/SettingsContent.h b/examples/DemoRunner/Source/UI/SettingsContent.h index fb9c18fb..138dc4b3 100644 --- a/examples/DemoRunner/Source/UI/SettingsContent.h +++ b/examples/DemoRunner/Source/UI/SettingsContent.h @@ -173,7 +173,9 @@ private: //============================================================================== void componentMovedOrResized (bool, bool) override {} + using ComponentListener::componentMovedOrResized; void componentVisibilityChanged() override {} + using ComponentListener::componentVisibilityChanged; void componentPeerChanged() override { auto* newPeer = getPeer(); diff --git a/examples/GUI/AnimationAppDemo.h b/examples/GUI/AnimationAppDemo.h index 5217a9bc..d7e7b14f 100644 --- a/examples/GUI/AnimationAppDemo.h +++ b/examples/GUI/AnimationAppDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, xcode_iphone + exporters: xcode_mac, vs2019, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/GUI/AnimationDemo.h b/examples/GUI/AnimationDemo.h index 337d1905..0d0a9512 100644 --- a/examples/GUI/AnimationDemo.h +++ b/examples/GUI/AnimationDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/GUI/BouncingBallWavetableDemo.h b/examples/GUI/BouncingBallWavetableDemo.h index 9c553019..ad186515 100644 --- a/examples/GUI/BouncingBallWavetableDemo.h +++ b/examples/GUI/BouncingBallWavetableDemo.h @@ -33,7 +33,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make + exporters: xcode_mac, vs2019, linux_make moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -70,7 +70,7 @@ public: startTimerHz (60); } - ~BouncingBallWavetableDemo() + ~BouncingBallWavetableDemo() override { shutdownAudio(); } @@ -217,7 +217,7 @@ public: for (auto i = 0; i < steps; ++i) { - auto p = start + ((finish - start) * i) / steps; + auto p = start + ((finish - start) * i) / (int) steps; auto index = (bufferIndex + i) % wavetableSize; waveValues[1][index] = yToAmplitude (p.y); diff --git a/examples/GUI/CameraDemo.h b/examples/GUI/CameraDemo.h index dab3911f..34a8e03a 100644 --- a/examples/GUI/CameraDemo.h +++ b/examples/GUI/CameraDemo.h @@ -32,7 +32,7 @@ dependencies: juce_audio_basics, juce_audio_devices, juce_core, juce_cryptography, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra, juce_video - exporters: xcode_mac, vs2017, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, androidstudio, xcode_iphone moduleFlags: JUCE_USE_CAMERA=1, JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -86,7 +86,7 @@ public: #endif } - ~CameraDemo() + ~CameraDemo() override { #if JUCE_IOS || JUCE_ANDROID setPortraitOrientationEnabled (false); diff --git a/examples/GUI/CodeEditorDemo.h b/examples/GUI/CodeEditorDemo.h index 3ecc11a7..c2be5ffb 100644 --- a/examples/GUI/CodeEditorDemo.h +++ b/examples/GUI/CodeEditorDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -83,7 +83,7 @@ public: setSize (500, 500); } - ~CodeEditorDemo() + ~CodeEditorDemo() override { fileChooser.removeListener (this); } diff --git a/examples/GUI/ComponentDemo.h b/examples/GUI/ComponentDemo.h index 86eae90e..5b80e50a 100644 --- a/examples/GUI/ComponentDemo.h +++ b/examples/GUI/ComponentDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017 + exporters: xcode_mac, vs2019 moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/GUI/ComponentTransformsDemo.h b/examples/GUI/ComponentTransformsDemo.h index 327cab77..7395aa7b 100644 --- a/examples/GUI/ComponentTransformsDemo.h +++ b/examples/GUI/ComponentTransformsDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/GUI/DialogsDemo.h b/examples/GUI/DialogsDemo.h index a6b1178b..cfa22eb9 100644 --- a/examples/GUI/DialogsDemo.h +++ b/examples/GUI/DialogsDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/GUI/FlexBoxDemo.h b/examples/GUI/FlexBoxDemo.h index e1008496..7560c23c 100644 --- a/examples/GUI/FlexBoxDemo.h +++ b/examples/GUI/FlexBoxDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/GUI/FontsDemo.h b/examples/GUI/FontsDemo.h index 61f94a80..baeb14d9 100644 --- a/examples/GUI/FontsDemo.h +++ b/examples/GUI/FontsDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/GUI/GraphicsDemo.h b/examples/GUI/GraphicsDemo.h index d2a98aa6..d5fecd46 100644 --- a/examples/GUI/GraphicsDemo.h +++ b/examples/GUI/GraphicsDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -496,18 +496,20 @@ public: if (svgFileStream.get() != nullptr) { - svgDrawable.reset (dynamic_cast (Drawable::createFromImageDataStream (*svgFileStream))); + svgDrawable = Drawable::createFromImageDataStream (*svgFileStream); - if (svgDrawable.get() != nullptr) + if (svgDrawable != nullptr) { // to make our icon the right size, we'll set its bounding box to the size and position that we want. - svgDrawable->setBoundingBox ({ -100.0f, -100.0f, 200.0f, 200.0f }); + + if (auto comp = dynamic_cast (svgDrawable.get())) + comp->setBoundingBox ({ -100.0f, -100.0f, 200.0f, 200.0f }); } } } Time lastSVGLoadTime; - std::unique_ptr svgDrawable; + std::unique_ptr svgDrawable; }; //============================================================================== diff --git a/examples/GUI/GridDemo.h b/examples/GUI/GridDemo.h index 00fb2125..9f599f64 100644 --- a/examples/GUI/GridDemo.h +++ b/examples/GUI/GridDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/GUI/HelloWorldDemo.h b/examples/GUI/HelloWorldDemo.h index 3b7dfb03..8acc465b 100644 --- a/examples/GUI/HelloWorldDemo.h +++ b/examples/GUI/HelloWorldDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -64,7 +64,7 @@ public: helloWorldLabel.setColour (TextEditor::backgroundColourId, Colour (0x00000000)); addAndMakeVisible (quitButton); - quitButton.onClick = [this] { JUCEApplication::quit(); }; + quitButton.onClick = [] { JUCEApplication::quit(); }; setSize (600, 300); } diff --git a/examples/GUI/ImagesDemo.h b/examples/GUI/ImagesDemo.h index 0cbedac8..61a0e4fe 100644 --- a/examples/GUI/ImagesDemo.h +++ b/examples/GUI/ImagesDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -82,7 +82,7 @@ public: setSize (500, 500); } - ~ImagesDemo() + ~ImagesDemo() override { fileTree.removeListener (this); } diff --git a/examples/GUI/KeyMappingsDemo.h b/examples/GUI/KeyMappingsDemo.h index 9fae26fd..19cdb975 100644 --- a/examples/GUI/KeyMappingsDemo.h +++ b/examples/GUI/KeyMappingsDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/GUI/LookAndFeelDemo.h b/examples/GUI/LookAndFeelDemo.h index 29205c16..f76807b5 100644 --- a/examples/GUI/LookAndFeelDemo.h +++ b/examples/GUI/LookAndFeelDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/GUI/MDIDemo.h b/examples/GUI/MDIDemo.h index 5c0edbce..040cebb7 100644 --- a/examples/GUI/MDIDemo.h +++ b/examples/GUI/MDIDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -140,7 +140,7 @@ class DemoMultiDocumentPanel : public MultiDocumentPanel public: DemoMultiDocumentPanel() {} - ~DemoMultiDocumentPanel() + ~DemoMultiDocumentPanel() override { closeAllDocuments (true); } diff --git a/examples/GUI/MenusDemo.h b/examples/GUI/MenusDemo.h index 1300fc28..2304b7c5 100644 --- a/examples/GUI/MenusDemo.h +++ b/examples/GUI/MenusDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -81,7 +81,7 @@ struct BurgerMenuHeader : public Component addAndMakeVisible (burgerButton); } - ~BurgerMenuHeader() + ~BurgerMenuHeader() override { sidePanel.showOrHide (false); } @@ -167,7 +167,7 @@ public: setSize (500, 500); } - ~MenusDemo() + ~MenusDemo() override { #if JUCE_MAC MenuBarModel::setMacMainMenu (nullptr); diff --git a/examples/GUI/MultiTouchDemo.h b/examples/GUI/MultiTouchDemo.h index 40441dd7..d507ab13 100644 --- a/examples/GUI/MultiTouchDemo.h +++ b/examples/GUI/MultiTouchDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/GUI/OpenGLAppDemo.h b/examples/GUI/OpenGLAppDemo.h index e9aa5127..5caff532 100644 --- a/examples/GUI/OpenGLAppDemo.h +++ b/examples/GUI/OpenGLAppDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra, juce_opengl - exporters: xcode_mac, vs2017, xcode_iphone + exporters: xcode_mac, vs2019, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -63,7 +63,7 @@ public: setSize (800, 600); } - ~OpenGLAppDemo() + ~OpenGLAppDemo() override { shutdownOpenGL(); } diff --git a/examples/GUI/OpenGLDemo.h b/examples/GUI/OpenGLDemo.h index d8f3bf58..065d40fa 100644 --- a/examples/GUI/OpenGLDemo.h +++ b/examples/GUI/OpenGLDemo.h @@ -31,12 +31,12 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra, juce_opengl - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 type: Component - mainClass: OpenGLDemoClasses::OpenGLDemo + mainClass: OpenGLDemo useLocalCopy: 1 @@ -49,9 +49,9 @@ #include "../Assets/DemoUtilities.h" #include "../Assets/WavefrontObjParser.h" -//============================================================================== -struct OpenGLDemoClasses +struct OpenGLUtils { + //============================================================================== /** Vertex data to be passed to the shaders. For the purposes of this demo, each vertex will have a 3D position, a colour and a 2D texture co-ordinate. Of course you can ignore these or manipulate them in the @@ -247,1011 +247,1009 @@ struct OpenGLDemoClasses }; //============================================================================== - // These classes are used to load textures from the various sources that the demo uses.. - struct DemoTexture + struct ShaderPreset { - virtual ~DemoTexture() {} - virtual bool applyTo (OpenGLTexture&) = 0; - - String name; + const char* name; + const char* vertexShader; + const char* fragmentShader; }; - struct DynamicTexture : public DemoTexture + static Array getPresets() { - DynamicTexture() { name = "Dynamically-generated texture"; } - - Image image; - BouncingNumber x, y; + #define SHADER_DEMO_HEADER \ + "/* This is a live OpenGL Shader demo.\n" \ + " Edit the shader program below and it will be \n" \ + " compiled and applied to the model above!\n" \ + "*/\n\n" - bool applyTo (OpenGLTexture& texture) override + ShaderPreset presets[] = { - int size = 128; - - if (! image.isValid()) - image = Image (Image::ARGB, size, size, true); - { - Graphics g (image); - g.fillAll (Colours::lightcyan); - - g.setColour (Colours::darkred); - g.drawRect (0, 0, size, size, 2); - - g.setColour (Colours::green); - g.fillEllipse (x.getValue() * size * 0.9f, y.getValue() * size * 0.9f, size * 0.1f, size * 0.1f); + "Texture + Lighting", - g.setColour (Colours::black); - g.setFont (40); + SHADER_DEMO_HEADER + "attribute vec4 position;\n" + "attribute vec4 normal;\n" + "attribute vec4 sourceColour;\n" + "attribute vec2 textureCoordIn;\n" + "\n" + "uniform mat4 projectionMatrix;\n" + "uniform mat4 viewMatrix;\n" + "uniform vec4 lightPosition;\n" + "\n" + "varying vec4 destinationColour;\n" + "varying vec2 textureCoordOut;\n" + "varying float lightIntensity;\n" + "\n" + "void main()\n" + "{\n" + " destinationColour = sourceColour;\n" + " textureCoordOut = textureCoordIn;\n" + "\n" + " vec4 light = viewMatrix * lightPosition;\n" + " lightIntensity = dot (light, normal);\n" + "\n" + " gl_Position = projectionMatrix * viewMatrix * position;\n" + "}\n", - const MessageManagerLock mml (ThreadPoolJob::getCurrentThreadPoolJob()); - if (! mml.lockWasGained()) - return false; + SHADER_DEMO_HEADER + #if JUCE_OPENGL_ES + "varying lowp vec4 destinationColour;\n" + "varying lowp vec2 textureCoordOut;\n" + "varying highp float lightIntensity;\n" + #else + "varying vec4 destinationColour;\n" + "varying vec2 textureCoordOut;\n" + "varying float lightIntensity;\n" + #endif + "\n" + "uniform sampler2D demoTexture;\n" + "\n" + "void main()\n" + "{\n" + #if JUCE_OPENGL_ES + " highp float l = max (0.3, lightIntensity * 0.3);\n" + " highp vec4 colour = vec4 (l, l, l, 1.0);\n" + #else + " float l = max (0.3, lightIntensity * 0.3);\n" + " vec4 colour = vec4 (l, l, l, 1.0);\n" + #endif + " gl_FragColor = colour * texture2D (demoTexture, textureCoordOut);\n" + "}\n" + }, - g.drawFittedText (String (Time::getCurrentTime().getMilliseconds()), image.getBounds(), Justification::centred, 1); - } + { + "Textured", - texture.loadImage (image); - return true; - } - }; + SHADER_DEMO_HEADER + "attribute vec4 position;\n" + "attribute vec4 sourceColour;\n" + "attribute vec2 textureCoordIn;\n" + "\n" + "uniform mat4 projectionMatrix;\n" + "uniform mat4 viewMatrix;\n" + "\n" + "varying vec4 destinationColour;\n" + "varying vec2 textureCoordOut;\n" + "\n" + "void main()\n" + "{\n" + " destinationColour = sourceColour;\n" + " textureCoordOut = textureCoordIn;\n" + " gl_Position = projectionMatrix * viewMatrix * position;\n" + "}\n", - struct BuiltInTexture : public DemoTexture - { - BuiltInTexture (const char* nm, const void* imageData, size_t imageSize) - : image (resizeImageToPowerOfTwo (ImageFileFormat::loadFrom (imageData, imageSize))) - { - name = nm; - } + SHADER_DEMO_HEADER + #if JUCE_OPENGL_ES + "varying lowp vec4 destinationColour;\n" + "varying lowp vec2 textureCoordOut;\n" + #else + "varying vec4 destinationColour;\n" + "varying vec2 textureCoordOut;\n" + #endif + "\n" + "uniform sampler2D demoTexture;\n" + "\n" + "void main()\n" + "{\n" + " gl_FragColor = texture2D (demoTexture, textureCoordOut);\n" + "}\n" + }, - Image image; + { + "Flat Colour", - bool applyTo (OpenGLTexture& texture) override - { - texture.loadImage (image); - return false; - } - }; + SHADER_DEMO_HEADER + "attribute vec4 position;\n" + "attribute vec4 sourceColour;\n" + "attribute vec2 textureCoordIn;\n" + "\n" + "uniform mat4 projectionMatrix;\n" + "uniform mat4 viewMatrix;\n" + "\n" + "varying vec4 destinationColour;\n" + "varying vec2 textureCoordOut;\n" + "\n" + "void main()\n" + "{\n" + " destinationColour = sourceColour;\n" + " textureCoordOut = textureCoordIn;\n" + " gl_Position = projectionMatrix * viewMatrix * position;\n" + "}\n", - struct TextureFromFile : public DemoTexture - { - TextureFromFile (const File& file) - { - name = file.getFileName(); - image = resizeImageToPowerOfTwo (ImageFileFormat::loadFrom (file)); - } + SHADER_DEMO_HEADER + #if JUCE_OPENGL_ES + "varying lowp vec4 destinationColour;\n" + "varying lowp vec2 textureCoordOut;\n" + #else + "varying vec4 destinationColour;\n" + "varying vec2 textureCoordOut;\n" + #endif + "\n" + "void main()\n" + "{\n" + " gl_FragColor = destinationColour;\n" + "}\n" + }, - Image image; + { + "Rainbow", - bool applyTo (OpenGLTexture& texture) override - { - texture.loadImage (image); - return false; - } - }; + SHADER_DEMO_HEADER + "attribute vec4 position;\n" + "attribute vec4 sourceColour;\n" + "attribute vec2 textureCoordIn;\n" + "\n" + "uniform mat4 projectionMatrix;\n" + "uniform mat4 viewMatrix;\n" + "\n" + "varying vec4 destinationColour;\n" + "varying vec2 textureCoordOut;\n" + "\n" + "varying float xPos;\n" + "varying float yPos;\n" + "varying float zPos;\n" + "\n" + "void main()\n" + "{\n" + " vec4 v = vec4 (position);\n" + " xPos = clamp (v.x, 0.0, 1.0);\n" + " yPos = clamp (v.y, 0.0, 1.0);\n" + " zPos = clamp (v.z, 0.0, 1.0);\n" + " gl_Position = projectionMatrix * viewMatrix * position;\n" + "}", - struct TextureFromAsset : public DemoTexture - { - TextureFromAsset (const char* assetName) - { - name = assetName; - image = resizeImageToPowerOfTwo (getImageFromAssets (assetName)); - } + SHADER_DEMO_HEADER + #if JUCE_OPENGL_ES + "varying lowp vec4 destinationColour;\n" + "varying lowp vec2 textureCoordOut;\n" + "varying lowp float xPos;\n" + "varying lowp float yPos;\n" + "varying lowp float zPos;\n" + #else + "varying vec4 destinationColour;\n" + "varying vec2 textureCoordOut;\n" + "varying float xPos;\n" + "varying float yPos;\n" + "varying float zPos;\n" + #endif + "\n" + "void main()\n" + "{\n" + " gl_FragColor = vec4 (xPos, yPos, zPos, 1.0);\n" + "}" + }, - Image image; + { + "Changing Colour", - bool applyTo (OpenGLTexture& texture) override - { - texture.loadImage (image); - return false; - } - }; + SHADER_DEMO_HEADER + "attribute vec4 position;\n" + "attribute vec2 textureCoordIn;\n" + "\n" + "uniform mat4 projectionMatrix;\n" + "uniform mat4 viewMatrix;\n" + "\n" + "varying vec2 textureCoordOut;\n" + "\n" + "void main()\n" + "{\n" + " textureCoordOut = textureCoordIn;\n" + " gl_Position = projectionMatrix * viewMatrix * position;\n" + "}\n", - static Image resizeImageToPowerOfTwo (Image image) - { - if (! (isPowerOfTwo (image.getWidth()) && isPowerOfTwo (image.getHeight()))) - return image.rescaled (jmin (1024, nextPowerOfTwo (image.getWidth())), - jmin (1024, nextPowerOfTwo (image.getHeight()))); + SHADER_DEMO_HEADER + "#define PI 3.1415926535897932384626433832795\n" + "\n" + #if JUCE_OPENGL_ES + "precision mediump float;\n" + "varying lowp vec2 textureCoordOut;\n" + #else + "varying vec2 textureCoordOut;\n" + #endif + "uniform float bouncingNumber;\n" + "\n" + "void main()\n" + "{\n" + " float b = bouncingNumber;\n" + " float n = b * PI * 2.0;\n" + " float sn = (sin (n * textureCoordOut.x) * 0.5) + 0.5;\n" + " float cn = (sin (n * textureCoordOut.y) * 0.5) + 0.5;\n" + "\n" + " vec4 col = vec4 (b, sn, cn, 1.0);\n" + " gl_FragColor = col;\n" + "}\n" + }, - return image; - } + { + "Simple Light", - class OpenGLDemo; + SHADER_DEMO_HEADER + "attribute vec4 position;\n" + "attribute vec4 normal;\n" + "\n" + "uniform mat4 projectionMatrix;\n" + "uniform mat4 viewMatrix;\n" + "uniform vec4 lightPosition;\n" + "\n" + "varying float lightIntensity;\n" + "\n" + "void main()\n" + "{\n" + " vec4 light = viewMatrix * lightPosition;\n" + " lightIntensity = dot (light, normal);\n" + "\n" + " gl_Position = projectionMatrix * viewMatrix * position;\n" + "}\n", - //============================================================================== - /** - This component sits on top of the main GL demo, and contains all the sliders - and widgets that control things. - */ - class DemoControlsOverlay : public Component, - private CodeDocument::Listener, - private Slider::Listener, - private Timer - { - public: - DemoControlsOverlay (OpenGLDemo& d) - : demo (d) - { - addAndMakeVisible (statusLabel); - statusLabel.setJustificationType (Justification::topLeft); - statusLabel.setFont (Font (14.0f)); + SHADER_DEMO_HEADER + #if JUCE_OPENGL_ES + "varying highp float lightIntensity;\n" + #else + "varying float lightIntensity;\n" + #endif + "\n" + "void main()\n" + "{\n" + #if JUCE_OPENGL_ES + " highp float l = lightIntensity * 0.25;\n" + " highp vec4 colour = vec4 (l, l, l, 1.0);\n" + #else + " float l = lightIntensity * 0.25;\n" + " vec4 colour = vec4 (l, l, l, 1.0);\n" + #endif + "\n" + " gl_FragColor = colour;\n" + "}\n" + }, - addAndMakeVisible (sizeSlider); - sizeSlider.setRange (0.0, 1.0, 0.001); - sizeSlider.addListener (this); + { + "Flattened", - addAndMakeVisible (zoomLabel); - zoomLabel.attachToComponent (&sizeSlider, true); + SHADER_DEMO_HEADER + "attribute vec4 position;\n" + "attribute vec4 normal;\n" + "\n" + "uniform mat4 projectionMatrix;\n" + "uniform mat4 viewMatrix;\n" + "uniform vec4 lightPosition;\n" + "\n" + "varying float lightIntensity;\n" + "\n" + "void main()\n" + "{\n" + " vec4 light = viewMatrix * lightPosition;\n" + " lightIntensity = dot (light, normal);\n" + "\n" + " vec4 v = vec4 (position);\n" + " v.z = v.z * 0.1;\n" + "\n" + " gl_Position = projectionMatrix * viewMatrix * v;\n" + "}\n", - addAndMakeVisible (speedSlider); - speedSlider.setRange (0.0, 0.5, 0.001); - speedSlider.addListener (this); - speedSlider.setSkewFactor (0.5f); + SHADER_DEMO_HEADER + #if JUCE_OPENGL_ES + "varying highp float lightIntensity;\n" + #else + "varying float lightIntensity;\n" + #endif + "\n" + "void main()\n" + "{\n" + #if JUCE_OPENGL_ES + " highp float l = lightIntensity * 0.25;\n" + " highp vec4 colour = vec4 (l, l, l, 1.0);\n" + #else + " float l = lightIntensity * 0.25;\n" + " vec4 colour = vec4 (l, l, l, 1.0);\n" + #endif + "\n" + " gl_FragColor = colour;\n" + "}\n" + }, - addAndMakeVisible (speedLabel); - speedLabel.attachToComponent (&speedSlider, true); + { + "Toon Shader", - addAndMakeVisible (showBackgroundToggle); - showBackgroundToggle.onClick = [this] { demo.doBackgroundDrawing = showBackgroundToggle.getToggleState(); }; + SHADER_DEMO_HEADER + "attribute vec4 position;\n" + "attribute vec4 normal;\n" + "\n" + "uniform mat4 projectionMatrix;\n" + "uniform mat4 viewMatrix;\n" + "uniform vec4 lightPosition;\n" + "\n" + "varying float lightIntensity;\n" + "\n" + "void main()\n" + "{\n" + " vec4 light = viewMatrix * lightPosition;\n" + " lightIntensity = dot (light, normal);\n" + "\n" + " gl_Position = projectionMatrix * viewMatrix * position;\n" + "}\n", - addAndMakeVisible (tabbedComp); - tabbedComp.setTabBarDepth (25); - tabbedComp.setColour (TabbedButtonBar::tabTextColourId, Colours::grey); - tabbedComp.addTab ("Vertex", Colours::transparentBlack, &vertexEditorComp, false); - tabbedComp.addTab ("Fragment", Colours::transparentBlack, &fragmentEditorComp, false); + SHADER_DEMO_HEADER + #if JUCE_OPENGL_ES + "varying highp float lightIntensity;\n" + #else + "varying float lightIntensity;\n" + #endif + "\n" + "void main()\n" + "{\n" + #if JUCE_OPENGL_ES + " highp float intensity = lightIntensity * 0.5;\n" + " highp vec4 colour;\n" + #else + " float intensity = lightIntensity * 0.5;\n" + " vec4 colour;\n" + #endif + "\n" + " if (intensity > 0.95)\n" + " colour = vec4 (1.0, 0.5, 0.5, 1.0);\n" + " else if (intensity > 0.5)\n" + " colour = vec4 (0.6, 0.3, 0.3, 1.0);\n" + " else if (intensity > 0.25)\n" + " colour = vec4 (0.4, 0.2, 0.2, 1.0);\n" + " else\n" + " colour = vec4 (0.2, 0.1, 0.1, 1.0);\n" + "\n" + " gl_FragColor = colour;\n" + "}\n" + } + }; - vertexDocument.addListener (this); - fragmentDocument.addListener (this); + return Array (presets, numElementsInArray (presets)); + } - textures.add (new TextureFromAsset ("portmeirion.jpg")); - textures.add (new TextureFromAsset ("tile_background.png")); - textures.add (new TextureFromAsset ("juce_icon.png")); - textures.add (new DynamicTexture()); + //============================================================================== + // These classes are used to load textures from the various sources that the demo uses.. + struct DemoTexture + { + virtual ~DemoTexture() {} + virtual bool applyTo (OpenGLTexture&) = 0; - addAndMakeVisible (textureBox); - textureBox.onChange = [this] { selectTexture (textureBox.getSelectedId()); }; - updateTexturesList(); + String name; + }; - addAndMakeVisible (presetBox); - presetBox.onChange = [this] { selectPreset (presetBox.getSelectedItemIndex()); }; + struct DynamicTexture : public DemoTexture + { + DynamicTexture() { name = "Dynamically-generated texture"; } - auto presets = getPresets(); + Image image; + BouncingNumber x, y; - for (int i = 0; i < presets.size(); ++i) - presetBox.addItem (presets[i].name, i + 1); + bool applyTo (OpenGLTexture& texture) override + { + int size = 128; - addAndMakeVisible (presetLabel); - presetLabel.attachToComponent (&presetBox, true); + if (! image.isValid()) + image = Image (Image::ARGB, size, size, true); - addAndMakeVisible (textureLabel); - textureLabel.attachToComponent (&textureBox, true); + { + Graphics g (image); + g.fillAll (Colours::lightcyan); - lookAndFeelChanged(); - } + g.setColour (Colours::darkred); + g.drawRect (0, 0, size, size, 2); - void initialise() - { - showBackgroundToggle.setToggleState (false, sendNotification); - textureBox.setSelectedItemIndex (0); - presetBox .setSelectedItemIndex (0); - speedSlider.setValue (0.01); - sizeSlider .setValue (0.5); - } + g.setColour (Colours::green); + g.fillEllipse (x.getValue() * size * 0.9f, y.getValue() * size * 0.9f, size * 0.1f, size * 0.1f); - void resized() override - { - auto area = getLocalBounds().reduced (4); + g.setColour (Colours::black); + g.setFont (40); - auto top = area.removeFromTop (75); + const MessageManagerLock mml (ThreadPoolJob::getCurrentThreadPoolJob()); + if (! mml.lockWasGained()) + return false; - auto sliders = top.removeFromRight (area.getWidth() / 2); - showBackgroundToggle.setBounds (sliders.removeFromBottom (25)); - speedSlider .setBounds (sliders.removeFromBottom (25)); - sizeSlider .setBounds (sliders.removeFromBottom (25)); + g.drawFittedText (String (Time::getCurrentTime().getMilliseconds()), image.getBounds(), Justification::centred, 1); + } - top.removeFromRight (70); - statusLabel.setBounds (top); + texture.loadImage (image); + return true; + } + }; - auto shaderArea = area.removeFromBottom (area.getHeight() / 2); + static Image resizeImageToPowerOfTwo (Image image) + { + if (! (isPowerOfTwo (image.getWidth()) && isPowerOfTwo (image.getHeight()))) + return image.rescaled (jmin (1024, nextPowerOfTwo (image.getWidth())), + jmin (1024, nextPowerOfTwo (image.getHeight()))); - auto presets = shaderArea.removeFromTop (25); - presets.removeFromLeft (100); - presetBox.setBounds (presets.removeFromLeft (150)); - presets.removeFromLeft (100); - textureBox.setBounds (presets); + return image; + } - shaderArea.removeFromTop (4); - tabbedComp.setBounds (shaderArea); + struct BuiltInTexture : public DemoTexture + { + BuiltInTexture (const char* nm, const void* imageData, size_t imageSize) + : image (resizeImageToPowerOfTwo (ImageFileFormat::loadFrom (imageData, imageSize))) + { + name = nm; } - void mouseDown (const MouseEvent& e) override + Image image; + + bool applyTo (OpenGLTexture& texture) override { - demo.draggableOrientation.mouseDown (e.getPosition()); + texture.loadImage (image); + return false; } + }; - void mouseDrag (const MouseEvent& e) override + struct TextureFromFile : public DemoTexture + { + TextureFromFile (const File& file) { - demo.draggableOrientation.mouseDrag (e.getPosition()); + name = file.getFileName(); + image = resizeImageToPowerOfTwo (ImageFileFormat::loadFrom (file)); } - void mouseWheelMove (const MouseEvent&, const MouseWheelDetails& d) override + Image image; + + bool applyTo (OpenGLTexture& texture) override { - sizeSlider.setValue (sizeSlider.getValue() + d.deltaY); + texture.loadImage (image); + return false; } + }; - void mouseMagnify (const MouseEvent&, float magnifyAmmount) override + struct TextureFromAsset : public DemoTexture + { + TextureFromAsset (const char* assetName) { - sizeSlider.setValue (sizeSlider.getValue() + magnifyAmmount - 1.0f); + name = assetName; + image = resizeImageToPowerOfTwo (getImageFromAssets (assetName)); } - void selectPreset (int preset) + Image image; + + bool applyTo (OpenGLTexture& texture) override { - const auto& p = getPresets()[preset]; + texture.loadImage (image); + return false; + } + }; +}; - vertexDocument .replaceAllContent (p.vertexShader); - fragmentDocument.replaceAllContent (p.fragmentShader); +//============================================================================== +/** This is the main demo component - the GL context gets attached to it, and + it implements the OpenGLRenderer callback so that it can do real GL work. +*/ +class OpenGLDemo : public Component, + private OpenGLRenderer, + private AsyncUpdater +{ +public: + OpenGLDemo() + { + if (auto* peer = getPeer()) + peer->setCurrentRenderingEngine (0); - startTimer (1); - } + setOpaque (true); + controlsOverlay.reset (new DemoControlsOverlay (*this)); + addAndMakeVisible (controlsOverlay.get()); - void selectTexture (int itemID) - { - #if JUCE_MODAL_LOOPS_PERMITTED - if (itemID == 1000) - { - auto lastLocation = File::getSpecialLocation (File::userPicturesDirectory); + openGLContext.setRenderer (this); + openGLContext.attachTo (*this); + openGLContext.setContinuousRepainting (true); - FileChooser fc ("Choose an image to open...", lastLocation, "*.jpg;*.jpeg;*.png;*.gif"); + controlsOverlay->initialise(); - if (fc.browseForFileToOpen()) - { - lastLocation = fc.getResult(); + setSize (500, 500); + } - textures.add (new TextureFromFile (fc.getResult())); - updateTexturesList(); + ~OpenGLDemo() override + { + openGLContext.detach(); + } - textureBox.setSelectedId (textures.size()); - } - } - else - #endif - { - if (auto* t = textures[itemID - 1]) - demo.setTexture (t); - } - } + void newOpenGLContextCreated() override + { + // nothing to do in this case - we'll initialise our shaders + textures + // on demand, during the render callback. + freeAllContextObjects(); - void updateTexturesList() - { - textureBox.clear(); + if (controlsOverlay.get() != nullptr) + controlsOverlay->updateShader(); + } - for (int i = 0; i < textures.size(); ++i) - textureBox.addItem (textures.getUnchecked (i)->name, i + 1); + void openGLContextClosing() override + { + // When the context is about to close, you must use this callback to delete + // any GPU resources while the context is still current. + freeAllContextObjects(); - #if JUCE_MODAL_LOOPS_PERMITTED - textureBox.addSeparator(); - textureBox.addItem ("Load from a file...", 1000); - #endif - } + if (lastTexture != nullptr) + setTexture (lastTexture); + } - void updateShader() - { - startTimer (10); - } + void freeAllContextObjects() + { + shape .reset(); + shader .reset(); + attributes.reset(); + uniforms .reset(); + texture .release(); + } - Label statusLabel; + // This is a virtual method in OpenGLRenderer, and is called when it's time + // to do your GL rendering. + void renderOpenGL() override + { + jassert (OpenGLHelpers::isContextActive()); - private: - void sliderValueChanged (Slider*) override - { - demo.scale = (float) sizeSlider .getValue(); - demo.rotationSpeed = (float) speedSlider.getValue(); - } + auto desktopScale = (float) openGLContext.getRenderingScale(); - enum { shaderLinkDelay = 500 }; + OpenGLHelpers::clear (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, + Colours::lightblue)); - void codeDocumentTextInserted (const String& /*newText*/, int /*insertIndex*/) override - { - startTimer (shaderLinkDelay); - } + if (textureToUse != nullptr) + if (! textureToUse->applyTo (texture)) + textureToUse = nullptr; - void codeDocumentTextDeleted (int /*startIndex*/, int /*endIndex*/) override - { - startTimer (shaderLinkDelay); - } + // First draw our background graphics to demonstrate the OpenGLGraphicsContext class + if (doBackgroundDrawing) + drawBackground2DStuff (desktopScale); - void timerCallback() override - { - stopTimer(); - demo.setShaderProgram (vertexDocument .getAllContent(), - fragmentDocument.getAllContent()); - } + updateShader(); // Check whether we need to compile a new shader - void lookAndFeelChanged() override - { - auto editorBackground = getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, - Colours::white); + if (shader.get() == nullptr) + return; - for (int i = tabbedComp.getNumTabs(); i >= 0; --i) - tabbedComp.setTabBackgroundColour (i, editorBackground); + // Having used the juce 2D renderer, it will have messed-up a whole load of GL state, so + // we need to initialise some important settings before doing our normal GL 3D drawing.. + glEnable (GL_DEPTH_TEST); + glDepthFunc (GL_LESS); + glEnable (GL_BLEND); + glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + openGLContext.extensions.glActiveTexture (GL_TEXTURE0); + glEnable (GL_TEXTURE_2D); - vertexEditorComp .setColour (CodeEditorComponent::backgroundColourId, editorBackground); - fragmentEditorComp.setColour (CodeEditorComponent::backgroundColourId, editorBackground); - } + glViewport (0, 0, roundToInt (desktopScale * getWidth()), roundToInt (desktopScale * getHeight())); - OpenGLDemo& demo; + texture.bind(); - Label speedLabel { {}, "Speed:" }, - zoomLabel { {}, "Zoom:" }; + glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - CodeDocument vertexDocument, fragmentDocument; - CodeEditorComponent vertexEditorComp { vertexDocument, nullptr }, - fragmentEditorComp { fragmentDocument, nullptr }; + shader->use(); - TabbedComponent tabbedComp { TabbedButtonBar::TabsAtLeft }; + if (uniforms->projectionMatrix.get() != nullptr) + uniforms->projectionMatrix->setMatrix4 (getProjectionMatrix().mat, 1, false); - ComboBox presetBox, textureBox; + if (uniforms->viewMatrix.get() != nullptr) + uniforms->viewMatrix->setMatrix4 (getViewMatrix().mat, 1, false); - Label presetLabel { {}, "Shader Preset:" }, - textureLabel { {}, "Texture:" }; + if (uniforms->texture.get() != nullptr) + uniforms->texture->set ((GLint) 0); - Slider speedSlider, sizeSlider; + if (uniforms->lightPosition.get() != nullptr) + uniforms->lightPosition->set (-15.0f, 10.0f, 15.0f, 0.0f); - ToggleButton showBackgroundToggle { "Draw 2D graphics in background" }; + if (uniforms->bouncingNumber.get() != nullptr) + uniforms->bouncingNumber->set (bouncingNumber.getValue()); - OwnedArray textures; + shape->draw (openGLContext, *attributes); - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DemoControlsOverlay) - }; + // Reset the element buffers so child Components draw correctly + openGLContext.extensions.glBindBuffer (GL_ARRAY_BUFFER, 0); + openGLContext.extensions.glBindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0); - //============================================================================== - /** This is the main demo component - the GL context gets attached to it, and - it implements the OpenGLRenderer callback so that it can do real GL work. - */ - class OpenGLDemo : public Component, - private OpenGLRenderer, - private AsyncUpdater + if (! controlsOverlay->isMouseButtonDown()) + rotation += (float) rotationSpeed; + } + + Matrix3D getProjectionMatrix() const { - public: - OpenGLDemo() - { - if (auto* peer = getPeer()) - peer->setCurrentRenderingEngine (0); + auto w = 1.0f / (scale + 0.1f); + auto h = w * getLocalBounds().toFloat().getAspectRatio (false); - setOpaque (true); - controlsOverlay.reset (new DemoControlsOverlay (*this)); - addAndMakeVisible (controlsOverlay.get()); + return Matrix3D::fromFrustum (-w, w, -h, h, 4.0f, 30.0f); + } - openGLContext.setRenderer (this); - openGLContext.attachTo (*this); - openGLContext.setContinuousRepainting (true); + Matrix3D getViewMatrix() const + { + auto viewMatrix = draggableOrientation.getRotationMatrix() + * Vector3D (0.0f, 1.0f, -10.0f); - controlsOverlay->initialise(); + auto rotationMatrix = Matrix3D::rotation ({ rotation, rotation, -0.3f }); - setSize (500, 500); - } + return rotationMatrix * viewMatrix; + } - ~OpenGLDemo() - { - openGLContext.detach(); - } + void setTexture (OpenGLUtils::DemoTexture* t) + { + lastTexture = textureToUse = t; + } - void newOpenGLContextCreated() override - { - // nothing to do in this case - we'll initialise our shaders + textures - // on demand, during the render callback. - freeAllContextObjects(); + void setShaderProgram (const String& vertexShader, const String& fragmentShader) + { + newVertexShader = vertexShader; + newFragmentShader = fragmentShader; + } - if (controlsOverlay.get() != nullptr) - controlsOverlay->updateShader(); - } + void paint (Graphics&) override {} - void openGLContextClosing() override - { - // When the context is about to close, you must use this callback to delete - // any GPU resources while the context is still current. - freeAllContextObjects(); + void resized() override + { + controlsOverlay->setBounds (getLocalBounds()); + draggableOrientation.setViewport (getLocalBounds()); + } - if (lastTexture != nullptr) - setTexture (lastTexture); - } + Draggable3DOrientation draggableOrientation; + bool doBackgroundDrawing = false; + float scale = 0.5f, rotationSpeed = 0.0f; + BouncingNumber bouncingNumber; + +private: + void handleAsyncUpdate() override + { + controlsOverlay->statusLabel.setText (statusText, dontSendNotification); + } + + void drawBackground2DStuff (float desktopScale) + { + // Create an OpenGLGraphicsContext that will draw into this GL window.. + std::unique_ptr glRenderer (createOpenGLGraphicsContext (openGLContext, + roundToInt (desktopScale * getWidth()), + roundToInt (desktopScale * getHeight()))); - void freeAllContextObjects() + if (glRenderer.get() != nullptr) { - shape .reset(); - shader .reset(); - attributes.reset(); - uniforms .reset(); - texture .release(); + Graphics g (*glRenderer); + g.addTransform (AffineTransform::scale (desktopScale)); + + for (auto s : stars) + { + auto size = 0.25f; + + // This stuff just creates a spinning star shape and fills it.. + Path p; + p.addStar ({ getWidth() * s.x.getValue(), + getHeight() * s.y.getValue() }, + 7, + getHeight() * size * 0.5f, + getHeight() * size, + s.angle.getValue()); + + auto hue = s.hue.getValue(); + + g.setGradientFill (ColourGradient (Colours::green.withRotatedHue (hue).withAlpha (0.8f), + 0, 0, + Colours::red.withRotatedHue (hue).withAlpha (0.5f), + 0, (float) getHeight(), false)); + g.fillPath (p); + } } + } + + OpenGLContext openGLContext; - // This is a virtual method in OpenGLRenderer, and is called when it's time - // to do your GL rendering. - void renderOpenGL() override + //============================================================================== + /** + This component sits on top of the main GL demo, and contains all the sliders + and widgets that control things. + */ + class DemoControlsOverlay : public Component, + private CodeDocument::Listener, + private Slider::Listener, + private Timer + { + public: + DemoControlsOverlay (OpenGLDemo& d) + : demo (d) { - jassert (OpenGLHelpers::isContextActive()); + addAndMakeVisible (statusLabel); + statusLabel.setJustificationType (Justification::topLeft); + statusLabel.setFont (Font (14.0f)); + + addAndMakeVisible (sizeSlider); + sizeSlider.setRange (0.0, 1.0, 0.001); + sizeSlider.addListener (this); + + addAndMakeVisible (zoomLabel); + zoomLabel.attachToComponent (&sizeSlider, true); + + addAndMakeVisible (speedSlider); + speedSlider.setRange (0.0, 0.5, 0.001); + speedSlider.addListener (this); + speedSlider.setSkewFactor (0.5f); - auto desktopScale = (float) openGLContext.getRenderingScale(); + addAndMakeVisible (speedLabel); + speedLabel.attachToComponent (&speedSlider, true); + + addAndMakeVisible (showBackgroundToggle); + showBackgroundToggle.onClick = [this] { demo.doBackgroundDrawing = showBackgroundToggle.getToggleState(); }; - OpenGLHelpers::clear (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, - Colours::lightblue)); + addAndMakeVisible (tabbedComp); + tabbedComp.setTabBarDepth (25); + tabbedComp.setColour (TabbedButtonBar::tabTextColourId, Colours::grey); + tabbedComp.addTab ("Vertex", Colours::transparentBlack, &vertexEditorComp, false); + tabbedComp.addTab ("Fragment", Colours::transparentBlack, &fragmentEditorComp, false); - if (textureToUse != nullptr) - if (! textureToUse->applyTo (texture)) - textureToUse = nullptr; + vertexDocument.addListener (this); + fragmentDocument.addListener (this); - // First draw our background graphics to demonstrate the OpenGLGraphicsContext class - if (doBackgroundDrawing) - drawBackground2DStuff (desktopScale); + textures.add (new OpenGLUtils::TextureFromAsset ("portmeirion.jpg")); + textures.add (new OpenGLUtils::TextureFromAsset ("tile_background.png")); + textures.add (new OpenGLUtils::TextureFromAsset ("juce_icon.png")); + textures.add (new OpenGLUtils::DynamicTexture()); - updateShader(); // Check whether we need to compile a new shader + addAndMakeVisible (textureBox); + textureBox.onChange = [this] { selectTexture (textureBox.getSelectedId()); }; + updateTexturesList(); - if (shader.get() == nullptr) - return; + addAndMakeVisible (presetBox); + presetBox.onChange = [this] { selectPreset (presetBox.getSelectedItemIndex()); }; - // Having used the juce 2D renderer, it will have messed-up a whole load of GL state, so - // we need to initialise some important settings before doing our normal GL 3D drawing.. - glEnable (GL_DEPTH_TEST); - glDepthFunc (GL_LESS); - glEnable (GL_BLEND); - glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - openGLContext.extensions.glActiveTexture (GL_TEXTURE0); - glEnable (GL_TEXTURE_2D); + auto presets = OpenGLUtils::getPresets(); - glViewport (0, 0, roundToInt (desktopScale * getWidth()), roundToInt (desktopScale * getHeight())); + for (int i = 0; i < presets.size(); ++i) + presetBox.addItem (presets[i].name, i + 1); - texture.bind(); + addAndMakeVisible (presetLabel); + presetLabel.attachToComponent (&presetBox, true); - glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + addAndMakeVisible (textureLabel); + textureLabel.attachToComponent (&textureBox, true); - shader->use(); + lookAndFeelChanged(); + } - if (uniforms->projectionMatrix.get() != nullptr) - uniforms->projectionMatrix->setMatrix4 (getProjectionMatrix().mat, 1, false); + void initialise() + { + showBackgroundToggle.setToggleState (false, sendNotification); + textureBox.setSelectedItemIndex (0); + presetBox .setSelectedItemIndex (0); + speedSlider.setValue (0.01); + sizeSlider .setValue (0.5); + } - if (uniforms->viewMatrix.get() != nullptr) - uniforms->viewMatrix->setMatrix4 (getViewMatrix().mat, 1, false); + void resized() override + { + auto area = getLocalBounds().reduced (4); - if (uniforms->texture.get() != nullptr) - uniforms->texture->set ((GLint) 0); + auto top = area.removeFromTop (75); - if (uniforms->lightPosition.get() != nullptr) - uniforms->lightPosition->set (-15.0f, 10.0f, 15.0f, 0.0f); + auto sliders = top.removeFromRight (area.getWidth() / 2); + showBackgroundToggle.setBounds (sliders.removeFromBottom (25)); + speedSlider .setBounds (sliders.removeFromBottom (25)); + sizeSlider .setBounds (sliders.removeFromBottom (25)); - if (uniforms->bouncingNumber.get() != nullptr) - uniforms->bouncingNumber->set (bouncingNumber.getValue()); + top.removeFromRight (70); + statusLabel.setBounds (top); - shape->draw (openGLContext, *attributes); + auto shaderArea = area.removeFromBottom (area.getHeight() / 2); - // Reset the element buffers so child Components draw correctly - openGLContext.extensions.glBindBuffer (GL_ARRAY_BUFFER, 0); - openGLContext.extensions.glBindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0); + auto presets = shaderArea.removeFromTop (25); + presets.removeFromLeft (100); + presetBox.setBounds (presets.removeFromLeft (150)); + presets.removeFromLeft (100); + textureBox.setBounds (presets); - if (! controlsOverlay->isMouseButtonDown()) - rotation += (float) rotationSpeed; + shaderArea.removeFromTop (4); + tabbedComp.setBounds (shaderArea); } - Matrix3D getProjectionMatrix() const + void mouseDown (const MouseEvent& e) override { - auto w = 1.0f / (scale + 0.1f); - auto h = w * getLocalBounds().toFloat().getAspectRatio (false); - - return Matrix3D::fromFrustum (-w, w, -h, h, 4.0f, 30.0f); + demo.draggableOrientation.mouseDown (e.getPosition()); } - Matrix3D getViewMatrix() const + void mouseDrag (const MouseEvent& e) override { - auto viewMatrix = draggableOrientation.getRotationMatrix() - * Vector3D (0.0f, 1.0f, -10.0f); - - auto rotationMatrix = Matrix3D::rotation ({ rotation, rotation, -0.3f }); - - return rotationMatrix * viewMatrix; + demo.draggableOrientation.mouseDrag (e.getPosition()); } - void setTexture (DemoTexture* t) + void mouseWheelMove (const MouseEvent&, const MouseWheelDetails& d) override { - lastTexture = textureToUse = t; + sizeSlider.setValue (sizeSlider.getValue() + d.deltaY); } - void setShaderProgram (const String& vertexShader, const String& fragmentShader) + void mouseMagnify (const MouseEvent&, float magnifyAmmount) override { - newVertexShader = vertexShader; - newFragmentShader = fragmentShader; + sizeSlider.setValue (sizeSlider.getValue() + magnifyAmmount - 1.0f); } - void paint (Graphics&) override {} - - void resized() override + void selectPreset (int preset) { - controlsOverlay->setBounds (getLocalBounds()); - draggableOrientation.setViewport (getLocalBounds()); - } + const auto& p = OpenGLUtils::getPresets()[preset]; - Draggable3DOrientation draggableOrientation; - bool doBackgroundDrawing = false; - float scale = 0.5f, rotationSpeed = 0.0f; - BouncingNumber bouncingNumber; + vertexDocument .replaceAllContent (p.vertexShader); + fragmentDocument.replaceAllContent (p.fragmentShader); - private: - void handleAsyncUpdate() override - { - controlsOverlay->statusLabel.setText (statusText, dontSendNotification); + startTimer (1); } - void drawBackground2DStuff (float desktopScale) + void selectTexture (int itemID) { - // Create an OpenGLGraphicsContext that will draw into this GL window.. - std::unique_ptr glRenderer (createOpenGLGraphicsContext (openGLContext, - roundToInt (desktopScale * getWidth()), - roundToInt (desktopScale * getHeight()))); - - if (glRenderer.get() != nullptr) + #if JUCE_MODAL_LOOPS_PERMITTED + if (itemID == 1000) { - Graphics g (*glRenderer); - g.addTransform (AffineTransform::scale (desktopScale)); + auto lastLocation = File::getSpecialLocation (File::userPicturesDirectory); - for (auto s : stars) + FileChooser fc ("Choose an image to open...", lastLocation, "*.jpg;*.jpeg;*.png;*.gif"); + + if (fc.browseForFileToOpen()) { - auto size = 0.25f; - - // This stuff just creates a spinning star shape and fills it.. - Path p; - p.addStar ({ getWidth() * s.x.getValue(), - getHeight() * s.y.getValue() }, - 7, - getHeight() * size * 0.5f, - getHeight() * size, - s.angle.getValue()); - - auto hue = s.hue.getValue(); - - g.setGradientFill (ColourGradient (Colours::green.withRotatedHue (hue).withAlpha (0.8f), - 0, 0, - Colours::red.withRotatedHue (hue).withAlpha (0.5f), - 0, (float) getHeight(), false)); - g.fillPath (p); + lastLocation = fc.getResult(); + + textures.add (new OpenGLUtils::TextureFromFile (fc.getResult())); + updateTexturesList(); + + textureBox.setSelectedId (textures.size()); } } + else + #endif + { + if (auto* t = textures[itemID - 1]) + demo.setTexture (t); + } } - OpenGLContext openGLContext; - - std::unique_ptr controlsOverlay; - - float rotation = 0.0f; - - std::unique_ptr shader; - std::unique_ptr shape; - std::unique_ptr attributes; - std::unique_ptr uniforms; - - OpenGLTexture texture; - DemoTexture* textureToUse = nullptr; - DemoTexture* lastTexture = nullptr; - - String newVertexShader, newFragmentShader, statusText; - - struct BackgroundStar + void updateTexturesList() { - SlowerBouncingNumber x, y, hue, angle; - }; + textureBox.clear(); + + for (int i = 0; i < textures.size(); ++i) + textureBox.addItem (textures.getUnchecked (i)->name, i + 1); - BackgroundStar stars[3]; + #if JUCE_MODAL_LOOPS_PERMITTED + textureBox.addSeparator(); + textureBox.addItem ("Load from a file...", 1000); + #endif + } - //============================================================================== void updateShader() { - if (newVertexShader.isNotEmpty() || newFragmentShader.isNotEmpty()) - { - std::unique_ptr newShader (new OpenGLShaderProgram (openGLContext)); - - if (newShader->addVertexShader (OpenGLHelpers::translateVertexShaderToV3 (newVertexShader)) - && newShader->addFragmentShader (OpenGLHelpers::translateFragmentShaderToV3 (newFragmentShader)) - && newShader->link()) - { - shape .reset(); - attributes.reset(); - uniforms .reset(); - - shader.reset (newShader.release()); - shader->use(); - - shape .reset (new Shape (openGLContext)); - attributes.reset (new Attributes (openGLContext, *shader)); - uniforms .reset (new Uniforms (openGLContext, *shader)); - - statusText = "GLSL: v" + String (OpenGLShaderProgram::getLanguageVersion(), 2); - } - else - { - statusText = newShader->getLastError(); - } - - triggerAsyncUpdate(); - - newVertexShader = {}; - newFragmentShader = {}; - } + startTimer (10); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OpenGLDemo) - }; + Label statusLabel; - //============================================================================== - struct ShaderPreset - { - const char* name; - const char* vertexShader; - const char* fragmentShader; - }; + private: + void sliderValueChanged (Slider*) override + { + demo.scale = (float) sizeSlider .getValue(); + demo.rotationSpeed = (float) speedSlider.getValue(); + } - static Array getPresets() - { - #define SHADER_DEMO_HEADER \ - "/* This is a live OpenGL Shader demo.\n" \ - " Edit the shader program below and it will be \n" \ - " compiled and applied to the model above!\n" \ - "*/\n\n" + enum { shaderLinkDelay = 500 }; - ShaderPreset presets[] = + void codeDocumentTextInserted (const String& /*newText*/, int /*insertIndex*/) override { - { - "Texture + Lighting", - - SHADER_DEMO_HEADER - "attribute vec4 position;\n" - "attribute vec4 normal;\n" - "attribute vec4 sourceColour;\n" - "attribute vec2 textureCoordIn;\n" - "\n" - "uniform mat4 projectionMatrix;\n" - "uniform mat4 viewMatrix;\n" - "uniform vec4 lightPosition;\n" - "\n" - "varying vec4 destinationColour;\n" - "varying vec2 textureCoordOut;\n" - "varying float lightIntensity;\n" - "\n" - "void main()\n" - "{\n" - " destinationColour = sourceColour;\n" - " textureCoordOut = textureCoordIn;\n" - "\n" - " vec4 light = viewMatrix * lightPosition;\n" - " lightIntensity = dot (light, normal);\n" - "\n" - " gl_Position = projectionMatrix * viewMatrix * position;\n" - "}\n", + startTimer (shaderLinkDelay); + } - SHADER_DEMO_HEADER - #if JUCE_OPENGL_ES - "varying lowp vec4 destinationColour;\n" - "varying lowp vec2 textureCoordOut;\n" - "varying highp float lightIntensity;\n" - #else - "varying vec4 destinationColour;\n" - "varying vec2 textureCoordOut;\n" - "varying float lightIntensity;\n" - #endif - "\n" - "uniform sampler2D demoTexture;\n" - "\n" - "void main()\n" - "{\n" - #if JUCE_OPENGL_ES - " highp float l = max (0.3, lightIntensity * 0.3);\n" - " highp vec4 colour = vec4 (l, l, l, 1.0);\n" - #else - " float l = max (0.3, lightIntensity * 0.3);\n" - " vec4 colour = vec4 (l, l, l, 1.0);\n" - #endif - " gl_FragColor = colour * texture2D (demoTexture, textureCoordOut);\n" - "}\n" - }, + void codeDocumentTextDeleted (int /*startIndex*/, int /*endIndex*/) override + { + startTimer (shaderLinkDelay); + } - { - "Textured", + void timerCallback() override + { + stopTimer(); + demo.setShaderProgram (vertexDocument .getAllContent(), + fragmentDocument.getAllContent()); + } - SHADER_DEMO_HEADER - "attribute vec4 position;\n" - "attribute vec4 sourceColour;\n" - "attribute vec2 textureCoordIn;\n" - "\n" - "uniform mat4 projectionMatrix;\n" - "uniform mat4 viewMatrix;\n" - "\n" - "varying vec4 destinationColour;\n" - "varying vec2 textureCoordOut;\n" - "\n" - "void main()\n" - "{\n" - " destinationColour = sourceColour;\n" - " textureCoordOut = textureCoordIn;\n" - " gl_Position = projectionMatrix * viewMatrix * position;\n" - "}\n", + void lookAndFeelChanged() override + { + auto editorBackground = getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, + Colours::white); - SHADER_DEMO_HEADER - #if JUCE_OPENGL_ES - "varying lowp vec4 destinationColour;\n" - "varying lowp vec2 textureCoordOut;\n" - #else - "varying vec4 destinationColour;\n" - "varying vec2 textureCoordOut;\n" - #endif - "\n" - "uniform sampler2D demoTexture;\n" - "\n" - "void main()\n" - "{\n" - " gl_FragColor = texture2D (demoTexture, textureCoordOut);\n" - "}\n" - }, + for (int i = tabbedComp.getNumTabs(); i >= 0; --i) + tabbedComp.setTabBackgroundColour (i, editorBackground); - { - "Flat Colour", + vertexEditorComp .setColour (CodeEditorComponent::backgroundColourId, editorBackground); + fragmentEditorComp.setColour (CodeEditorComponent::backgroundColourId, editorBackground); + } - SHADER_DEMO_HEADER - "attribute vec4 position;\n" - "attribute vec4 sourceColour;\n" - "attribute vec2 textureCoordIn;\n" - "\n" - "uniform mat4 projectionMatrix;\n" - "uniform mat4 viewMatrix;\n" - "\n" - "varying vec4 destinationColour;\n" - "varying vec2 textureCoordOut;\n" - "\n" - "void main()\n" - "{\n" - " destinationColour = sourceColour;\n" - " textureCoordOut = textureCoordIn;\n" - " gl_Position = projectionMatrix * viewMatrix * position;\n" - "}\n", + OpenGLDemo& demo; - SHADER_DEMO_HEADER - #if JUCE_OPENGL_ES - "varying lowp vec4 destinationColour;\n" - "varying lowp vec2 textureCoordOut;\n" - #else - "varying vec4 destinationColour;\n" - "varying vec2 textureCoordOut;\n" - #endif - "\n" - "void main()\n" - "{\n" - " gl_FragColor = destinationColour;\n" - "}\n" - }, + Label speedLabel { {}, "Speed:" }, + zoomLabel { {}, "Zoom:" }; - { - "Rainbow", + CodeDocument vertexDocument, fragmentDocument; + CodeEditorComponent vertexEditorComp { vertexDocument, nullptr }, + fragmentEditorComp { fragmentDocument, nullptr }; - SHADER_DEMO_HEADER - "attribute vec4 position;\n" - "attribute vec4 sourceColour;\n" - "attribute vec2 textureCoordIn;\n" - "\n" - "uniform mat4 projectionMatrix;\n" - "uniform mat4 viewMatrix;\n" - "\n" - "varying vec4 destinationColour;\n" - "varying vec2 textureCoordOut;\n" - "\n" - "varying float xPos;\n" - "varying float yPos;\n" - "varying float zPos;\n" - "\n" - "void main()\n" - "{\n" - " vec4 v = vec4 (position);\n" - " xPos = clamp (v.x, 0.0, 1.0);\n" - " yPos = clamp (v.y, 0.0, 1.0);\n" - " zPos = clamp (v.z, 0.0, 1.0);\n" - " gl_Position = projectionMatrix * viewMatrix * position;\n" - "}", + TabbedComponent tabbedComp { TabbedButtonBar::TabsAtLeft }; - SHADER_DEMO_HEADER - #if JUCE_OPENGL_ES - "varying lowp vec4 destinationColour;\n" - "varying lowp vec2 textureCoordOut;\n" - "varying lowp float xPos;\n" - "varying lowp float yPos;\n" - "varying lowp float zPos;\n" - #else - "varying vec4 destinationColour;\n" - "varying vec2 textureCoordOut;\n" - "varying float xPos;\n" - "varying float yPos;\n" - "varying float zPos;\n" - #endif - "\n" - "void main()\n" - "{\n" - " gl_FragColor = vec4 (xPos, yPos, zPos, 1.0);\n" - "}" - }, + ComboBox presetBox, textureBox; - { - "Changing Colour", + Label presetLabel { {}, "Shader Preset:" }, + textureLabel { {}, "Texture:" }; - SHADER_DEMO_HEADER - "attribute vec4 position;\n" - "attribute vec2 textureCoordIn;\n" - "\n" - "uniform mat4 projectionMatrix;\n" - "uniform mat4 viewMatrix;\n" - "\n" - "varying vec2 textureCoordOut;\n" - "\n" - "void main()\n" - "{\n" - " textureCoordOut = textureCoordIn;\n" - " gl_Position = projectionMatrix * viewMatrix * position;\n" - "}\n", + Slider speedSlider, sizeSlider; - SHADER_DEMO_HEADER - "#define PI 3.1415926535897932384626433832795\n" - "\n" - #if JUCE_OPENGL_ES - "precision mediump float;\n" - "varying lowp vec2 textureCoordOut;\n" - #else - "varying vec2 textureCoordOut;\n" - #endif - "uniform float bouncingNumber;\n" - "\n" - "void main()\n" - "{\n" - " float b = bouncingNumber;\n" - " float n = b * PI * 2.0;\n" - " float sn = (sin (n * textureCoordOut.x) * 0.5) + 0.5;\n" - " float cn = (sin (n * textureCoordOut.y) * 0.5) + 0.5;\n" - "\n" - " vec4 col = vec4 (b, sn, cn, 1.0);\n" - " gl_FragColor = col;\n" - "}\n" - }, + ToggleButton showBackgroundToggle { "Draw 2D graphics in background" }; - { - "Simple Light", + OwnedArray textures; - SHADER_DEMO_HEADER - "attribute vec4 position;\n" - "attribute vec4 normal;\n" - "\n" - "uniform mat4 projectionMatrix;\n" - "uniform mat4 viewMatrix;\n" - "uniform vec4 lightPosition;\n" - "\n" - "varying float lightIntensity;\n" - "\n" - "void main()\n" - "{\n" - " vec4 light = viewMatrix * lightPosition;\n" - " lightIntensity = dot (light, normal);\n" - "\n" - " gl_Position = projectionMatrix * viewMatrix * position;\n" - "}\n", + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DemoControlsOverlay) + }; - SHADER_DEMO_HEADER - #if JUCE_OPENGL_ES - "varying highp float lightIntensity;\n" - #else - "varying float lightIntensity;\n" - #endif - "\n" - "void main()\n" - "{\n" - #if JUCE_OPENGL_ES - " highp float l = lightIntensity * 0.25;\n" - " highp vec4 colour = vec4 (l, l, l, 1.0);\n" - #else - " float l = lightIntensity * 0.25;\n" - " vec4 colour = vec4 (l, l, l, 1.0);\n" - #endif - "\n" - " gl_FragColor = colour;\n" - "}\n" - }, + std::unique_ptr controlsOverlay; - { - "Flattened", + float rotation = 0.0f; - SHADER_DEMO_HEADER - "attribute vec4 position;\n" - "attribute vec4 normal;\n" - "\n" - "uniform mat4 projectionMatrix;\n" - "uniform mat4 viewMatrix;\n" - "uniform vec4 lightPosition;\n" - "\n" - "varying float lightIntensity;\n" - "\n" - "void main()\n" - "{\n" - " vec4 light = viewMatrix * lightPosition;\n" - " lightIntensity = dot (light, normal);\n" - "\n" - " vec4 v = vec4 (position);\n" - " v.z = v.z * 0.1;\n" - "\n" - " gl_Position = projectionMatrix * viewMatrix * v;\n" - "}\n", + std::unique_ptr shader; + std::unique_ptr shape; + std::unique_ptr attributes; + std::unique_ptr uniforms; - SHADER_DEMO_HEADER - #if JUCE_OPENGL_ES - "varying highp float lightIntensity;\n" - #else - "varying float lightIntensity;\n" - #endif - "\n" - "void main()\n" - "{\n" - #if JUCE_OPENGL_ES - " highp float l = lightIntensity * 0.25;\n" - " highp vec4 colour = vec4 (l, l, l, 1.0);\n" - #else - " float l = lightIntensity * 0.25;\n" - " vec4 colour = vec4 (l, l, l, 1.0);\n" - #endif - "\n" - " gl_FragColor = colour;\n" - "}\n" - }, + OpenGLTexture texture; + OpenGLUtils::DemoTexture* textureToUse = nullptr; + OpenGLUtils::DemoTexture* lastTexture = nullptr; + String newVertexShader, newFragmentShader, statusText; + + struct BackgroundStar + { + SlowerBouncingNumber x, y, hue, angle; + }; + + BackgroundStar stars[3]; + + //============================================================================== + void updateShader() + { + if (newVertexShader.isNotEmpty() || newFragmentShader.isNotEmpty()) + { + std::unique_ptr newShader (new OpenGLShaderProgram (openGLContext)); + + if (newShader->addVertexShader (OpenGLHelpers::translateVertexShaderToV3 (newVertexShader)) + && newShader->addFragmentShader (OpenGLHelpers::translateFragmentShaderToV3 (newFragmentShader)) + && newShader->link()) { - "Toon Shader", + shape .reset(); + attributes.reset(); + uniforms .reset(); - SHADER_DEMO_HEADER - "attribute vec4 position;\n" - "attribute vec4 normal;\n" - "\n" - "uniform mat4 projectionMatrix;\n" - "uniform mat4 viewMatrix;\n" - "uniform vec4 lightPosition;\n" - "\n" - "varying float lightIntensity;\n" - "\n" - "void main()\n" - "{\n" - " vec4 light = viewMatrix * lightPosition;\n" - " lightIntensity = dot (light, normal);\n" - "\n" - " gl_Position = projectionMatrix * viewMatrix * position;\n" - "}\n", + shader.reset (newShader.release()); + shader->use(); - SHADER_DEMO_HEADER - #if JUCE_OPENGL_ES - "varying highp float lightIntensity;\n" - #else - "varying float lightIntensity;\n" - #endif - "\n" - "void main()\n" - "{\n" - #if JUCE_OPENGL_ES - " highp float intensity = lightIntensity * 0.5;\n" - " highp vec4 colour;\n" - #else - " float intensity = lightIntensity * 0.5;\n" - " vec4 colour;\n" - #endif - "\n" - " if (intensity > 0.95)\n" - " colour = vec4 (1.0, 0.5, 0.5, 1.0);\n" - " else if (intensity > 0.5)\n" - " colour = vec4 (0.6, 0.3, 0.3, 1.0);\n" - " else if (intensity > 0.25)\n" - " colour = vec4 (0.4, 0.2, 0.2, 1.0);\n" - " else\n" - " colour = vec4 (0.2, 0.1, 0.1, 1.0);\n" - "\n" - " gl_FragColor = colour;\n" - "}\n" + shape .reset (new OpenGLUtils::Shape (openGLContext)); + attributes.reset (new OpenGLUtils::Attributes (openGLContext, *shader)); + uniforms .reset (new OpenGLUtils::Uniforms (openGLContext, *shader)); + + statusText = "GLSL: v" + String (OpenGLShaderProgram::getLanguageVersion(), 2); + } + else + { + statusText = newShader->getLastError(); } - }; - return Array (presets, numElementsInArray (presets)); + triggerAsyncUpdate(); + + newVertexShader = {}; + newFragmentShader = {}; + } } + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OpenGLDemo) }; diff --git a/examples/GUI/OpenGLDemo2D.h b/examples/GUI/OpenGLDemo2D.h index cdfd3acd..24ae12b5 100644 --- a/examples/GUI/OpenGLDemo2D.h +++ b/examples/GUI/OpenGLDemo2D.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra, juce_opengl - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -87,7 +87,7 @@ public: setSize (500, 500); } - ~OpenGLDemo2D() + ~OpenGLDemo2D() override { openGLContext.detach(); shader.reset(); diff --git a/examples/GUI/PropertiesDemo.h b/examples/GUI/PropertiesDemo.h index 439887d0..64672110 100644 --- a/examples/GUI/PropertiesDemo.h +++ b/examples/GUI/PropertiesDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/GUI/VideoDemo.h b/examples/GUI/VideoDemo.h index d091e0ca..7f9ce3c2 100644 --- a/examples/GUI/VideoDemo.h +++ b/examples/GUI/VideoDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra, juce_video - exporters: xcode_mac, vs2017, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -186,7 +186,7 @@ public: setSize (500, 500); } - ~VideoDemo() + ~VideoDemo() override { fileTree.removeListener (this); } @@ -363,7 +363,7 @@ public: setPortraitOrientationEnabled (true); } - ~VideoDemo() + ~VideoDemo() override { curVideoComp->onPlaybackStarted = nullptr; curVideoComp->onPlaybackStopped = nullptr; diff --git a/examples/GUI/WebBrowserDemo.h b/examples/GUI/WebBrowserDemo.h index cc70a483..ba63e420 100644 --- a/examples/GUI/WebBrowserDemo.h +++ b/examples/GUI/WebBrowserDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/GUI/WidgetsDemo.h b/examples/GUI/WidgetsDemo.h index a3dfe9db..27a62200 100644 --- a/examples/GUI/WidgetsDemo.h +++ b/examples/GUI/WidgetsDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -97,6 +97,8 @@ public: CallOutBox::launchAsynchronously (colourSelector, getScreenBounds(), nullptr); } + using TextButton::clicked; + void changeListenerCallback (ChangeBroadcaster* source) override { if (auto* cs = dynamic_cast (source)) @@ -632,12 +634,14 @@ private: case edit_copy: return createButtonFromZipFileSVG (itemId, "copy", "edit-copy.svg"); case edit_cut: return createButtonFromZipFileSVG (itemId, "cut", "edit-cut.svg"); case edit_paste: return createButtonFromZipFileSVG (itemId, "paste", "edit-paste.svg"); + case juceLogoButton: { - auto* drawable = new DrawableImage(); + auto drawable = std::make_unique(); drawable->setImage (getImageFromAssets ("juce_icon.png")); - return new ToolbarButton (itemId, "juce!", drawable, nullptr); + return new ToolbarButton (itemId, "juce!", std::move (drawable), {}); } + case customComboBox: return new CustomToolbarComboBox (itemId); default: break; } @@ -670,8 +674,8 @@ private: } } - auto* image = iconsFromZipFile[iconNames.indexOf (filename)]->createCopy(); - return new ToolbarButton (itemId, text, image, nullptr); + auto* image = iconsFromZipFile[iconNames.indexOf (filename)]; + return new ToolbarButton (itemId, text, image->createCopy(), {}); } // Demonstrates how to put a custom component into a toolbar - this one contains diff --git a/examples/GUI/WindowsDemo.h b/examples/GUI/WindowsDemo.h index 3bd58bf0..3e7deb0c 100644 --- a/examples/GUI/WindowsDemo.h +++ b/examples/GUI/WindowsDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -231,7 +231,7 @@ public: setSize (250, 250); } - ~WindowsDemo() + ~WindowsDemo() override { if (dialogWindow != nullptr) { diff --git a/examples/Plugins/AUv3SynthPluginDemo.h b/examples/Plugins/AUv3SynthPluginDemo.h index 9d0dbae8..1dc74234 100644 --- a/examples/Plugins/AUv3SynthPluginDemo.h +++ b/examples/Plugins/AUv3SynthPluginDemo.h @@ -191,7 +191,7 @@ public: recordButton.onClick = [this] { startRecording(); }; addAndMakeVisible (recordButton); - roomSizeSlider.onValueChange = [this] { setParameterValue ("roomSize", roomSizeSlider.getValue()); }; + roomSizeSlider.onValueChange = [this] { setParameterValue ("roomSize", (float) roomSizeSlider.getValue()); }; roomSizeSlider.setRange (0.0, 1.0); addAndMakeVisible (roomSizeSlider); @@ -260,7 +260,7 @@ private: { if (auto* processor = getAudioProcessor()) { - const OwnedArray& params = processor->getParameters(); + auto& params = processor->getParameters(); for (auto p : params) { diff --git a/examples/Plugins/ArpeggiatorPluginDemo.h b/examples/Plugins/ArpeggiatorPluginDemo.h index 9ad8996f..132e1b2c 100644 --- a/examples/Plugins/ArpeggiatorPluginDemo.h +++ b/examples/Plugins/ArpeggiatorPluginDemo.h @@ -33,7 +33,7 @@ juce_audio_plugin_client, juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017 + exporters: xcode_mac, vs2019 moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -125,7 +125,7 @@ public: bool isMidiEffect() const override { return true; } //============================================================================== - AudioProcessorEditor* createEditor() override { return new GenericAudioProcessorEditor (this); } + AudioProcessorEditor* createEditor() override { return new GenericAudioProcessorEditor (*this); } bool hasEditor() const override { return true; } //============================================================================== diff --git a/examples/Plugins/AudioPluginDemo.h b/examples/Plugins/AudioPluginDemo.h index 5d78c587..4937219b 100644 --- a/examples/Plugins/AudioPluginDemo.h +++ b/examples/Plugins/AudioPluginDemo.h @@ -33,7 +33,7 @@ juce_audio_plugin_client, juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, xcode_iphone, androidstudio + exporters: xcode_mac, vs2017, vs2019, linux_make, xcode_iphone, androidstudio moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -160,6 +160,8 @@ public: } } + using SynthesiserVoice::renderNextBlock; + private: double currentAngle = 0.0; double angleDelta = 0.0; @@ -187,7 +189,7 @@ public: initialiseSynth(); } - ~JuceDemoPluginAudioProcessor() {} + ~JuceDemoPluginAudioProcessor() override = default; //============================================================================== bool isBusesLayoutSupported (const BusesLayout& layouts) const override @@ -285,9 +287,7 @@ public: void getStateInformation (MemoryBlock& destData) override { // Store an xml representation of our state. - std::unique_ptr xmlState (state.copyState().createXml()); - - if (xmlState.get() != nullptr) + if (auto xmlState = state.copyState().createXml()) copyXmlToBinary (*xmlState, destData); } @@ -295,9 +295,7 @@ public: { // Restore our plug-in's state from the xml representation stored in the above // method. - std::unique_ptr xmlState (getXmlFromBinary (data, sizeInBytes)); - - if (xmlState.get() != nullptr) + if (auto xmlState = getXmlFromBinary (data, sizeInBytes)) state.replaceState (ValueTree::fromXml (*xmlState)); } @@ -382,7 +380,7 @@ private: startTimerHz (30); } - ~JuceDemoPluginAudioProcessorEditor() {} + ~JuceDemoPluginAudioProcessorEditor() override {} //============================================================================== void paint (Graphics& g) override diff --git a/examples/Plugins/DSPModulePluginDemo.h b/examples/Plugins/DSPModulePluginDemo.h index 5282b779..a814a91a 100644 --- a/examples/Plugins/DSPModulePluginDemo.h +++ b/examples/Plugins/DSPModulePluginDemo.h @@ -33,7 +33,7 @@ juce_audio_plugin_client, juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_dsp, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017 + exporters: xcode_mac, vs2019 moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -498,7 +498,7 @@ private: { ScopedNoDenormals noDenormals; - // Input volume applied with a LinearSmoothedValue + // Input volume applied with a SmoothedValue inputVolume.process (context); // Pre-highpass filtering, very useful for distortion audio effects @@ -511,7 +511,7 @@ private: setLatencySamples (audioCurrentlyOversampled ? roundToInt (oversampling->getLatencyInSamples()) : 0); if (audioCurrentlyOversampled) - oversampledBlock = oversampling->processSamplesUp (context.getInputBlock()); + oversampledBlock = oversampling->processSamplesUp (context.getOutputBlock()); auto waveshaperContext = audioCurrentlyOversampled ? dsp::ProcessContextReplacing (oversampledBlock) : context; @@ -543,7 +543,7 @@ private: convolution.process (context); context.isBypassed = wasBypassed; - // Output volume applied with a LinearSmoothedValue + // Output volume applied with a SmoothedValue outputVolume.process (context); } diff --git a/examples/Plugins/GainPluginDemo.h b/examples/Plugins/GainPluginDemo.h index 4d620e49..850c7de3 100644 --- a/examples/Plugins/GainPluginDemo.h +++ b/examples/Plugins/GainPluginDemo.h @@ -33,7 +33,7 @@ juce_audio_plugin_client, juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017 + exporters: xcode_mac, vs2019 moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -74,7 +74,7 @@ public: } //============================================================================== - AudioProcessorEditor* createEditor() override { return new GenericAudioProcessorEditor (this); } + AudioProcessorEditor* createEditor() override { return new GenericAudioProcessorEditor (*this); } bool hasEditor() const override { return true; } //============================================================================== diff --git a/examples/Plugins/InterAppAudioEffectPluginDemo.h b/examples/Plugins/InterAppAudioEffectPluginDemo.h index 46e8af12..c159dd58 100644 --- a/examples/Plugins/InterAppAudioEffectPluginDemo.h +++ b/examples/Plugins/InterAppAudioEffectPluginDemo.h @@ -94,7 +94,7 @@ private: { auto callbackLevel = maxLevel.exchange (0.0); - auto decayFactor = 0.95; + float decayFactor = 0.95f; if (callbackLevel > level) level = callbackLevel; @@ -230,15 +230,13 @@ public: //============================================================================== void getStateInformation (MemoryBlock& destData) override { - auto xml = std::unique_ptr (parameters.state.createXml()); - copyXmlToBinary (*xml, destData); + if (auto xml = parameters.state.createXml()) + copyXmlToBinary (*xml, destData); } void setStateInformation (const void* data, int sizeInBytes) override { - auto xmlState = std::unique_ptr (getXmlFromBinary (data, sizeInBytes)); - - if (xmlState.get() != nullptr) + if (auto xmlState = getXmlFromBinary (data, sizeInBytes)) if (xmlState->hasTagName (parameters.state.getType())) parameters.state = ValueTree::fromXml (*xmlState); } @@ -267,13 +265,13 @@ public: // meter values directly from the audio thread. struct MeterListener { - virtual ~MeterListener() {}; + virtual ~MeterListener() {} virtual void handleNewMeterValue (int, float) = 0; }; - void addMeterListener (MeterListener& listener) { meterListeners.add (&listener); }; - void removeMeterListener (MeterListener& listener) { meterListeners.remove (&listener); }; + void addMeterListener (MeterListener& listener) { meterListeners.add (&listener); } + void removeMeterListener (MeterListener& listener) { meterListeners.remove (&listener); } private: diff --git a/examples/Plugins/MultiOutSynthPluginDemo.h b/examples/Plugins/MultiOutSynthPluginDemo.h index 09668ae1..0424acc2 100644 --- a/examples/Plugins/MultiOutSynthPluginDemo.h +++ b/examples/Plugins/MultiOutSynthPluginDemo.h @@ -33,7 +33,7 @@ juce_audio_plugin_client, juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017 + exporters: xcode_mac, vs2019 moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -125,7 +125,7 @@ public: } //============================================================================== - AudioProcessorEditor* createEditor() override { return new GenericAudioProcessorEditor (this); } + AudioProcessorEditor* createEditor() override { return new GenericAudioProcessorEditor (*this); } bool hasEditor() const override { return true; } //============================================================================== diff --git a/examples/Plugins/NoiseGatePluginDemo.h b/examples/Plugins/NoiseGatePluginDemo.h index 6925d0fc..620e0936 100644 --- a/examples/Plugins/NoiseGatePluginDemo.h +++ b/examples/Plugins/NoiseGatePluginDemo.h @@ -33,7 +33,7 @@ juce_audio_plugin_client, juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017 + exporters: xcode_mac, vs2019 moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -108,7 +108,7 @@ public: } //============================================================================== - AudioProcessorEditor* createEditor() override { return new GenericAudioProcessorEditor (this); } + AudioProcessorEditor* createEditor() override { return new GenericAudioProcessorEditor (*this); } bool hasEditor() const override { return true; } const String getName() const override { return "NoiseGate"; } bool acceptsMidi() const override { return false; } diff --git a/examples/Plugins/SamplerPluginDemo.h b/examples/Plugins/SamplerPluginDemo.h index ceca60b2..107fb664 100644 --- a/examples/Plugins/SamplerPluginDemo.h +++ b/examples/Plugins/SamplerPluginDemo.h @@ -33,7 +33,7 @@ juce_audio_plugin_client, juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017 + exporters: xcode_mac, vs2019 moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -100,7 +100,7 @@ class MoveOnlyFifo final { public: explicit MoveOnlyFifo (int size) - : buffer (size), + : buffer ((size_t) size), abstractFifo (size) {} @@ -115,12 +115,12 @@ public: if (writer.blockSize1 == 1) { - buffer[writer.startIndex1] = move (item); + buffer[(size_t) writer.startIndex1] = move (item); item = {}; } else if (writer.blockSize2 == 1) { - buffer[writer.startIndex2] = move (item); + buffer[(size_t) writer.startIndex2] = move (item); item = {}; } @@ -132,10 +132,10 @@ public: auto reader = abstractFifo.read (1); if (reader.blockSize1 == 1) - return move (buffer[reader.startIndex1]); + return move (buffer[(size_t) reader.startIndex1]); if (reader.blockSize2 == 1) - return move (buffer[reader.startIndex2]); + return move (buffer[(size_t) reader.startIndex2]); return {}; } @@ -250,12 +250,12 @@ public: jassert (currentlyPlayingNote.keyState == MPENote::keyDown || currentlyPlayingNote.keyState == MPENote::keyDownAndSustained); - level .setValue (currentlyPlayingNote.pressure.asUnsignedFloat()); - frequency.setValue (currentlyPlayingNote.getFrequencyInHertz()); + level .setTargetValue (currentlyPlayingNote.pressure.asUnsignedFloat()); + frequency.setTargetValue (currentlyPlayingNote.getFrequencyInHertz()); auto loopPoints = samplerSound->getLoopPointsInSeconds(); - loopBegin.setValue (loopPoints.getStart() * samplerSound->getSample()->getSampleRate()); - loopEnd .setValue (loopPoints.getEnd() * samplerSound->getSample()->getSampleRate()); + loopBegin.setTargetValue (loopPoints.getStart() * samplerSound->getSample()->getSampleRate()); + loopEnd .setTargetValue (loopPoints.getEnd() * samplerSound->getSample()->getSampleRate()); for (auto smoothed : { &level, &frequency, &loopBegin, &loopEnd }) smoothed->reset (currentSampleRate, smoothingLengthInSeconds); @@ -276,12 +276,12 @@ public: void notePressureChanged() override { - level.setValue (currentlyPlayingNote.pressure.asUnsignedFloat()); + level.setTargetValue (currentlyPlayingNote.pressure.asUnsignedFloat()); } void notePitchbendChanged() override { - frequency.setValue (currentlyPlayingNote.getFrequencyInHertz()); + frequency.setTargetValue (currentlyPlayingNote.getFrequencyInHertz()); } void noteTimbreChanged() override {} @@ -294,8 +294,8 @@ public: jassert (samplerSound->getSample() != nullptr); auto loopPoints = samplerSound->getLoopPointsInSeconds(); - loopBegin.setValue (loopPoints.getStart() * samplerSound->getSample()->getSampleRate()); - loopEnd .setValue (loopPoints.getEnd() * samplerSound->getSample()->getSampleRate()); + loopBegin.setTargetValue (loopPoints.getStart() * samplerSound->getSample()->getSampleRate()); + loopEnd .setTargetValue (loopPoints.getEnd() * samplerSound->getSample()->getSampleRate()); auto& data = samplerSound->getSample()->getBuffer(); @@ -446,10 +446,10 @@ private: } std::shared_ptr samplerSound; - LinearSmoothedValue level { 0 }; - LinearSmoothedValue frequency { 0 }; - LinearSmoothedValue loopBegin; - LinearSmoothedValue loopEnd; + SmoothedValue level { 0 }; + SmoothedValue frequency { 0 }; + SmoothedValue loopBegin; + SmoothedValue loopEnd; double currentSamplePos { 0 }; double tailOff { 0 }; Direction currentDirection { Direction::forward }; @@ -2178,14 +2178,14 @@ public: auto numVoices = synthesiser.getNumVoices(); // Update the current playback positions - for (auto i = 0; i != maxVoices; ++i) + for (auto i = 0; i < maxVoices; ++i) { auto* voicePtr = dynamic_cast (synthesiser.getVoice (i)); if (i < numVoices && voicePtr != nullptr) - playbackPositions[i] = static_cast (voicePtr->getCurrentSamplePosition() / loadedSamplerSound->getSample()->getSampleRate()); + playbackPositions[(size_t) i] = static_cast (voicePtr->getCurrentSamplePosition() / loadedSamplerSound->getSample()->getSampleRate()); else - playbackPositions[i] = 0.0f; + playbackPositions[(size_t) i] = 0.0f; } } @@ -2207,8 +2207,8 @@ public: void operator() (SamplerAudioProcessor& proc) { proc.readerFactory = move (readerFactory); - auto samplerSound = proc.samplerSound.load(); - samplerSound->setSample (move (sample)); + auto sound = proc.samplerSound.load(); + sound->setSample (move (sample)); auto numberOfVoices = proc.synthesiser.getNumVoices(); proc.synthesiser.clearVoices(); @@ -2322,15 +2322,11 @@ public: void operator() (SamplerAudioProcessor& proc) { - if (newVoices.size() < proc.synthesiser.getNumVoices()) + if (newVoices.size() < (size_t) proc.synthesiser.getNumVoices()) proc.synthesiser.reduceNumVoices (int (newVoices.size())); else - { - for (auto it = begin (newVoices); proc.synthesiser.getNumVoices() < newVoices.size(); ++it) - { + for (auto it = begin (newVoices); (size_t) proc.synthesiser.getNumVoices() < newVoices.size(); ++it) proc.synthesiser.addVoice (it->release()); - } - } } private: @@ -2340,7 +2336,7 @@ public: numberOfVoices = std::min (maxVoices, numberOfVoices); auto loadedSamplerSound = samplerSound.load(); std::vector> newSamplerVoices; - newSamplerVoices.reserve (numberOfVoices); + newSamplerVoices.reserve ((size_t) numberOfVoices); for (auto i = 0; i != numberOfVoices; ++i) newSamplerVoices.emplace_back (new MPESamplerVoice (loadedSamplerSound)); @@ -2355,7 +2351,7 @@ public: // been updated to remove some voices in the meantime, so the returned // value won't correspond to an existing voice. int getNumVoices() const { return synthesiser.getNumVoices(); } - float getPlaybackPosition (int voice) const { return playbackPositions.at (voice); } + float getPlaybackPosition (int voice) const { return playbackPositions.at ((size_t) voice); } private: //============================================================================== @@ -2373,7 +2369,7 @@ private: { std::vector ret; auto voices = p.getNumVoices(); - ret.reserve (voices); + ret.reserve ((size_t) voices); for (auto i = 0; i != voices; ++i) ret.emplace_back (p.getPlaybackPosition (i)); diff --git a/examples/Plugins/SurroundPluginDemo.h b/examples/Plugins/SurroundPluginDemo.h index f98af7d4..e15d3cc1 100644 --- a/examples/Plugins/SurroundPluginDemo.h +++ b/examples/Plugins/SurroundPluginDemo.h @@ -33,7 +33,7 @@ juce_audio_plugin_client, juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make + exporters: xcode_mac, vs2019, linux_make moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -78,8 +78,6 @@ public: startTimer (500); } - ~SurroundEditor() {} - void resized() override { auto r = getLocalBounds(); @@ -222,8 +220,6 @@ public: .withOutput ("Output", AudioChannelSet::stereo())) {} - ~SurroundProcessor() {} - //============================================================================== void prepareToPlay (double sampleRate, int samplesPerBlock) override { diff --git a/examples/Utilities/AnalyticsCollectionDemo.h b/examples/Utilities/AnalyticsCollectionDemo.h index 8cc8af70..9537221f 100644 --- a/examples/Utilities/AnalyticsCollectionDemo.h +++ b/examples/Utilities/AnalyticsCollectionDemo.h @@ -31,7 +31,7 @@ dependencies: juce_analytics, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, xcode_iphone, androidstudio + exporters: xcode_mac, vs2019, linux_make, xcode_iphone, androidstudio moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -89,7 +89,7 @@ public: startAnalyticsThread (initialPeriodMs); } - ~GoogleAnalyticsDestination() + ~GoogleAnalyticsDestination() override { // Here we sleep so that our background thread has a chance to send the // last lot of batched events. Be careful - if your app takes too long to @@ -212,11 +212,10 @@ private: // a binary format may be more suitable if it is faster - remember that this // method is called on app shutdown so it needs to complete quickly! - XmlDocument previouslySavedEvents (savedEventsFile); - std::unique_ptr xml (previouslySavedEvents.getDocumentElement()); + auto xml = parseXMLIfTagMatches (savedEventsFile, "events"); - if (xml.get() == nullptr || xml->getTagName() != "events") - xml.reset (new XmlElement ("events")); + if (xml == nullptr) + xml = std::make_unique ("events"); for (auto& event : eventsToSave) { @@ -243,50 +242,47 @@ private: xml->addChildElement (xmlEvent); } - xml->writeToFile (savedEventsFile, {}); + xml->writeTo (savedEventsFile, {}); } void restoreUnloggedEvents (std::deque& restoredEventQueue) override { - XmlDocument savedEvents (savedEventsFile); - std::unique_ptr xml (savedEvents.getDocumentElement()); - - if (xml.get() == nullptr || xml->getTagName() != "events") - return; + if (auto xml = parseXMLIfTagMatches (savedEventsFile, "events")) + { + auto numEvents = xml->getNumChildElements(); - auto numEvents = xml->getNumChildElements(); + for (auto iEvent = 0; iEvent < numEvents; ++iEvent) + { + auto* xmlEvent = xml->getChildElement (iEvent); + + StringPairArray parameters; + auto* xmlParameters = xmlEvent->getChildByName ("parameters"); + auto numParameters = xmlParameters->getNumAttributes(); + + for (auto iParam = 0; iParam < numParameters; ++iParam) + parameters.set (xmlParameters->getAttributeName (iParam), + xmlParameters->getAttributeValue (iParam)); + + StringPairArray userProperties; + auto* xmlUserProperties = xmlEvent->getChildByName ("user_properties"); + auto numUserProperties = xmlUserProperties->getNumAttributes(); + + for (auto iProp = 0; iProp < numUserProperties; ++iProp) + userProperties.set (xmlUserProperties->getAttributeName (iProp), + xmlUserProperties->getAttributeValue (iProp)); + + restoredEventQueue.push_back ({ + xmlEvent->getStringAttribute ("name"), + xmlEvent->getIntAttribute ("type"), + static_cast (xmlEvent->getIntAttribute ("timestamp")), + parameters, + xmlEvent->getStringAttribute ("user_id"), + userProperties + }); + } - for (auto iEvent = 0; iEvent < numEvents; ++iEvent) - { - auto* xmlEvent = xml->getChildElement (iEvent); - - StringPairArray parameters; - auto* xmlParameters = xmlEvent->getChildByName ("parameters"); - auto numParameters = xmlParameters->getNumAttributes(); - - for (auto iParam = 0; iParam < numParameters; ++iParam) - parameters.set (xmlParameters->getAttributeName (iParam), - xmlParameters->getAttributeValue (iParam)); - - StringPairArray userProperties; - auto* xmlUserProperties = xmlEvent->getChildByName ("user_properties"); - auto numUserProperties = xmlUserProperties->getNumAttributes(); - - for (auto iProp = 0; iProp < numUserProperties; ++iProp) - userProperties.set (xmlUserProperties->getAttributeName (iProp), - xmlUserProperties->getAttributeValue (iProp)); - - restoredEventQueue.push_back ({ - xmlEvent->getStringAttribute ("name"), - xmlEvent->getIntAttribute ("type"), - static_cast (xmlEvent->getIntAttribute ("timestamp")), - parameters, - xmlEvent->getStringAttribute ("user_id"), - userProperties - }); + savedEventsFile.deleteFile(); } - - savedEventsFile.deleteFile(); } const int initialPeriodMs = 1000; @@ -336,7 +332,7 @@ public: logEventButtonPress.reset (new ButtonTracker (eventButton, "button_press", logButtonPressParameters)); } - ~AnalyticsCollectionDemo() + ~AnalyticsCollectionDemo() override { // The event type here should probably be DemoAnalyticsEventTypes::sessionEnd // in a more advanced app. diff --git a/examples/Utilities/Box2DDemo.h b/examples/Utilities/Box2DDemo.h index 2104b5f4..c5086f23 100644 --- a/examples/Utilities/Box2DDemo.h +++ b/examples/Utilities/Box2DDemo.h @@ -31,7 +31,7 @@ dependencies: juce_box2d, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -192,7 +192,7 @@ public: setSize (500, 500); } - ~Box2DDemo() + ~Box2DDemo() override { testsListModel.removeChangeListener (this); } diff --git a/examples/Utilities/ChildProcessDemo.h b/examples/Utilities/ChildProcessDemo.h index fc70d4df..d2651bcc 100644 --- a/examples/Utilities/ChildProcessDemo.h +++ b/examples/Utilities/ChildProcessDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make + exporters: xcode_mac, vs2019, linux_make moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -69,10 +69,8 @@ static MemoryBlock valueTreeToMemoryBlock (const ValueTree& v) static String valueTreeToString (const ValueTree& v) { - std::unique_ptr xml (v.createXml()); - - if (xml.get() != nullptr) - return xml->createDocument ({}, true, false); + if (auto xml = v.createXml()) + return xml->toString (XmlElement::TextFormat().singleLine().withoutHeader()); return {}; } @@ -105,7 +103,7 @@ public: setSize (500, 500); } - ~ChildProcessDemo() + ~ChildProcessDemo() override { masterProcess.reset(); } diff --git a/examples/Utilities/CryptographyDemo.h b/examples/Utilities/CryptographyDemo.h index ed6c25ee..74727074 100644 --- a/examples/Utilities/CryptographyDemo.h +++ b/examples/Utilities/CryptographyDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_cryptography, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/Utilities/JavaScriptDemo.h b/examples/Utilities/JavaScriptDemo.h index e7682e39..5a5031f6 100644 --- a/examples/Utilities/JavaScriptDemo.h +++ b/examples/Utilities/JavaScriptDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/Utilities/LiveConstantDemo.h b/examples/Utilities/LiveConstantDemo.h index df9e3737..8705ef4a 100644 --- a/examples/Utilities/LiveConstantDemo.h +++ b/examples/Utilities/LiveConstantDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/Utilities/MultithreadingDemo.h b/examples/Utilities/MultithreadingDemo.h index 3a335005..1f69967f 100644 --- a/examples/Utilities/MultithreadingDemo.h +++ b/examples/Utilities/MultithreadingDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -49,11 +49,14 @@ #include "../Assets/DemoUtilities.h" //============================================================================== -class BouncingBallComp : public Component +class BouncingBall : private ComponentListener { public: - BouncingBallComp() + BouncingBall (Component& comp) + : containerComponent (comp) { + containerComponent.addComponentListener (this); + auto speed = 5.0f; // give each ball a fixed speed so we can // see the effects of thread priority on how fast // they actually go. @@ -66,26 +69,35 @@ public: colour = Colour ((juce::uint32) Random::getSystemRandom().nextInt()) .withAlpha (0.5f) .withBrightness (0.7f); + + componentMovedOrResized (containerComponent, true, true); + + x = Random::getSystemRandom().nextFloat() * parentWidth; + y = Random::getSystemRandom().nextFloat() * parentHeight; } - void paint (Graphics& g) override + ~BouncingBall() override + { + containerComponent.removeComponentListener (this); + } + + // This will be called from the message thread + void draw (Graphics& g) { + const ScopedLock lock (drawing); + g.setColour (colour); - g.fillEllipse (innerX, innerY, size, size); + g.fillEllipse (x, y, size, size); g.setColour (Colours::black); g.setFont (10.0f); - g.drawText (String::toHexString ((int64) threadId), getLocalBounds(), Justification::centred, false); - } - - void parentSizeChanged() override - { - parentWidth = getParentWidth() - size; - parentHeight = getParentHeight() - size; + g.drawText (String::toHexString ((int64) threadId), Rectangle (x, y, size, size), Justification::centred, false); } void moveBall() { + const ScopedLock lock (drawing); + threadId = Thread::getCurrentThreadId(); // this is so the component can print the thread ID inside the ball x += dx; @@ -102,46 +114,46 @@ public: if (y > parentHeight) dy = -std::abs (dy); + } - setBounds (((int) x) - 2, - ((int) y) - 2, - ((int) size) + 4, - ((int) size) + 4); - - innerX = x - getX(); - innerY = y - getY(); +private: + void componentMovedOrResized (Component& comp, bool, bool) override + { + const ScopedLock lock (drawing); - repaint(); + parentWidth = comp.getWidth() - size; + parentHeight = comp.getHeight() - size; } -private: - float x = Random::getSystemRandom().nextFloat() * 200.0f, - y = Random::getSystemRandom().nextFloat() * 200.0f, + float x = 0.0f, y = 0.0f, size = Random::getSystemRandom().nextFloat() * 30.0f + 30.0f, - dx = 0.0f, dy = 0.0f, innerX = 0.0f, innerY = 0.0f, + dx = 0.0f, dy = 0.0f, parentWidth = 50.0f, parentHeight = 50.0f; Colour colour; Thread::ThreadID threadId = {}; + CriticalSection drawing; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BouncingBallComp) -}; + Component& containerComponent; + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BouncingBall) +}; //============================================================================== -class DemoThread : public BouncingBallComp, +class DemoThread : public BouncingBall, public Thread { public: - DemoThread() - : Thread ("JUCE Demo Thread") + DemoThread (Component& containerComp) + : BouncingBall (containerComp), + Thread ("JUCE Demo Thread") { // give the threads a random priority, so some will move more // smoothly than others.. startThread (Random::getSystemRandom().nextInt (3) + 3); } - ~DemoThread() + ~DemoThread() override { // allow the thread 2 seconds to stop cleanly - should be plenty of time. stopThread (2000); @@ -179,12 +191,13 @@ private: //============================================================================== -class DemoThreadPoolJob : public BouncingBallComp, +class DemoThreadPoolJob : public BouncingBall, public ThreadPoolJob { public: - DemoThreadPoolJob() - : ThreadPoolJob ("Demo Threadpool Job") + DemoThreadPoolJob (Component& containerComp) + : BouncingBall (containerComp), + ThreadPoolJob ("Demo Threadpool Job") {} JobStatus runJob() override @@ -220,6 +233,7 @@ class MultithreadingDemo : public Component, private Timer { public: + //============================================================================== MultithreadingDemo() { setOpaque (true); @@ -232,41 +246,36 @@ public: controlButton.onClick = [this] { showMenu(); }; setSize (500, 500); + + resetAllBalls(); + + startTimerHz (60); } - ~MultithreadingDemo() + ~MultithreadingDemo() override { pool.removeAllJobs (true, 2000); } void resetAllBalls() { - stopTimer(); - pool.removeAllJobs (true, 4000); balls.clear(); - if (isShowing()) - { - while (balls.size() < 5) - addABall(); - - startTimer (300); - } + for (int i = 0; i < 5; ++i) + addABall(); } void paint (Graphics& g) override { g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); + + for (auto* ball : balls) + ball->draw (g); } private: - ThreadPool pool { 3 }; - TextButton controlButton { "Thread type" }; - bool isUsingPool = false; - - OwnedArray balls; - + //============================================================================== void setUsingPool (bool usePool) { isUsingPool = usePool; @@ -277,56 +286,20 @@ private: { if (isUsingPool) { - auto* newBall = new DemoThreadPoolJob(); - balls.add (newBall); - addAndMakeVisible (newBall); - newBall->parentSizeChanged(); + auto newBall = std::make_unique (*this); + pool.addJob (newBall.get(), false); + balls.add (newBall.release()); - pool.addJob (newBall, false); } else { - auto* newBall = new DemoThread(); - balls.add (newBall); - addAndMakeVisible (newBall); - newBall->parentSizeChanged(); - } - } - - void removeABall() - { - if (balls.size() > 0) - { - auto indexToRemove = Random::getSystemRandom().nextInt (balls.size()); - - if (isUsingPool) - pool.removeJob (dynamic_cast (balls[indexToRemove]), true, 4000); - - balls.remove (indexToRemove); + balls.add (new DemoThread (*this)); } } - - // this gets called when a component is added or removed from a parent component. - void parentHierarchyChanged() override - { - // we'll use this as an opportunity to start and stop the threads, so that - // we don't leave them going when the component's not actually visible. - resetAllBalls(); - } - void timerCallback() override { - if (Random::getSystemRandom().nextBool()) - { - if (balls.size() <= 10) - addABall(); - } - else - { - if (balls.size() > 3) - removeABall(); - } + repaint(); } void showMenu() @@ -335,7 +308,7 @@ private: m.addItem (1, "Use one thread per ball", true, ! isUsingPool); m.addItem (2, "Use a thread pool", true, isUsingPool); - m.showMenuAsync (PopupMenu::Options().withTargetComponent (&controlButton), + m.showMenuAsync (PopupMenu::Options().withTargetComponent (controlButton), ModalCallbackFunction::forComponent (menuItemChosenCallback, this)); } @@ -345,5 +318,12 @@ private: demoComponent->setUsingPool (result == 2); } + //============================================================================== + ThreadPool pool { 3 }; + TextButton controlButton { "Thread type" }; + bool isUsingPool = false; + + OwnedArray balls; + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MultithreadingDemo) }; diff --git a/examples/Utilities/NetworkingDemo.h b/examples/Utilities/NetworkingDemo.h index 83001104..c4e11fd8 100644 --- a/examples/Utilities/NetworkingDemo.h +++ b/examples/Utilities/NetworkingDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/Utilities/OSCDemo.h b/examples/Utilities/OSCDemo.h index 827d8aa4..56548a4a 100644 --- a/examples/Utilities/OSCDemo.h +++ b/examples/Utilities/OSCDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_osc - exporters: xcode_mac, vs2017, linux_make + exporters: xcode_mac, vs2019, linux_make moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -58,7 +58,7 @@ public: setModel (this); } - ~OSCLogListBox() {} + ~OSCLogListBox() override = default; //============================================================================== int getNumRows() override diff --git a/examples/Utilities/PushNotificationsDemo.h b/examples/Utilities/PushNotificationsDemo.h index e035db54..7de0da76 100644 --- a/examples/Utilities/PushNotificationsDemo.h +++ b/examples/Utilities/PushNotificationsDemo.h @@ -34,7 +34,7 @@ juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, xcode_iphone, androidstudio + exporters: xcode_mac, vs2019, xcode_iphone, androidstudio moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -51,6 +51,74 @@ #include "../Assets/DemoUtilities.h" +/* + To finish the setup of this demo, do the following: + +1. Download google_services.json from your Firebase project. +2. Update "Remote Notifications Config File" path in Android exporter (this can be different for debug and release) + to point to that json file. +3. Add image and sound resources by adding the following to "Extra Android Raw Resources" in Projucer: + +../../Assets/Notifications/images/ic_stat_name.png +../../Assets/Notifications/images/ic_stat_name2.png +../../Assets/Notifications/images/ic_stat_name3.png +../../Assets/Notifications/images/ic_stat_name4.png +../../Assets/Notifications/images/ic_stat_name5.png +../../Assets/Notifications/images/ic_stat_name6.png +../../Assets/Notifications/images/ic_stat_name7.png +../../Assets/Notifications/images/ic_stat_name8.png +../../Assets/Notifications/images/ic_stat_name9.png +../../Assets/Notifications/images/ic_stat_name10.png +../../Assets/Notifications/sounds/demonstrative.mp3 +../../Assets/Notifications/sounds/isntit.mp3 +../../Assets/Notifications/sounds/jinglebellssms.mp3 +../../Assets/Notifications/sounds/served.mp3 +../../Assets/Notifications/sounds/solemn.mp3 + +4. Set "Remote Notifications" to enabled in Projucer Android exporter. + +To verify that remote notifications are configured properly, go to Remote tab in the demo and press "GetDeviceToken" +button, a dialog with your token (also printed to console in debug build) should show up. + + +The following steps are only necessary if you have a custom activity defined: + +5. Ensure that its launchMode is set to "singleTop" or "singleTask" in Android manifest. This is the default behaviour + in JUCE so you only need to do it if you have custom Android manifest content. You can do it from Projucer by + ensuring that "Custom Manifest XML Content" contains: + + + + + + + + +6. Ensure that you override onNewIntent() function in the same way as it is done in JuceActivity.java: + +package com.roli.juce; + +import android.app.Activity; +import android.content.Intent; + +//============================================================================== +public class JuceActivity extends Activity +{ + //============================================================================== + private native void appNewIntent (Intent intent); + + @Override + protected void onNewIntent (Intent intent) + { + super.onNewIntent(intent); + setIntent(intent); + + appNewIntent (intent); + } +} + +*/ + //============================================================================== class PushNotificationsDemo : public Component, private ChangeListener, @@ -101,22 +169,22 @@ public: #endif sendButton.onClick = [this] { sendLocalNotification(); }; - auxActionsView.getDeliveredNotificationsButton .onClick = [this] + auxActionsView.getDeliveredNotificationsButton .onClick = [] { PushNotifications::getInstance()->getDeliveredNotifications(); }; auxActionsView.removeDeliveredNotifWithIdButton.onClick = [this] { PushNotifications::getInstance()->removeDeliveredNotification (auxActionsView.deliveredNotifIdentifier.getText()); }; - auxActionsView.removeAllDeliveredNotifsButton .onClick = [this] + auxActionsView.removeAllDeliveredNotifsButton .onClick = [] { PushNotifications::getInstance()->removeAllDeliveredNotifications(); }; #if JUCE_IOS || JUCE_MAC - auxActionsView.getPendingNotificationsButton .onClick = [this] + auxActionsView.getPendingNotificationsButton .onClick = [] { PushNotifications::getInstance()->getPendingLocalNotifications(); }; auxActionsView.removePendingNotifWithIdButton.onClick = [this] { PushNotifications::getInstance()->removePendingLocalNotification (auxActionsView.pendingNotifIdentifier.getText()); }; - auxActionsView.removeAllPendingNotifsButton .onClick = [this] + auxActionsView.removeAllPendingNotifsButton .onClick = [] { PushNotifications::getInstance()->removeAllPendingLocalNotifications(); }; #endif - remoteView.getDeviceTokenButton.onClick = [this] + remoteView.getDeviceTokenButton.onClick = [] { String token = PushNotifications::getInstance()->getDeviceToken(); @@ -129,7 +197,7 @@ public: }; #if JUCE_ANDROID - remoteView.sendRemoteMessageButton.onClick = [this] + remoteView.sendRemoteMessageButton.onClick = [] { StringPairArray data; data.set ("key1", "value1"); @@ -144,9 +212,9 @@ public: data); }; - remoteView.subscribeToSportsButton .onClick = [this] + remoteView.subscribeToSportsButton .onClick = [] { PushNotifications::getInstance()->subscribeToTopic ("sports"); }; - remoteView.unsubscribeFromSportsButton.onClick = [this] + remoteView.unsubscribeFromSportsButton.onClick = [] { PushNotifications::getInstance()->unsubscribeFromTopic ("sports"); }; #endif @@ -164,11 +232,31 @@ public: PushNotifications::ChannelGroup cg { "demoGroup", "demo group" }; PushNotifications::getInstance()->setupChannels ({ { cg } }, getAndroidChannels()); #endif + + #if JUCE_IOS || JUCE_ANDROID + setPortraitOrientationEnabled (true); + #endif } ~PushNotificationsDemo() { PushNotifications::getInstance()->removeListener (this); + + #if JUCE_IOS || JUCE_ANDROID + setPortraitOrientationEnabled (false); + #endif + } + + void setPortraitOrientationEnabled (bool shouldBeEnabled) + { + auto allowedOrientations = Desktop::getInstance().getOrientationsEnabled(); + + if (shouldBeEnabled) + allowedOrientations |= Desktop::upright; + else + allowedOrientations &= ~Desktop::upright; + + Desktop::getInstance().setOrientationsEnabled (allowedOrientations); } void paint (Graphics& g) override @@ -260,7 +348,7 @@ private: #if JUCE_ANDROID // Note: this is not strictly speaking required param, just doing it here because it is the fastest way! - n.publicVersion = new PushNotifications::Notification(); + n.publicVersion.reset (new PushNotifications::Notification()); n.publicVersion->identifier = "blahblahblah"; n.publicVersion->title = "Public title!"; n.publicVersion->body = "Public body!"; diff --git a/examples/Utilities/SystemInfoDemo.h b/examples/Utilities/SystemInfoDemo.h index 82307b08..85123712 100644 --- a/examples/Utilities/SystemInfoDemo.h +++ b/examples/Utilities/SystemInfoDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 diff --git a/examples/Utilities/TimersAndEventsDemo.h b/examples/Utilities/TimersAndEventsDemo.h index 0707708f..01b29a89 100644 --- a/examples/Utilities/TimersAndEventsDemo.h +++ b/examples/Utilities/TimersAndEventsDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -196,7 +196,7 @@ public: setSize (600, 600); } - ~TimersAndEventsDemo() + ~TimersAndEventsDemo() override { for (auto* fc : flashingComponents) fc->removeChangeListener (this); diff --git a/examples/Utilities/UnitTestsDemo.h b/examples/Utilities/UnitTestsDemo.h index 4c2f9c3d..783296f2 100644 --- a/examples/Utilities/UnitTestsDemo.h +++ b/examples/Utilities/UnitTestsDemo.h @@ -34,13 +34,13 @@ juce_core, juce_cryptography, juce_data_structures, juce_dsp, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra, juce_opengl, juce_osc, juce_product_unlocking, juce_video - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 defines: JUCE_UNIT_TESTS=1 type: Component - mainClass: UnitTestClasses::UnitTestsDemo + mainClass: UnitTestsDemo useLocalCopy: 1 @@ -53,35 +53,98 @@ #include "../Assets/DemoUtilities.h" //============================================================================== -struct UnitTestClasses +class UnitTestsDemo : public Component { - class UnitTestsDemo; - class TestRunnerThread; +public: + UnitTestsDemo() + { + setOpaque (true); + + addAndMakeVisible (startTestButton); + startTestButton.onClick = [this] { start(); }; + + addAndMakeVisible (testResultsBox); + testResultsBox.setMultiLine (true); + testResultsBox.setFont (Font (Font::getDefaultMonospacedFontName(), 12.0f, Font::plain)); + + addAndMakeVisible (categoriesBox); + categoriesBox.addItem ("All Tests", 1); + + auto categories = UnitTest::getAllCategories(); + categories.sort (true); + + categoriesBox.addItemList (categories, 2); + categoriesBox.setSelectedId (1); + + logMessage ("This panel runs the built-in JUCE unit-tests from the selected category.\n"); + logMessage ("To add your own unit-tests, see the JUCE_UNIT_TESTS macro."); + + setSize (500, 500); + } + + ~UnitTestsDemo() override + { + stopTest(); + } //============================================================================== - // This subclass of UnitTestRunner is used to redirect the test output to our - // TextBox, and to interrupt the running tests when our thread is asked to stop.. - class CustomTestRunner : public UnitTestRunner + void paint (Graphics& g) override { - public: - CustomTestRunner (TestRunnerThread& trt) : owner (trt) {} + g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, + Colours::grey)); + } - void logMessage (const String& message) override - { - owner.logMessage (message); - } + void resized() override + { + auto bounds = getLocalBounds().reduced (6); + + auto topSlice = bounds.removeFromTop (25); + startTestButton.setBounds (topSlice.removeFromLeft (200)); + topSlice.removeFromLeft (10); + categoriesBox .setBounds (topSlice.removeFromLeft (250)); + + bounds.removeFromTop (5); + testResultsBox.setBounds (bounds); + } + + void start() + { + startTest (categoriesBox.getText()); + } + + void startTest (const String& category) + { + testResultsBox.clear(); + startTestButton.setEnabled (false); + + currentTestThread.reset (new TestRunnerThread (*this, category)); + currentTestThread->startThread(); + } - bool shouldAbortTests() override + void stopTest() + { + if (currentTestThread.get() != nullptr) { - return owner.threadShouldExit(); + currentTestThread->stopThread (15000); + currentTestThread.reset(); } + } - private: - TestRunnerThread& owner; + void logMessage (const String& message) + { + testResultsBox.moveCaretToEnd(); + testResultsBox.insertTextAtCaret (message + newLine); + testResultsBox.moveCaretToEnd(); + } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CustomTestRunner) - }; + void testFinished() + { + stopTest(); + startTestButton.setEnabled (true); + logMessage (newLine + "*** Tests finished ***"); + } +private: //============================================================================== class TestRunnerThread : public Thread, private Timer @@ -108,10 +171,13 @@ struct UnitTestClasses void logMessage (const String& message) { - MessageManagerLock mm (this); + WeakReference safeOwner (&owner); - if (mm.lockWasGained()) // this lock may fail if this thread has been told to stop - owner.logMessage (message); + MessageManager::callAsync ([=] + { + if (auto* o = safeOwner.get()) + o->logMessage (message); + }); } void timerCallback() override @@ -121,117 +187,46 @@ struct UnitTestClasses } private: - UnitTestsDemo& owner; - const String category; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestRunnerThread) - }; - - - //============================================================================== - class UnitTestsDemo : public Component - { - public: - UnitTestsDemo() - { - setOpaque (true); - - addAndMakeVisible (startTestButton); - startTestButton.onClick = [this] { start(); }; - - addAndMakeVisible (testResultsBox); - testResultsBox.setMultiLine (true); - testResultsBox.setFont (Font (Font::getDefaultMonospacedFontName(), 12.0f, Font::plain)); - - addAndMakeVisible (categoriesBox); - categoriesBox.addItem ("All Tests", 1); - - auto categories = UnitTest::getAllCategories(); - categories.sort (true); - - categoriesBox.addItemList (categories, 2); - categoriesBox.setSelectedId (1); - - logMessage ("This panel runs the built-in JUCE unit-tests from the selected category.\n"); - logMessage ("To add your own unit-tests, see the JUCE_UNIT_TESTS macro."); - - setSize (500, 500); - } - - ~UnitTestsDemo() - { - stopTest(); - } - //============================================================================== - void paint (Graphics& g) override + // This subclass of UnitTestRunner is used to redirect the test output to our + // TextBox, and to interrupt the running tests when our thread is asked to stop.. + class CustomTestRunner : public UnitTestRunner { - g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, - Colours::grey)); - } + public: + CustomTestRunner (TestRunnerThread& trt) : owner (trt) {} - void resized() override - { - auto bounds = getLocalBounds().reduced (6); - - auto topSlice = bounds.removeFromTop (25); - startTestButton.setBounds (topSlice.removeFromLeft (200)); - topSlice.removeFromLeft (10); - categoriesBox .setBounds (topSlice.removeFromLeft (250)); - - bounds.removeFromTop (5); - testResultsBox.setBounds (bounds); - } - - void start() - { - startTest (categoriesBox.getText()); - } - - void startTest (const String& category) - { - testResultsBox.clear(); - startTestButton.setEnabled (false); - - currentTestThread.reset (new TestRunnerThread (*this, category)); - currentTestThread->startThread(); - } + void logMessage (const String& message) override + { + owner.logMessage (message); + } - void stopTest() - { - if (currentTestThread.get() != nullptr) + bool shouldAbortTests() override { - currentTestThread->stopThread (15000); - currentTestThread.reset(); + return owner.threadShouldExit(); } - } - void logMessage (const String& message) - { - testResultsBox.moveCaretToEnd(); - testResultsBox.insertTextAtCaret (message + newLine); - testResultsBox.moveCaretToEnd(); - } + private: + TestRunnerThread& owner; - void testFinished() - { - stopTest(); - startTestButton.setEnabled (true); - logMessage (newLine + "*** Tests finished ***"); - } + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CustomTestRunner) + }; - private: - std::unique_ptr currentTestThread; + UnitTestsDemo& owner; + const String category; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestRunnerThread) + }; + std::unique_ptr currentTestThread; - TextButton startTestButton { "Run Unit Tests..." }; - ComboBox categoriesBox; - TextEditor testResultsBox; + TextButton startTestButton { "Run Unit Tests..." }; + ComboBox categoriesBox; + TextEditor testResultsBox; - void lookAndFeelChanged() override - { - testResultsBox.applyFontToAllText (testResultsBox.getFont()); - } + void lookAndFeelChanged() override + { + testResultsBox.applyFontToAllText (testResultsBox.getFont()); + } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UnitTestsDemo) - }; + JUCE_DECLARE_WEAK_REFERENCEABLE (UnitTestsDemo) + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UnitTestsDemo) }; diff --git a/examples/Utilities/ValueTreesDemo.h b/examples/Utilities/ValueTreesDemo.h index 97455087..1d42397a 100644 --- a/examples/Utilities/ValueTreesDemo.h +++ b/examples/Utilities/ValueTreesDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -71,6 +71,10 @@ public: void paintItem (Graphics& g, int width, int height) override { + if (isSelected()) + g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::highlightedFill, + Colours::teal)); + g.setColour (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::defaultText, Colours::black)); g.setFont (15.0f); @@ -199,7 +203,7 @@ public: setSize (500, 500); } - ~ValueTreesDemo() + ~ValueTreesDemo() override { tree.setRootItem (nullptr); } @@ -233,7 +237,7 @@ public: { auto vt = createTree ("This demo displays a ValueTree as a treeview."); vt.appendChild (createTree ("You can drag around the nodes to rearrange them"), nullptr); - vt.appendChild (createTree ("..and press 'delete' to delete them"), nullptr); + vt.appendChild (createTree ("..and press 'delete' or 'backspace' to delete them"), nullptr); vt.appendChild (createTree ("Then, you can use the undo/redo buttons to undo these changes"), nullptr); int n = 1; @@ -267,7 +271,7 @@ public: bool keyPressed (const KeyPress& key) override { - if (key == KeyPress::deleteKey) + if (key == KeyPress::deleteKey || key == KeyPress::backspaceKey) { deleteSelectedItems(); return true; diff --git a/examples/Utilities/XMLandJSONDemo.h b/examples/Utilities/XMLandJSONDemo.h index 8c5f7a34..79d18661 100644 --- a/examples/Utilities/XMLandJSONDemo.h +++ b/examples/Utilities/XMLandJSONDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2017, linux_make, androidstudio, xcode_iphone + exporters: xcode_mac, vs2019, linux_make, androidstudio, xcode_iphone moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -278,7 +278,7 @@ public: setSize (500, 500); } - ~XMLandJSONDemo() + ~XMLandJSONDemo() override { resultsTree.setRootItem (nullptr); } @@ -314,7 +314,7 @@ private: std::unique_ptr openness; if (rootItem.get() != nullptr) - openness.reset (rootItem->getOpennessState()); + openness = rootItem->getOpennessState(); createNewRootNode(); @@ -351,7 +351,7 @@ private: parsedXml.reset(); XmlDocument doc (codeDocument.getAllContent()); - parsedXml.reset (doc.getDocumentElement()); + parsedXml = doc.getDocumentElement(); if (parsedXml.get() == nullptr) { diff --git a/extras/AudioPerformanceTest/AudioPerformanceTest.jucer b/extras/AudioPerformanceTest/AudioPerformanceTest.jucer index 76cc1cfb..895863e8 100644 --- a/extras/AudioPerformanceTest/AudioPerformanceTest.jucer +++ b/extras/AudioPerformanceTest/AudioPerformanceTest.jucer @@ -1,7 +1,7 @@ @@ -11,7 +11,7 @@ - + @@ -30,7 +30,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -67,8 +67,8 @@ - - + + @@ -88,10 +88,8 @@ + androidCpp11="1" targetFolder="Builds/Android" extraCompilerFlags="-mfpu=neon -mfloat-abi=hard -ffast-math -funroll-loops --param max-unroll-times=8 -mhard-float -D_NDK_MATH_NO_SOFTFP=1 -DJUCE_DISABLE_ASSERTIONS=1" + gradleToolchainVersion="3.6" androidMinimumSDK="23"> - diff --git a/extras/AudioPerformanceTest/Builds/Android/settings.gradle b/extras/AudioPerformanceTest/Builds/Android/settings.gradle index 9d495b34..0e06f060 100644 --- a/extras/AudioPerformanceTest/Builds/Android/settings.gradle +++ b/extras/AudioPerformanceTest/Builds/Android/settings.gradle @@ -1 +1,2 @@ +rootProject.name = 'AudioPerformanceTest' include ':app' \ No newline at end of file diff --git a/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile b/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile index 299fb0d4..cd2ac907 100644 --- a/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile +++ b/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile @@ -35,13 +35,13 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) 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 JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) - JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -ldl -lpthread -lrt $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -lrt -ldl -lpthread $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -56,13 +56,13 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) 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 JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) - JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -ldl -lpthread -lrt $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -lrt -ldl -lpthread $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -87,7 +87,7 @@ all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : $(OBJECTS_APP) $(RESOURCES) @command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } - @pkg-config --print-errors alsa freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl + @pkg-config --print-errors alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl @echo Linking "AudioPerformanceTest - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) -$(V_AT)mkdir -p $(JUCE_LIBDIR) diff --git a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj b/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj index 90094bdb..282962a3 100644 --- a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj +++ b/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj @@ -29,6 +29,10 @@ isa = PBXBuildFile; fileRef = 9F28F179EF6B90EB9F4DBEE9; }; + 71863EE98034AB7C3CBCAA81 = { + isa = PBXBuildFile; + fileRef = 24D90B40648CC05A9B1AA55B; + }; 5923A711C0020F2CDD598714 = { isa = PBXBuildFile; fileRef = 12C680C68A15B9A590264B18; @@ -164,6 +168,13 @@ path = "../../JuceLibraryCode/include_juce_events.mm"; sourceTree = "SOURCE_ROOT"; }; + 24D90B40648CC05A9B1AA55B = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = CoreAudioKit.framework; + path = System/Library/Frameworks/CoreAudioKit.framework; + sourceTree = SDKROOT; + }; 253CCF9514FE705169600047 = { isa = PBXFileReference; lastKnownFileType = file; @@ -446,6 +457,7 @@ 1DA5C6A474916745AFEC6DA5, 453777CEB7099A5D61901D13, 9F28F179EF6B90EB9F4DBEE9, + 24D90B40648CC05A9B1AA55B, 12C680C68A15B9A590264B18, EE758AD71415EB31BD3E82F3, 43775DC3D9F7917846EA5327, @@ -584,7 +596,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; @@ -603,7 +615,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "AudioPerformanceTest"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Debug; @@ -630,7 +642,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; @@ -647,7 +659,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "AudioPerformanceTest"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Release; @@ -710,6 +722,7 @@ 9B19A6655FCC8086134C8656, 0319B40AD2FD96007FFA928B, 5AFD011031C266431687C922, + 71863EE98034AB7C3CBCAA81, 5923A711C0020F2CDD598714, 3825E8984D8F6AA00DDC6BAC, 9031C69145EE085B60904363, @@ -736,13 +749,14 @@ 9CE2A44801B5B4BE7A9667DA = { isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; - attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; 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; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1100; ORGANIZATIONNAME = "ROLI Ltd."; 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; projectDirPath = ""; projectRoot = ""; targets = (E9FD2656EC625C9C8DE30219); + knownRegions = (en, Base); }; }; rootObject = 9CE2A44801B5B4BE7A9667DA; diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.sln b/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.sln deleted file mode 100644 index ee157010..00000000 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.sln +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2015 - -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioPerformanceTest - App", "AudioPerformanceTest_App.vcxproj", "{78607AE9-F43B-3DDB-0FE1-D745771AF527}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Debug|x64.ActiveCfg = Debug|x64 - {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Debug|x64.Build.0 = Debug|x64 - {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Release|x64.ActiveCfg = Release|x64 - {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj b/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj deleted file mode 100644 index 03ef95ed..00000000 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj +++ /dev/null @@ -1,2345 +0,0 @@ - - - - - - Debug - x64 - - - Release - x64 - - - - {78607AE9-F43B-3DDB-0FE1-D745771AF527} - v140 - 8.1 - - - - Application - false - false - v140 - v140 - 8.1 - - - Application - false - true - v140 - v140 - 8.1 - - - - - - - - v140 - 8.1 - - - <_ProjectFileVersion>10.0.30319.1 - .exe - $(SolutionDir)$(Platform)\$(Configuration)\App\ - $(Platform)\$(Configuration)\App\ - AudioPerformanceTest - true - $(SolutionDir)$(Platform)\$(Configuration)\App\ - $(Platform)\$(Configuration)\App\ - AudioPerformanceTest - true - v140 - 8.1 - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - - Disabled - ProgramDatabase - ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - true - - $(IntDir)\ - $(IntDir)\ - $(IntDir)\ - Level4 - true - true - stdcpp14 - - - _DEBUG;%(PreprocessorDefinitions) - - - $(OutDir)\AudioPerformanceTest.exe - true - libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) - true - $(IntDir)\AudioPerformanceTest.pdb - Windows - true - - - true - $(IntDir)\AudioPerformanceTest.bsc - - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - - Full - ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - $(IntDir)\ - $(IntDir)\ - $(IntDir)\ - Level4 - true - true - stdcpp14 - - - NDEBUG;%(PreprocessorDefinitions) - - - $(OutDir)\AudioPerformanceTest.exe - true - %(IgnoreSpecificDefaultLibraries) - false - $(IntDir)\AudioPerformanceTest.pdb - Windows - true - true - true - - - true - $(IntDir)\AudioPerformanceTest.bsc - - - - - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj.filters b/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj.filters deleted file mode 100644 index c4b5c703..00000000 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj.filters +++ /dev/null @@ -1,3845 +0,0 @@ - - - - - - {D163E404-6FE0-D71C-79C0-B2C2204C6939} - - - {EA26FD9B-DE67-F842-284B-F11CFEA08C63} - - - {EB58F05A-A968-CEBE-40C4-107CDD8F240F} - - - {5FCF559E-451A-CB1E-B177-A5DC5A0005BB} - - - {31054003-EA72-6A9D-D650-56451D9820E6} - - - {D78296AF-218E-B17E-7F8B-9D148601188D} - - - {B96EBA26-E668-FFAF-FC53-1EC1337DAF5A} - - - {D8532E5E-469E-5042-EFC8-238241704735} - - - {777B5D1D-9AF0-B22B-8894-034603EE97F5} - - - {8292766D-2459-2E7E-7615-17216318BA93} - - - {10472B2C-9888-D269-F351-0D0AC3BCD16C} - - - {BF23FC10-1D57-2A9B-706F-6DD8A7B593D4} - - - {092EFC17-7C95-7E04-0ACA-0D61A462EE81} - - - {0AFC1CE8-F6E6-9817-8C21-8432B2A375DA} - - - {0D1AF264-3AC1-78A2-B2A4-AE6171F9194A} - - - {9A5DB854-CFFB-5F88-C566-0E10F994DDB3} - - - {38A5DDC7-416E-548F-39DA-887875FE6B20} - - - {980FE2DB-05D3-5FDA-79DA-067A56F5D19D} - - - {F336DC25-747A-0663-93D6-E3EB9AA0CBF8} - - - {7D78546A-80FC-4DCA-00B9-F191F0AB2179} - - - {9EB3EC7F-2AB7-DDAA-3C05-DF382B728D3F} - - - {02D37B85-7DE2-C8E7-A274-A5A0FBE99D69} - - - {DAF3BAAF-5207-4C34-61B9-A97DDC930D50} - - - {C7885588-8436-4C21-DC1E-58879BF53BDC} - - - {E4ECEA39-0EFF-2443-91B3-1E5DA7AD5AE4} - - - {210B8D25-68E0-32C3-1449-6A40F109C5E9} - - - {378AD911-E8E4-D230-E76B-34542849509D} - - - {F6CED5B6-0A8C-56D2-C1AC-DED6BE774A13} - - - {E684D858-09E8-0251-8E86-5657129641E1} - - - {1EF1BF17-F941-243A-04D1-EE617D140CBA} - - - {344DB016-679C-FBD0-3EC6-4570C47522DE} - - - {3D9758A0-9359-1710-87C1-05D475C08B17} - - - {E824435F-FC7B-10BE-5D1A-5DACC51A8836} - - - {86737735-F6BA-F64A-5EC7-5C9F36755F79} - - - {6B7BE34D-1BC1-C7B9-111F-C55CA8250943} - - - {9B6B6D54-D378-80C2-8CC9-D1D8FB44C2A8} - - - {D0584AC3-6837-14F6-90BF-5EA604D1F074} - - - {794B64EC-B809-32E3-AD00-4EE6A74802CA} - - - {67BE498C-9E1F-C73A-B99A-387C034CE680} - - - {1A9C8538-959B-25E3-473D-B462C9A9D458} - - - {AA9F594C-DFAF-C0A7-0CCD-9F90E54D3A01} - - - {230BF784-34F4-3BE8-46D4-54E6B67E5E9E} - - - {39F680F3-5161-4D1C-EAD0-3911ED808874} - - - {3197198B-A978-E330-C7FB-07E5CE8236C7} - - - {42F7BE9D-3C8A-AE26-289B-8F355C068036} - - - {7868764A-6572-381A-906C-9C26792A4C29} - - - {03678508-A517-48BB-FB4A-485628C34E08} - - - {07D27C1D-3227-F527-356C-17DA11551A99} - - - {6146D580-99D2-A6C8-5908-30DC355BB6BA} - - - {C67003E8-BEA8-2188-F4B3-A122F4B4FA3F} - - - {09B91E68-1FF4-C7ED-9055-D4D96E66A0BA} - - - {4F24EEED-AA33-AC6C-9A39-72E71CF83EF0} - - - {0F70B1A9-BB50-23F5-2AE7-F95E51A00389} - - - {D4C8DC40-2CD2-04B6-05D0-1E7A88841390} - - - {58BED6AF-DB89-7560-B2B8-D937C1C0825A} - - - {B958F86B-6926-8D9B-2FC6-8BFD4BDC72C9} - - - {DB624F7D-D513-25AC-C13C-B9062EB3BEEE} - - - {89AA9B6C-4029-A34F-C1B0-3B5D8691F4D4} - - - {1A7F541C-B032-9C66-C320-A13B2A8A9866} - - - {4BAB7C18-51AB-0D9D-83CD-9C37F28D2E38} - - - {5523922E-8B0C-A52B-477C-752C09F8197F} - - - {857B6D8B-0ECB-FE9E-D1EB-D5E45E72F057} - - - {BAA582FA-40B7-320E-EE7A-4C3892C7BE72} - - - {632B4C79-AF7D-BFB5-D006-5AE67F607130} - - - {B10E20C2-4583-2B79-60B7-FE4D4B044313} - - - {CFB54F15-8A8A-0505-9B7F-ECA41CEE38E8} - - - {911F0159-A7A8-4A43-3FD4-154F62F4A44B} - - - {9D5816C2-E2B2-2E3F-B095-AC8BD1100D29} - - - {3FDCD000-763F-8477-9AF8-70ABA2E91E5E} - - - {0947506F-66FA-EF8D-8A4E-4D48BCDBB226} - - - {E4B6AED3-F54C-3FF2-069F-640BACAE0E08} - - - {D5EADBCC-6A1C-C940-0206-26E49110AF08} - - - {D27DC92D-5BEB-9294-DCD1-81D54E245AD5} - - - {BCD73D20-42B1-6CDB-DE66-B06236A60F47} - - - {20DC13F6-2369-8841-9F0B-D13FA14EEE74} - - - {A302A8DB-120F-9EBB-A3D5-2C29963AA56B} - - - {45489C2A-6E0E-CCDC-6638-0DACEEB63CCA} - - - {F1B90726-DB55-0293-BFAF-C65C7DF5489C} - - - {2C55FD42-0ACD-B0B8-7EAE-EB17F09BAEEC} - - - {B68CD2B2-701F-9AB7-4638-2485D6E06BCF} - - - {B0B7C78E-729E-0FFA-D611-82AE8BC7FE2C} - - - {0A4F7E12-220C-14EF-0026-9C0629FA9C17} - - - {37F49E10-4E62-6D5C-FF70-722D0CA3D97E} - - - {160D9882-0F68-278D-C5F9-8960FD7421D2} - - - {4CED05DA-E0A2-E548-F753-1F2EF299A8E3} - - - {294E4CD5-B06F-97D1-04A3-51871CEA507C} - - - {77228F15-BD91-06FF-2C7E-0377D25C2C94} - - - {5CB531E6-BF9A-2C50-056C-EE5A525D28D3} - - - {E4EA47E5-B41C-2A19-1783-7E9104096ECD} - - - {46A17AC9-0BFF-B5CE-26D6-B9D1992C88AC} - - - {D90A8DF7-FBAB-D363-13C0-6707BB22B72B} - - - {8AE77C40-6839-EC37-4515-BD3CC269BCE4} - - - {0EAD99DB-011F-09E5-45A2-365F646EB004} - - - {F57590C6-3B90-1BE1-1006-488BA33E8BD9} - - - {7C319D73-0D93-5842-0874-398D2D3038D5} - - - {2CB4DB0C-DD3B-6195-D822-76EC7A5C88D2} - - - {FE3CB19C-EF43-5CF5-DAF0-09D4E43D0AB9} - - - {895C2D33-E08D-B1BA-BB36-FC4CA65090C8} - - - {D64A57DB-A956-5519-1929-1D929B56E1B0} - - - {5A99CC24-AC45-7ED6-C11A-B8B86E76D884} - - - {7A131EEC-25A7-22F6-2839-A2194DDF3007} - - - {EA9DB76C-CEF7-6BFC-2070-28B7DF8E8063} - - - {3C206A40-6F1B-E683-ACF1-DEC3703D0140} - - - {DF95D4BF-E18C-125A-5EBB-8993A06E232C} - - - {118946F2-AC24-0F09-62D5-753DF87A60CD} - - - {07329F9B-7D3D-CEB3-C771-714842076140} - - - {08BBBECB-B0D1-7611-37EC-F57E1D0CE2A2} - - - {268E8F2A-980C-BF2F-B161-AACABC9D91F3} - - - {A4D76113-9EDC-DA60-D89B-5BACF7F1C426} - - - {FE955B6B-68AC-AA07-70D8-2413F6DB65C8} - - - {7ED5A90E-41AF-A1EF-659B-37CEEAB9BA61} - - - - - AudioPerformanceTest\Source - - - JUCE Modules\juce_audio_basics\buffers - - - JUCE Modules\juce_audio_basics\buffers - - - JUCE Modules\juce_audio_basics\buffers - - - JUCE Modules\juce_audio_basics\effects - - - JUCE Modules\juce_audio_basics\effects - - - JUCE Modules\juce_audio_basics\effects - - - JUCE Modules\juce_audio_basics\midi - - - JUCE Modules\juce_audio_basics\midi - - - JUCE Modules\juce_audio_basics\midi - - - JUCE Modules\juce_audio_basics\midi - - - JUCE Modules\juce_audio_basics\midi - - - JUCE Modules\juce_audio_basics\midi - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\synthesisers - - - JUCE Modules\juce_audio_basics - - - JUCE Modules\juce_audio_basics - - - JUCE Modules\juce_audio_devices\audio_io - - - JUCE Modules\juce_audio_devices\audio_io - - - JUCE Modules\juce_audio_devices\audio_io - - - JUCE Modules\juce_audio_devices\midi_io - - - JUCE Modules\juce_audio_devices\midi_io - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\sources - - - JUCE Modules\juce_audio_devices\sources - - - JUCE Modules\juce_audio_devices - - - JUCE Modules\juce_audio_devices - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\format - - - JUCE Modules\juce_audio_formats\format - - - JUCE Modules\juce_audio_formats\format - - - JUCE Modules\juce_audio_formats\format - - - JUCE Modules\juce_audio_formats\format - - - JUCE Modules\juce_audio_formats\format - - - JUCE Modules\juce_audio_formats\format - - - JUCE Modules\juce_audio_formats\sampler - - - JUCE Modules\juce_audio_formats - - - JUCE Modules\juce_audio_formats - - - JUCE Modules\juce_audio_processors\format - - - JUCE Modules\juce_audio_processors\format - - - JUCE Modules\juce_audio_processors\format_types - - - JUCE Modules\juce_audio_processors\format_types - - - JUCE Modules\juce_audio_processors\format_types - - - JUCE Modules\juce_audio_processors\format_types - - - JUCE Modules\juce_audio_processors\format_types - - - JUCE Modules\juce_audio_processors\processors - - - JUCE Modules\juce_audio_processors\processors - - - JUCE Modules\juce_audio_processors\processors - - - JUCE Modules\juce_audio_processors\processors - - - JUCE Modules\juce_audio_processors\processors - - - JUCE Modules\juce_audio_processors\processors - - - JUCE Modules\juce_audio_processors\scanning - - - JUCE Modules\juce_audio_processors\scanning - - - JUCE Modules\juce_audio_processors\scanning - - - JUCE Modules\juce_audio_processors\utilities - - - JUCE Modules\juce_audio_processors\utilities - - - JUCE Modules\juce_audio_processors - - - JUCE Modules\juce_audio_processors - - - JUCE Modules\juce_audio_utils\audio_cd - - - JUCE Modules\juce_audio_utils\gui - - - JUCE Modules\juce_audio_utils\gui - - - JUCE Modules\juce_audio_utils\gui - - - JUCE Modules\juce_audio_utils\gui - - - JUCE Modules\juce_audio_utils\gui - - - JUCE Modules\juce_audio_utils\gui - - - JUCE Modules\juce_audio_utils\native - - - JUCE Modules\juce_audio_utils\native - - - JUCE Modules\juce_audio_utils\native - - - JUCE Modules\juce_audio_utils\native - - - JUCE Modules\juce_audio_utils\native - - - JUCE Modules\juce_audio_utils\native - - - JUCE Modules\juce_audio_utils\native - - - JUCE Modules\juce_audio_utils\native - - - JUCE Modules\juce_audio_utils\native - - - JUCE Modules\juce_audio_utils\native - - - JUCE Modules\juce_audio_utils\players - - - JUCE Modules\juce_audio_utils\players - - - JUCE Modules\juce_audio_utils - - - JUCE Modules\juce_audio_utils - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\javascript - - - JUCE Modules\juce_core\javascript - - - JUCE Modules\juce_core\logging - - - JUCE Modules\juce_core\logging - - - JUCE Modules\juce_core\maths - - - JUCE Modules\juce_core\maths - - - JUCE Modules\juce_core\maths - - - JUCE Modules\juce_core\memory - - - JUCE Modules\juce_core\misc - - - JUCE Modules\juce_core\misc - - - JUCE Modules\juce_core\misc - - - JUCE Modules\juce_core\misc - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\network - - - JUCE Modules\juce_core\network - - - JUCE Modules\juce_core\network - - - JUCE Modules\juce_core\network - - - JUCE Modules\juce_core\network - - - JUCE Modules\juce_core\network - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\system - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\time - - - JUCE Modules\juce_core\time - - - JUCE Modules\juce_core\time - - - JUCE Modules\juce_core\unit_tests - - - JUCE Modules\juce_core\xml - - - JUCE Modules\juce_core\xml - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip - - - JUCE Modules\juce_core\zip - - - JUCE Modules\juce_core\zip - - - JUCE Modules\juce_core - - - JUCE Modules\juce_core - - - JUCE Modules\juce_data_structures\app_properties - - - JUCE Modules\juce_data_structures\app_properties - - - JUCE Modules\juce_data_structures\undomanager - - - JUCE Modules\juce_data_structures\values - - - JUCE Modules\juce_data_structures\values - - - JUCE Modules\juce_data_structures\values - - - JUCE Modules\juce_data_structures\values - - - JUCE Modules\juce_data_structures - - - JUCE Modules\juce_data_structures - - - JUCE Modules\juce_events\broadcasters - - - JUCE Modules\juce_events\broadcasters - - - JUCE Modules\juce_events\broadcasters - - - JUCE Modules\juce_events\interprocess - - - JUCE Modules\juce_events\interprocess - - - JUCE Modules\juce_events\interprocess - - - JUCE Modules\juce_events\messages - - - JUCE Modules\juce_events\messages - - - JUCE Modules\juce_events\messages - - - JUCE Modules\juce_events\messages - - - JUCE Modules\juce_events\native - - - JUCE Modules\juce_events\native - - - JUCE Modules\juce_events\native - - - JUCE Modules\juce_events\native - - - JUCE Modules\juce_events\native - - - JUCE Modules\juce_events\native - - - JUCE Modules\juce_events\timers - - - JUCE Modules\juce_events\timers - - - JUCE Modules\juce_events - - - JUCE Modules\juce_events - - - JUCE Modules\juce_graphics\colour - - - JUCE Modules\juce_graphics\colour - - - JUCE Modules\juce_graphics\colour - - - JUCE Modules\juce_graphics\colour - - - JUCE Modules\juce_graphics\contexts - - - JUCE Modules\juce_graphics\contexts - - - JUCE Modules\juce_graphics\contexts - - - JUCE Modules\juce_graphics\effects - - - JUCE Modules\juce_graphics\effects - - - JUCE Modules\juce_graphics\fonts - - - JUCE Modules\juce_graphics\fonts - - - JUCE Modules\juce_graphics\fonts - - - JUCE Modules\juce_graphics\fonts - - - JUCE Modules\juce_graphics\fonts - - - JUCE Modules\juce_graphics\fonts - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats - - - JUCE Modules\juce_graphics\image_formats - - - JUCE Modules\juce_graphics\image_formats - - - JUCE Modules\juce_graphics\images - - - JUCE Modules\juce_graphics\images - - - JUCE Modules\juce_graphics\images - - - JUCE Modules\juce_graphics\images - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\placement - - - JUCE Modules\juce_graphics - - - JUCE Modules\juce_graphics - - - JUCE Modules\juce_gui_basics\application - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\commands - - - JUCE Modules\juce_gui_basics\commands - - - JUCE Modules\juce_gui_basics\commands - - - JUCE Modules\juce_gui_basics\commands - - - JUCE Modules\juce_gui_basics\components - - - JUCE Modules\juce_gui_basics\components - - - JUCE Modules\juce_gui_basics\components - - - JUCE Modules\juce_gui_basics\components - - - JUCE Modules\juce_gui_basics\drawables - - - JUCE Modules\juce_gui_basics\drawables - - - JUCE Modules\juce_gui_basics\drawables - - - JUCE Modules\juce_gui_basics\drawables - - - JUCE Modules\juce_gui_basics\drawables - - - JUCE Modules\juce_gui_basics\drawables - - - JUCE Modules\juce_gui_basics\drawables - - - JUCE Modules\juce_gui_basics\drawables - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\keyboard - - - JUCE Modules\juce_gui_basics\keyboard - - - JUCE Modules\juce_gui_basics\keyboard - - - JUCE Modules\juce_gui_basics\keyboard - - - JUCE Modules\juce_gui_basics\keyboard - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\lookandfeel - - - JUCE Modules\juce_gui_basics\lookandfeel - - - JUCE Modules\juce_gui_basics\lookandfeel - - - JUCE Modules\juce_gui_basics\lookandfeel - - - JUCE Modules\juce_gui_basics\lookandfeel - - - JUCE Modules\juce_gui_basics\menus - - - JUCE Modules\juce_gui_basics\menus - - - JUCE Modules\juce_gui_basics\menus - - - JUCE Modules\juce_gui_basics\menus - - - JUCE Modules\juce_gui_basics\misc - - - JUCE Modules\juce_gui_basics\misc - - - JUCE Modules\juce_gui_basics\misc - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\positioning - - - JUCE Modules\juce_gui_basics\positioning - - - JUCE Modules\juce_gui_basics\positioning - - - JUCE Modules\juce_gui_basics\positioning - - - JUCE Modules\juce_gui_basics\positioning - - - JUCE Modules\juce_gui_basics\positioning - - - JUCE Modules\juce_gui_basics\positioning - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics - - - JUCE Modules\juce_gui_basics - - - JUCE Modules\juce_gui_extra\code_editor - - - JUCE Modules\juce_gui_extra\code_editor - - - JUCE Modules\juce_gui_extra\code_editor - - - JUCE Modules\juce_gui_extra\code_editor - - - JUCE Modules\juce_gui_extra\code_editor - - - JUCE Modules\juce_gui_extra\documents - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra - - - JUCE Modules\juce_gui_extra - - - JUCE Library Code - - - JUCE Library Code - - - JUCE Library Code - - - JUCE Library Code - - - JUCE Library Code - - - JUCE Library Code - - - JUCE Library Code - - - JUCE Library Code - - - JUCE Library Code - - - JUCE Library Code - - - JUCE Library Code - - - - - AudioPerformanceTest\Source - - - JUCE Modules\juce_audio_basics\audio_play_head - - - JUCE Modules\juce_audio_basics\buffers - - - JUCE Modules\juce_audio_basics\buffers - - - JUCE Modules\juce_audio_basics\buffers - - - JUCE Modules\juce_audio_basics\buffers - - - JUCE Modules\juce_audio_basics\effects - - - JUCE Modules\juce_audio_basics\effects - - - JUCE Modules\juce_audio_basics\effects - - - JUCE Modules\juce_audio_basics\effects - - - JUCE Modules\juce_audio_basics\effects - - - JUCE Modules\juce_audio_basics\effects - - - JUCE Modules\juce_audio_basics\midi - - - JUCE Modules\juce_audio_basics\midi - - - JUCE Modules\juce_audio_basics\midi - - - JUCE Modules\juce_audio_basics\midi - - - JUCE Modules\juce_audio_basics\midi - - - JUCE Modules\juce_audio_basics\midi - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\mpe - - - JUCE Modules\juce_audio_basics\native - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\sources - - - JUCE Modules\juce_audio_basics\synthesisers - - - JUCE Modules\juce_audio_basics - - - JUCE Modules\juce_audio_devices\audio_io - - - JUCE Modules\juce_audio_devices\audio_io - - - JUCE Modules\juce_audio_devices\audio_io - - - JUCE Modules\juce_audio_devices\audio_io - - - JUCE Modules\juce_audio_devices\midi_io - - - JUCE Modules\juce_audio_devices\midi_io - - - JUCE Modules\juce_audio_devices\midi_io - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\native - - - JUCE Modules\juce_audio_devices\sources - - - JUCE Modules\juce_audio_devices\sources - - - JUCE Modules\juce_audio_devices - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected - - - JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected - - - JUCE Modules\juce_audio_formats\codecs\flac - - - JUCE Modules\juce_audio_formats\codecs\flac - - - JUCE Modules\juce_audio_formats\codecs\flac - - - JUCE Modules\juce_audio_formats\codecs\flac - - - JUCE Modules\juce_audio_formats\codecs\flac - - - JUCE Modules\juce_audio_formats\codecs\flac - - - JUCE Modules\juce_audio_formats\codecs\flac - - - JUCE Modules\juce_audio_formats\codecs\flac - - - JUCE Modules\juce_audio_formats\codecs\flac - - - JUCE Modules\juce_audio_formats\codecs\flac - - - JUCE Modules\juce_audio_formats\codecs\flac - - - JUCE Modules\juce_audio_formats\codecs\flac - - - JUCE Modules\juce_audio_formats\codecs\flac - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\floor - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\uncoupled - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\codecs - - - JUCE Modules\juce_audio_formats\format - - - JUCE Modules\juce_audio_formats\format - - - JUCE Modules\juce_audio_formats\format - - - JUCE Modules\juce_audio_formats\format - - - JUCE Modules\juce_audio_formats\format - - - JUCE Modules\juce_audio_formats\format - - - JUCE Modules\juce_audio_formats\format - - - JUCE Modules\juce_audio_formats\format - - - JUCE Modules\juce_audio_formats\sampler - - - JUCE Modules\juce_audio_formats - - - JUCE Modules\juce_audio_processors\format - - - JUCE Modules\juce_audio_processors\format - - - JUCE Modules\juce_audio_processors\format_types - - - JUCE Modules\juce_audio_processors\format_types - - - JUCE Modules\juce_audio_processors\format_types - - - JUCE Modules\juce_audio_processors\format_types - - - JUCE Modules\juce_audio_processors\format_types - - - JUCE Modules\juce_audio_processors\format_types - - - JUCE Modules\juce_audio_processors\format_types - - - JUCE Modules\juce_audio_processors\format_types - - - JUCE Modules\juce_audio_processors\format_types - - - JUCE Modules\juce_audio_processors\processors - - - JUCE Modules\juce_audio_processors\processors - - - JUCE Modules\juce_audio_processors\processors - - - JUCE Modules\juce_audio_processors\processors - - - JUCE Modules\juce_audio_processors\processors - - - JUCE Modules\juce_audio_processors\processors - - - JUCE Modules\juce_audio_processors\processors - - - JUCE Modules\juce_audio_processors\processors - - - JUCE Modules\juce_audio_processors\scanning - - - JUCE Modules\juce_audio_processors\scanning - - - JUCE Modules\juce_audio_processors\scanning - - - JUCE Modules\juce_audio_processors\utilities - - - JUCE Modules\juce_audio_processors\utilities - - - JUCE Modules\juce_audio_processors\utilities - - - JUCE Modules\juce_audio_processors\utilities - - - JUCE Modules\juce_audio_processors\utilities - - - JUCE Modules\juce_audio_processors\utilities - - - JUCE Modules\juce_audio_processors - - - JUCE Modules\juce_audio_utils\audio_cd - - - JUCE Modules\juce_audio_utils\audio_cd - - - JUCE Modules\juce_audio_utils\gui - - - JUCE Modules\juce_audio_utils\gui - - - JUCE Modules\juce_audio_utils\gui - - - JUCE Modules\juce_audio_utils\gui - - - JUCE Modules\juce_audio_utils\gui - - - JUCE Modules\juce_audio_utils\gui - - - JUCE Modules\juce_audio_utils\gui - - - JUCE Modules\juce_audio_utils\gui - - - JUCE Modules\juce_audio_utils\players - - - JUCE Modules\juce_audio_utils\players - - - JUCE Modules\juce_audio_utils - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\containers - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\files - - - JUCE Modules\juce_core\javascript - - - JUCE Modules\juce_core\javascript - - - JUCE Modules\juce_core\logging - - - JUCE Modules\juce_core\logging - - - JUCE Modules\juce_core\maths - - - JUCE Modules\juce_core\maths - - - JUCE Modules\juce_core\maths - - - JUCE Modules\juce_core\maths - - - JUCE Modules\juce_core\maths - - - JUCE Modules\juce_core\maths - - - JUCE Modules\juce_core\maths - - - JUCE Modules\juce_core\memory - - - JUCE Modules\juce_core\memory - - - JUCE Modules\juce_core\memory - - - JUCE Modules\juce_core\memory - - - JUCE Modules\juce_core\memory - - - JUCE Modules\juce_core\memory - - - JUCE Modules\juce_core\memory - - - JUCE Modules\juce_core\memory - - - JUCE Modules\juce_core\memory - - - JUCE Modules\juce_core\memory - - - JUCE Modules\juce_core\memory - - - JUCE Modules\juce_core\memory - - - JUCE Modules\juce_core\memory - - - JUCE Modules\juce_core\misc - - - JUCE Modules\juce_core\misc - - - JUCE Modules\juce_core\misc - - - JUCE Modules\juce_core\misc - - - JUCE Modules\juce_core\misc - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\native - - - JUCE Modules\juce_core\network - - - JUCE Modules\juce_core\network - - - JUCE Modules\juce_core\network - - - JUCE Modules\juce_core\network - - - JUCE Modules\juce_core\network - - - JUCE Modules\juce_core\network - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\streams - - - JUCE Modules\juce_core\system - - - JUCE Modules\juce_core\system - - - JUCE Modules\juce_core\system - - - JUCE Modules\juce_core\system - - - JUCE Modules\juce_core\system - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\text - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\threads - - - JUCE Modules\juce_core\time - - - JUCE Modules\juce_core\time - - - JUCE Modules\juce_core\time - - - JUCE Modules\juce_core\unit_tests - - - JUCE Modules\juce_core\xml - - - JUCE Modules\juce_core\xml - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip\zlib - - - JUCE Modules\juce_core\zip - - - JUCE Modules\juce_core\zip - - - JUCE Modules\juce_core\zip - - - JUCE Modules\juce_core - - - JUCE Modules\juce_data_structures\app_properties - - - JUCE Modules\juce_data_structures\app_properties - - - JUCE Modules\juce_data_structures\undomanager - - - JUCE Modules\juce_data_structures\undomanager - - - JUCE Modules\juce_data_structures\values - - - JUCE Modules\juce_data_structures\values - - - JUCE Modules\juce_data_structures\values - - - JUCE Modules\juce_data_structures\values - - - JUCE Modules\juce_data_structures\values - - - JUCE Modules\juce_data_structures - - - JUCE Modules\juce_events\broadcasters - - - JUCE Modules\juce_events\broadcasters - - - JUCE Modules\juce_events\broadcasters - - - JUCE Modules\juce_events\broadcasters - - - JUCE Modules\juce_events\broadcasters - - - JUCE Modules\juce_events\interprocess - - - JUCE Modules\juce_events\interprocess - - - JUCE Modules\juce_events\interprocess - - - JUCE Modules\juce_events\messages - - - JUCE Modules\juce_events\messages - - - JUCE Modules\juce_events\messages - - - JUCE Modules\juce_events\messages - - - JUCE Modules\juce_events\messages - - - JUCE Modules\juce_events\messages - - - JUCE Modules\juce_events\messages - - - JUCE Modules\juce_events\messages - - - JUCE Modules\juce_events\messages - - - JUCE Modules\juce_events\native - - - JUCE Modules\juce_events\native - - - JUCE Modules\juce_events\native - - - JUCE Modules\juce_events\native - - - JUCE Modules\juce_events\timers - - - JUCE Modules\juce_events\timers - - - JUCE Modules\juce_events - - - JUCE Modules\juce_graphics\colour - - - JUCE Modules\juce_graphics\colour - - - JUCE Modules\juce_graphics\colour - - - JUCE Modules\juce_graphics\colour - - - JUCE Modules\juce_graphics\colour - - - JUCE Modules\juce_graphics\contexts - - - JUCE Modules\juce_graphics\contexts - - - JUCE Modules\juce_graphics\contexts - - - JUCE Modules\juce_graphics\contexts - - - JUCE Modules\juce_graphics\effects - - - JUCE Modules\juce_graphics\effects - - - JUCE Modules\juce_graphics\effects - - - JUCE Modules\juce_graphics\fonts - - - JUCE Modules\juce_graphics\fonts - - - JUCE Modules\juce_graphics\fonts - - - JUCE Modules\juce_graphics\fonts - - - JUCE Modules\juce_graphics\fonts - - - JUCE Modules\juce_graphics\fonts - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\geometry - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - JUCE Modules\juce_graphics\images - - - JUCE Modules\juce_graphics\images - - - JUCE Modules\juce_graphics\images - - - JUCE Modules\juce_graphics\images - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\native - - - JUCE Modules\juce_graphics\placement - - - JUCE Modules\juce_graphics\placement - - - JUCE Modules\juce_graphics - - - JUCE Modules\juce_gui_basics\application - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\buttons - - - JUCE Modules\juce_gui_basics\commands - - - JUCE Modules\juce_gui_basics\commands - - - JUCE Modules\juce_gui_basics\commands - - - JUCE Modules\juce_gui_basics\commands - - - JUCE Modules\juce_gui_basics\commands - - - JUCE Modules\juce_gui_basics\components - - - JUCE Modules\juce_gui_basics\components - - - JUCE Modules\juce_gui_basics\components - - - JUCE Modules\juce_gui_basics\components - - - JUCE Modules\juce_gui_basics\components - - - JUCE Modules\juce_gui_basics\drawables - - - JUCE Modules\juce_gui_basics\drawables - - - JUCE Modules\juce_gui_basics\drawables - - - JUCE Modules\juce_gui_basics\drawables - - - JUCE Modules\juce_gui_basics\drawables - - - JUCE Modules\juce_gui_basics\drawables - - - JUCE Modules\juce_gui_basics\drawables - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\filebrowser - - - JUCE Modules\juce_gui_basics\keyboard - - - JUCE Modules\juce_gui_basics\keyboard - - - JUCE Modules\juce_gui_basics\keyboard - - - JUCE Modules\juce_gui_basics\keyboard - - - JUCE Modules\juce_gui_basics\keyboard - - - JUCE Modules\juce_gui_basics\keyboard - - - JUCE Modules\juce_gui_basics\keyboard - - - JUCE Modules\juce_gui_basics\keyboard - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\layout - - - JUCE Modules\juce_gui_basics\lookandfeel - - - JUCE Modules\juce_gui_basics\lookandfeel - - - JUCE Modules\juce_gui_basics\lookandfeel - - - JUCE Modules\juce_gui_basics\lookandfeel - - - JUCE Modules\juce_gui_basics\lookandfeel - - - JUCE Modules\juce_gui_basics\menus - - - JUCE Modules\juce_gui_basics\menus - - - JUCE Modules\juce_gui_basics\menus - - - JUCE Modules\juce_gui_basics\menus - - - JUCE Modules\juce_gui_basics\misc - - - JUCE Modules\juce_gui_basics\misc - - - JUCE Modules\juce_gui_basics\misc - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\mouse - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\native - - - JUCE Modules\juce_gui_basics\positioning - - - JUCE Modules\juce_gui_basics\positioning - - - JUCE Modules\juce_gui_basics\positioning - - - JUCE Modules\juce_gui_basics\positioning - - - JUCE Modules\juce_gui_basics\positioning - - - JUCE Modules\juce_gui_basics\positioning - - - JUCE Modules\juce_gui_basics\positioning - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\properties - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\widgets - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics\windows - - - JUCE Modules\juce_gui_basics - - - JUCE Modules\juce_gui_extra\code_editor - - - JUCE Modules\juce_gui_extra\code_editor - - - JUCE Modules\juce_gui_extra\code_editor - - - JUCE Modules\juce_gui_extra\code_editor - - - JUCE Modules\juce_gui_extra\code_editor - - - JUCE Modules\juce_gui_extra\code_editor - - - JUCE Modules\juce_gui_extra\code_editor - - - JUCE Modules\juce_gui_extra\documents - - - JUCE Modules\juce_gui_extra\embedding - - - JUCE Modules\juce_gui_extra\embedding - - - JUCE Modules\juce_gui_extra\embedding - - - JUCE Modules\juce_gui_extra\embedding - - - JUCE Modules\juce_gui_extra\embedding - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\misc - - - JUCE Modules\juce_gui_extra\native - - - JUCE Modules\juce_gui_extra - - - JUCE Library Code - - - JUCE Library Code - - - - - JUCE Modules\juce_audio_formats\codecs\flac - - - JUCE Modules\juce_audio_formats\codecs\oggvorbis - - - JUCE Modules\juce_graphics\image_formats\jpglib - - - JUCE Modules\juce_graphics\image_formats\pnglib - - - - - JUCE Library Code - - - diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest.sln b/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest.sln similarity index 95% rename from extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest.sln rename to extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest.sln index ee79a7aa..9db45183 100644 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest.sln +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2017 +# Visual Studio 2019 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioPerformanceTest - App", "AudioPerformanceTest_App.vcxproj", "{78607AE9-F43B-3DDB-0FE1-D745771AF527}" EndProject diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj b/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj similarity index 97% rename from extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj rename to extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj index 0ea89c95..7115eb29 100644 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj @@ -1,7 +1,7 @@ @@ -22,16 +22,16 @@ Application false false - v141 - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + v142 + 10.0 Application false true - v141 - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + v142 + 10.0 @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;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 @@ -105,7 +105,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;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 @@ -232,6 +232,9 @@ true + + true + true @@ -244,10 +247,10 @@ true - + true - + true @@ -589,12 +592,27 @@ true - + + true + + + true + + + true + + + true + + true true + + true + true @@ -1489,9 +1507,6 @@ true - - true - true @@ -1877,16 +1892,15 @@ - + - + - @@ -2041,6 +2055,7 @@ + @@ -2215,6 +2230,7 @@ + @@ -2311,6 +2327,7 @@ + @@ -2500,8 +2517,11 @@ + + + diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj.filters b/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj.filters similarity index 97% rename from extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj.filters rename to extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj.filters index 4e413d44..3c1483fe 100644 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj.filters +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj.filters @@ -1,6 +1,6 @@ - + {D163E404-6FE0-D71C-79C0-B2C2204C6939} @@ -484,6 +484,9 @@ JUCE Modules\juce_audio_basics\utilities + + JUCE Modules\juce_audio_basics\utilities + JUCE Modules\juce_audio_basics @@ -499,10 +502,10 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io - + JUCE Modules\juce_audio_devices\midi_io @@ -853,12 +856,27 @@ JUCE Modules\juce_audio_processors\scanning - + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities + JUCE Modules\juce_audio_processors @@ -1810,9 +1828,6 @@ JUCE Modules\juce_gui_basics\layout - - JUCE Modules\juce_gui_basics\layout - JUCE Modules\juce_gui_basics\layout @@ -2340,10 +2355,10 @@ JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities @@ -2361,15 +2376,12 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io JUCE Modules\juce_audio_devices\midi_io - - JUCE Modules\juce_audio_devices\midi_io - JUCE Modules\juce_audio_devices\native @@ -2832,6 +2844,9 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst @@ -3354,6 +3369,9 @@ JUCE Modules\juce_core\unit_tests + + JUCE Modules\juce_core\unit_tests + JUCE Modules\juce_core\xml @@ -3642,6 +3660,9 @@ JUCE Modules\juce_graphics\image_formats\pnglib + + JUCE Modules\juce_graphics\image_formats\pnglib + JUCE Modules\juce_graphics\image_formats\pnglib @@ -4205,12 +4226,21 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + JUCE Modules\juce_audio_processors\format_types\VST3_SDK diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2015/resources.rc b/extras/AudioPerformanceTest/Builds/VisualStudio2019/resources.rc similarity index 100% rename from extras/AudioPerformanceTest/Builds/VisualStudio2015/resources.rc rename to extras/AudioPerformanceTest/Builds/VisualStudio2019/resources.rc diff --git a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj b/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj index ca80812a..81affeea 100644 --- a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj +++ b/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj @@ -635,7 +635,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; @@ -657,7 +657,7 @@ PRODUCT_NAME = "AudioPerformanceTest"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Debug; @@ -685,7 +685,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; @@ -705,7 +705,7 @@ PRODUCT_NAME = "AudioPerformanceTest"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Release; @@ -798,13 +798,14 @@ 9CE2A44801B5B4BE7A9667DA = { isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; - attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; 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; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1100; ORGANIZATIONNAME = "ROLI Ltd."; 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; projectDirPath = ""; projectRoot = ""; targets = (E9FD2656EC625C9C8DE30219); + knownRegions = (en, Base); }; }; rootObject = 9CE2A44801B5B4BE7A9667DA; diff --git a/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h b/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h index 79b8844d..954761b2 100644 --- a/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h +++ b/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h @@ -186,7 +186,7 @@ #endif #ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL 0 + //#define JUCE_USE_CURL 1 #endif #ifndef JUCE_LOAD_CURL_SYMBOLS_LAZILY @@ -194,11 +194,11 @@ #endif #ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 0 #endif #ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 0 #endif #ifndef JUCE_STRICT_REFCOUNTEDPOINTER diff --git a/extras/AudioPluginHost/AudioPluginHost.jucer b/extras/AudioPluginHost/AudioPluginHost.jucer index 8d10bca1..5aff91d4 100644 --- a/extras/AudioPluginHost/AudioPluginHost.jucer +++ b/extras/AudioPluginHost/AudioPluginHost.jucer @@ -1,17 +1,16 @@ + juceFolder="../../../juce" bundleIdentifier="com.roli.juce.pluginhost" + jucerVersion="5.4.4" companyName="ROLI Ltd." displaySplashScreen="0" + reportAppUsage="0" companyCopyright="ROLI Ltd."> - - - + + @@ -30,8 +29,7 @@ - + - + - - + + @@ -78,9 +74,9 @@ - - + + @@ -101,8 +97,8 @@ - - + @@ -124,16 +120,16 @@ - + + linkTimeOptimisation="0" targetName="Plugin Host" recommendedWarnings="LLVM"/> + linkTimeOptimisation="1" targetName="Plugin Host" recommendedWarnings="LLVM"/> @@ -152,14 +148,15 @@ - + - + optimisation="1" linkTimeOptimisation="0" targetName="Plugin Host" + recommendedWarnings="LLVM"/> + @@ -181,17 +178,17 @@ - - - - - - - + + + + + + + - diff --git a/extras/AudioPluginHost/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java b/extras/AudioPluginHost/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java deleted file mode 100644 index 0bb31cb5..00000000 --- a/extras/AudioPluginHost/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java +++ /dev/null @@ -1,971 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. - - JUCE is an open source library subject to commercial or open-source - licensing. - - The code included in this file is provided under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license. Permission - To use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted provided that the above copyright notice and - this permission notice appear in all copies. - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -package com.android.vending.billing; -/** - * InAppBillingService is the service that provides in-app billing version 3 and beyond. - * This service provides the following features: - * 1. Provides a new API to get details of in-app items published for the app including - * price, type, title and description. - * 2. The purchase flow is synchronous and purchase information is available immediately - * after it completes. - * 3. Purchase information of in-app purchases is maintained within the Google Play system - * till the purchase is consumed. - * 4. An API to consume a purchase of an inapp item. All purchases of one-time - * in-app items are consumable and thereafter can be purchased again. - * 5. An API to get current purchases of the user immediately. This will not contain any - * consumed purchases. - * - * All calls will give a response code with the following possible values - * RESULT_OK = 0 - success - * RESULT_USER_CANCELED = 1 - User pressed back or canceled a dialog - * RESULT_SERVICE_UNAVAILABLE = 2 - The network connection is down - * RESULT_BILLING_UNAVAILABLE = 3 - This billing API version is not supported for the type requested - * RESULT_ITEM_UNAVAILABLE = 4 - Requested SKU is not available for purchase - * RESULT_DEVELOPER_ERROR = 5 - Invalid arguments provided to the API - * RESULT_ERROR = 6 - Fatal error during the API action - * RESULT_ITEM_ALREADY_OWNED = 7 - Failure to purchase since item is already owned - * RESULT_ITEM_NOT_OWNED = 8 - Failure to consume since item is not owned - */ -public interface IInAppBillingService extends android.os.IInterface - { - /** Local-side IPC implementation stub class. */ - public static abstract class Stub extends android.os.Binder implements com.android.vending.billing.IInAppBillingService - { - private static final java.lang.String DESCRIPTOR = "com.android.vending.billing.IInAppBillingService"; - /** Construct the stub at attach it to the interface. */ - public Stub() - { - this.attachInterface(this, DESCRIPTOR); - } - /** - * Cast an IBinder object into an com.android.vending.billing.IInAppBillingService interface, - * generating a proxy if needed. - */ - public static com.android.vending.billing.IInAppBillingService asInterface(android.os.IBinder obj) - { - if ((obj==null)) { - return null; - } - android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR); - if (((iin!=null)&&(iin instanceof com.android.vending.billing.IInAppBillingService))) { - return ((com.android.vending.billing.IInAppBillingService)iin); - } - return new com.android.vending.billing.IInAppBillingService.Stub.Proxy(obj); - } - @Override public android.os.IBinder asBinder() - { - return this; - } - @Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException - { - switch (code) - { - case INTERFACE_TRANSACTION: - { - reply.writeString(DESCRIPTOR); - return true; - } - case TRANSACTION_isBillingSupported: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - int _result = this.isBillingSupported(_arg0, _arg1, _arg2); - reply.writeNoException(); - reply.writeInt(_result); - return true; - } - case TRANSACTION_getSkuDetails: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - android.os.Bundle _arg3; - if ((0!=data.readInt())) { - _arg3 = android.os.Bundle.CREATOR.createFromParcel(data); - } - else { - _arg3 = null; - } - android.os.Bundle _result = this.getSkuDetails(_arg0, _arg1, _arg2, _arg3); - reply.writeNoException(); - if ((_result!=null)) { - reply.writeInt(1); - _result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); - } - else { - reply.writeInt(0); - } - return true; - } - case TRANSACTION_getBuyIntent: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - java.lang.String _arg3; - _arg3 = data.readString(); - java.lang.String _arg4; - _arg4 = data.readString(); - android.os.Bundle _result = this.getBuyIntent(_arg0, _arg1, _arg2, _arg3, _arg4); - reply.writeNoException(); - if ((_result!=null)) { - reply.writeInt(1); - _result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); - } - else { - reply.writeInt(0); - } - return true; - } - case TRANSACTION_getPurchases: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - java.lang.String _arg3; - _arg3 = data.readString(); - android.os.Bundle _result = this.getPurchases(_arg0, _arg1, _arg2, _arg3); - reply.writeNoException(); - if ((_result!=null)) { - reply.writeInt(1); - _result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); - } - else { - reply.writeInt(0); - } - return true; - } - case TRANSACTION_consumePurchase: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - int _result = this.consumePurchase(_arg0, _arg1, _arg2); - reply.writeNoException(); - reply.writeInt(_result); - return true; - } - case TRANSACTION_stub: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - int _result = this.stub(_arg0, _arg1, _arg2); - reply.writeNoException(); - reply.writeInt(_result); - return true; - } - case TRANSACTION_getBuyIntentToReplaceSkus: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.util.List _arg2; - _arg2 = data.createStringArrayList(); - java.lang.String _arg3; - _arg3 = data.readString(); - java.lang.String _arg4; - _arg4 = data.readString(); - java.lang.String _arg5; - _arg5 = data.readString(); - android.os.Bundle _result = this.getBuyIntentToReplaceSkus(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); - reply.writeNoException(); - if ((_result!=null)) { - reply.writeInt(1); - _result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); - } - else { - reply.writeInt(0); - } - return true; - } - case TRANSACTION_getBuyIntentExtraParams: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - java.lang.String _arg3; - _arg3 = data.readString(); - java.lang.String _arg4; - _arg4 = data.readString(); - android.os.Bundle _arg5; - if ((0!=data.readInt())) { - _arg5 = android.os.Bundle.CREATOR.createFromParcel(data); - } - else { - _arg5 = null; - } - android.os.Bundle _result = this.getBuyIntentExtraParams(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); - reply.writeNoException(); - if ((_result!=null)) { - reply.writeInt(1); - _result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); - } - else { - reply.writeInt(0); - } - return true; - } - case TRANSACTION_getPurchaseHistory: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - java.lang.String _arg3; - _arg3 = data.readString(); - android.os.Bundle _arg4; - if ((0!=data.readInt())) { - _arg4 = android.os.Bundle.CREATOR.createFromParcel(data); - } - else { - _arg4 = null; - } - android.os.Bundle _result = this.getPurchaseHistory(_arg0, _arg1, _arg2, _arg3, _arg4); - reply.writeNoException(); - if ((_result!=null)) { - reply.writeInt(1); - _result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); - } - else { - reply.writeInt(0); - } - return true; - } - case TRANSACTION_isBillingSupportedExtraParams: - { - data.enforceInterface(DESCRIPTOR); - int _arg0; - _arg0 = data.readInt(); - java.lang.String _arg1; - _arg1 = data.readString(); - java.lang.String _arg2; - _arg2 = data.readString(); - android.os.Bundle _arg3; - if ((0!=data.readInt())) { - _arg3 = android.os.Bundle.CREATOR.createFromParcel(data); - } - else { - _arg3 = null; - } - int _result = this.isBillingSupportedExtraParams(_arg0, _arg1, _arg2, _arg3); - reply.writeNoException(); - reply.writeInt(_result); - return true; - } - } - return super.onTransact(code, data, reply, flags); - } - private static class Proxy implements com.android.vending.billing.IInAppBillingService - { - private android.os.IBinder mRemote; - Proxy(android.os.IBinder remote) - { - mRemote = remote; - } - @Override public android.os.IBinder asBinder() - { - return mRemote; - } - public java.lang.String getInterfaceDescriptor() - { - return DESCRIPTOR; - } - @Override public int isBillingSupported(int apiVersion, java.lang.String packageName, java.lang.String type) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - int _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(type); - mRemote.transact(Stub.TRANSACTION_isBillingSupported, _data, _reply, 0); - _reply.readException(); - _result = _reply.readInt(); - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - /** - * Provides details of a list of SKUs - * Given a list of SKUs of a valid type in the skusBundle, this returns a bundle - * with a list JSON strings containing the productId, price, title and description. - * This API can be called with a maximum of 20 SKUs. - * @param apiVersion billing API version that the app is using - * @param packageName the package name of the calling app - * @param type of the in-app items ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param skusBundle bundle containing a StringArrayList of SKUs with key "ITEM_ID_LIST" - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - * on failures. - * "DETAILS_LIST" with a StringArrayList containing purchase information - * in JSON format similar to: - * '{ "productId" : "exampleSku", - * "type" : "inapp", - * "price" : "$5.00", - * "price_currency": "USD", - * "price_amount_micros": 5000000, - * "title : "Example Title", - * "description" : "This is an example description" }' - */ - @Override public android.os.Bundle getSkuDetails(int apiVersion, java.lang.String packageName, java.lang.String type, android.os.Bundle skusBundle) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - android.os.Bundle _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(type); - if ((skusBundle!=null)) { - _data.writeInt(1); - skusBundle.writeToParcel(_data, 0); - } - else { - _data.writeInt(0); - } - mRemote.transact(Stub.TRANSACTION_getSkuDetails, _data, _reply, 0); - _reply.readException(); - if ((0!=_reply.readInt())) { - _result = android.os.Bundle.CREATOR.createFromParcel(_reply); - } - else { - _result = null; - } - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - /** - * Returns a pending intent to launch the purchase flow for an in-app item by providing a SKU, - * the type, a unique purchase token and an optional developer payload. - * @param apiVersion billing API version that the app is using - * @param packageName package name of the calling app - * @param sku the SKU of the in-app item as published in the developer console - * @param type of the in-app item being purchased ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param developerPayload optional argument to be sent back with the purchase information - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - * on failures. - * "BUY_INTENT" - PendingIntent to start the purchase flow - * - * The Pending intent should be launched with startIntentSenderForResult. When purchase flow - * has completed, the onActivityResult() will give a resultCode of OK or CANCELED. - * If the purchase is successful, the result data will contain the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response - * codes on failures. - * "INAPP_PURCHASE_DATA" - String in JSON format similar to - * '{"orderId":"12999763169054705758.1371079406387615", - * "packageName":"com.example.app", - * "productId":"exampleSku", - * "purchaseTime":1345678900000, - * "purchaseToken" : "122333444455555", - * "developerPayload":"example developer payload" }' - * "INAPP_DATA_SIGNATURE" - String containing the signature of the purchase data that - * was signed with the private key of the developer - */ - @Override public android.os.Bundle getBuyIntent(int apiVersion, java.lang.String packageName, java.lang.String sku, java.lang.String type, java.lang.String developerPayload) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - android.os.Bundle _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(sku); - _data.writeString(type); - _data.writeString(developerPayload); - mRemote.transact(Stub.TRANSACTION_getBuyIntent, _data, _reply, 0); - _reply.readException(); - if ((0!=_reply.readInt())) { - _result = android.os.Bundle.CREATOR.createFromParcel(_reply); - } - else { - _result = null; - } - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - /** - * Returns the current SKUs owned by the user of the type and package name specified along with - * purchase information and a signature of the data to be validated. - * This will return all SKUs that have been purchased in V3 and managed items purchased using - * V1 and V2 that have not been consumed. - * @param apiVersion billing API version that the app is using - * @param packageName package name of the calling app - * @param type of the in-app items being requested ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param continuationToken to be set as null for the first call, if the number of owned - * skus are too many, a continuationToken is returned in the response bundle. - * This method can be called again with the continuation token to get the next set of - * owned skus. - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - on failures. - * "INAPP_PURCHASE_ITEM_LIST" - StringArrayList containing the list of SKUs - * "INAPP_PURCHASE_DATA_LIST" - StringArrayList containing the purchase information - * "INAPP_DATA_SIGNATURE_LIST"- StringArrayList containing the signatures - * of the purchase information - * "INAPP_CONTINUATION_TOKEN" - String containing a continuation token for the - * next set of in-app purchases. Only set if the - * user has more owned skus than the current list. - */ - @Override public android.os.Bundle getPurchases(int apiVersion, java.lang.String packageName, java.lang.String type, java.lang.String continuationToken) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - android.os.Bundle _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(type); - _data.writeString(continuationToken); - mRemote.transact(Stub.TRANSACTION_getPurchases, _data, _reply, 0); - _reply.readException(); - if ((0!=_reply.readInt())) { - _result = android.os.Bundle.CREATOR.createFromParcel(_reply); - } - else { - _result = null; - } - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - @Override public int consumePurchase(int apiVersion, java.lang.String packageName, java.lang.String purchaseToken) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - int _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(purchaseToken); - mRemote.transact(Stub.TRANSACTION_consumePurchase, _data, _reply, 0); - _reply.readException(); - _result = _reply.readInt(); - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - @Override public int stub(int apiVersion, java.lang.String packageName, java.lang.String type) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - int _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(type); - mRemote.transact(Stub.TRANSACTION_stub, _data, _reply, 0); - _reply.readException(); - _result = _reply.readInt(); - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - /** - * Returns a pending intent to launch the purchase flow for upgrading or downgrading a - * subscription. The existing owned SKU(s) should be provided along with the new SKU that - * the user is upgrading or downgrading to. - * @param apiVersion billing API version that the app is using, must be 5 or later - * @param packageName package name of the calling app - * @param oldSkus the SKU(s) that the user is upgrading or downgrading from, - * if null or empty this method will behave like {@link #getBuyIntent} - * @param newSku the SKU that the user is upgrading or downgrading to - * @param type of the item being purchased, currently must be "subs" - * @param developerPayload optional argument to be sent back with the purchase information - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - * on failures. - * "BUY_INTENT" - PendingIntent to start the purchase flow - * - * The Pending intent should be launched with startIntentSenderForResult. When purchase flow - * has completed, the onActivityResult() will give a resultCode of OK or CANCELED. - * If the purchase is successful, the result data will contain the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response - * codes on failures. - * "INAPP_PURCHASE_DATA" - String in JSON format similar to - * '{"orderId":"12999763169054705758.1371079406387615", - * "packageName":"com.example.app", - * "productId":"exampleSku", - * "purchaseTime":1345678900000, - * "purchaseToken" : "122333444455555", - * "developerPayload":"example developer payload" }' - * "INAPP_DATA_SIGNATURE" - String containing the signature of the purchase data that - * was signed with the private key of the developer - */ - @Override public android.os.Bundle getBuyIntentToReplaceSkus(int apiVersion, java.lang.String packageName, java.util.List oldSkus, java.lang.String newSku, java.lang.String type, java.lang.String developerPayload) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - android.os.Bundle _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeStringList(oldSkus); - _data.writeString(newSku); - _data.writeString(type); - _data.writeString(developerPayload); - mRemote.transact(Stub.TRANSACTION_getBuyIntentToReplaceSkus, _data, _reply, 0); - _reply.readException(); - if ((0!=_reply.readInt())) { - _result = android.os.Bundle.CREATOR.createFromParcel(_reply); - } - else { - _result = null; - } - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - /** - * Returns a pending intent to launch the purchase flow for an in-app item. This method is - * a variant of the {@link #getBuyIntent} method and takes an additional {@code extraParams} - * parameter. This parameter is a Bundle of optional keys and values that affect the - * operation of the method. - * @param apiVersion billing API version that the app is using, must be 6 or later - * @param packageName package name of the calling app - * @param sku the SKU of the in-app item as published in the developer console - * @param type of the in-app item being purchased ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param developerPayload optional argument to be sent back with the purchase information - * @extraParams a Bundle with the following optional keys: - * "skusToReplace" - List - an optional list of SKUs that the user is - * upgrading or downgrading from. - * Pass this field if the purchase is upgrading or downgrading - * existing subscriptions. - * The specified SKUs are replaced with the SKUs that the user is - * purchasing. Google Play replaces the specified SKUs at the start of - * the next billing cycle. - * "replaceSkusProration" - Boolean - whether the user should be credited for any unused - * subscription time on the SKUs they are upgrading or downgrading. - * If you set this field to true, Google Play swaps out the old SKUs - * and credits the user with the unused value of their subscription - * time on a pro-rated basis. - * Google Play applies this credit to the new subscription, and does - * not begin billing the user for the new subscription until after - * the credit is used up. - * If you set this field to false, the user does not receive credit for - * any unused subscription time and the recurrence date does not - * change. - * Default value is true. Ignored if you do not pass skusToReplace. - * "accountId" - String - an optional obfuscated string that is uniquely - * associated with the user's account in your app. - * If you pass this value, Google Play can use it to detect irregular - * activity, such as many devices making purchases on the same - * account in a short period of time. - * Do not use the developer ID or the user's Google ID for this field. - * In addition, this field should not contain the user's ID in - * cleartext. - * We recommend that you use a one-way hash to generate a string from - * the user's ID, and store the hashed string in this field. - * "vr" - Boolean - an optional flag indicating whether the returned intent - * should start a VR purchase flow. The apiVersion must also be 7 or - * later to use this flag. - */ - @Override public android.os.Bundle getBuyIntentExtraParams(int apiVersion, java.lang.String packageName, java.lang.String sku, java.lang.String type, java.lang.String developerPayload, android.os.Bundle extraParams) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - android.os.Bundle _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(sku); - _data.writeString(type); - _data.writeString(developerPayload); - if ((extraParams!=null)) { - _data.writeInt(1); - extraParams.writeToParcel(_data, 0); - } - else { - _data.writeInt(0); - } - mRemote.transact(Stub.TRANSACTION_getBuyIntentExtraParams, _data, _reply, 0); - _reply.readException(); - if ((0!=_reply.readInt())) { - _result = android.os.Bundle.CREATOR.createFromParcel(_reply); - } - else { - _result = null; - } - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - /** - * Returns the most recent purchase made by the user for each SKU, even if that purchase is - * expired, canceled, or consumed. - * @param apiVersion billing API version that the app is using, must be 6 or later - * @param packageName package name of the calling app - * @param type of the in-app items being requested ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param continuationToken to be set as null for the first call, if the number of owned - * skus is too large, a continuationToken is returned in the response bundle. - * This method can be called again with the continuation token to get the next set of - * owned skus. - * @param extraParams a Bundle with extra params that would be appended into http request - * query string. Not used at this moment. Reserved for future functionality. - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value: RESULT_OK(0) if success, - * {@link IabHelper#BILLING_RESPONSE_RESULT_*} response codes on failures. - * - * "INAPP_PURCHASE_ITEM_LIST" - ArrayList containing the list of SKUs - * "INAPP_PURCHASE_DATA_LIST" - ArrayList containing the purchase information - * "INAPP_DATA_SIGNATURE_LIST"- ArrayList containing the signatures - * of the purchase information - * "INAPP_CONTINUATION_TOKEN" - String containing a continuation token for the - * next set of in-app purchases. Only set if the - * user has more owned skus than the current list. - */ - @Override public android.os.Bundle getPurchaseHistory(int apiVersion, java.lang.String packageName, java.lang.String type, java.lang.String continuationToken, android.os.Bundle extraParams) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - android.os.Bundle _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(type); - _data.writeString(continuationToken); - if ((extraParams!=null)) { - _data.writeInt(1); - extraParams.writeToParcel(_data, 0); - } - else { - _data.writeInt(0); - } - mRemote.transact(Stub.TRANSACTION_getPurchaseHistory, _data, _reply, 0); - _reply.readException(); - if ((0!=_reply.readInt())) { - _result = android.os.Bundle.CREATOR.createFromParcel(_reply); - } - else { - _result = null; - } - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - @Override public int isBillingSupportedExtraParams(int apiVersion, java.lang.String packageName, java.lang.String type, android.os.Bundle extraParams) throws android.os.RemoteException - { - android.os.Parcel _data = android.os.Parcel.obtain(); - android.os.Parcel _reply = android.os.Parcel.obtain(); - int _result; - try { - _data.writeInterfaceToken(DESCRIPTOR); - _data.writeInt(apiVersion); - _data.writeString(packageName); - _data.writeString(type); - if ((extraParams!=null)) { - _data.writeInt(1); - extraParams.writeToParcel(_data, 0); - } - else { - _data.writeInt(0); - } - mRemote.transact(Stub.TRANSACTION_isBillingSupportedExtraParams, _data, _reply, 0); - _reply.readException(); - _result = _reply.readInt(); - } - finally { - _reply.recycle(); - _data.recycle(); - } - return _result; - } - } - static final int TRANSACTION_isBillingSupported = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0); - static final int TRANSACTION_getSkuDetails = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1); - static final int TRANSACTION_getBuyIntent = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2); - static final int TRANSACTION_getPurchases = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3); - static final int TRANSACTION_consumePurchase = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4); - static final int TRANSACTION_stub = (android.os.IBinder.FIRST_CALL_TRANSACTION + 5); - static final int TRANSACTION_getBuyIntentToReplaceSkus = (android.os.IBinder.FIRST_CALL_TRANSACTION + 6); - static final int TRANSACTION_getBuyIntentExtraParams = (android.os.IBinder.FIRST_CALL_TRANSACTION + 7); - static final int TRANSACTION_getPurchaseHistory = (android.os.IBinder.FIRST_CALL_TRANSACTION + 8); - static final int TRANSACTION_isBillingSupportedExtraParams = (android.os.IBinder.FIRST_CALL_TRANSACTION + 9); - } - public int isBillingSupported(int apiVersion, java.lang.String packageName, java.lang.String type) throws android.os.RemoteException; - /** - * Provides details of a list of SKUs - * Given a list of SKUs of a valid type in the skusBundle, this returns a bundle - * with a list JSON strings containing the productId, price, title and description. - * This API can be called with a maximum of 20 SKUs. - * @param apiVersion billing API version that the app is using - * @param packageName the package name of the calling app - * @param type of the in-app items ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param skusBundle bundle containing a StringArrayList of SKUs with key "ITEM_ID_LIST" - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - * on failures. - * "DETAILS_LIST" with a StringArrayList containing purchase information - * in JSON format similar to: - * '{ "productId" : "exampleSku", - * "type" : "inapp", - * "price" : "$5.00", - * "price_currency": "USD", - * "price_amount_micros": 5000000, - * "title : "Example Title", - * "description" : "This is an example description" }' - */ - public android.os.Bundle getSkuDetails(int apiVersion, java.lang.String packageName, java.lang.String type, android.os.Bundle skusBundle) throws android.os.RemoteException; - /** - * Returns a pending intent to launch the purchase flow for an in-app item by providing a SKU, - * the type, a unique purchase token and an optional developer payload. - * @param apiVersion billing API version that the app is using - * @param packageName package name of the calling app - * @param sku the SKU of the in-app item as published in the developer console - * @param type of the in-app item being purchased ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param developerPayload optional argument to be sent back with the purchase information - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - * on failures. - * "BUY_INTENT" - PendingIntent to start the purchase flow - * - * The Pending intent should be launched with startIntentSenderForResult. When purchase flow - * has completed, the onActivityResult() will give a resultCode of OK or CANCELED. - * If the purchase is successful, the result data will contain the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response - * codes on failures. - * "INAPP_PURCHASE_DATA" - String in JSON format similar to - * '{"orderId":"12999763169054705758.1371079406387615", - * "packageName":"com.example.app", - * "productId":"exampleSku", - * "purchaseTime":1345678900000, - * "purchaseToken" : "122333444455555", - * "developerPayload":"example developer payload" }' - * "INAPP_DATA_SIGNATURE" - String containing the signature of the purchase data that - * was signed with the private key of the developer - */ - public android.os.Bundle getBuyIntent(int apiVersion, java.lang.String packageName, java.lang.String sku, java.lang.String type, java.lang.String developerPayload) throws android.os.RemoteException; - /** - * Returns the current SKUs owned by the user of the type and package name specified along with - * purchase information and a signature of the data to be validated. - * This will return all SKUs that have been purchased in V3 and managed items purchased using - * V1 and V2 that have not been consumed. - * @param apiVersion billing API version that the app is using - * @param packageName package name of the calling app - * @param type of the in-app items being requested ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param continuationToken to be set as null for the first call, if the number of owned - * skus are too many, a continuationToken is returned in the response bundle. - * This method can be called again with the continuation token to get the next set of - * owned skus. - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - on failures. - * "INAPP_PURCHASE_ITEM_LIST" - StringArrayList containing the list of SKUs - * "INAPP_PURCHASE_DATA_LIST" - StringArrayList containing the purchase information - * "INAPP_DATA_SIGNATURE_LIST"- StringArrayList containing the signatures - * of the purchase information - * "INAPP_CONTINUATION_TOKEN" - String containing a continuation token for the - * next set of in-app purchases. Only set if the - * user has more owned skus than the current list. - */ - public android.os.Bundle getPurchases(int apiVersion, java.lang.String packageName, java.lang.String type, java.lang.String continuationToken) throws android.os.RemoteException; - public int consumePurchase(int apiVersion, java.lang.String packageName, java.lang.String purchaseToken) throws android.os.RemoteException; - public int stub(int apiVersion, java.lang.String packageName, java.lang.String type) throws android.os.RemoteException; - /** - * Returns a pending intent to launch the purchase flow for upgrading or downgrading a - * subscription. The existing owned SKU(s) should be provided along with the new SKU that - * the user is upgrading or downgrading to. - * @param apiVersion billing API version that the app is using, must be 5 or later - * @param packageName package name of the calling app - * @param oldSkus the SKU(s) that the user is upgrading or downgrading from, - * if null or empty this method will behave like {@link #getBuyIntent} - * @param newSku the SKU that the user is upgrading or downgrading to - * @param type of the item being purchased, currently must be "subs" - * @param developerPayload optional argument to be sent back with the purchase information - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes - * on failures. - * "BUY_INTENT" - PendingIntent to start the purchase flow - * - * The Pending intent should be launched with startIntentSenderForResult. When purchase flow - * has completed, the onActivityResult() will give a resultCode of OK or CANCELED. - * If the purchase is successful, the result data will contain the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response - * codes on failures. - * "INAPP_PURCHASE_DATA" - String in JSON format similar to - * '{"orderId":"12999763169054705758.1371079406387615", - * "packageName":"com.example.app", - * "productId":"exampleSku", - * "purchaseTime":1345678900000, - * "purchaseToken" : "122333444455555", - * "developerPayload":"example developer payload" }' - * "INAPP_DATA_SIGNATURE" - String containing the signature of the purchase data that - * was signed with the private key of the developer - */ - public android.os.Bundle getBuyIntentToReplaceSkus(int apiVersion, java.lang.String packageName, java.util.List oldSkus, java.lang.String newSku, java.lang.String type, java.lang.String developerPayload) throws android.os.RemoteException; - /** - * Returns a pending intent to launch the purchase flow for an in-app item. This method is - * a variant of the {@link #getBuyIntent} method and takes an additional {@code extraParams} - * parameter. This parameter is a Bundle of optional keys and values that affect the - * operation of the method. - * @param apiVersion billing API version that the app is using, must be 6 or later - * @param packageName package name of the calling app - * @param sku the SKU of the in-app item as published in the developer console - * @param type of the in-app item being purchased ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param developerPayload optional argument to be sent back with the purchase information - * @extraParams a Bundle with the following optional keys: - * "skusToReplace" - List - an optional list of SKUs that the user is - * upgrading or downgrading from. - * Pass this field if the purchase is upgrading or downgrading - * existing subscriptions. - * The specified SKUs are replaced with the SKUs that the user is - * purchasing. Google Play replaces the specified SKUs at the start of - * the next billing cycle. - * "replaceSkusProration" - Boolean - whether the user should be credited for any unused - * subscription time on the SKUs they are upgrading or downgrading. - * If you set this field to true, Google Play swaps out the old SKUs - * and credits the user with the unused value of their subscription - * time on a pro-rated basis. - * Google Play applies this credit to the new subscription, and does - * not begin billing the user for the new subscription until after - * the credit is used up. - * If you set this field to false, the user does not receive credit for - * any unused subscription time and the recurrence date does not - * change. - * Default value is true. Ignored if you do not pass skusToReplace. - * "accountId" - String - an optional obfuscated string that is uniquely - * associated with the user's account in your app. - * If you pass this value, Google Play can use it to detect irregular - * activity, such as many devices making purchases on the same - * account in a short period of time. - * Do not use the developer ID or the user's Google ID for this field. - * In addition, this field should not contain the user's ID in - * cleartext. - * We recommend that you use a one-way hash to generate a string from - * the user's ID, and store the hashed string in this field. - * "vr" - Boolean - an optional flag indicating whether the returned intent - * should start a VR purchase flow. The apiVersion must also be 7 or - * later to use this flag. - */ - public android.os.Bundle getBuyIntentExtraParams(int apiVersion, java.lang.String packageName, java.lang.String sku, java.lang.String type, java.lang.String developerPayload, android.os.Bundle extraParams) throws android.os.RemoteException; - /** - * Returns the most recent purchase made by the user for each SKU, even if that purchase is - * expired, canceled, or consumed. - * @param apiVersion billing API version that the app is using, must be 6 or later - * @param packageName package name of the calling app - * @param type of the in-app items being requested ("inapp" for one-time purchases - * and "subs" for subscriptions) - * @param continuationToken to be set as null for the first call, if the number of owned - * skus is too large, a continuationToken is returned in the response bundle. - * This method can be called again with the continuation token to get the next set of - * owned skus. - * @param extraParams a Bundle with extra params that would be appended into http request - * query string. Not used at this moment. Reserved for future functionality. - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value: RESULT_OK(0) if success, - * {@link IabHelper#BILLING_RESPONSE_RESULT_*} response codes on failures. - * - * "INAPP_PURCHASE_ITEM_LIST" - ArrayList containing the list of SKUs - * "INAPP_PURCHASE_DATA_LIST" - ArrayList containing the purchase information - * "INAPP_DATA_SIGNATURE_LIST"- ArrayList containing the signatures - * of the purchase information - * "INAPP_CONTINUATION_TOKEN" - String containing a continuation token for the - * next set of in-app purchases. Only set if the - * user has more owned skus than the current list. - */ - public android.os.Bundle getPurchaseHistory(int apiVersion, java.lang.String packageName, java.lang.String type, java.lang.String continuationToken, android.os.Bundle extraParams) throws android.os.RemoteException; - public int isBillingSupportedExtraParams(int apiVersion, java.lang.String packageName, java.lang.String type, android.os.Bundle extraParams) throws android.os.RemoteException; - } diff --git a/extras/AudioPluginHost/Builds/Android/app/src/main/java/com/roli/juce/pluginhost/AudioPluginHost.java b/extras/AudioPluginHost/Builds/Android/app/src/main/java/com/roli/juce/pluginhost/AudioPluginHost.java deleted file mode 100644 index 64ef7164..00000000 --- a/extras/AudioPluginHost/Builds/Android/app/src/main/java/com/roli/juce/pluginhost/AudioPluginHost.java +++ /dev/null @@ -1,3166 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. - - JUCE is an open source library subject to commercial or open-source - licensing. - - The code included in this file is provided under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license. Permission - To use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted provided that the above copyright notice and - this permission notice appear in all copies. - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -package com.roli.juce.pluginhost; - -import android.app.Activity; -import android.app.AlertDialog; -import android.content.DialogInterface; -import android.content.Context; -import android.content.Intent; -import android.content.res.Configuration; -import android.content.pm.PackageInfo; -import android.content.pm.PackageManager; -import android.hardware.camera2.*; -import android.database.ContentObserver; -import android.media.session.*; -import android.media.MediaMetadata; -import android.net.http.SslError; -import android.net.Uri; -import android.os.Bundle; -import android.os.Looper; -import android.os.Handler; -import android.os.Message; -import android.os.ParcelUuid; -import android.os.Environment; -import android.view.*; -import android.view.inputmethod.BaseInputConnection; -import android.view.inputmethod.EditorInfo; -import android.view.inputmethod.InputConnection; -import android.view.inputmethod.InputMethodManager; -import android.graphics.*; -import android.text.ClipboardManager; -import android.text.InputType; -import android.util.DisplayMetrics; -import android.util.Log; -import android.util.Pair; -import android.webkit.SslErrorHandler; -import android.webkit.WebChromeClient; -import android.webkit.WebResourceError; -import android.webkit.WebResourceRequest; -import android.webkit.WebResourceResponse; -import android.webkit.WebView; -import android.webkit.WebViewClient; -import java.lang.Runnable; -import java.lang.ref.WeakReference; -import java.lang.reflect.*; -import java.util.*; -import java.io.*; -import java.net.URL; -import java.net.HttpURLConnection; -import android.media.AudioManager; -import android.Manifest; -import java.util.concurrent.CancellationException; -import java.util.concurrent.Future; -import java.util.concurrent.Executors; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.Callable; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.locks.ReentrantLock; -import java.util.concurrent.atomic.*; - -import android.media.midi.*; -import android.bluetooth.*; -import android.bluetooth.le.*; - - -//============================================================================== -public class AudioPluginHost extends Activity -{ - //============================================================================== - static - { - System.loadLibrary ("juce_jni"); - } - - //============================================================================== - public boolean isPermissionDeclaredInManifest (int permissionID) - { - return isPermissionDeclaredInManifest (getAndroidPermissionName (permissionID)); - } - - public boolean isPermissionDeclaredInManifest (String permissionToCheck) - { - try - { - PackageInfo info = getPackageManager().getPackageInfo(getApplicationContext().getPackageName(), PackageManager.GET_PERMISSIONS); - - if (info.requestedPermissions != null) - for (String permission : info.requestedPermissions) - if (permission.equals (permissionToCheck)) - return true; - } - catch (PackageManager.NameNotFoundException e) - { - Log.d ("JUCE", "isPermissionDeclaredInManifest: PackageManager.NameNotFoundException = " + e.toString()); - } - - Log.d ("JUCE", "isPermissionDeclaredInManifest: could not find requested permission " + permissionToCheck); - return false; - } - - //============================================================================== - // these have to match the values of enum PermissionID in C++ class RuntimePermissions: - private static final int JUCE_PERMISSIONS_RECORD_AUDIO = 1; - private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2; - private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3; - private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4; - private static final int JUCE_PERMISSIONS_CAMERA = 5; - - private static String getAndroidPermissionName (int permissionID) - { - switch (permissionID) - { - case JUCE_PERMISSIONS_RECORD_AUDIO: return Manifest.permission.RECORD_AUDIO; - case JUCE_PERMISSIONS_BLUETOOTH_MIDI: return Manifest.permission.ACCESS_COARSE_LOCATION; - // use string value as this is not defined in SDKs < 16 - case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE"; - case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE; - case JUCE_PERMISSIONS_CAMERA: return Manifest.permission.CAMERA; - } - - // unknown permission ID! - assert false; - return new String(); - } - - public boolean isPermissionGranted (int permissionID) - { - return getApplicationContext().checkCallingOrSelfPermission (getAndroidPermissionName (permissionID)) == PackageManager.PERMISSION_GRANTED; - } - - private Map permissionCallbackPtrMap; - - public void requestRuntimePermission (int permissionID, long ptrToCallback) - { - String permissionName = getAndroidPermissionName (permissionID); - - if (getApplicationContext().checkCallingOrSelfPermission (permissionName) != PackageManager.PERMISSION_GRANTED) - { - // remember callbackPtr, request permissions, and let onRequestPermissionResult call callback asynchronously - permissionCallbackPtrMap.put (permissionID, ptrToCallback); - requestPermissionsCompat (new String[]{permissionName}, permissionID); - } - else - { - // permissions were already granted before, we can call callback directly - androidRuntimePermissionsCallback (true, ptrToCallback); - } - } - - private native void androidRuntimePermissionsCallback (boolean permissionWasGranted, long ptrToCallback); - - @Override - public void onRequestPermissionsResult (int permissionID, String permissions[], int[] grantResults) - { - boolean permissionsGranted = (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED); - - if (! permissionsGranted) - Log.d ("JUCE", "onRequestPermissionsResult: runtime permission was DENIED: " + getAndroidPermissionName (permissionID)); - - Long ptrToCallback = permissionCallbackPtrMap.get (permissionID); - permissionCallbackPtrMap.remove (permissionID); - androidRuntimePermissionsCallback (permissionsGranted, ptrToCallback); - } - - //============================================================================== - public interface JuceMidiPort - { - boolean isInputPort(); - - // start, stop does nothing on an output port - void start(); - void stop(); - - void close(); - - // send will do nothing on an input port - void sendMidi (byte[] msg, int offset, int count); - } - - //============================================================================== - //============================================================================== - public class BluetoothManager extends ScanCallback - { - BluetoothManager() - { - } - - public String[] getMidiBluetoothAddresses() - { - return bluetoothMidiDevices.toArray (new String[bluetoothMidiDevices.size()]); - } - - public String getHumanReadableStringForBluetoothAddress (String address) - { - BluetoothDevice btDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice (address); - return btDevice.getName(); - } - - public int getBluetoothDeviceStatus (String address) - { - return getAndroidMidiDeviceManager().getBluetoothDeviceStatus (address); - } - - public void startStopScan (boolean shouldStart) - { - BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); - - if (bluetoothAdapter == null) - { - Log.d ("JUCE", "BluetoothManager error: could not get default Bluetooth adapter"); - return; - } - - BluetoothLeScanner bluetoothLeScanner = bluetoothAdapter.getBluetoothLeScanner(); - - if (bluetoothLeScanner == null) - { - Log.d ("JUCE", "BluetoothManager error: could not get Bluetooth LE scanner"); - return; - } - - if (shouldStart) - { - ScanFilter.Builder scanFilterBuilder = new ScanFilter.Builder(); - scanFilterBuilder.setServiceUuid (ParcelUuid.fromString (bluetoothLEMidiServiceUUID)); - - ScanSettings.Builder scanSettingsBuilder = new ScanSettings.Builder(); - scanSettingsBuilder.setCallbackType (ScanSettings.CALLBACK_TYPE_ALL_MATCHES) - .setScanMode (ScanSettings.SCAN_MODE_LOW_POWER) - .setScanMode (ScanSettings.MATCH_MODE_STICKY); - - bluetoothLeScanner.startScan (Arrays.asList (scanFilterBuilder.build()), - scanSettingsBuilder.build(), - this); - } - else - { - bluetoothLeScanner.stopScan (this); - } - } - - public boolean pairBluetoothMidiDevice(String address) - { - BluetoothDevice btDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice (address); - - if (btDevice == null) - { - Log.d ("JUCE", "failed to create buletooth device from address"); - return false; - } - - return getAndroidMidiDeviceManager().pairBluetoothDevice (btDevice); - } - - public void unpairBluetoothMidiDevice (String address) - { - getAndroidMidiDeviceManager().unpairBluetoothDevice (address); - } - - public void onScanFailed (int errorCode) - { - } - - public void onScanResult (int callbackType, ScanResult result) - { - if (callbackType == ScanSettings.CALLBACK_TYPE_ALL_MATCHES - || callbackType == ScanSettings.CALLBACK_TYPE_FIRST_MATCH) - { - BluetoothDevice device = result.getDevice(); - - if (device != null) - bluetoothMidiDevices.add (device.getAddress()); - } - - if (callbackType == ScanSettings.CALLBACK_TYPE_MATCH_LOST) - { - Log.d ("JUCE", "ScanSettings.CALLBACK_TYPE_MATCH_LOST"); - BluetoothDevice device = result.getDevice(); - - if (device != null) - { - bluetoothMidiDevices.remove (device.getAddress()); - unpairBluetoothMidiDevice (device.getAddress()); - } - } - } - - public void onBatchScanResults (List results) - { - for (ScanResult result : results) - onScanResult (ScanSettings.CALLBACK_TYPE_ALL_MATCHES, result); - } - - private BluetoothLeScanner scanner; - private static final String bluetoothLEMidiServiceUUID = "03B80E5A-EDE8-4B33-A751-6CE34EC4C700"; - - private HashSet bluetoothMidiDevices = new HashSet(); - } - - public static class JuceMidiInputPort extends MidiReceiver implements JuceMidiPort - { - private native void handleReceive (long host, byte[] msg, int offset, int count, long timestamp); - - public JuceMidiInputPort (MidiDeviceManager mm, MidiOutputPort actualPort, MidiPortPath portPathToUse, long hostToUse) - { - owner = mm; - androidPort = actualPort; - portPath = portPathToUse; - juceHost = hostToUse; - isConnected = false; - } - - @Override - protected void finalize() throws Throwable - { - close(); - super.finalize(); - } - - @Override - public boolean isInputPort() - { - return true; - } - - @Override - public void start() - { - if (owner != null && androidPort != null && ! isConnected) { - androidPort.connect(this); - isConnected = true; - } - } - - @Override - public void stop() - { - if (owner != null && androidPort != null && isConnected) { - androidPort.disconnect(this); - isConnected = false; - } - } - - @Override - public void close() - { - if (androidPort != null) { - try { - androidPort.close(); - } catch (IOException exception) { - Log.d("JUCE", "IO Exception while closing port"); - } - } - - if (owner != null) - owner.removePort (portPath); - - owner = null; - androidPort = null; - } - - @Override - public void onSend (byte[] msg, int offset, int count, long timestamp) - { - if (count > 0) - handleReceive (juceHost, msg, offset, count, timestamp); - } - - @Override - public void onFlush() - {} - - @Override - public void sendMidi (byte[] msg, int offset, int count) - { - } - - MidiDeviceManager owner; - MidiOutputPort androidPort; - MidiPortPath portPath; - long juceHost; - boolean isConnected; - } - - public static class JuceMidiOutputPort implements JuceMidiPort - { - public JuceMidiOutputPort (MidiDeviceManager mm, MidiInputPort actualPort, MidiPortPath portPathToUse) - { - owner = mm; - androidPort = actualPort; - portPath = portPathToUse; - } - - @Override - protected void finalize() throws Throwable - { - close(); - super.finalize(); - } - - @Override - public boolean isInputPort() - { - return false; - } - - @Override - public void start() - { - } - - @Override - public void stop() - { - } - - @Override - public void sendMidi (byte[] msg, int offset, int count) - { - if (androidPort != null) - { - try { - androidPort.send(msg, offset, count); - } catch (IOException exception) - { - Log.d ("JUCE", "send midi had IO exception"); - } - } - } - - @Override - public void close() - { - if (androidPort != null) { - try { - androidPort.close(); - } catch (IOException exception) { - Log.d("JUCE", "IO Exception while closing port"); - } - } - - if (owner != null) - owner.removePort (portPath); - - owner = null; - androidPort = null; - } - - MidiDeviceManager owner; - MidiInputPort androidPort; - MidiPortPath portPath; - } - - private static class MidiPortPath extends Object - { - public MidiPortPath (int deviceIdToUse, boolean direction, int androidIndex) - { - deviceId = deviceIdToUse; - isInput = direction; - portIndex = androidIndex; - - } - - public int deviceId; - public int portIndex; - public boolean isInput; - - @Override - public int hashCode() - { - Integer i = new Integer ((deviceId * 128) + (portIndex < 128 ? portIndex : 127)); - return i.hashCode() * (isInput ? -1 : 1); - } - - @Override - public boolean equals (Object obj) - { - if (obj == null) - return false; - - if (getClass() != obj.getClass()) - return false; - - MidiPortPath other = (MidiPortPath) obj; - return (portIndex == other.portIndex && isInput == other.isInput && deviceId == other.deviceId); - } - } - - //============================================================================== - public class MidiDeviceManager extends MidiManager.DeviceCallback implements MidiManager.OnDeviceOpenedListener - { - //============================================================================== - private class DummyBluetoothGattCallback extends BluetoothGattCallback - { - public DummyBluetoothGattCallback (MidiDeviceManager mm) - { - super(); - owner = mm; - } - - public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) - { - if (newState == BluetoothProfile.STATE_CONNECTED) - { - gatt.requestConnectionPriority(BluetoothGatt.CONNECTION_PRIORITY_HIGH); - owner.pairBluetoothDeviceStepTwo (gatt.getDevice()); - } - } - public void onServicesDiscovered(BluetoothGatt gatt, int status) {} - public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {} - public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {} - public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {} - public void onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {} - public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {} - public void onReliableWriteCompleted(BluetoothGatt gatt, int status) {} - public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) {} - public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) {} - - private MidiDeviceManager owner; - } - - //============================================================================== - private class MidiDeviceOpenTask extends java.util.TimerTask - { - public MidiDeviceOpenTask (MidiDeviceManager deviceManager, MidiDevice device, BluetoothGatt gattToUse) - { - owner = deviceManager; - midiDevice = device; - btGatt = gattToUse; - } - - @Override - public boolean cancel() - { - synchronized (MidiDeviceOpenTask.class) - { - owner = null; - boolean retval = super.cancel(); - - if (btGatt != null) - { - btGatt.disconnect(); - btGatt.close(); - - btGatt = null; - } - - if (midiDevice != null) - { - try - { - midiDevice.close(); - } - catch (IOException e) - {} - - midiDevice = null; - } - - return retval; - } - } - - public String getBluetoothAddress() - { - synchronized (MidiDeviceOpenTask.class) - { - if (midiDevice != null) - { - MidiDeviceInfo info = midiDevice.getInfo(); - if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH) - { - BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); - if (btDevice != null) - return btDevice.getAddress(); - } - } - } - - return ""; - } - - public BluetoothGatt getGatt() { return btGatt; } - - public int getID() - { - return midiDevice.getInfo().getId(); - } - - @Override - public void run() - { - synchronized (MidiDeviceOpenTask.class) - { - if (owner != null && midiDevice != null) - owner.onDeviceOpenedDelayed (midiDevice); - } - } - - private MidiDeviceManager owner; - private MidiDevice midiDevice; - private BluetoothGatt btGatt; - } - - //============================================================================== - public MidiDeviceManager() - { - manager = (MidiManager) getSystemService (MIDI_SERVICE); - - if (manager == null) - { - Log.d ("JUCE", "MidiDeviceManager error: could not get MidiManager system service"); - return; - } - - openPorts = new HashMap> (); - midiDevices = new ArrayList>(); - openTasks = new HashMap(); - btDevicesPairing = new HashMap(); - - MidiDeviceInfo[] foundDevices = manager.getDevices(); - for (MidiDeviceInfo info : foundDevices) - onDeviceAdded (info); - - manager.registerDeviceCallback (this, null); - } - - protected void finalize() throws Throwable - { - manager.unregisterDeviceCallback (this); - - synchronized (MidiDeviceManager.class) - { - btDevicesPairing.clear(); - - for (Integer deviceID : openTasks.keySet()) - openTasks.get (deviceID).cancel(); - - openTasks = null; - } - - for (MidiPortPath key : openPorts.keySet()) - openPorts.get (key).get().close(); - - openPorts = null; - - for (Pair device : midiDevices) - { - if (device.second != null) - { - device.second.disconnect(); - device.second.close(); - } - - device.first.close(); - } - - midiDevices.clear(); - - super.finalize(); - } - - public String[] getJuceAndroidMidiInputDevices() - { - return getJuceAndroidMidiDevices (MidiDeviceInfo.PortInfo.TYPE_OUTPUT); - } - - public String[] getJuceAndroidMidiOutputDevices() - { - return getJuceAndroidMidiDevices (MidiDeviceInfo.PortInfo.TYPE_INPUT); - } - - private String[] getJuceAndroidMidiDevices (int portType) - { - // only update the list when JUCE asks for a new list - synchronized (MidiDeviceManager.class) - { - deviceInfos = getDeviceInfos(); - } - - ArrayList portNames = new ArrayList(); - - int index = 0; - for (MidiPortPath portInfo = getPortPathForJuceIndex (portType, index); portInfo != null; portInfo = getPortPathForJuceIndex (portType, ++index)) - portNames.add (getPortName (portInfo)); - - String[] names = new String[portNames.size()]; - return portNames.toArray (names); - } - - private JuceMidiPort openMidiPortWithJuceIndex (int index, long host, boolean isInput) - { - synchronized (MidiDeviceManager.class) - { - int portTypeToFind = (isInput ? MidiDeviceInfo.PortInfo.TYPE_OUTPUT : MidiDeviceInfo.PortInfo.TYPE_INPUT); - MidiPortPath portInfo = getPortPathForJuceIndex (portTypeToFind, index); - - if (portInfo != null) - { - // ports must be opened exclusively! - if (openPorts.containsKey (portInfo)) - return null; - - Pair devicePair = getMidiDevicePairForId (portInfo.deviceId); - - if (devicePair != null) - { - MidiDevice device = devicePair.first; - if (device != null) - { - JuceMidiPort juceMidiPort = null; - - if (isInput) - { - MidiOutputPort outputPort = device.openOutputPort(portInfo.portIndex); - - if (outputPort != null) - juceMidiPort = new JuceMidiInputPort(this, outputPort, portInfo, host); - } - else - { - MidiInputPort inputPort = device.openInputPort(portInfo.portIndex); - - if (inputPort != null) - juceMidiPort = new JuceMidiOutputPort(this, inputPort, portInfo); - } - - if (juceMidiPort != null) - { - openPorts.put(portInfo, new WeakReference(juceMidiPort)); - - return juceMidiPort; - } - } - } - } - } - - return null; - } - - public JuceMidiPort openMidiInputPortWithJuceIndex (int index, long host) - { - return openMidiPortWithJuceIndex (index, host, true); - } - - public JuceMidiPort openMidiOutputPortWithJuceIndex (int index) - { - return openMidiPortWithJuceIndex (index, 0, false); - } - - /* 0: unpaired, 1: paired, 2: pairing */ - public int getBluetoothDeviceStatus (String address) - { - synchronized (MidiDeviceManager.class) - { - if (! address.isEmpty()) - { - if (findMidiDeviceForBluetoothAddress (address) != null) - return 1; - - if (btDevicesPairing.containsKey (address)) - return 2; - - if (findOpenTaskForBluetoothAddress (address) != null) - return 2; - } - } - - return 0; - } - - public boolean pairBluetoothDevice (BluetoothDevice btDevice) - { - String btAddress = btDevice.getAddress(); - if (btAddress.isEmpty()) - return false; - - synchronized (MidiDeviceManager.class) - { - if (getBluetoothDeviceStatus (btAddress) != 0) - return false; - - - btDevicesPairing.put (btDevice.getAddress(), null); - BluetoothGatt gatt = btDevice.connectGatt (getApplicationContext(), true, new DummyBluetoothGattCallback (this)); - - if (gatt != null) - { - btDevicesPairing.put (btDevice.getAddress(), gatt); - } - else - { - pairBluetoothDeviceStepTwo (btDevice); - } - } - - return true; - } - - public void pairBluetoothDeviceStepTwo (BluetoothDevice btDevice) - { - manager.openBluetoothDevice(btDevice, this, null); - } - - public void unpairBluetoothDevice (String address) - { - if (address.isEmpty()) - return; - - synchronized (MidiDeviceManager.class) - { - if (btDevicesPairing.containsKey (address)) - { - BluetoothGatt gatt = btDevicesPairing.get (address); - if (gatt != null) - { - gatt.disconnect(); - gatt.close(); - } - - btDevicesPairing.remove (address); - } - - MidiDeviceOpenTask openTask = findOpenTaskForBluetoothAddress (address); - if (openTask != null) - { - int deviceID = openTask.getID(); - openTask.cancel(); - openTasks.remove (deviceID); - } - - Pair midiDevicePair = findMidiDeviceForBluetoothAddress (address); - if (midiDevicePair != null) - { - MidiDevice midiDevice = midiDevicePair.first; - onDeviceRemoved (midiDevice.getInfo()); - - try { - midiDevice.close(); - } - catch (IOException exception) - { - Log.d ("JUCE", "IOException while closing midi device"); - } - } - } - } - - private Pair findMidiDeviceForBluetoothAddress (String address) - { - for (Pair midiDevice : midiDevices) - { - MidiDeviceInfo info = midiDevice.first.getInfo(); - if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH) - { - BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); - if (btDevice != null && btDevice.getAddress().equals (address)) - return midiDevice; - } - } - - return null; - } - - private MidiDeviceOpenTask findOpenTaskForBluetoothAddress (String address) - { - for (Integer deviceID : openTasks.keySet()) - { - MidiDeviceOpenTask openTask = openTasks.get (deviceID); - if (openTask.getBluetoothAddress().equals (address)) - return openTask; - } - - return null; - } - - public void removePort (MidiPortPath path) - { - openPorts.remove (path); - } - - public String getInputPortNameForJuceIndex (int index) - { - MidiPortPath portInfo = getPortPathForJuceIndex (MidiDeviceInfo.PortInfo.TYPE_OUTPUT, index); - if (portInfo != null) - return getPortName (portInfo); - - return ""; - } - - public String getOutputPortNameForJuceIndex (int index) - { - MidiPortPath portInfo = getPortPathForJuceIndex (MidiDeviceInfo.PortInfo.TYPE_INPUT, index); - if (portInfo != null) - return getPortName (portInfo); - - return ""; - } - - public void onDeviceAdded (MidiDeviceInfo info) - { - // only add standard midi devices - if (info.getType() == info.TYPE_BLUETOOTH) - return; - - manager.openDevice (info, this, null); - } - - public void onDeviceRemoved (MidiDeviceInfo info) - { - synchronized (MidiDeviceManager.class) - { - Pair devicePair = getMidiDevicePairForId (info.getId()); - - if (devicePair != null) - { - MidiDevice midiDevice = devicePair.first; - BluetoothGatt gatt = devicePair.second; - - // close all ports that use this device - boolean removedPort = true; - - while (removedPort == true) - { - removedPort = false; - for (MidiPortPath key : openPorts.keySet()) - { - if (key.deviceId == info.getId()) - { - openPorts.get(key).get().close(); - removedPort = true; - break; - } - } - } - - if (gatt != null) - { - gatt.disconnect(); - gatt.close(); - } - - midiDevices.remove (devicePair); - } - } - } - - public void onDeviceStatusChanged (MidiDeviceStatus status) - { - } - - @Override - public void onDeviceOpened (MidiDevice theDevice) - { - synchronized (MidiDeviceManager.class) - { - MidiDeviceInfo info = theDevice.getInfo(); - int deviceID = info.getId(); - BluetoothGatt gatt = null; - boolean isBluetooth = false; - - if (! openTasks.containsKey (deviceID)) - { - if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH) - { - isBluetooth = true; - BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); - if (btDevice != null) - { - String btAddress = btDevice.getAddress(); - if (btDevicesPairing.containsKey (btAddress)) - { - gatt = btDevicesPairing.get (btAddress); - btDevicesPairing.remove (btAddress); - } - else - { - // unpair was called in the mean time - try - { - Pair midiDevicePair = findMidiDeviceForBluetoothAddress (btDevice.getAddress()); - if (midiDevicePair != null) - { - gatt = midiDevicePair.second; - - if (gatt != null) - { - gatt.disconnect(); - gatt.close(); - } - } - - theDevice.close(); - } - catch (IOException e) - {} - - return; - } - } - } - - MidiDeviceOpenTask openTask = new MidiDeviceOpenTask (this, theDevice, gatt); - openTasks.put (deviceID, openTask); - - new java.util.Timer().schedule (openTask, (isBluetooth ? 2000 : 100)); - } - } - } - - public void onDeviceOpenedDelayed (MidiDevice theDevice) - { - synchronized (MidiDeviceManager.class) - { - int deviceID = theDevice.getInfo().getId(); - - if (openTasks.containsKey (deviceID)) - { - if (! midiDevices.contains(theDevice)) - { - BluetoothGatt gatt = openTasks.get (deviceID).getGatt(); - openTasks.remove (deviceID); - midiDevices.add (new Pair (theDevice, gatt)); - } - } - else - { - // unpair was called in the mean time - MidiDeviceInfo info = theDevice.getInfo(); - BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); - if (btDevice != null) - { - String btAddress = btDevice.getAddress(); - Pair midiDevicePair = findMidiDeviceForBluetoothAddress (btDevice.getAddress()); - if (midiDevicePair != null) - { - BluetoothGatt gatt = midiDevicePair.second; - - if (gatt != null) - { - gatt.disconnect(); - gatt.close(); - } - } - } - - try - { - theDevice.close(); - } - catch (IOException e) - {} - } - } - } - - public String getPortName(MidiPortPath path) - { - int portTypeToFind = (path.isInput ? MidiDeviceInfo.PortInfo.TYPE_INPUT : MidiDeviceInfo.PortInfo.TYPE_OUTPUT); - - synchronized (MidiDeviceManager.class) - { - for (MidiDeviceInfo info : deviceInfos) - { - int localIndex = 0; - if (info.getId() == path.deviceId) - { - for (MidiDeviceInfo.PortInfo portInfo : info.getPorts()) - { - int portType = portInfo.getType(); - if (portType == portTypeToFind) - { - int portIndex = portInfo.getPortNumber(); - if (portIndex == path.portIndex) - { - String portName = portInfo.getName(); - if (portName.isEmpty()) - portName = (String) info.getProperties().get(info.PROPERTY_NAME); - - return portName; - } - } - } - } - } - } - - return ""; - } - - public MidiPortPath getPortPathForJuceIndex (int portType, int juceIndex) - { - int portIdx = 0; - for (MidiDeviceInfo info : deviceInfos) - { - for (MidiDeviceInfo.PortInfo portInfo : info.getPorts()) - { - if (portInfo.getType() == portType) - { - if (portIdx == juceIndex) - return new MidiPortPath (info.getId(), - (portType == MidiDeviceInfo.PortInfo.TYPE_INPUT), - portInfo.getPortNumber()); - - portIdx++; - } - } - } - - return null; - } - - private MidiDeviceInfo[] getDeviceInfos() - { - synchronized (MidiDeviceManager.class) - { - MidiDeviceInfo[] infos = new MidiDeviceInfo[midiDevices.size()]; - - int idx = 0; - for (Pair midiDevice : midiDevices) - infos[idx++] = midiDevice.first.getInfo(); - - return infos; - } - } - - private Pair getMidiDevicePairForId (int deviceId) - { - synchronized (MidiDeviceManager.class) - { - for (Pair midiDevice : midiDevices) - if (midiDevice.first.getInfo().getId() == deviceId) - return midiDevice; - } - - return null; - } - - private MidiManager manager; - private HashMap btDevicesPairing; - private HashMap openTasks; - private ArrayList> midiDevices; - private MidiDeviceInfo[] deviceInfos; - private HashMap> openPorts; - } - - public MidiDeviceManager getAndroidMidiDeviceManager() - { - if (getSystemService (MIDI_SERVICE) == null) - return null; - - synchronized (AudioPluginHost.class) - { - if (midiDeviceManager == null) - midiDeviceManager = new MidiDeviceManager(); - } - - return midiDeviceManager; - } - - public BluetoothManager getAndroidBluetoothManager() - { - BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); - - if (adapter == null) - return null; - - if (adapter.getBluetoothLeScanner() == null) - return null; - - synchronized (AudioPluginHost.class) - { - if (bluetoothManager == null) - bluetoothManager = new BluetoothManager(); - } - - return bluetoothManager; - } - - //============================================================================== - @Override - public void onCreate (Bundle savedInstanceState) - { - super.onCreate (savedInstanceState); - - isScreenSaverEnabled = true; - hideActionBar(); - viewHolder = new ViewHolder (this); - setContentView (viewHolder); - - setVolumeControlStream (AudioManager.STREAM_MUSIC); - - permissionCallbackPtrMap = new HashMap(); - appPausedResumedListeners = new HashMap(); - } - - @Override - protected void onDestroy() - { - quitApp(); - super.onDestroy(); - - clearDataCache(); - } - - @Override - protected void onPause() - { - suspendApp(); - - Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); - - for (Long k : keys) - appPausedResumedListeners.get (k).appPaused(); - - try - { - Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down - // openGL glitches when pausing/resuming apps.. - } catch (InterruptedException e) {} - - super.onPause(); - } - - @Override - protected void onResume() - { - super.onResume(); - resumeApp(); - - Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); - - for (Long k : keys) - appPausedResumedListeners.get (k).appResumed(); - } - - @Override - public void onConfigurationChanged (Configuration cfg) - { - super.onConfigurationChanged (cfg); - setContentView (viewHolder); - } - - private void callAppLauncher() - { - launchApp (getApplicationInfo().publicSourceDir, - getApplicationInfo().dataDir); - } - - // Need to override this as the default implementation always finishes the activity. - @Override - public void onBackPressed() - { - ComponentPeerView focusedView = getViewWithFocusOrDefaultView(); - - if (focusedView == null) - return; - - focusedView.backButtonPressed(); - } - - private ComponentPeerView getViewWithFocusOrDefaultView() - { - for (int i = 0; i < viewHolder.getChildCount(); ++i) - { - if (viewHolder.getChildAt (i).hasFocus()) - return (ComponentPeerView) viewHolder.getChildAt (i); - } - - if (viewHolder.getChildCount() > 0) - return (ComponentPeerView) viewHolder.getChildAt (0); - - return null; - } - - //============================================================================== - private void hideActionBar() - { - // get "getActionBar" method - java.lang.reflect.Method getActionBarMethod = null; - try - { - getActionBarMethod = this.getClass().getMethod ("getActionBar"); - } - catch (SecurityException e) { return; } - catch (NoSuchMethodException e) { return; } - if (getActionBarMethod == null) return; - - // invoke "getActionBar" method - Object actionBar = null; - try - { - actionBar = getActionBarMethod.invoke (this); - } - catch (java.lang.IllegalArgumentException e) { return; } - catch (java.lang.IllegalAccessException e) { return; } - catch (java.lang.reflect.InvocationTargetException e) { return; } - if (actionBar == null) return; - - // get "hide" method - java.lang.reflect.Method actionBarHideMethod = null; - try - { - actionBarHideMethod = actionBar.getClass().getMethod ("hide"); - } - catch (SecurityException e) { return; } - catch (NoSuchMethodException e) { return; } - if (actionBarHideMethod == null) return; - - // invoke "hide" method - try - { - actionBarHideMethod.invoke (actionBar); - } - catch (java.lang.IllegalArgumentException e) {} - catch (java.lang.IllegalAccessException e) {} - catch (java.lang.reflect.InvocationTargetException e) {} - } - - void requestPermissionsCompat (String[] permissions, int requestCode) - { - Method requestPermissionsMethod = null; - try - { - requestPermissionsMethod = this.getClass().getMethod ("requestPermissions", - String[].class, int.class); - } - catch (SecurityException e) { return; } - catch (NoSuchMethodException e) { return; } - if (requestPermissionsMethod == null) return; - - try - { - requestPermissionsMethod.invoke (this, permissions, requestCode); - } - catch (java.lang.IllegalArgumentException e) {} - catch (java.lang.IllegalAccessException e) {} - catch (java.lang.reflect.InvocationTargetException e) {} - } - - //============================================================================== - private native void launchApp (String appFile, String appDataDir); - private native void quitApp(); - private native void suspendApp(); - private native void resumeApp(); - private native void setScreenSize (int screenWidth, int screenHeight, int dpi); - private native void appActivityResult (int requestCode, int resultCode, Intent data); - private native void appNewIntent (Intent intent); - - //============================================================================== - private ViewHolder viewHolder; - private MidiDeviceManager midiDeviceManager = null; - private BluetoothManager bluetoothManager = null; - private boolean isScreenSaverEnabled; - private java.util.Timer keepAliveTimer; - - public final ComponentPeerView createNewView (boolean opaque, long host) - { - ComponentPeerView v = new ComponentPeerView (this, opaque, host); - viewHolder.addView (v); - addAppPausedResumedListener (v, host); - return v; - } - - public final void deleteView (ComponentPeerView view) - { - removeAppPausedResumedListener (view, view.host); - - view.host = 0; - - ViewGroup group = (ViewGroup) (view.getParent()); - - if (group != null) - group.removeView (view); - } - - public final void deleteNativeSurfaceView (NativeSurfaceView view) - { - ViewGroup group = (ViewGroup) (view.getParent()); - - if (group != null) - group.removeView (view); - } - - final class ViewHolder extends ViewGroup - { - public ViewHolder (Context context) - { - super (context); - setDescendantFocusability (ViewGroup.FOCUS_AFTER_DESCENDANTS); - setFocusable (false); - } - - protected final void onLayout (boolean changed, int left, int top, int right, int bottom) - { - setScreenSize (getWidth(), getHeight(), getDPI()); - - if (isFirstResize) - { - isFirstResize = false; - callAppLauncher(); - } - } - - private final int getDPI() - { - DisplayMetrics metrics = new DisplayMetrics(); - getWindowManager().getDefaultDisplay().getMetrics (metrics); - return metrics.densityDpi; - } - - private boolean isFirstResize = true; - } - - public final void excludeClipRegion (android.graphics.Canvas canvas, float left, float top, float right, float bottom) - { - canvas.clipRect (left, top, right, bottom, android.graphics.Region.Op.DIFFERENCE); - } - - //============================================================================== - public final void setScreenSaver (boolean enabled) - { - if (isScreenSaverEnabled != enabled) - { - isScreenSaverEnabled = enabled; - - if (keepAliveTimer != null) - { - keepAliveTimer.cancel(); - keepAliveTimer = null; - } - - if (enabled) - { - getWindow().clearFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); - } - else - { - getWindow().addFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); - - // If no user input is received after about 3 seconds, the OS will lower the - // task's priority, so this timer forces it to be kept active. - keepAliveTimer = new java.util.Timer(); - - keepAliveTimer.scheduleAtFixedRate (new TimerTask() - { - @Override - public void run() - { - android.app.Instrumentation instrumentation = new android.app.Instrumentation(); - - try - { - instrumentation.sendKeyDownUpSync (KeyEvent.KEYCODE_UNKNOWN); - } - catch (Exception e) - { - } - } - }, 2000, 2000); - } - } - } - - public final boolean getScreenSaver() - { - return isScreenSaverEnabled; - } - - //============================================================================== - public final String getClipboardContent() - { - ClipboardManager clipboard = (ClipboardManager) getSystemService (CLIPBOARD_SERVICE); - - CharSequence content = clipboard.getText(); - return content != null ? content.toString() : new String(); - } - - public final void setClipboardContent (String newText) - { - ClipboardManager clipboard = (ClipboardManager) getSystemService (CLIPBOARD_SERVICE); - clipboard.setText (newText); - } - - //============================================================================== - public final void showMessageBox (String title, String message, final long callback) - { - AlertDialog.Builder builder = new AlertDialog.Builder (this); - builder.setTitle (title) - .setMessage (message) - .setCancelable (true) - .setOnCancelListener (new DialogInterface.OnCancelListener() - { - public void onCancel (DialogInterface dialog) - { - AudioPluginHost.this.alertDismissed (callback, 0); - } - }) - .setPositiveButton ("OK", new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - AudioPluginHost.this.alertDismissed (callback, 0); - } - }); - - builder.create().show(); - } - - public final void showOkCancelBox (String title, String message, final long callback, - String okButtonText, String cancelButtonText) - { - AlertDialog.Builder builder = new AlertDialog.Builder (this); - builder.setTitle (title) - .setMessage (message) - .setCancelable (true) - .setOnCancelListener (new DialogInterface.OnCancelListener() - { - public void onCancel (DialogInterface dialog) - { - AudioPluginHost.this.alertDismissed (callback, 0); - } - }) - .setPositiveButton (okButtonText.isEmpty() ? "OK" : okButtonText, new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - AudioPluginHost.this.alertDismissed (callback, 1); - } - }) - .setNegativeButton (cancelButtonText.isEmpty() ? "Cancel" : cancelButtonText, new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - AudioPluginHost.this.alertDismissed (callback, 0); - } - }); - - builder.create().show(); - } - - public final void showYesNoCancelBox (String title, String message, final long callback) - { - AlertDialog.Builder builder = new AlertDialog.Builder (this); - builder.setTitle (title) - .setMessage (message) - .setCancelable (true) - .setOnCancelListener (new DialogInterface.OnCancelListener() - { - public void onCancel (DialogInterface dialog) - { - AudioPluginHost.this.alertDismissed (callback, 0); - } - }) - .setPositiveButton ("Yes", new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - AudioPluginHost.this.alertDismissed (callback, 1); - } - }) - .setNegativeButton ("No", new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - AudioPluginHost.this.alertDismissed (callback, 2); - } - }) - .setNeutralButton ("Cancel", new DialogInterface.OnClickListener() - { - public void onClick (DialogInterface dialog, int id) - { - dialog.dismiss(); - AudioPluginHost.this.alertDismissed (callback, 0); - } - }); - - builder.create().show(); - } - - public native void alertDismissed (long callback, int id); - - //============================================================================== - public interface AppPausedResumedListener - { - void appPaused(); - void appResumed(); - } - - private Map appPausedResumedListeners; - - public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) - { - appPausedResumedListeners.put (new Long (listenerHost), l); - } - - public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) - { - appPausedResumedListeners.remove (new Long (listenerHost)); - } - - //============================================================================== - public final class ComponentPeerView extends ViewGroup - implements View.OnFocusChangeListener, AppPausedResumedListener - { - public ComponentPeerView (Context context, boolean opaque_, long host) - { - super (context); - this.host = host; - setWillNotDraw (false); - opaque = opaque_; - - setFocusable (true); - setFocusableInTouchMode (true); - setOnFocusChangeListener (this); - - // swap red and blue colours to match internal opengl texture format - ColorMatrix colorMatrix = new ColorMatrix(); - - float[] colorTransform = { 0, 0, 1.0f, 0, 0, - 0, 1.0f, 0, 0, 0, - 1.0f, 0, 0, 0, 0, - 0, 0, 0, 1.0f, 0 }; - - colorMatrix.set (colorTransform); - paint.setColorFilter (new ColorMatrixColorFilter (colorMatrix)); - - java.lang.reflect.Method method = null; - - try - { - method = getClass().getMethod ("setLayerType", int.class, Paint.class); - } - catch (SecurityException e) {} - catch (NoSuchMethodException e) {} - - if (method != null) - { - try - { - int layerTypeNone = 0; - method.invoke (this, layerTypeNone, null); - } - catch (java.lang.IllegalArgumentException e) {} - catch (java.lang.IllegalAccessException e) {} - catch (java.lang.reflect.InvocationTargetException e) {} - } - } - - //============================================================================== - private native void handlePaint (long host, Canvas canvas, Paint paint); - - @Override - public void onDraw (Canvas canvas) - { - if (host == 0) - return; - - handlePaint (host, canvas, paint); - } - - @Override - public boolean isOpaque() - { - return opaque; - } - - private boolean opaque; - private long host; - private Paint paint = new Paint(); - - //============================================================================== - private native void handleMouseDown (long host, int index, float x, float y, long time); - private native void handleMouseDrag (long host, int index, float x, float y, long time); - private native void handleMouseUp (long host, int index, float x, float y, long time); - - @Override - public boolean onTouchEvent (MotionEvent event) - { - if (host == 0) - return false; - - int action = event.getAction(); - long time = event.getEventTime(); - - switch (action & MotionEvent.ACTION_MASK) - { - case MotionEvent.ACTION_DOWN: - handleMouseDown (host, event.getPointerId(0), event.getX(), event.getY(), time); - return true; - - case MotionEvent.ACTION_CANCEL: - case MotionEvent.ACTION_UP: - handleMouseUp (host, event.getPointerId(0), event.getX(), event.getY(), time); - return true; - - case MotionEvent.ACTION_MOVE: - { - int n = event.getPointerCount(); - for (int i = 0; i < n; ++i) - handleMouseDrag (host, event.getPointerId(i), event.getX(i), event.getY(i), time); - - return true; - } - - case MotionEvent.ACTION_POINTER_UP: - { - int i = (action & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT; - handleMouseUp (host, event.getPointerId(i), event.getX(i), event.getY(i), time); - return true; - } - - case MotionEvent.ACTION_POINTER_DOWN: - { - int i = (action & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT; - handleMouseDown (host, event.getPointerId(i), event.getX(i), event.getY(i), time); - return true; - } - - default: - break; - } - - return false; - } - - //============================================================================== - private native void handleKeyDown (long host, int keycode, int textchar); - private native void handleKeyUp (long host, int keycode, int textchar); - private native void handleBackButton (long host); - private native void handleKeyboardHidden (long host); - - public void showKeyboard (String type) - { - InputMethodManager imm = (InputMethodManager) getSystemService (Context.INPUT_METHOD_SERVICE); - - if (imm != null) - { - if (type.length() > 0) - { - imm.showSoftInput (this, android.view.inputmethod.InputMethodManager.SHOW_IMPLICIT); - imm.setInputMethod (getWindowToken(), type); - keyboardDismissListener.startListening(); - } - else - { - imm.hideSoftInputFromWindow (getWindowToken(), 0); - keyboardDismissListener.stopListening(); - } - } - } - - public void backButtonPressed() - { - if (host == 0) - return; - - handleBackButton (host); - } - - @Override - public boolean onKeyDown (int keyCode, KeyEvent event) - { - if (host == 0) - return false; - - switch (keyCode) - { - case KeyEvent.KEYCODE_VOLUME_UP: - case KeyEvent.KEYCODE_VOLUME_DOWN: - return super.onKeyDown (keyCode, event); - case KeyEvent.KEYCODE_BACK: - { - ((Activity) getContext()).onBackPressed(); - return true; - } - - default: - break; - } - - handleKeyDown (host, keyCode, event.getUnicodeChar()); - return true; - } - - @Override - public boolean onKeyUp (int keyCode, KeyEvent event) - { - if (host == 0) - return false; - - handleKeyUp (host, keyCode, event.getUnicodeChar()); - return true; - } - - @Override - public boolean onKeyMultiple (int keyCode, int count, KeyEvent event) - { - if (host == 0) - return false; - - if (keyCode != KeyEvent.KEYCODE_UNKNOWN || event.getAction() != KeyEvent.ACTION_MULTIPLE) - return super.onKeyMultiple (keyCode, count, event); - - if (event.getCharacters() != null) - { - int utf8Char = event.getCharacters().codePointAt (0); - handleKeyDown (host, utf8Char, utf8Char); - return true; - } - - return false; - } - - //============================================================================== - private final class KeyboardDismissListener - { - public KeyboardDismissListener (ComponentPeerView viewToUse) - { - view = viewToUse; - } - - private void startListening() - { - view.getViewTreeObserver().addOnGlobalLayoutListener(viewTreeObserver); - } - - private void stopListening() - { - view.getViewTreeObserver().removeGlobalOnLayoutListener(viewTreeObserver); - } - - private class TreeObserver implements ViewTreeObserver.OnGlobalLayoutListener - { - TreeObserver() - { - keyboardShown = false; - } - - @Override - public void onGlobalLayout() - { - Rect r = new Rect(); - - ViewGroup parentView = (ViewGroup) getParent(); - - if (parentView == null) - return; - - parentView.getWindowVisibleDisplayFrame (r); - - int diff = parentView.getHeight() - (r.bottom - r.top); - - // Arbitrary threshold, surely keyboard would take more than 20 pix. - if (diff < 20 && keyboardShown) - { - keyboardShown = false; - handleKeyboardHidden (view.host); - } - - if (! keyboardShown && diff > 20) - keyboardShown = true; - }; - - private boolean keyboardShown; - }; - - private ComponentPeerView view; - private TreeObserver viewTreeObserver = new TreeObserver(); - } - - private KeyboardDismissListener keyboardDismissListener = new KeyboardDismissListener(this); - - // this is here to make keyboard entry work on a Galaxy Tab2 10.1 - @Override - public InputConnection onCreateInputConnection (EditorInfo outAttrs) - { - outAttrs.actionLabel = ""; - outAttrs.hintText = ""; - outAttrs.initialCapsMode = 0; - outAttrs.initialSelEnd = outAttrs.initialSelStart = -1; - outAttrs.label = ""; - outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_EXTRACT_UI; - outAttrs.inputType = InputType.TYPE_NULL; - - return new BaseInputConnection (this, false); - } - - //============================================================================== - @Override - protected void onSizeChanged (int w, int h, int oldw, int oldh) - { - if (host == 0) - return; - - super.onSizeChanged (w, h, oldw, oldh); - viewSizeChanged (host); - } - - @Override - protected void onLayout (boolean changed, int left, int top, int right, int bottom) - { - for (int i = getChildCount(); --i >= 0;) - requestTransparentRegion (getChildAt (i)); - } - - private native void viewSizeChanged (long host); - - @Override - public void onFocusChange (View v, boolean hasFocus) - { - if (host == 0) - return; - - if (v == this) - focusChanged (host, hasFocus); - } - - private native void focusChanged (long host, boolean hasFocus); - - public void setViewName (String newName) {} - - public void setSystemUiVisibilityCompat (int visibility) - { - Method systemUIVisibilityMethod = null; - try - { - systemUIVisibilityMethod = this.getClass().getMethod ("setSystemUiVisibility", int.class); - } - catch (SecurityException e) { return; } - catch (NoSuchMethodException e) { return; } - if (systemUIVisibilityMethod == null) return; - - try - { - systemUIVisibilityMethod.invoke (this, visibility); - } - catch (java.lang.IllegalArgumentException e) {} - catch (java.lang.IllegalAccessException e) {} - catch (java.lang.reflect.InvocationTargetException e) {} - } - - public boolean isVisible() { return getVisibility() == VISIBLE; } - public void setVisible (boolean b) { setVisibility (b ? VISIBLE : INVISIBLE); } - - public boolean containsPoint (int x, int y) - { - return true; //xxx needs to check overlapping views - } - - //============================================================================== - private native void handleAppPaused (long host); - private native void handleAppResumed (long host); - - @Override - public void appPaused() - { - if (host == 0) - return; - - handleAppPaused (host); - } - - @Override - public void appResumed() - { - if (host == 0) - return; - - // Ensure that navigation/status bar visibility is correctly restored. - handleAppResumed (host); - } - } - - //============================================================================== - public static class NativeSurfaceView extends SurfaceView - implements SurfaceHolder.Callback - { - private long nativeContext = 0; - private boolean forVideo; - - NativeSurfaceView (Context context, long nativeContextPtr, boolean createdForVideo) - { - super (context); - nativeContext = nativeContextPtr; - forVideo = createdForVideo; - } - - public Surface getNativeSurface() - { - Surface retval = null; - - SurfaceHolder holder = getHolder(); - if (holder != null) - retval = holder.getSurface(); - - return retval; - } - - //============================================================================== - @Override - public void surfaceChanged (SurfaceHolder holder, int format, int width, int height) - { - if (forVideo) - surfaceChangedNativeVideo (nativeContext, holder, format, width, height); - else - surfaceChangedNative (nativeContext, holder, format, width, height); - } - - @Override - public void surfaceCreated (SurfaceHolder holder) - { - if (forVideo) - surfaceCreatedNativeVideo (nativeContext, holder); - else - surfaceCreatedNative (nativeContext, holder); - } - - @Override - public void surfaceDestroyed (SurfaceHolder holder) - { - if (forVideo) - surfaceDestroyedNativeVideo (nativeContext, holder); - else - surfaceDestroyedNative (nativeContext, holder); - } - - @Override - protected void dispatchDraw (Canvas canvas) - { - super.dispatchDraw (canvas); - - if (forVideo) - dispatchDrawNativeVideo (nativeContext, canvas); - else - dispatchDrawNative (nativeContext, canvas); - } - - //============================================================================== - @Override - protected void onAttachedToWindow() - { - super.onAttachedToWindow(); - getHolder().addCallback (this); - } - - @Override - protected void onDetachedFromWindow() - { - super.onDetachedFromWindow(); - getHolder().removeCallback (this); - } - - //============================================================================== - private native void dispatchDrawNative (long nativeContextPtr, Canvas canvas); - private native void surfaceCreatedNative (long nativeContextptr, SurfaceHolder holder); - private native void surfaceDestroyedNative (long nativeContextptr, SurfaceHolder holder); - private native void surfaceChangedNative (long nativeContextptr, SurfaceHolder holder, - int format, int width, int height); - - private native void dispatchDrawNativeVideo (long nativeContextPtr, Canvas canvas); - private native void surfaceCreatedNativeVideo (long nativeContextptr, SurfaceHolder holder); - private native void surfaceDestroyedNativeVideo (long nativeContextptr, SurfaceHolder holder); - private native void surfaceChangedNativeVideo (long nativeContextptr, SurfaceHolder holder, - int format, int width, int height); - } - - public NativeSurfaceView createNativeSurfaceView (long nativeSurfacePtr, boolean forVideo) - { - return new NativeSurfaceView (this, nativeSurfacePtr, forVideo); - } - - //============================================================================== - public final int[] renderGlyph (char glyph1, char glyph2, Paint paint, android.graphics.Matrix matrix, Rect bounds) - { - Path p = new Path(); - - char[] str = { glyph1, glyph2 }; - paint.getTextPath (str, 0, (glyph2 != 0 ? 2 : 1), 0.0f, 0.0f, p); - - RectF boundsF = new RectF(); - p.computeBounds (boundsF, true); - matrix.mapRect (boundsF); - - boundsF.roundOut (bounds); - bounds.left--; - bounds.right++; - - final int w = bounds.width(); - final int h = Math.max (1, bounds.height()); - - Bitmap bm = Bitmap.createBitmap (w, h, Bitmap.Config.ARGB_8888); - - Canvas c = new Canvas (bm); - matrix.postTranslate (-bounds.left, -bounds.top); - c.setMatrix (matrix); - c.drawPath (p, paint); - - final int sizeNeeded = w * h; - if (cachedRenderArray.length < sizeNeeded) - cachedRenderArray = new int [sizeNeeded]; - - bm.getPixels (cachedRenderArray, 0, w, 0, 0, w, h); - bm.recycle(); - return cachedRenderArray; - } - - private int[] cachedRenderArray = new int [256]; - - //============================================================================== - public static class NativeInvocationHandler implements InvocationHandler - { - public NativeInvocationHandler (Activity activityToUse, long nativeContextRef) - { - activity = activityToUse; - nativeContext = nativeContextRef; - } - - public void nativeContextDeleted() - { - nativeContext = 0; - } - - @Override - public void finalize() - { - activity.runOnUiThread (new Runnable() - { - @Override - public void run() - { - if (nativeContext != 0) - dispatchFinalize (nativeContext); - } - }); - } - - @Override - public Object invoke (Object proxy, Method method, Object[] args) throws Throwable - { - return dispatchInvoke (nativeContext, proxy, method, args); - } - - //============================================================================== - Activity activity; - private long nativeContext = 0; - - private native void dispatchFinalize (long nativeContextRef); - private native Object dispatchInvoke (long nativeContextRef, Object proxy, Method method, Object[] args); - } - - public InvocationHandler createInvocationHandler (long nativeContextRef) - { - return new NativeInvocationHandler (this, nativeContextRef); - } - - public void invocationHandlerContextDeleted (InvocationHandler handler) - { - ((NativeInvocationHandler) handler).nativeContextDeleted(); - } - - //============================================================================== - public static class HTTPStream - { - public HTTPStream (String address, boolean isPostToUse, byte[] postDataToUse, - String headersToUse, int timeOutMsToUse, - int[] statusCodeToUse, StringBuffer responseHeadersToUse, - int numRedirectsToFollowToUse, String httpRequestCmdToUse) throws IOException - { - isPost = isPostToUse; - postData = postDataToUse; - headers = headersToUse; - timeOutMs = timeOutMsToUse; - statusCode = statusCodeToUse; - responseHeaders = responseHeadersToUse; - totalLength = -1; - numRedirectsToFollow = numRedirectsToFollowToUse; - httpRequestCmd = httpRequestCmdToUse; - - connection = createConnection (address, isPost, postData, headers, timeOutMs, httpRequestCmd); - } - - private final HttpURLConnection createConnection (String address, boolean isPost, byte[] postData, - String headers, int timeOutMs, String httpRequestCmdToUse) throws IOException - { - HttpURLConnection newConnection = (HttpURLConnection) (new URL(address).openConnection()); - - try - { - newConnection.setInstanceFollowRedirects (false); - newConnection.setConnectTimeout (timeOutMs); - newConnection.setReadTimeout (timeOutMs); - - // headers - if not empty, this string is appended onto the headers that are used for the request. It must therefore be a valid set of HTML header directives, separated by newlines. - // So convert headers string to an array, with an element for each line - String headerLines[] = headers.split("\\n"); - - // Set request headers - for (int i = 0; i < headerLines.length; ++i) - { - int pos = headerLines[i].indexOf (":"); - - if (pos > 0 && pos < headerLines[i].length()) - { - String field = headerLines[i].substring (0, pos); - String value = headerLines[i].substring (pos + 1); - - if (value.length() > 0) - newConnection.setRequestProperty (field, value); - } - } - - newConnection.setRequestMethod (httpRequestCmd); - - if (isPost) - { - newConnection.setDoOutput (true); - - if (postData != null) - { - OutputStream out = newConnection.getOutputStream(); - out.write(postData); - out.flush(); - } - } - - return newConnection; - } - catch (Throwable e) - { - newConnection.disconnect(); - throw new IOException ("Connection error"); - } - } - - private final InputStream getCancellableStream (final boolean isInput) throws ExecutionException - { - synchronized (createFutureLock) - { - if (hasBeenCancelled.get()) - return null; - - streamFuture = executor.submit (new Callable() - { - @Override - public BufferedInputStream call() throws IOException - { - return new BufferedInputStream (isInput ? connection.getInputStream() - : connection.getErrorStream()); - } - }); - } - - try - { - return streamFuture.get(); - } - catch (InterruptedException e) - { - return null; - } - catch (CancellationException e) - { - return null; - } - } - - public final boolean connect() - { - boolean result = false; - int numFollowedRedirects = 0; - - while (true) - { - result = doConnect(); - - if (! result) - return false; - - if (++numFollowedRedirects > numRedirectsToFollow) - break; - - int status = statusCode[0]; - - if (status == 301 || status == 302 || status == 303 || status == 307) - { - // Assumes only one occurrence of "Location" - int pos1 = responseHeaders.indexOf ("Location:") + 10; - int pos2 = responseHeaders.indexOf ("\n", pos1); - - if (pos2 > pos1) - { - String currentLocation = connection.getURL().toString(); - String newLocation = responseHeaders.substring (pos1, pos2); - - try - { - // Handle newLocation whether it's absolute or relative - URL baseUrl = new URL (currentLocation); - URL newUrl = new URL (baseUrl, newLocation); - String transformedNewLocation = newUrl.toString(); - - if (transformedNewLocation != currentLocation) - { - // Clear responseHeaders before next iteration - responseHeaders.delete (0, responseHeaders.length()); - - synchronized (createStreamLock) - { - if (hasBeenCancelled.get()) - return false; - - connection.disconnect(); - - try - { - connection = createConnection (transformedNewLocation, isPost, - postData, headers, timeOutMs, - httpRequestCmd); - } - catch (Throwable e) - { - return false; - } - } - } - else - { - break; - } - } - catch (Throwable e) - { - return false; - } - } - else - { - break; - } - } - else - { - break; - } - } - - return result; - } - - private final boolean doConnect() - { - synchronized (createStreamLock) - { - if (hasBeenCancelled.get()) - return false; - - try - { - try - { - inputStream = getCancellableStream (true); - } - catch (ExecutionException e) - { - if (connection.getResponseCode() < 400) - { - statusCode[0] = connection.getResponseCode(); - connection.disconnect(); - return false; - } - } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - try - { - if (statusCode[0] >= 400) - inputStream = getCancellableStream (false); - else - inputStream = getCancellableStream (true); - } - catch (ExecutionException e) - {} - - for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) - { - if (entry.getKey() != null && entry.getValue() != null) - { - responseHeaders.append(entry.getKey() + ": " - + android.text.TextUtils.join(",", entry.getValue()) + "\n"); - - if (entry.getKey().compareTo ("Content-Length") == 0) - totalLength = Integer.decode (entry.getValue().get (0)); - } - } - - return true; - } - catch (IOException e) - { - return false; - } - } - } - - static class DisconnectionRunnable implements Runnable - { - public DisconnectionRunnable (HttpURLConnection theConnection, - InputStream theInputStream, - ReentrantLock theCreateStreamLock, - Object theCreateFutureLock, - Future theStreamFuture) - { - connectionToDisconnect = theConnection; - inputStream = theInputStream; - createStreamLock = theCreateStreamLock; - createFutureLock = theCreateFutureLock; - streamFuture = theStreamFuture; - } - - public void run() - { - try - { - if (! createStreamLock.tryLock()) - { - synchronized (createFutureLock) - { - if (streamFuture != null) - streamFuture.cancel (true); - } - - createStreamLock.lock(); - } - - if (connectionToDisconnect != null) - connectionToDisconnect.disconnect(); - - if (inputStream != null) - inputStream.close(); - } - catch (IOException e) - {} - finally - { - createStreamLock.unlock(); - } - } - - private HttpURLConnection connectionToDisconnect; - private InputStream inputStream; - private ReentrantLock createStreamLock; - private Object createFutureLock; - Future streamFuture; - } - - public final void release() - { - DisconnectionRunnable disconnectionRunnable = new DisconnectionRunnable (connection, - inputStream, - createStreamLock, - createFutureLock, - streamFuture); - - synchronized (createStreamLock) - { - hasBeenCancelled.set (true); - - connection = null; - } - - Thread disconnectionThread = new Thread(disconnectionRunnable); - disconnectionThread.start(); - } - - public final int read (byte[] buffer, int numBytes) - { - int num = 0; - - try - { - synchronized (createStreamLock) - { - if (inputStream != null) - num = inputStream.read (buffer, 0, numBytes); - } - } - catch (IOException e) - {} - - if (num > 0) - position += num; - - return num; - } - - public final long getPosition() { return position; } - public final long getTotalLength() { return totalLength; } - public final boolean isExhausted() { return false; } - public final boolean setPosition (long newPos) { return false; } - - private boolean isPost; - private byte[] postData; - private String headers; - private int timeOutMs; - String httpRequestCmd; - private HttpURLConnection connection; - private int[] statusCode; - private StringBuffer responseHeaders; - private int totalLength; - private int numRedirectsToFollow; - private InputStream inputStream; - private long position; - private final ReentrantLock createStreamLock = new ReentrantLock(); - private final Object createFutureLock = new Object(); - private AtomicBoolean hasBeenCancelled = new AtomicBoolean(); - - private final ExecutorService executor = Executors.newCachedThreadPool (Executors.defaultThreadFactory()); - Future streamFuture; - } - - public static final HTTPStream createHTTPStream (String address, boolean isPost, byte[] postData, - String headers, int timeOutMs, int[] statusCode, - StringBuffer responseHeaders, int numRedirectsToFollow, - String httpRequestCmd) - { - // timeout parameter of zero for HttpUrlConnection is a blocking connect (negative value for juce::URL) - if (timeOutMs < 0) - timeOutMs = 0; - else if (timeOutMs == 0) - timeOutMs = 30000; - - for (;;) - { - try - { - HTTPStream httpStream = new HTTPStream (address, isPost, postData, headers, - timeOutMs, statusCode, responseHeaders, - numRedirectsToFollow, httpRequestCmd); - - return httpStream; - } - catch (Throwable e) {} - - return null; - } - } - - public final void launchURL (String url) - { - startActivity (new Intent (Intent.ACTION_VIEW, Uri.parse (url))); - } - - private native boolean webViewPageLoadStarted (long host, WebView view, String url); - private native void webViewPageLoadFinished (long host, WebView view, String url); - private native void webViewReceivedError (long host, WebView view, WebResourceRequest request, WebResourceError error); private native void webViewReceivedHttpError (long host, WebView view, WebResourceRequest request, WebResourceResponse errorResponse); private native void webViewReceivedSslError (long host, WebView view, SslErrorHandler handler, SslError error); - private native void webViewCloseWindowRequest (long host, WebView view); - private native void webViewCreateWindowRequest (long host, WebView view); - - //============================================================================== - public class JuceWebViewClient extends WebViewClient - { - public JuceWebViewClient (long hostToUse) - { - host = hostToUse; - } - - public void hostDeleted() - { - synchronized (hostLock) - { - host = 0; - } - } - - @Override - public void onPageFinished (WebView view, String url) - { - if (host == 0) - return; - - webViewPageLoadFinished (host, view, url); - } - - @Override - public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) - { - if (host == 0) - return; - - webViewReceivedSslError (host, view, handler, error); - } - - @Override - public void onReceivedError (WebView view, WebResourceRequest request, WebResourceError error) - { - if (host == 0) - return; - - webViewReceivedError (host, view, request, error); - } - - @Override - public void onReceivedHttpError (WebView view, WebResourceRequest request, WebResourceResponse errorResponse) - { - if (host == 0) - return; - - webViewReceivedHttpError (host, view, request, errorResponse); - } - - @Override - public WebResourceResponse shouldInterceptRequest (WebView view, WebResourceRequest request) - { - synchronized (hostLock) - { - if (host != 0) - { - boolean shouldLoad = webViewPageLoadStarted (host, view, request.getUrl().toString()); - - if (shouldLoad) - return null; - } - } - - return new WebResourceResponse ("text/html", null, null); - } - - private long host; - private final Object hostLock = new Object(); - } - - public class JuceWebChromeClient extends WebChromeClient - { - public JuceWebChromeClient (long hostToUse) - { - host = hostToUse; - } - - @Override - public void onCloseWindow (WebView window) - { - webViewCloseWindowRequest (host, window); - } - - @Override - public boolean onCreateWindow (WebView view, boolean isDialog, - boolean isUserGesture, Message resultMsg) - { - webViewCreateWindowRequest (host, view); - return false; - } - - private long host; - private final Object hostLock = new Object(); - } - - - //============================================================================== - public class CameraDeviceStateCallback extends CameraDevice.StateCallback - { - private native void cameraDeviceStateClosed (long host, CameraDevice camera); - private native void cameraDeviceStateDisconnected (long host, CameraDevice camera); - private native void cameraDeviceStateError (long host, CameraDevice camera, int error); - private native void cameraDeviceStateOpened (long host, CameraDevice camera); - - CameraDeviceStateCallback (long hostToUse) - { - host = hostToUse; - } - - @Override - public void onClosed (CameraDevice camera) - { - cameraDeviceStateClosed (host, camera); - } - - @Override - public void onDisconnected (CameraDevice camera) - { - cameraDeviceStateDisconnected (host, camera); - } - - @Override - public void onError (CameraDevice camera, int error) - { - cameraDeviceStateError (host, camera, error); - } - - @Override - public void onOpened (CameraDevice camera) - { - cameraDeviceStateOpened (host, camera); - } - - private long host; - } - - //============================================================================== - public class CameraCaptureSessionStateCallback extends CameraCaptureSession.StateCallback - { - private native void cameraCaptureSessionActive (long host, CameraCaptureSession session); - private native void cameraCaptureSessionClosed (long host, CameraCaptureSession session); - private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session); - private native void cameraCaptureSessionConfigured (long host, CameraCaptureSession session); - private native void cameraCaptureSessionReady (long host, CameraCaptureSession session); - - CameraCaptureSessionStateCallback (long hostToUse) - { - host = hostToUse; - } - - @Override - public void onActive (CameraCaptureSession session) - { - cameraCaptureSessionActive (host, session); - } - - @Override - public void onClosed (CameraCaptureSession session) - { - cameraCaptureSessionClosed (host, session); - } - - @Override - public void onConfigureFailed (CameraCaptureSession session) - { - cameraCaptureSessionConfigureFailed (host, session); - } - - @Override - public void onConfigured (CameraCaptureSession session) - { - cameraCaptureSessionConfigured (host, session); - } - - @Override - public void onReady (CameraCaptureSession session) - { - cameraCaptureSessionReady (host, session); - } - - private long host; - } - - //============================================================================== - public class CameraCaptureSessionCaptureCallback extends CameraCaptureSession.CaptureCallback - { - private native void cameraCaptureSessionCaptureCompleted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, TotalCaptureResult result); - private native void cameraCaptureSessionCaptureFailed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureFailure failure); - private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureResult partialResult); - private native void cameraCaptureSessionCaptureStarted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, long timestamp, long frameNumber); - private native void cameraCaptureSessionCaptureSequenceAborted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId); - private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber); - - CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview) - { - host = hostToUse; - preview = shouldBePreview; - } - - @Override - public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request, - TotalCaptureResult result) - { - cameraCaptureSessionCaptureCompleted (host, preview, session, request, result); - } - - @Override - public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure) - { - cameraCaptureSessionCaptureFailed (host, preview, session, request, failure); - } - - @Override - public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request, - CaptureResult partialResult) - { - cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult); - } - - @Override - public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId) - { - cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId); - } - - @Override - public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber) - { - cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber); - } - - @Override - public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp, - long frameNumber) - { - cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber); - } - - private long host; - private boolean preview; - } - - //============================================================================== - public class JuceOrientationEventListener extends OrientationEventListener - { - private native void deviceOrientationChanged (long host, int orientation); - - public JuceOrientationEventListener (long hostToUse, Context context, int rate) - { - super (context, rate); - - host = hostToUse; - } - - @Override - public void onOrientationChanged (int orientation) - { - deviceOrientationChanged (host, orientation); - } - - private long host; - } - - - //============================================================================== - public class MediaControllerCallback extends MediaController.Callback - { - private native void mediaControllerAudioInfoChanged (long host, MediaController.PlaybackInfo info); - private native void mediaControllerMetadataChanged (long host, MediaMetadata metadata); - private native void mediaControllerPlaybackStateChanged (long host, PlaybackState state); - private native void mediaControllerSessionDestroyed (long host); - - MediaControllerCallback (long hostToUse) - { - host = hostToUse; - } - - @Override - public void onAudioInfoChanged (MediaController.PlaybackInfo info) - { - mediaControllerAudioInfoChanged (host, info); - } - - @Override - public void onMetadataChanged (MediaMetadata metadata) - { - mediaControllerMetadataChanged (host, metadata); - } - - @Override - public void onPlaybackStateChanged (PlaybackState state) - { - mediaControllerPlaybackStateChanged (host, state); - } - - @Override - public void onQueueChanged (List queue) {} - - @Override - public void onSessionDestroyed() - { - mediaControllerSessionDestroyed (host); - } - - private long host; - } - - //============================================================================== - public class MediaSessionCallback extends MediaSession.Callback - { - private native void mediaSessionPause (long host); - private native void mediaSessionPlay (long host); - private native void mediaSessionPlayFromMediaId (long host, String mediaId, Bundle extras); - private native void mediaSessionSeekTo (long host, long pos); - private native void mediaSessionStop (long host); - - - MediaSessionCallback (long hostToUse) - { - host = hostToUse; - } - - @Override - public void onPause() - { - mediaSessionPause (host); - } - - @Override - public void onPlay() - { - mediaSessionPlay (host); - } - - @Override - public void onPlayFromMediaId (String mediaId, Bundle extras) - { - mediaSessionPlayFromMediaId (host, mediaId, extras); - } - - @Override - public void onSeekTo (long pos) - { - mediaSessionSeekTo (host, pos); - } - - @Override - public void onStop() - { - mediaSessionStop (host); - } - - @Override - public void onFastForward() {} - - @Override - public boolean onMediaButtonEvent (Intent mediaButtonIntent) - { - return true; - } - - @Override - public void onRewind() {} - - @Override - public void onSkipToNext() {} - - @Override - public void onSkipToPrevious() {} - - @Override - public void onSkipToQueueItem (long id) {} - - private long host; - } - - //============================================================================== - public class SystemVolumeObserver extends ContentObserver - { - private native void mediaSessionSystemVolumeChanged (long host); - - SystemVolumeObserver (Activity activityToUse, long hostToUse) - { - super (null); - - activity = activityToUse; - host = hostToUse; - } - - void setEnabled (boolean shouldBeEnabled) - { - if (shouldBeEnabled) - activity.getApplicationContext().getContentResolver().registerContentObserver (android.provider.Settings.System.CONTENT_URI, true, this); - else - activity.getApplicationContext().getContentResolver().unregisterContentObserver (this); - } - - @Override - public void onChange (boolean selfChange, Uri uri) - { - if (uri.toString().startsWith ("content://settings/system/volume_music")) - mediaSessionSystemVolumeChanged (host); - } - - private Activity activity; - private long host; - } - - - //============================================================================== - public static final String getLocaleValue (boolean isRegion) - { - java.util.Locale locale = java.util.Locale.getDefault(); - - return isRegion ? locale.getCountry() - : locale.getLanguage(); - } - - private static final String getFileLocation (String type) - { - return Environment.getExternalStoragePublicDirectory (type).getAbsolutePath(); - } - - public static final String getDocumentsFolder() - { - if (getAndroidSDKVersion() >= 19) - return getFileLocation ("Documents"); - - return Environment.getDataDirectory().getAbsolutePath(); - } - - public static final String getPicturesFolder() { return getFileLocation (Environment.DIRECTORY_PICTURES); } - public static final String getMusicFolder() { return getFileLocation (Environment.DIRECTORY_MUSIC); } - public static final String getMoviesFolder() { return getFileLocation (Environment.DIRECTORY_MOVIES); } - public static final String getDownloadsFolder() { return getFileLocation (Environment.DIRECTORY_DOWNLOADS); } - - //============================================================================== - @Override - protected void onActivityResult (int requestCode, int resultCode, Intent data) - { - appActivityResult (requestCode, resultCode, data); - } - - @Override - protected void onNewIntent (Intent intent) - { - super.onNewIntent(intent); - setIntent(intent); - - appNewIntent (intent); - } - - //============================================================================== - public final Typeface getTypeFaceFromAsset (String assetName) - { - try - { - return Typeface.createFromAsset (this.getResources().getAssets(), assetName); - } - catch (Throwable e) {} - - return null; - } - - final protected static char[] hexArray = "0123456789ABCDEF".toCharArray(); - - public static String bytesToHex (byte[] bytes) - { - char[] hexChars = new char[bytes.length * 2]; - - for (int j = 0; j < bytes.length; ++j) - { - int v = bytes[j] & 0xff; - hexChars[j * 2] = hexArray[v >>> 4]; - hexChars[j * 2 + 1] = hexArray[v & 0x0f]; - } - - return new String (hexChars); - } - - final private java.util.Map dataCache = new java.util.HashMap(); - - synchronized private final File getDataCacheFile (byte[] data) - { - try - { - java.security.MessageDigest digest = java.security.MessageDigest.getInstance ("MD5"); - digest.update (data); - - String key = bytesToHex (digest.digest()); - - if (dataCache.containsKey (key)) - return (File) dataCache.get (key); - - File f = new File (this.getCacheDir(), "bindata_" + key); - f.delete(); - FileOutputStream os = new FileOutputStream (f); - os.write (data, 0, data.length); - dataCache.put (key, f); - return f; - } - catch (Throwable e) {} - - return null; - } - - private final void clearDataCache() - { - java.util.Iterator it = dataCache.values().iterator(); - - while (it.hasNext()) - { - File f = (File) it.next(); - f.delete(); - } - } - - public final Typeface getTypeFaceFromByteArray (byte[] data) - { - try - { - File f = getDataCacheFile (data); - - if (f != null) - return Typeface.createFromFile (f); - } - catch (Exception e) - { - Log.e ("JUCE", e.toString()); - } - - return null; - } - - public static final int getAndroidSDKVersion() - { - return android.os.Build.VERSION.SDK_INT; - } - - public final String audioManagerGetProperty (String property) - { - Object obj = getSystemService (AUDIO_SERVICE); - if (obj == null) - return null; - - java.lang.reflect.Method method; - - try - { - method = obj.getClass().getMethod ("getProperty", String.class); - } - catch (SecurityException e) { return null; } - catch (NoSuchMethodException e) { return null; } - - if (method == null) - return null; - - try - { - return (String) method.invoke (obj, property); - } - catch (java.lang.IllegalArgumentException e) {} - catch (java.lang.IllegalAccessException e) {} - catch (java.lang.reflect.InvocationTargetException e) {} - - return null; - } - - public final boolean hasSystemFeature (String property) - { - return getPackageManager().hasSystemFeature (property); - } -} diff --git a/extras/AudioPluginHost/Builds/Android/app/src/main/java/com/roli/juce/pluginhost/SharingContentProvider.java b/extras/AudioPluginHost/Builds/Android/app/src/main/java/com/roli/juce/pluginhost/SharingContentProvider.java deleted file mode 100644 index f8dd82b0..00000000 --- a/extras/AudioPluginHost/Builds/Android/app/src/main/java/com/roli/juce/pluginhost/SharingContentProvider.java +++ /dev/null @@ -1,138 +0,0 @@ -package com.roli.juce.pluginhost; - -import android.content.ContentProvider; -import android.content.ContentValues; -import android.content.res.AssetFileDescriptor; -import android.content.res.Resources; -import android.database.Cursor; -import android.database.MatrixCursor; -import android.net.Uri; -import android.os.FileObserver; -import android.os.ParcelFileDescriptor; -import java.lang.String; - -public final class SharingContentProvider extends ContentProvider -{ - private Object lock = new Object(); - - private native void contentSharerFileObserverEvent (long host, int event, String path); - - private native Cursor contentSharerQuery (Uri uri, String[] projection, String selection, - String[] selectionArgs, String sortOrder); - - private native void contentSharerCursorClosed (long host); - - private native AssetFileDescriptor contentSharerOpenFile (Uri uri, String mode); - private native String[] contentSharerGetStreamTypes (Uri uri, String mimeTypeFilter); - - public final class ProviderFileObserver extends FileObserver - { - public ProviderFileObserver (long hostToUse, String path, int mask) - { - super (path, mask); - - host = hostToUse; - } - - public void onEvent (int event, String path) - { - contentSharerFileObserverEvent (host, event, path); - } - - private long host; - } - - public final class ProviderCursor extends MatrixCursor - { - ProviderCursor (long hostToUse, String[] columnNames) - { - super (columnNames); - - host = hostToUse; - } - - @Override - public void close() - { - super.close(); - - contentSharerCursorClosed (host); - } - - private long host; - } - - @Override - public boolean onCreate() - { - return true; - } - - @Override - public Cursor query (Uri url, String[] projection, String selection, - String[] selectionArgs, String sortOrder) - { - synchronized (lock) - { - return contentSharerQuery (url, projection, selection, selectionArgs, sortOrder); - } - } - - @Override - public Uri insert (Uri uri, ContentValues values) - { - return null; - } - - @Override - public int update (Uri uri, ContentValues values, String selection, - String[] selectionArgs) - { - return 0; - } - - @Override - public int delete (Uri uri, String selection, String[] selectionArgs) - { - return 0; - } - - @Override - public String getType (Uri uri) - { - return null; - } - - @Override - public AssetFileDescriptor openAssetFile (Uri uri, String mode) - { - synchronized (lock) - { - return contentSharerOpenFile (uri, mode); - } - } - - @Override - public ParcelFileDescriptor openFile (Uri uri, String mode) - { - synchronized (lock) - { - AssetFileDescriptor result = contentSharerOpenFile (uri, mode); - - if (result != null) - return result.getParcelFileDescriptor(); - - return null; - } - } - - @Override - public String[] getStreamTypes (Uri uri, String mimeTypeFilter) - { - synchronized (lock) - { - return contentSharerGetStreamTypes (uri, mimeTypeFilter); - } - } - -} diff --git a/extras/AudioPluginHost/Builds/Android/settings.gradle b/extras/AudioPluginHost/Builds/Android/settings.gradle index 9d495b34..e0f55683 100644 --- a/extras/AudioPluginHost/Builds/Android/settings.gradle +++ b/extras/AudioPluginHost/Builds/Android/settings.gradle @@ -1 +1,2 @@ +rootProject.name = 'AudioPluginHost' include ':app' \ No newline at end of file diff --git a/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile b/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile index 65b7508f..e6bb5df3 100644 --- a/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile +++ b/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile @@ -35,13 +35,13 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 x11 xext xinerama 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 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa x11 xinerama xext freetype2 libcurl) -pthread -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) 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 JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) - JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa freetype2 x11 xext xinerama libcurl) -lGL -ldl -lpthread -lrt $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa x11 xinerama xext freetype2 libcurl) -lrt -ldl -lpthread -lGL $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -56,21 +56,21 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 x11 xext xinerama libcurl) -pthread -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa x11 xinerama xext freetype2 libcurl) -pthread -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) 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 JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -Os $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) - JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa freetype2 x11 xext xinerama libcurl) -fvisibility=hidden -lGL -ldl -lpthread -lrt $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa x11 xinerama xext freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif OBJECTS_APP := \ - $(JUCE_OBJDIR)/FilterGraph_769715e3.o \ - $(JUCE_OBJDIR)/FilterIOConfiguration_d1cf3d25.o \ - $(JUCE_OBJDIR)/InternalFilters_eceadbab.o \ + $(JUCE_OBJDIR)/InternalPlugins_8278e3f5.o \ + $(JUCE_OBJDIR)/IOConfigurationWindow_d71a5732.o \ + $(JUCE_OBJDIR)/PluginGraph_6bd15e2d.o \ $(JUCE_OBJDIR)/GraphEditorPanel_2223d925.o \ $(JUCE_OBJDIR)/MainHostWindow_b3494acd.o \ $(JUCE_OBJDIR)/HostStartup_5ce96f96.o \ @@ -96,26 +96,26 @@ all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : $(OBJECTS_APP) $(RESOURCES) @command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } - @pkg-config --print-errors alsa freetype2 x11 xext xinerama libcurl + @pkg-config --print-errors alsa x11 xinerama xext freetype2 libcurl @echo Linking "AudioPluginHost - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) -$(V_AT)mkdir -p $(JUCE_LIBDIR) -$(V_AT)mkdir -p $(JUCE_OUTDIR) $(V_AT)$(CXX) -o $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) $(OBJECTS_APP) $(JUCE_LDFLAGS) $(JUCE_LDFLAGS_APP) $(RESOURCES) $(TARGET_ARCH) -$(JUCE_OBJDIR)/FilterGraph_769715e3.o: ../../Source/Filters/FilterGraph.cpp +$(JUCE_OBJDIR)/InternalPlugins_8278e3f5.o: ../../Source/Plugins/InternalPlugins.cpp -$(V_AT)mkdir -p $(JUCE_OBJDIR) - @echo "Compiling FilterGraph.cpp" + @echo "Compiling InternalPlugins.cpp" $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" -$(JUCE_OBJDIR)/FilterIOConfiguration_d1cf3d25.o: ../../Source/Filters/FilterIOConfiguration.cpp +$(JUCE_OBJDIR)/IOConfigurationWindow_d71a5732.o: ../../Source/Plugins/IOConfigurationWindow.cpp -$(V_AT)mkdir -p $(JUCE_OBJDIR) - @echo "Compiling FilterIOConfiguration.cpp" + @echo "Compiling IOConfigurationWindow.cpp" $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" -$(JUCE_OBJDIR)/InternalFilters_eceadbab.o: ../../Source/Filters/InternalFilters.cpp +$(JUCE_OBJDIR)/PluginGraph_6bd15e2d.o: ../../Source/Plugins/PluginGraph.cpp -$(V_AT)mkdir -p $(JUCE_OBJDIR) - @echo "Compiling InternalFilters.cpp" + @echo "Compiling PluginGraph.cpp" $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" $(JUCE_OBJDIR)/GraphEditorPanel_2223d925.o: ../../Source/UI/GraphEditorPanel.cpp diff --git a/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj b/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj index 7b2e79b6..c99c747c 100644 --- a/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj +++ b/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj @@ -81,17 +81,17 @@ isa = PBXBuildFile; fileRef = 2A6983F82B13F9E8B10299AE; }; - 2E74188531792924F0C73142 = { + 7FF8A938915488310A7F5921 = { isa = PBXBuildFile; - fileRef = 05863BDFC582C9552A86DF49; + fileRef = 87A7AAB053051C49EAF4EE88; }; - C8423A9611C8AAF27468847D = { + 025B22813EA4E34CE3630B9A = { isa = PBXBuildFile; - fileRef = 336FD30C38BD0A176161B8AE; + fileRef = C37B2E77AAB6C9E13729BF99; }; - 786AF545C1C1E4D11140C3DF = { + 09309BD494A05931864B6730 = { isa = PBXBuildFile; - fileRef = 43647951ECC7F030B9953965; + fileRef = 0B1CC8C80F6F99BDE7D6AEC9; }; 3E1689E23B9C85F03209DCEF = { isa = PBXBuildFile; @@ -179,11 +179,11 @@ path = ../../Source/UI/GraphEditorPanel.h; sourceTree = "SOURCE_ROOT"; }; - 05863BDFC582C9552A86DF49 = { + 0B1CC8C80F6F99BDE7D6AEC9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; - name = FilterGraph.cpp; - path = ../../Source/Filters/FilterGraph.cpp; + name = PluginGraph.cpp; + path = ../../Source/Plugins/PluginGraph.cpp; sourceTree = "SOURCE_ROOT"; }; 1DADAD8E34AAF4AFF1C69DC4 = { @@ -228,13 +228,6 @@ path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - 336FD30C38BD0A176161B8AE = { - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = FilterIOConfiguration.cpp; - path = ../../Source/Filters/FilterIOConfiguration.cpp; - sourceTree = "SOURCE_ROOT"; - }; 37E4D5C341406B7072120006 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; @@ -263,11 +256,11 @@ path = ../../Source/UI/GraphEditorPanel.cpp; sourceTree = "SOURCE_ROOT"; }; - 43647951ECC7F030B9953965 = { + 46C3C2CD301CD59C51FD02D6 = { isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = InternalFilters.cpp; - path = ../../Source/Filters/InternalFilters.cpp; + lastKnownFileType = sourcecode.c.h; + name = PluginGraph.h; + path = ../../Source/Plugins/PluginGraph.h; sourceTree = "SOURCE_ROOT"; }; 4C7D82F9274A4F9DBF11235C = { @@ -291,13 +284,6 @@ path = "../../../../modules/juce_audio_devices"; sourceTree = "SOURCE_ROOT"; }; - 545D57A6AA801B38548B0CAC = { - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = FilterGraph.h; - path = ../../Source/Filters/FilterGraph.h; - sourceTree = "SOURCE_ROOT"; - }; 57DF618F1DE781556B7AFC32 = { isa = PBXFileReference; lastKnownFileType = text.plist.xml; @@ -375,13 +361,6 @@ path = ../../JuceLibraryCode/BinaryData.cpp; sourceTree = "SOURCE_ROOT"; }; - 725D0D9C8C7FF7B3FB3020ED = { - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = FilterIOConfiguration.h; - path = ../../Source/Filters/FilterIOConfiguration.h; - sourceTree = "SOURCE_ROOT"; - }; 7DA35787B5F6F7440D667CC8 = { isa = PBXFileReference; lastKnownFileType = file.nib; @@ -417,6 +396,13 @@ path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + 87A7AAB053051C49EAF4EE88 = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = InternalPlugins.cpp; + path = ../../Source/Plugins/InternalPlugins.cpp; + sourceTree = "SOURCE_ROOT"; + }; 89309C0C5F3269BD06BE7F27 = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; @@ -473,13 +459,6 @@ path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - 9EBEE3AE5856E877478607C7 = { - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = InternalFilters.h; - path = ../../Source/Filters/InternalFilters.h; - sourceTree = "SOURCE_ROOT"; - }; 9F9B445E6755CAA19E4344ED = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; @@ -564,6 +543,20 @@ path = "../../JuceLibraryCode/include_juce_cryptography.mm"; sourceTree = "SOURCE_ROOT"; }; + B95B9D6774059DBB19F2B4E2 = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = InternalPlugins.h; + path = ../../Source/Plugins/InternalPlugins.h; + sourceTree = "SOURCE_ROOT"; + }; + C37B2E77AAB6C9E13729BF99 = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = IOConfigurationWindow.cpp; + path = ../../Source/Plugins/IOConfigurationWindow.cpp; + sourceTree = "SOURCE_ROOT"; + }; D313CF37B25D7FD313C4F336 = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; @@ -592,6 +585,13 @@ path = System/Library/Frameworks/CoreAudioKit.framework; sourceTree = SDKROOT; }; + F14CDB17EFE157DA3C3A5A91 = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = IOConfigurationWindow.h; + path = ../../Source/Plugins/IOConfigurationWindow.h; + sourceTree = "SOURCE_ROOT"; + }; F299BECFB2AEA6105F014848 = { isa = PBXFileReference; lastKnownFileType = file; @@ -620,17 +620,17 @@ path = "../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; }; - AA37F82D57C9BB4BE78FCCB9 = { + 9F51E92D8C77FA9DDD1F7B10 = { isa = PBXGroup; children = ( - 05863BDFC582C9552A86DF49, - 545D57A6AA801B38548B0CAC, - 336FD30C38BD0A176161B8AE, - 725D0D9C8C7FF7B3FB3020ED, - 43647951ECC7F030B9953965, - 9EBEE3AE5856E877478607C7, + 87A7AAB053051C49EAF4EE88, + B95B9D6774059DBB19F2B4E2, + C37B2E77AAB6C9E13729BF99, + F14CDB17EFE157DA3C3A5A91, + 0B1CC8C80F6F99BDE7D6AEC9, + 46C3C2CD301CD59C51FD02D6, ); - name = Filters; + name = Plugins; sourceTree = ""; }; DE7B77306553B1204071B39A = { @@ -648,7 +648,7 @@ B225B7F2CAABD28A41E7C339 = { isa = PBXGroup; children = ( - AA37F82D57C9BB4BE78FCCB9, + 9F51E92D8C77FA9DDD1F7B10, DE7B77306553B1204071B39A, A66EFAC64B1B67B536C73415, B2A1E626CC120982805754F6, @@ -801,7 +801,7 @@ INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; + 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"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.pluginhost; PRODUCT_NAME = "AudioPluginHost"; USE_HEADERMAP = NO; @@ -847,7 +847,7 @@ INSTALL_PATH = "$(HOME)/Applications"; LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.11; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; + 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"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.pluginhost; PRODUCT_NAME = "AudioPluginHost"; USE_HEADERMAP = NO; @@ -876,7 +876,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; @@ -895,7 +895,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "AudioPluginHost"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Debug; @@ -922,7 +922,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; @@ -939,7 +939,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "AudioPluginHost"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Release; @@ -979,9 +979,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2E74188531792924F0C73142, - C8423A9611C8AAF27468847D, - 786AF545C1C1E4D11140C3DF, + 7FF8A938915488310A7F5921, + 025B22813EA4E34CE3630B9A, + 09309BD494A05931864B6730, 3E1689E23B9C85F03209DCEF, F635D974599DEC2ED91E6A88, A1B0416DA378BB0C3AD6F74B, @@ -1044,13 +1044,14 @@ ADE6E539DB98A302483A82D0 = { isa = PBXProject; buildConfigurationList = 493C2C5E457692E5149C5525; - attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; 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; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1100; ORGANIZATIONNAME = "ROLI Ltd."; 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; projectDirPath = ""; projectRoot = ""; targets = (DE12B7643D374BFF7E4FEB1C); + knownRegions = (en, Base); }; }; rootObject = ADE6E539DB98A302483A82D0; diff --git a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj index b8021926..a65519c4 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj @@ -74,6 +74,7 @@ Level4 true true + /w44265 /w44062 /bigobj %(AdditionalOptions) stdcpp14 @@ -115,6 +116,7 @@ Level4 true true + /w44265 /w44062 /bigobj %(AdditionalOptions) stdcpp14 @@ -138,9 +140,9 @@ - - - + + + @@ -237,6 +239,9 @@ true + + true + true @@ -249,10 +254,10 @@ true - + true - + true @@ -594,12 +599,27 @@ true - + + true + + + true + + + true + + + true + + true true + + true + true @@ -1515,9 +1535,6 @@ true - - true - true @@ -1907,9 +1924,9 @@ - - - + + + @@ -1951,16 +1968,15 @@ - + - + - @@ -2115,6 +2131,7 @@ + @@ -2289,6 +2306,7 @@ + @@ -2392,6 +2410,7 @@ + @@ -2615,8 +2634,11 @@ + + + diff --git a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters index 3199fa45..74ef99ca 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters @@ -2,8 +2,8 @@ - - {01436C03-42F4-5952-30EF-7F9E81D997C6} + + {346E906D-8A2B-A93A-4C90-BCD3C60D2FD0} {8C61EB30-11E6-7029-4CC8-56C52EB1F1C3} @@ -430,14 +430,14 @@ - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins AudioPluginHost\Source\UI @@ -541,6 +541,9 @@ JUCE Modules\juce_audio_basics\utilities + + JUCE Modules\juce_audio_basics\utilities + JUCE Modules\juce_audio_basics @@ -556,10 +559,10 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io - + JUCE Modules\juce_audio_devices\midi_io @@ -910,12 +913,27 @@ JUCE Modules\juce_audio_processors\scanning - + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities + JUCE Modules\juce_audio_processors @@ -1891,9 +1909,6 @@ JUCE Modules\juce_gui_basics\layout - - JUCE Modules\juce_gui_basics\layout - JUCE Modules\juce_gui_basics\layout @@ -2361,14 +2376,14 @@ - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins AudioPluginHost\Source\UI @@ -2493,10 +2508,10 @@ JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities @@ -2514,15 +2529,12 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io JUCE Modules\juce_audio_devices\midi_io - - JUCE Modules\juce_audio_devices\midi_io - JUCE Modules\juce_audio_devices\native @@ -2985,6 +2997,9 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst @@ -3507,6 +3522,9 @@ JUCE Modules\juce_core\unit_tests + + JUCE Modules\juce_core\unit_tests + JUCE Modules\juce_core\xml @@ -3816,6 +3834,9 @@ JUCE Modules\juce_graphics\image_formats\pnglib + + JUCE Modules\juce_graphics\image_formats\pnglib + JUCE Modules\juce_graphics\image_formats\pnglib @@ -4481,12 +4502,21 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + JUCE Modules\juce_audio_processors\format_types\VST3_SDK diff --git a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj index 22df94ac..630e31bd 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj @@ -140,9 +140,9 @@ - - - + + + @@ -239,6 +239,9 @@ true + + true + true @@ -251,10 +254,10 @@ true - + true - + true @@ -596,12 +599,27 @@ true - + + true + + + true + + + true + + + true + + true true + + true + true @@ -1517,9 +1535,6 @@ true - - true - true @@ -1909,9 +1924,9 @@ - - - + + + @@ -1953,16 +1968,15 @@ - + - + - @@ -2117,6 +2131,7 @@ + @@ -2291,6 +2306,7 @@ + @@ -2394,6 +2410,7 @@ + @@ -2617,8 +2634,11 @@ + + + diff --git a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters index ffc6618f..3d2f4476 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters @@ -2,8 +2,8 @@ - - {01436C03-42F4-5952-30EF-7F9E81D997C6} + + {346E906D-8A2B-A93A-4C90-BCD3C60D2FD0} {8C61EB30-11E6-7029-4CC8-56C52EB1F1C3} @@ -430,14 +430,14 @@ - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins AudioPluginHost\Source\UI @@ -541,6 +541,9 @@ JUCE Modules\juce_audio_basics\utilities + + JUCE Modules\juce_audio_basics\utilities + JUCE Modules\juce_audio_basics @@ -556,10 +559,10 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io - + JUCE Modules\juce_audio_devices\midi_io @@ -910,12 +913,27 @@ JUCE Modules\juce_audio_processors\scanning - + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities + JUCE Modules\juce_audio_processors @@ -1891,9 +1909,6 @@ JUCE Modules\juce_gui_basics\layout - - JUCE Modules\juce_gui_basics\layout - JUCE Modules\juce_gui_basics\layout @@ -2361,14 +2376,14 @@ - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins AudioPluginHost\Source\UI @@ -2493,10 +2508,10 @@ JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities @@ -2514,15 +2529,12 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io JUCE Modules\juce_audio_devices\midi_io - - JUCE Modules\juce_audio_devices\midi_io - JUCE Modules\juce_audio_devices\native @@ -2985,6 +2997,9 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst @@ -3507,6 +3522,9 @@ JUCE Modules\juce_core\unit_tests + + JUCE Modules\juce_core\unit_tests + JUCE Modules\juce_core\xml @@ -3816,6 +3834,9 @@ JUCE Modules\juce_graphics\image_formats\pnglib + + JUCE Modules\juce_graphics\image_formats\pnglib + JUCE Modules\juce_graphics\image_formats\pnglib @@ -4481,12 +4502,21 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + JUCE Modules\juce_audio_processors\format_types\VST3_SDK diff --git a/extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost.sln b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost.sln similarity index 54% rename from extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost.sln rename to extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost.sln index b3d46f55..80fab7f6 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost.sln +++ b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost.sln @@ -1,18 +1,18 @@ Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2013 +# Visual Studio 2019 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioPluginHost - App", "AudioPluginHost_App.vcxproj", "{5666EAA2-C82B-D06A-5228-D0E810428536}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5666EAA2-C82B-D06A-5228-D0E810428536}.Debug|Win32.ActiveCfg = Debug|Win32 - {5666EAA2-C82B-D06A-5228-D0E810428536}.Debug|Win32.Build.0 = Debug|Win32 - {5666EAA2-C82B-D06A-5228-D0E810428536}.Release|Win32.ActiveCfg = Release|Win32 - {5666EAA2-C82B-D06A-5228-D0E810428536}.Release|Win32.Build.0 = Release|Win32 + {5666EAA2-C82B-D06A-5228-D0E810428536}.Debug|x64.ActiveCfg = Debug|x64 + {5666EAA2-C82B-D06A-5228-D0E810428536}.Debug|x64.Build.0 = Debug|x64 + {5666EAA2-C82B-D06A-5228-D0E810428536}.Release|x64.ActiveCfg = Release|x64 + {5666EAA2-C82B-D06A-5228-D0E810428536}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj similarity index 96% rename from extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj rename to extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj index 8e20ebbc..007c667c 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj @@ -1,37 +1,37 @@ - + Debug - Win32 + x64 - + Release - Win32 + x64 {5666EAA2-C82B-D06A-5228-D0E810428536} - Application false false - v120 - 8.1 + v142 + 10.0 - Application false true - v120 - 8.1 + v142 + 10.0 @@ -43,16 +43,16 @@ <_ProjectFileVersion>10.0.30319.1 .exe - $(SolutionDir)$(Platform)\$(Configuration)\App\ - $(Platform)\$(Configuration)\App\ - AudioPluginHost - true - $(SolutionDir)$(Platform)\$(Configuration)\App\ - $(Platform)\$(Configuration)\App\ - AudioPluginHost - true + $(SolutionDir)$(Platform)\$(Configuration)\App\ + $(Platform)\$(Configuration)\App\ + AudioPluginHost + true + $(SolutionDir)$(Platform)\$(Configuration)\App\ + $(Platform)\$(Configuration)\App\ + AudioPluginHost + true - + _DEBUG;%(PreprocessorDefinitions) true @@ -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;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;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 @@ -74,6 +74,7 @@ Level4 true true + /w44265 /w45038 /w44062 %(AdditionalOptions) stdcpp14 @@ -86,7 +87,6 @@ true $(IntDir)\AudioPluginHost.pdb Windows - MachineX86 true @@ -95,7 +95,7 @@ - + NDEBUG;%(PreprocessorDefinitions) true @@ -106,7 +106,7 @@ Full ..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;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 @@ -116,6 +116,7 @@ Level4 true true + /w44265 /w45038 /w44062 %(AdditionalOptions) stdcpp14 @@ -128,7 +129,6 @@ false $(IntDir)\AudioPluginHost.pdb Windows - MachineX86 true true true @@ -140,9 +140,9 @@ - - - + + + @@ -239,6 +239,9 @@ true + + true + true @@ -251,10 +254,10 @@ true - + true - + true @@ -596,12 +599,27 @@ true - + + true + + + true + + + true + + + true + + true true + + true + true @@ -1517,9 +1535,6 @@ true - - true - true @@ -1909,9 +1924,9 @@ - - - + + + @@ -1953,16 +1968,15 @@ - + - + - @@ -2117,6 +2131,7 @@ + @@ -2291,6 +2306,7 @@ + @@ -2394,6 +2410,7 @@ + @@ -2617,8 +2634,11 @@ + + + diff --git a/extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters similarity index 97% rename from extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj.filters rename to extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters index d1a0fb60..3b679132 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters @@ -1,9 +1,9 @@ - + - - {01436C03-42F4-5952-30EF-7F9E81D997C6} + + {346E906D-8A2B-A93A-4C90-BCD3C60D2FD0} {8C61EB30-11E6-7029-4CC8-56C52EB1F1C3} @@ -430,14 +430,14 @@ - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins AudioPluginHost\Source\UI @@ -541,6 +541,9 @@ JUCE Modules\juce_audio_basics\utilities + + JUCE Modules\juce_audio_basics\utilities + JUCE Modules\juce_audio_basics @@ -556,10 +559,10 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io - + JUCE Modules\juce_audio_devices\midi_io @@ -910,12 +913,27 @@ JUCE Modules\juce_audio_processors\scanning - + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities + JUCE Modules\juce_audio_processors @@ -1891,9 +1909,6 @@ JUCE Modules\juce_gui_basics\layout - - JUCE Modules\juce_gui_basics\layout - JUCE Modules\juce_gui_basics\layout @@ -2361,14 +2376,14 @@ - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins - - AudioPluginHost\Source\Filters + + AudioPluginHost\Source\Plugins AudioPluginHost\Source\UI @@ -2493,10 +2508,10 @@ JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities @@ -2514,15 +2529,12 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io JUCE Modules\juce_audio_devices\midi_io - - JUCE Modules\juce_audio_devices\midi_io - JUCE Modules\juce_audio_devices\native @@ -2985,6 +2997,9 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst @@ -3507,6 +3522,9 @@ JUCE Modules\juce_core\unit_tests + + JUCE Modules\juce_core\unit_tests + JUCE Modules\juce_core\xml @@ -3816,6 +3834,9 @@ JUCE Modules\juce_graphics\image_formats\pnglib + + JUCE Modules\juce_graphics\image_formats\pnglib + JUCE Modules\juce_graphics\image_formats\pnglib @@ -4481,12 +4502,21 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + JUCE Modules\juce_audio_processors\format_types\VST3_SDK diff --git a/extras/AudioPluginHost/Builds/VisualStudio2013/icon.ico b/extras/AudioPluginHost/Builds/VisualStudio2019/icon.ico similarity index 100% rename from extras/AudioPluginHost/Builds/VisualStudio2013/icon.ico rename to extras/AudioPluginHost/Builds/VisualStudio2019/icon.ico diff --git a/extras/AudioPluginHost/Builds/VisualStudio2013/resources.rc b/extras/AudioPluginHost/Builds/VisualStudio2019/resources.rc similarity index 100% rename from extras/AudioPluginHost/Builds/VisualStudio2013/resources.rc rename to extras/AudioPluginHost/Builds/VisualStudio2019/resources.rc diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj index 0a7f1cbc..b7546839 100644 --- a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj +++ b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj @@ -85,17 +85,17 @@ isa = PBXBuildFile; fileRef = 2A6983F82B13F9E8B10299AE; }; - 2E74188531792924F0C73142 = { + 7FF8A938915488310A7F5921 = { isa = PBXBuildFile; - fileRef = 05863BDFC582C9552A86DF49; + fileRef = 87A7AAB053051C49EAF4EE88; }; - C8423A9611C8AAF27468847D = { + 025B22813EA4E34CE3630B9A = { isa = PBXBuildFile; - fileRef = 336FD30C38BD0A176161B8AE; + fileRef = C37B2E77AAB6C9E13729BF99; }; - 786AF545C1C1E4D11140C3DF = { + 09309BD494A05931864B6730 = { isa = PBXBuildFile; - fileRef = 43647951ECC7F030B9953965; + fileRef = 0B1CC8C80F6F99BDE7D6AEC9; }; 3E1689E23B9C85F03209DCEF = { isa = PBXBuildFile; @@ -190,11 +190,11 @@ path = ../../Source/UI/GraphEditorPanel.h; sourceTree = "SOURCE_ROOT"; }; - 05863BDFC582C9552A86DF49 = { + 0B1CC8C80F6F99BDE7D6AEC9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; - name = FilterGraph.cpp; - path = ../../Source/Filters/FilterGraph.cpp; + name = PluginGraph.cpp; + path = ../../Source/Plugins/PluginGraph.cpp; sourceTree = "SOURCE_ROOT"; }; 1DADAD8E34AAF4AFF1C69DC4 = { @@ -253,13 +253,6 @@ path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - 336FD30C38BD0A176161B8AE = { - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = FilterIOConfiguration.cpp; - path = ../../Source/Filters/FilterIOConfiguration.cpp; - sourceTree = "SOURCE_ROOT"; - }; 37E4D5C341406B7072120006 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; @@ -288,11 +281,11 @@ path = ../../Source/UI/GraphEditorPanel.cpp; sourceTree = "SOURCE_ROOT"; }; - 43647951ECC7F030B9953965 = { + 46C3C2CD301CD59C51FD02D6 = { isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = InternalFilters.cpp; - path = ../../Source/Filters/InternalFilters.cpp; + lastKnownFileType = sourcecode.c.h; + name = PluginGraph.h; + path = ../../Source/Plugins/PluginGraph.h; sourceTree = "SOURCE_ROOT"; }; 4C7D82F9274A4F9DBF11235C = { @@ -309,13 +302,6 @@ path = "../../../../modules/juce_audio_devices"; sourceTree = "SOURCE_ROOT"; }; - 545D57A6AA801B38548B0CAC = { - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = FilterGraph.h; - path = ../../Source/Filters/FilterGraph.h; - sourceTree = "SOURCE_ROOT"; - }; 57DF618F1DE781556B7AFC32 = { isa = PBXFileReference; lastKnownFileType = text.plist.xml; @@ -393,13 +379,6 @@ path = ../../JuceLibraryCode/BinaryData.cpp; sourceTree = "SOURCE_ROOT"; }; - 725D0D9C8C7FF7B3FB3020ED = { - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = FilterIOConfiguration.h; - path = ../../Source/Filters/FilterIOConfiguration.h; - sourceTree = "SOURCE_ROOT"; - }; 81C1A7770E082F56FE5A90A7 = { isa = PBXFileReference; lastKnownFileType = file; @@ -428,6 +407,13 @@ path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + 87A7AAB053051C49EAF4EE88 = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = InternalPlugins.cpp; + path = ../../Source/Plugins/InternalPlugins.cpp; + sourceTree = "SOURCE_ROOT"; + }; 89309C0C5F3269BD06BE7F27 = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; @@ -477,13 +463,6 @@ path = ../../Source/UI/PluginWindow.h; sourceTree = "SOURCE_ROOT"; }; - 9EBEE3AE5856E877478607C7 = { - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = InternalFilters.h; - path = ../../Source/Filters/InternalFilters.h; - sourceTree = "SOURCE_ROOT"; - }; 9F9B445E6755CAA19E4344ED = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; @@ -554,6 +533,20 @@ path = "../../JuceLibraryCode/include_juce_cryptography.mm"; sourceTree = "SOURCE_ROOT"; }; + B95B9D6774059DBB19F2B4E2 = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = InternalPlugins.h; + path = ../../Source/Plugins/InternalPlugins.h; + sourceTree = "SOURCE_ROOT"; + }; + C37B2E77AAB6C9E13729BF99 = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = IOConfigurationWindow.cpp; + path = ../../Source/Plugins/IOConfigurationWindow.cpp; + sourceTree = "SOURCE_ROOT"; + }; CFFA8E9A7820C5A27B4393C9 = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; @@ -589,6 +582,13 @@ path = System/Library/Frameworks/CoreAudioKit.framework; sourceTree = SDKROOT; }; + F14CDB17EFE157DA3C3A5A91 = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = IOConfigurationWindow.h; + path = ../../Source/Plugins/IOConfigurationWindow.h; + sourceTree = "SOURCE_ROOT"; + }; F299BECFB2AEA6105F014848 = { isa = PBXFileReference; lastKnownFileType = file; @@ -631,17 +631,17 @@ path = "../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; }; - AA37F82D57C9BB4BE78FCCB9 = { + 9F51E92D8C77FA9DDD1F7B10 = { isa = PBXGroup; children = ( - 05863BDFC582C9552A86DF49, - 545D57A6AA801B38548B0CAC, - 336FD30C38BD0A176161B8AE, - 725D0D9C8C7FF7B3FB3020ED, - 43647951ECC7F030B9953965, - 9EBEE3AE5856E877478607C7, + 87A7AAB053051C49EAF4EE88, + B95B9D6774059DBB19F2B4E2, + C37B2E77AAB6C9E13729BF99, + F14CDB17EFE157DA3C3A5A91, + 0B1CC8C80F6F99BDE7D6AEC9, + 46C3C2CD301CD59C51FD02D6, ); - name = Filters; + name = Plugins; sourceTree = ""; }; DE7B77306553B1204071B39A = { @@ -659,7 +659,7 @@ B225B7F2CAABD28A41E7C339 = { isa = PBXGroup; children = ( - AA37F82D57C9BB4BE78FCCB9, + 9F51E92D8C77FA9DDD1F7B10, DE7B77306553B1204071B39A, A66EFAC64B1B67B536C73415, B2A1E626CC120982805754F6, @@ -814,6 +814,7 @@ INFOPLIST_FILE = Info-App.plist; INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.pluginhost; PRODUCT_NAME = "Plugin Host"; USE_HEADERMAP = NO; @@ -860,6 +861,7 @@ INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; LLVM_LTO = YES; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.pluginhost; PRODUCT_NAME = "Plugin Host"; USE_HEADERMAP = NO; @@ -889,7 +891,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; @@ -911,7 +913,7 @@ PRODUCT_NAME = "Plugin Host"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Debug; @@ -939,7 +941,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; @@ -959,7 +961,7 @@ PRODUCT_NAME = "Plugin Host"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Release; @@ -1000,9 +1002,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2E74188531792924F0C73142, - C8423A9611C8AAF27468847D, - 786AF545C1C1E4D11140C3DF, + 7FF8A938915488310A7F5921, + 025B22813EA4E34CE3630B9A, + 09309BD494A05931864B6730, 3E1689E23B9C85F03209DCEF, F635D974599DEC2ED91E6A88, A1B0416DA378BB0C3AD6F74B, @@ -1065,13 +1067,14 @@ ADE6E539DB98A302483A82D0 = { isa = PBXProject; buildConfigurationList = 493C2C5E457692E5149C5525; - attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; 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; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1100; ORGANIZATIONNAME = "ROLI Ltd."; 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; projectDirPath = ""; projectRoot = ""; targets = (DE12B7643D374BFF7E4FEB1C); + knownRegions = (en, Base); }; }; rootObject = ADE6E539DB98A302483A82D0; diff --git a/extras/AudioPluginHost/JuceLibraryCode/AppConfig.h b/extras/AudioPluginHost/JuceLibraryCode/AppConfig.h index 2b5f6944..f2c41a73 100644 --- a/extras/AudioPluginHost/JuceLibraryCode/AppConfig.h +++ b/extras/AudioPluginHost/JuceLibraryCode/AppConfig.h @@ -191,7 +191,7 @@ #endif #ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL 0 + //#define JUCE_USE_CURL 1 #endif #ifndef JUCE_LOAD_CURL_SYMBOLS_LAZILY @@ -199,11 +199,11 @@ #endif #ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 0 #endif #ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 0 #endif #ifndef JUCE_STRICT_REFCOUNTEDPOINTER diff --git a/extras/AudioPluginHost/Source/HostStartup.cpp b/extras/AudioPluginHost/Source/HostStartup.cpp index 63e8713b..49d8e52e 100644 --- a/extras/AudioPluginHost/Source/HostStartup.cpp +++ b/extras/AudioPluginHost/Source/HostStartup.cpp @@ -26,7 +26,7 @@ #include "../JuceLibraryCode/JuceHeader.h" #include "UI/MainHostWindow.h" -#include "Filters/InternalFilters.h" +#include "Plugins/InternalPlugins.h" #if ! (JUCE_PLUGINHOST_VST || JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_AU) #error "If you're building the audio plugin host, you probably want to enable VST and/or AU support" @@ -76,7 +76,7 @@ public: File fileToOpen; #if JUCE_ANDROID || JUCE_IOS - fileToOpen = FilterGraph::getDefaultGraphDocumentOnMobile(); + fileToOpen = PluginGraph::getDefaultGraphDocumentOnMobile(); #else for (int i = 0; i < getCommandLineParameterArray().size(); ++i) { @@ -112,9 +112,9 @@ public: void suspended() override { #if JUCE_ANDROID || JUCE_IOS - if (GraphDocumentComponent* graph = mainWindow->graphHolder.get()) - if (FilterGraph* ioGraph = graph->graph.get()) - ioGraph->saveDocument (FilterGraph::getDefaultGraphDocumentOnMobile()); + if (auto graph = mainWindow->graphHolder.get()) + if (auto ioGraph = graph->graph.get()) + ioGraph->saveDocument (PluginGraph::getDefaultGraphDocumentOnMobile()); #endif } diff --git a/extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.cpp b/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.cpp similarity index 89% rename from extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.cpp rename to extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.cpp index f5dc0b16..2a8ac4d0 100644 --- a/extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.cpp +++ b/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.cpp @@ -26,9 +26,9 @@ #include "../JuceLibraryCode/JuceHeader.h" #include "../UI/GraphEditorPanel.h" -#include "InternalFilters.h" +#include "InternalPlugins.h" #include "../UI/MainHostWindow.h" -#include "FilterIOConfiguration.h" +#include "IOConfigurationWindow.h" //============================================================================== @@ -171,13 +171,13 @@ private: }; //============================================================================== -class FilterIOConfigurationWindow::InputOutputConfig : public Component, - private ComboBox::Listener, - private Button::Listener, - private NumberedBoxes::Listener +class IOConfigurationWindow::InputOutputConfig : public Component, + private ComboBox::Listener, + private Button::Listener, + private NumberedBoxes::Listener { public: - InputOutputConfig (FilterIOConfigurationWindow& parent, bool direction) + InputOutputConfig (IOConfigurationWindow& parent, bool direction) : owner (parent), ioTitle ("ioLabel", direction ? "Input Configuration" : "Output Configuration"), ioBuses (*this, false, false), @@ -235,12 +235,12 @@ public: private: void updateBusButtons() { - if (auto* filter = owner.getAudioProcessor()) + if (auto* plugin = owner.getAudioProcessor()) { auto& header = ioBuses.getHeader(); header.removeAllColumns(); - const int n = filter->getBusCount (isInput); + const int n = plugin->getBusCount (isInput); for (int i = 0; i < n; ++i) header.addColumn ("", i + 1, 40); @@ -248,8 +248,8 @@ private: header.addColumn ("+", NumberedBoxes::plusButtonColumnId, 20); header.addColumn ("-", NumberedBoxes::minusButtonColumnId, 20); - ioBuses.setCanAddColumn (filter->canAddBus (isInput)); - ioBuses.setCanRemoveColumn (filter->canRemoveBus (isInput)); + ioBuses.setCanAddColumn (plugin->canAddBus (isInput)); + ioBuses.setCanRemoveColumn (plugin->canRemoveBus (isInput)); } ioBuses.setSelected (currentBus + 1); @@ -257,9 +257,9 @@ private: void updateBusLayout() { - if (auto* filter = owner.getAudioProcessor()) + if (auto* plugin = owner.getAudioProcessor()) { - if (auto* bus = filter->getBus (isInput, currentBus)) + if (auto* bus = plugin->getBus (isInput, currentBus)) { name.setText (bus->getName(), NotificationType::dontSendNotification); @@ -418,7 +418,7 @@ private: } //============================================================================== - FilterIOConfigurationWindow& owner; + IOConfigurationWindow& owner; Label ioTitle, name; Label nameLabel { "nameLabel", "Bus Name:" }; Label layoutLabel { "layoutLabel", "Channel Layout:" }; @@ -432,7 +432,7 @@ private: }; -FilterIOConfigurationWindow::FilterIOConfigurationWindow (AudioProcessor& p) +IOConfigurationWindow::IOConfigurationWindow (AudioProcessor& p) : AudioProcessorEditor (&p), title ("title", p.getName()) { @@ -463,7 +463,7 @@ FilterIOConfigurationWindow::FilterIOConfigurationWindow (AudioProcessor& p) setSize (400, (inConfig != nullptr && outConfig != nullptr ? 160 : 0) + 200); } -FilterIOConfigurationWindow::~FilterIOConfigurationWindow() +IOConfigurationWindow::~IOConfigurationWindow() { if (auto* graph = getGraph()) { @@ -483,12 +483,12 @@ FilterIOConfigurationWindow::~FilterIOConfigurationWindow() } } -void FilterIOConfigurationWindow::paint (Graphics& g) +void IOConfigurationWindow::paint (Graphics& g) { g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); } -void FilterIOConfigurationWindow::resized() +void IOConfigurationWindow::resized() { auto r = getLocalBounds().reduced (10); @@ -502,7 +502,7 @@ void FilterIOConfigurationWindow::resized() outConfig->setBounds (r.removeFromTop (160)); } -void FilterIOConfigurationWindow::update() +void IOConfigurationWindow::update() { auto nodeID = getNodeID(); @@ -515,7 +515,7 @@ void FilterIOConfigurationWindow::update() panel->updateComponents(); } -AudioProcessorGraph::NodeID FilterIOConfigurationWindow::getNodeID() const +AudioProcessorGraph::NodeID IOConfigurationWindow::getNodeID() const { if (auto* graph = getGraph()) for (auto* node : graph->getNodes()) @@ -525,7 +525,7 @@ AudioProcessorGraph::NodeID FilterIOConfigurationWindow::getNodeID() const return {}; } -MainHostWindow* FilterIOConfigurationWindow::getMainWindow() const +MainHostWindow* IOConfigurationWindow::getMainWindow() const { auto& desktop = Desktop::getInstance(); @@ -536,7 +536,7 @@ MainHostWindow* FilterIOConfigurationWindow::getMainWindow() const return nullptr; } -GraphDocumentComponent* FilterIOConfigurationWindow::getGraphEditor() const +GraphDocumentComponent* IOConfigurationWindow::getGraphEditor() const { if (auto* mainWindow = getMainWindow()) return mainWindow->graphHolder.get(); @@ -544,7 +544,7 @@ GraphDocumentComponent* FilterIOConfigurationWindow::getGraphEditor() const return nullptr; } -AudioProcessorGraph* FilterIOConfigurationWindow::getGraph() const +AudioProcessorGraph* IOConfigurationWindow::getGraph() const { if (auto* graphEditor = getGraphEditor()) if (auto* panel = graphEditor->graph.get()) diff --git a/extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.h b/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.h similarity index 85% rename from extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.h rename to extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.h index 4fcf3ba6..ec7123ed 100644 --- a/extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.h +++ b/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.h @@ -31,11 +31,11 @@ class GraphDocumentComponent; //============================================================================== -class FilterIOConfigurationWindow : public AudioProcessorEditor +class IOConfigurationWindow : public AudioProcessorEditor { public: - FilterIOConfigurationWindow (AudioProcessor&); - ~FilterIOConfigurationWindow(); + IOConfigurationWindow (AudioProcessor&); + ~IOConfigurationWindow() override; //============================================================================== void paint (Graphics& g) override; @@ -56,5 +56,5 @@ private: AudioProcessorGraph* getGraph() const; AudioProcessorGraph::NodeID getNodeID() const; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FilterIOConfigurationWindow) + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (IOConfigurationWindow) }; diff --git a/extras/AudioPluginHost/Source/Filters/InternalFilters.cpp b/extras/AudioPluginHost/Source/Plugins/InternalPlugins.cpp similarity index 83% rename from extras/AudioPluginHost/Source/Filters/InternalFilters.cpp rename to extras/AudioPluginHost/Source/Plugins/InternalPlugins.cpp index e2f96328..ac887559 100644 --- a/extras/AudioPluginHost/Source/Filters/InternalFilters.cpp +++ b/extras/AudioPluginHost/Source/Plugins/InternalPlugins.cpp @@ -25,8 +25,8 @@ */ #include "../JuceLibraryCode/JuceHeader.h" -#include "InternalFilters.h" -#include "FilterGraph.h" +#include "InternalPlugins.h" +#include "PluginGraph.h" //============================================================================== class InternalPlugin : public AudioPluginInstance @@ -64,10 +64,8 @@ public: bool isBusesLayoutSupported (const BusesLayout& layout) const override { if (! isGenerator) - { if (layout.getMainOutputChannelSet() != channelSet) return false; - } if (layout.getMainInputChannelSet() != channelSet) return false; @@ -130,7 +128,7 @@ private: class SineWaveSynth : public InternalPlugin { public: - SineWaveSynth (const PluginDescription& descr) : InternalPlugin (descr) + SineWaveSynth (const PluginDescription& descr) : InternalPlugin (descr) { const int numVoices = 8; @@ -170,24 +168,21 @@ public: buffer.applyGain (0.8f); } + using InternalPlugin::processBlock; + private: //============================================================================== - class SineWaveSound : public SynthesiserSound + struct SineWaveSound : public SynthesiserSound { - public: - SineWaveSound() {} + SineWaveSound() = default; bool appliesToNote (int /*midiNoteNumber*/) override { return true; } bool appliesToChannel (int /*midiChannel*/) override { return true; } }; - class SineWaveVoice : public SynthesiserVoice + struct SineWaveVoice : public SynthesiserVoice { - public: - SineWaveVoice() - : currentAngle (0), angleDelta (0), level (0), tailOff (0) - { - } + SineWaveVoice() = default; bool canPlaySound (SynthesiserSound* sound) override { @@ -282,8 +277,10 @@ private: } } + using SynthesiserVoice::renderNextBlock; + private: - double currentAngle, angleDelta, level, tailOff; + double currentAngle = 0, angleDelta = 0, level = 0, tailOff = 0; }; //============================================================================== @@ -294,10 +291,10 @@ private: }; //============================================================================== -class ReverbFilter : public InternalPlugin +class ReverbPlugin : public InternalPlugin { public: - ReverbFilter (const PluginDescription& descr) : InternalPlugin (descr) + ReverbPlugin (const PluginDescription& descr) : InternalPlugin (descr) {} static String getIdentifier() @@ -337,6 +334,8 @@ public: buffer.clear (ch, 0, buffer.getNumSamples()); } + using InternalPlugin::processBlock; + private: Reverb reverb; }; @@ -360,40 +359,36 @@ InternalPluginFormat::InternalPluginFormat() } } -AudioPluginInstance* InternalPluginFormat::createInstance (const String& name) +std::unique_ptr InternalPluginFormat::createInstance (const String& name) { - if (name == audioOutDesc.name) return new AudioProcessorGraph::AudioGraphIOProcessor (AudioProcessorGraph::AudioGraphIOProcessor::audioOutputNode); - if (name == audioInDesc.name) return new AudioProcessorGraph::AudioGraphIOProcessor (AudioProcessorGraph::AudioGraphIOProcessor::audioInputNode); - if (name == midiInDesc.name) return new AudioProcessorGraph::AudioGraphIOProcessor (AudioProcessorGraph::AudioGraphIOProcessor::midiInputNode); + if (name == audioOutDesc.name) return std::make_unique (AudioProcessorGraph::AudioGraphIOProcessor::audioOutputNode); + if (name == audioInDesc.name) return std::make_unique (AudioProcessorGraph::AudioGraphIOProcessor::audioInputNode); + if (name == midiInDesc.name) return std::make_unique (AudioProcessorGraph::AudioGraphIOProcessor::midiInputNode); + if (name == SineWaveSynth::getIdentifier()) return std::make_unique (SineWaveSynth::getPluginDescription()); + if (name == ReverbPlugin::getIdentifier()) return std::make_unique (ReverbPlugin::getPluginDescription()); - if (name == SineWaveSynth::getIdentifier()) return new SineWaveSynth (SineWaveSynth::getPluginDescription()); - if (name == ReverbFilter::getIdentifier()) return new ReverbFilter (ReverbFilter::getPluginDescription()); - - return nullptr; + return {}; } void InternalPluginFormat::createPluginInstance (const PluginDescription& desc, - double /*initialSampleRate*/, - int /*initialBufferSize*/, - void* userData, + double /*initialSampleRate*/, int /*initialBufferSize*/, PluginCreationCallback callback) { - auto* p = createInstance (desc.name); - - callback (userData, p, p == nullptr ? NEEDS_TRANS ("Invalid internal filter name") : String()); + if (auto p = createInstance (desc.name)) + callback (std::move (p), {}); + else + callback (nullptr, NEEDS_TRANS ("Invalid internal plugin name")); } -bool InternalPluginFormat::requiresUnblockedMessageThreadDuringCreation (const PluginDescription&) const noexcept +bool InternalPluginFormat::requiresUnblockedMessageThreadDuringCreation (const PluginDescription&) const { return false; } -void InternalPluginFormat::getAllTypes (OwnedArray& results) +void InternalPluginFormat::getAllTypes (Array& results) { - results.add (new PluginDescription (audioInDesc)); - results.add (new PluginDescription (audioOutDesc)); - results.add (new PluginDescription (midiInDesc)); - results.add (new PluginDescription (SineWaveSynth::getPluginDescription())); - results.add (new PluginDescription (ReverbFilter::getPluginDescription())); + results.add (audioInDesc, audioOutDesc, midiInDesc, + SineWaveSynth::getPluginDescription(), + ReverbPlugin::getPluginDescription()); } diff --git a/extras/AudioPluginHost/Source/Filters/InternalFilters.h b/extras/AudioPluginHost/Source/Plugins/InternalPlugins.h similarity index 78% rename from extras/AudioPluginHost/Source/Filters/InternalFilters.h rename to extras/AudioPluginHost/Source/Plugins/InternalPlugins.h index 4432ff08..82baf6e7 100644 --- a/extras/AudioPluginHost/Source/Filters/InternalFilters.h +++ b/extras/AudioPluginHost/Source/Plugins/InternalPlugins.h @@ -26,7 +26,7 @@ #pragma once -#include "FilterGraph.h" +#include "PluginGraph.h" //============================================================================== @@ -38,19 +38,19 @@ class InternalPluginFormat : public AudioPluginFormat public: //============================================================================== InternalPluginFormat(); - ~InternalPluginFormat() {} + ~InternalPluginFormat() override {} //============================================================================== PluginDescription audioInDesc, audioOutDesc, midiInDesc; - - void getAllTypes (OwnedArray&); + void getAllTypes (Array&); //============================================================================== String getName() const override { return "Internal"; } bool fileMightContainThisPluginType (const String&) override { return true; } FileSearchPath getDefaultLocationsToSearch() override { return {}; } bool canScanForPlugins() const override { return false; } - void findAllTypesForFile (OwnedArray &, const String&) override {} + bool isTrivialToScan() const override { return true; } + void findAllTypesForFile (OwnedArray&, const String&) override {} bool doesPluginStillExist (const PluginDescription&) override { return true; } String getNameOfPluginFromIdentifier (const String& fileOrIdentifier) override { return fileOrIdentifier; } bool pluginNeedsRescanning (const PluginDescription&) override { return false; } @@ -58,9 +58,11 @@ public: private: //============================================================================== - void createPluginInstance (const PluginDescription&, double initialSampleRate, int initialBufferSize, - void* userData, PluginCreationCallback) override; - AudioPluginInstance* createInstance (const String& name); + void createPluginInstance (const PluginDescription&, + double initialSampleRate, int initialBufferSize, + PluginCreationCallback) override; + + std::unique_ptr createInstance (const String& name); - bool requiresUnblockedMessageThreadDuringCreation (const PluginDescription&) const noexcept override; + bool requiresUnblockedMessageThreadDuringCreation (const PluginDescription&) const override; }; diff --git a/extras/AudioPluginHost/Source/Filters/FilterGraph.cpp b/extras/AudioPluginHost/Source/Plugins/PluginGraph.cpp similarity index 76% rename from extras/AudioPluginHost/Source/Filters/FilterGraph.cpp rename to extras/AudioPluginHost/Source/Plugins/PluginGraph.cpp index 07ee7c67..0eeb43cd 100644 --- a/extras/AudioPluginHost/Source/Filters/FilterGraph.cpp +++ b/extras/AudioPluginHost/Source/Plugins/PluginGraph.cpp @@ -26,37 +26,37 @@ #include "../JuceLibraryCode/JuceHeader.h" #include "../UI/MainHostWindow.h" -#include "FilterGraph.h" -#include "InternalFilters.h" +#include "PluginGraph.h" +#include "InternalPlugins.h" #include "../UI/GraphEditorPanel.h" //============================================================================== -FilterGraph::FilterGraph (AudioPluginFormatManager& fm) +PluginGraph::PluginGraph (AudioPluginFormatManager& fm) : FileBasedDocument (getFilenameSuffix(), getFilenameWildcard(), - "Load a filter graph", - "Save a filter graph"), + "Load a graph", + "Save a graph"), formatManager (fm) { newDocument(); graph.addListener (this); } -FilterGraph::~FilterGraph() +PluginGraph::~PluginGraph() { graph.removeListener (this); graph.removeChangeListener (this); graph.clear(); } -FilterGraph::NodeID FilterGraph::getNextUID() noexcept +PluginGraph::NodeID PluginGraph::getNextUID() noexcept { - return FilterGraph::NodeID (++(lastUID.uid)); + return PluginGraph::NodeID (++(lastUID.uid)); } //============================================================================== -void FilterGraph::changeListenerCallback (ChangeBroadcaster*) +void PluginGraph::changeListenerCallback (ChangeBroadcaster*) { changed(); @@ -65,7 +65,7 @@ void FilterGraph::changeListenerCallback (ChangeBroadcaster*) activePluginWindows.remove (i); } -AudioProcessorGraph::Node::Ptr FilterGraph::getNodeForName (const String& name) const +AudioProcessorGraph::Node::Ptr PluginGraph::getNodeForName (const String& name) const { for (auto* node : graph.getNodes()) if (auto p = node->getProcessor()) @@ -75,41 +75,31 @@ AudioProcessorGraph::Node::Ptr FilterGraph::getNodeForName (const String& name) return nullptr; } -void FilterGraph::addPlugin (const PluginDescription& desc, Point p) +void PluginGraph::addPlugin (const PluginDescription& desc, Point pos) { - struct AsyncCallback : public AudioPluginFormat::InstantiationCompletionCallback - { - AsyncCallback (FilterGraph& g, Point pos) : owner (g), position (pos) - {} - - void completionCallback (AudioPluginInstance* instance, const String& error) override - { - owner.addFilterCallback (instance, error, position); - } - - FilterGraph& owner; - Point position; - }; - formatManager.createPluginInstanceAsync (desc, graph.getSampleRate(), graph.getBlockSize(), - new AsyncCallback (*this, p)); + [this, pos] (std::unique_ptr instance, const String& error) + { + addPluginCallback (std::move (instance), error, pos); + }); } -void FilterGraph::addFilterCallback (AudioPluginInstance* instance, const String& error, Point pos) +void PluginGraph::addPluginCallback (std::unique_ptr instance, + const String& error, Point pos) { if (instance == nullptr) { AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, - TRANS("Couldn't create filter"), + TRANS("Couldn't create plugin"), error); } else { instance->enableAllBuses(); - if (auto node = graph.addNode (instance)) + if (auto node = graph.addNode (std::move (instance))) { node->properties.set ("x", pos.x); node->properties.set ("y", pos.y); @@ -118,7 +108,7 @@ void FilterGraph::addFilterCallback (AudioPluginInstance* instance, const String } } -void FilterGraph::setNodePosition (NodeID nodeID, Point pos) +void PluginGraph::setNodePosition (NodeID nodeID, Point pos) { if (auto* n = graph.getNodeForId (nodeID)) { @@ -127,7 +117,7 @@ void FilterGraph::setNodePosition (NodeID nodeID, Point pos) } } -Point FilterGraph::getNodePosition (NodeID nodeID) const +Point PluginGraph::getNodePosition (NodeID nodeID) const { if (auto* n = graph.getNodeForId (nodeID)) return { static_cast (n->properties ["x"]), @@ -137,14 +127,14 @@ Point FilterGraph::getNodePosition (NodeID nodeID) const } //============================================================================== -void FilterGraph::clear() +void PluginGraph::clear() { closeAnyOpenPluginWindows(); graph.clear(); changed(); } -PluginWindow* FilterGraph::getOrCreateWindowFor (AudioProcessorGraph::Node* node, PluginWindow::Type type) +PluginWindow* PluginGraph::getOrCreateWindowFor (AudioProcessorGraph::Node* node, PluginWindow::Type type) { jassert (node != nullptr); @@ -184,7 +174,7 @@ PluginWindow* FilterGraph::getOrCreateWindowFor (AudioProcessorGraph::Node* node return nullptr; } -bool FilterGraph::closeAnyOpenPluginWindows() +bool PluginGraph::closeAnyOpenPluginWindows() { bool wasEmpty = activePluginWindows.isEmpty(); activePluginWindows.clear(); @@ -192,7 +182,7 @@ bool FilterGraph::closeAnyOpenPluginWindows() } //============================================================================== -String FilterGraph::getDocumentTitle() +String PluginGraph::getDocumentTitle() { if (! getFile().exists()) return "Unnamed"; @@ -200,7 +190,7 @@ String FilterGraph::getDocumentTitle() return getFile().getFileNameWithoutExtension(); } -void FilterGraph::newDocument() +void PluginGraph::newDocument() { clear(); setFile ({}); @@ -219,36 +209,36 @@ void FilterGraph::newDocument() } ); } -Result FilterGraph::loadDocument (const File& file) +Result PluginGraph::loadDocument (const File& file) { - XmlDocument doc (file); - std::unique_ptr xml (doc.getDocumentElement()); - - if (xml == nullptr || ! xml->hasTagName ("FILTERGRAPH")) - return Result::fail ("Not a valid filter graph file"); + if (auto xml = parseXMLIfTagMatches (file, "FILTERGRAPH")) + { + graph.removeChangeListener (this); + restoreFromXml (*xml); - graph.removeChangeListener (this); - restoreFromXml (*xml); + MessageManager::callAsync ([this] + { + setChangedFlag (false); + graph.addChangeListener (this); + }); - MessageManager::callAsync ([this] () { - setChangedFlag (false); - graph.addChangeListener (this); - } ); + return Result::ok(); + } - return Result::ok(); + return Result::fail ("Not a valid graph file"); } -Result FilterGraph::saveDocument (const File& file) +Result PluginGraph::saveDocument (const File& file) { - std::unique_ptr xml (createXml()); + auto xml = createXml(); - if (! xml->writeToFile (file, {})) + if (! xml->writeTo (file, {})) return Result::fail ("Couldn't write to the file"); return Result::ok(); } -File FilterGraph::getLastDocumentOpened() +File PluginGraph::getLastDocumentOpened() { RecentlyOpenedFilesList recentFiles; recentFiles.restoreFromString (getAppProperties().getUserSettings() @@ -257,7 +247,7 @@ File FilterGraph::getLastDocumentOpened() return recentFiles.getFile (0); } -void FilterGraph::setLastDocumentOpened (const File& file) +void PluginGraph::setLastDocumentOpened (const File& file) { RecentlyOpenedFilesList recentFiles; recentFiles.restoreFromString (getAppProperties().getUserSettings() @@ -270,8 +260,8 @@ void FilterGraph::setLastDocumentOpened (const File& file) } //============================================================================== -static void readBusLayoutFromXml (AudioProcessor::BusesLayout& busesLayout, AudioProcessor* plugin, - const XmlElement& xml, const bool isInput) +static void readBusLayoutFromXml (AudioProcessor::BusesLayout& busesLayout, AudioProcessor& plugin, + const XmlElement& xml, bool isInput) { auto& targetBuses = (isInput ? busesLayout.inputBuses : busesLayout.outputBuses); @@ -286,12 +276,12 @@ static void readBusLayoutFromXml (AudioProcessor::BusesLayout& busesLayout, Audi // the number of buses on busesLayout may not be in sync with the plugin after adding buses // because adding an input bus could also add an output bus - for (int actualIdx = plugin->getBusCount (isInput) - 1; actualIdx < busIdx; ++actualIdx) - if (! plugin->addBus (isInput)) + for (int actualIdx = plugin.getBusCount (isInput) - 1; actualIdx < busIdx; ++actualIdx) + if (! plugin.addBus (isInput)) return; for (int actualIdx = targetBuses.size() - 1; actualIdx < busIdx; ++actualIdx) - targetBuses.add (plugin->getChannelLayoutOfBus (isInput, busIdx)); + targetBuses.add (plugin.getChannelLayoutOfBus (isInput, busIdx)); auto layout = e->getStringAttribute ("layout"); @@ -303,7 +293,7 @@ static void readBusLayoutFromXml (AudioProcessor::BusesLayout& busesLayout, Audi // if the plugin has more buses than specified in the xml, then try to remove them! while (maxNumBuses < targetBuses.size()) { - if (! plugin->removeBus (isInput)) + if (! plugin.removeBus (isInput)) return; targetBuses.removeLast(); @@ -354,7 +344,7 @@ static XmlElement* createNodeXml (AudioProcessorGraph::Node* const node) noexcep { PluginDescription pd; plugin->fillInPluginDescription (pd); - e->addChildElement (pd.createXml()); + e->addChildElement (pd.createXml().release()); } { @@ -376,7 +366,7 @@ static XmlElement* createNodeXml (AudioProcessorGraph::Node* const node) noexcep return nullptr; } -void FilterGraph::createNodeFromXml (const XmlElement& xml) +void PluginGraph::createNodeFromXml (const XmlElement& xml) { PluginDescription pd; @@ -388,20 +378,20 @@ void FilterGraph::createNodeFromXml (const XmlElement& xml) String errorMessage; - if (auto* instance = formatManager.createPluginInstance (pd, graph.getSampleRate(), - graph.getBlockSize(), errorMessage)) + if (auto instance = formatManager.createPluginInstance (pd, graph.getSampleRate(), + graph.getBlockSize(), errorMessage)) { if (auto* layoutEntity = xml.getChildByName ("LAYOUT")) { auto layout = instance->getBusesLayout(); - readBusLayoutFromXml (layout, instance, *layoutEntity, true); - readBusLayoutFromXml (layout, instance, *layoutEntity, false); + readBusLayoutFromXml (layout, *instance, *layoutEntity, true); + readBusLayoutFromXml (layout, *instance, *layoutEntity, false); instance->setBusesLayout (layout); } - if (auto node = graph.addNode (instance, NodeID ((uint32) xml.getIntAttribute ("uid")))) + if (auto node = graph.addNode (std::move (instance), NodeID ((uint32) xml.getIntAttribute ("uid")))) { if (auto* state = xml.getChildByName ("STATE")) { @@ -437,9 +427,9 @@ void FilterGraph::createNodeFromXml (const XmlElement& xml) } } -XmlElement* FilterGraph::createXml() const +std::unique_ptr PluginGraph::createXml() const { - auto* xml = new XmlElement ("FILTERGRAPH"); + auto xml = std::make_unique ("FILTERGRAPH"); for (auto* node : graph.getNodes()) xml->addChildElement (createNodeXml (node)); @@ -457,7 +447,7 @@ XmlElement* FilterGraph::createXml() const return xml; } -void FilterGraph::restoreFromXml (const XmlElement& xml) +void PluginGraph::restoreFromXml (const XmlElement& xml) { clear(); @@ -476,7 +466,7 @@ void FilterGraph::restoreFromXml (const XmlElement& xml) graph.removeIllegalConnections(); } -File FilterGraph::getDefaultGraphDocumentOnMobile() +File PluginGraph::getDefaultGraphDocumentOnMobile() { auto persistantStorageLocation = File::getSpecialLocation (File::userApplicationDataDirectory); return persistantStorageLocation.getChildFile ("state.filtergraph"); diff --git a/extras/AudioPluginHost/Source/Filters/FilterGraph.h b/extras/AudioPluginHost/Source/Plugins/PluginGraph.h similarity index 84% rename from extras/AudioPluginHost/Source/Filters/FilterGraph.h rename to extras/AudioPluginHost/Source/Plugins/PluginGraph.h index 592642d4..75764752 100644 --- a/extras/AudioPluginHost/Source/Filters/FilterGraph.h +++ b/extras/AudioPluginHost/Source/Plugins/PluginGraph.h @@ -31,16 +31,16 @@ //============================================================================== /** - A collection of filters and some connections between them. + A collection of plugins and some connections between them. */ -class FilterGraph : public FileBasedDocument, +class PluginGraph : public FileBasedDocument, public AudioProcessorListener, private ChangeListener { public: //============================================================================== - FilterGraph (AudioPluginFormatManager&); - ~FilterGraph(); + PluginGraph (AudioPluginFormatManager&); + ~PluginGraph() override; //============================================================================== using NodeID = AudioProcessorGraph::NodeID; @@ -64,8 +64,8 @@ public: void audioProcessorChanged (AudioProcessor*) override { changed(); } //============================================================================== - XmlElement* createXml() const; - void restoreFromXml (const XmlElement& xml); + std::unique_ptr createXml() const; + void restoreFromXml (const XmlElement&); static const char* getFilenameSuffix() { return ".filtergraph"; } static const char* getFilenameWildcard() { return "*.filtergraph"; } @@ -91,9 +91,9 @@ private: NodeID lastUID; NodeID getNextUID() noexcept; - void createNodeFromXml (const XmlElement& xml); - void addFilterCallback (AudioPluginInstance*, const String& error, Point); + void createNodeFromXml (const XmlElement&); + void addPluginCallback (std::unique_ptr, const String& error, Point); void changeListenerCallback (ChangeBroadcaster*) override; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FilterGraph) + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PluginGraph) }; diff --git a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp index 3803bf0b..bea2b67b 100644 --- a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp +++ b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp @@ -26,7 +26,7 @@ #include "../JuceLibraryCode/JuceHeader.h" #include "GraphEditorPanel.h" -#include "../Filters/InternalFilters.h" +#include "../Plugins/InternalPlugins.h" #include "MainHostWindow.h" //============================================================================== @@ -164,7 +164,7 @@ struct GraphEditorPanel::PinComponent : public Component, } GraphEditorPanel& panel; - FilterGraph& graph; + PluginGraph& graph; AudioProcessorGraph::NodeAndChannel pin; const bool isInput; int busIdx = 0; @@ -173,11 +173,11 @@ struct GraphEditorPanel::PinComponent : public Component, }; //============================================================================== -struct GraphEditorPanel::FilterComponent : public Component, +struct GraphEditorPanel::PluginComponent : public Component, public Timer, private AudioProcessorParameter::Listener { - FilterComponent (GraphEditorPanel& p, AudioProcessorGraph::NodeID id) : panel (p), graph (p.graph), pluginID (id) + PluginComponent (GraphEditorPanel& p, AudioProcessorGraph::NodeID id) : panel (p), graph (p.graph), pluginID (id) { shadow.setShadowProperties (DropShadow (Colours::black.withAlpha (0.5f), 3, { 0, 1 })); setComponentEffect (&shadow); @@ -194,10 +194,10 @@ struct GraphEditorPanel::FilterComponent : public Component, setSize (150, 60); } - FilterComponent (const FilterComponent&) = delete; - FilterComponent& operator= (const FilterComponent&) = delete; + PluginComponent (const PluginComponent&) = delete; + PluginComponent& operator= (const PluginComponent&) = delete; - ~FilterComponent() + ~PluginComponent() override { if (auto f = graph.graph.getNodeForId (pluginID)) { @@ -491,7 +491,7 @@ struct GraphEditorPanel::FilterComponent : public Component, void parameterGestureChanged (int, bool) override {} GraphEditorPanel& panel; - FilterGraph& graph; + PluginGraph& graph; const AudioProcessorGraph::NodeID pluginID; OwnedArray pins; int numInputs = 0, numOutputs = 0; @@ -572,10 +572,10 @@ struct GraphEditorPanel::ConnectorComponent : public Component, p1 = lastInputPos; p2 = lastOutputPos; - if (auto* src = panel.getComponentForFilter (connection.source.nodeID)) + if (auto* src = panel.getComponentForPlugin (connection.source.nodeID)) p1 = src->getPinPos (connection.source.channelIndex, false); - if (auto* dest = panel.getComponentForFilter (connection.destination.nodeID)) + if (auto* dest = panel.getComponentForPlugin (connection.destination.nodeID)) p2 = dest->getPinPos (connection.destination.channelIndex, true); } @@ -689,7 +689,7 @@ struct GraphEditorPanel::ConnectorComponent : public Component, } GraphEditorPanel& panel; - FilterGraph& graph; + PluginGraph& graph; AudioProcessorGraph::Connection connection { { {}, 0 }, { {}, 0 } }; Point lastInputPos, lastOutputPos; Path linePath, hitPath; @@ -700,7 +700,7 @@ struct GraphEditorPanel::ConnectorComponent : public Component, //============================================================================== -GraphEditorPanel::GraphEditorPanel (FilterGraph& g) : graph (g) +GraphEditorPanel::GraphEditorPanel (PluginGraph& g) : graph (g) { graph.addChangeListener (this); setOpaque (true); @@ -751,7 +751,7 @@ void GraphEditorPanel::createNewPlugin (const PluginDescription& desc, Point ((double) getWidth(), (double) getHeight())); } -GraphEditorPanel::FilterComponent* GraphEditorPanel::getComponentForFilter (AudioProcessorGraph::NodeID nodeID) const +GraphEditorPanel::PluginComponent* GraphEditorPanel::getComponentForPlugin (AudioProcessorGraph::NodeID nodeID) const { for (auto* fc : nodes) if (fc->pluginID == nodeID) @@ -812,9 +812,9 @@ void GraphEditorPanel::updateComponents() for (auto* f : graph.graph.getNodes()) { - if (getComponentForFilter (f->nodeID) == 0) + if (getComponentForPlugin (f->nodeID) == nullptr) { - auto* comp = nodes.add (new FilterComponent (*this, f->nodeID)); + auto* comp = nodes.add (new PluginComponent (*this, f->nodeID)); addAndMakeVisible (comp); comp->update(); } @@ -822,7 +822,7 @@ void GraphEditorPanel::updateComponents() for (auto& c : graph.graph.getConnections()) { - if (getComponentForConnection (c) == 0) + if (getComponentForConnection (c) == nullptr) { auto* comp = connectors.add (new ConnectorComponent (*this)); addAndMakeVisible (comp); @@ -844,9 +844,9 @@ void GraphEditorPanel::showPopupMenu (Point mousePos) menu->showMenuAsync ({}, ModalCallbackFunction::create ([this, mousePos] (int r) { - if (auto* mainWindow = findParentComponentOfClass()) - if (auto* desc = mainWindow->getChosenType (r)) - createNewPlugin (*desc, mousePos); + if (r > 0) + if (auto* mainWin = findParentComponentOfClass()) + createNewPlugin (mainWin->getChosenType (r), mousePos); })); } } @@ -1114,10 +1114,7 @@ struct GraphDocumentComponent::PluginListBoxModel : public ListBoxModel, g.setColour (rowIsSelected ? Colours::black : Colours::white); if (rowNumber < knownPlugins.getNumTypes()) - g.drawFittedText (knownPlugins.getType (rowNumber)->name, - { 0, 0, width, height - 2 }, - Justification::centred, - 1); + g.drawFittedText (knownPlugins.getTypes()[rowNumber].name, { 0, 0, width, height - 2 }, Justification::centred, 1); g.setColour (Colours::black.withAlpha (0.4f)); g.drawRect (0, height - 1, width, 1); @@ -1150,13 +1147,15 @@ struct GraphDocumentComponent::PluginListBoxModel : public ListBoxModel, #if JUCE_IOS std::unique_ptr scanner; #endif + + JUCE_DECLARE_NON_COPYABLE (PluginListBoxModel) }; //============================================================================== GraphDocumentComponent::GraphDocumentComponent (AudioPluginFormatManager& fm, AudioDeviceManager& dm, KnownPluginList& kpl) - : graph (new FilterGraph (fm)), + : graph (new PluginGraph (fm)), deviceManager (dm), pluginList (kpl), graphPlayer (getAppProperties().getUserSettings()->getBoolValue ("doublePrecisionProcessing", false)) @@ -1165,7 +1164,7 @@ GraphDocumentComponent::GraphDocumentComponent (AudioPluginFormatManager& fm, deviceManager.addChangeListener (graphPanel.get()); deviceManager.addAudioCallback (&graphPlayer); - deviceManager.addMidiInputCallback (String(), &graphPlayer.getMidiMessageCollector()); + deviceManager.addMidiInputDeviceCallback ({}, &graphPlayer.getMidiMessageCollector()); } void GraphDocumentComponent::init() @@ -1247,7 +1246,7 @@ void GraphDocumentComponent::unfocusKeyboardComponent() void GraphDocumentComponent::releaseGraph() { deviceManager.removeAudioCallback (&graphPlayer); - deviceManager.removeMidiInputCallback (String(), &graphPlayer.getMidiMessageCollector()); + deviceManager.removeMidiInputDeviceCallback ({}, &graphPlayer.getMidiMessageCollector()); if (graphPanel != nullptr) { @@ -1281,7 +1280,7 @@ void GraphDocumentComponent::itemDropped (const SourceDetails& details) // must be a valid index! jassert (isPositiveAndBelow (pluginTypeIndex, pluginList.getNumTypes())); - createNewPlugin (*pluginList.getType (pluginTypeIndex), details.localPosition); + createNewPlugin (pluginList.getTypes()[pluginTypeIndex], details.localPosition); } void GraphDocumentComponent::showSidePanel (bool showSettingsPanel) diff --git a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.h b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.h index 7112e05a..2796b750 100644 --- a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.h +++ b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.h @@ -26,21 +26,21 @@ #pragma once -#include "../Filters/FilterGraph.h" +#include "../Plugins/PluginGraph.h" class MainHostWindow; //============================================================================== /** - A panel that displays and edits a FilterGraph. + A panel that displays and edits a PluginGraph. */ class GraphEditorPanel : public Component, public ChangeListener, private Timer { public: - GraphEditorPanel (FilterGraph& graph); - ~GraphEditorPanel(); + GraphEditorPanel (PluginGraph& graph); + ~GraphEditorPanel() override; void createNewPlugin (const PluginDescription&, Point position); @@ -67,19 +67,19 @@ public: void endDraggingConnector (const MouseEvent&); //============================================================================== - FilterGraph& graph; + PluginGraph& graph; private: - struct FilterComponent; + struct PluginComponent; struct ConnectorComponent; struct PinComponent; - OwnedArray nodes; + OwnedArray nodes; OwnedArray connectors; std::unique_ptr draggingConnector; std::unique_ptr menu; - FilterComponent* getComponentForFilter (AudioProcessorGraph::NodeID) const; + PluginComponent* getComponentForPlugin (AudioProcessorGraph::NodeID) const; ConnectorComponent* getComponentForConnection (const AudioProcessorGraph::Connection&) const; PinComponent* findPinAt (Point) const; @@ -107,7 +107,7 @@ public: AudioDeviceManager& deviceManager, KnownPluginList& pluginList); - ~GraphDocumentComponent(); + ~GraphDocumentComponent() override; //============================================================================== void createNewPlugin (const PluginDescription&, Point position); @@ -115,7 +115,7 @@ public: bool closeAnyOpenPluginWindows(); //============================================================================== - std::unique_ptr graph; + std::unique_ptr graph; void resized() override; void unfocusKeyboardComponent(); diff --git a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp index e3956674..28678c2c 100644 --- a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp +++ b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp @@ -26,7 +26,7 @@ #include "../JuceLibraryCode/JuceHeader.h" #include "MainHostWindow.h" -#include "../Filters/InternalFilters.h" +#include "../Plugins/InternalPlugins.h" //============================================================================== @@ -55,7 +55,7 @@ public: setVisible (true); } - ~PluginListWindow() + ~PluginListWindow() override { getAppProperties().getUserSettings()->setValue ("listWindowPos", getWindowStateAsString()); clearContentComponent(); @@ -85,10 +85,8 @@ MainHostWindow::MainHostWindow() RuntimePermissions::request (RuntimePermissions::recordAudio, [safeThis] (bool granted) mutable { - std::unique_ptr savedAudioState (getAppProperties().getUserSettings() - ->getXmlValue ("audioDeviceState")); - - safeThis->deviceManager.initialise (granted ? 256 : 0, 256, savedAudioState.get(), true); + auto savedState = getAppProperties().getUserSettings()->getXmlValue ("audioDeviceState"); + safeThis->deviceManager.initialise (granted ? 256 : 0, 256, savedState.get(), true); }); #if JUCE_IOS || JUCE_ANDROID @@ -110,21 +108,19 @@ MainHostWindow::MainHostWindow() InternalPluginFormat internalFormat; internalFormat.getAllTypes (internalTypes); - std::unique_ptr savedPluginList (getAppProperties().getUserSettings()->getXmlValue ("pluginList")); - - if (savedPluginList != nullptr) + if (auto savedPluginList = getAppProperties().getUserSettings()->getXmlValue ("pluginList")) knownPluginList.recreateFromXml (*savedPluginList); - for (auto* t : internalTypes) - knownPluginList.addType (*t); + for (auto& t : internalTypes) + knownPluginList.addType (t); pluginSortMethod = (KnownPluginList::SortMethod) getAppProperties().getUserSettings() ->getIntValue ("pluginSortMethod", KnownPluginList::sortByManufacturer); knownPluginList.addChangeListener (this); - if (auto* filterGraph = graphHolder->graph.get()) - filterGraph->addChangeListener (this); + if (auto* g = graphHolder->graph.get()) + g->addChangeListener (this); addKeyListener (getCommandManager().getKeyMappings()); @@ -148,8 +144,8 @@ MainHostWindow::~MainHostWindow() pluginListWindow = nullptr; knownPluginList.removeChangeListener (this); - if (auto* filterGraph = graphHolder->graph.get()) - filterGraph->removeChangeListener (this); + if (auto* g = graphHolder->graph.get()) + g->removeChangeListener (this); getAppProperties().getUserSettings()->setValue ("mainWindowPos", getWindowStateAsString()); clearContentComponent(); @@ -200,7 +196,7 @@ void MainHostWindow::tryToQuitApplication() new AsyncQuitRetrier(); } #if JUCE_ANDROID || JUCE_IOS - else if (graphHolder == nullptr || graphHolder->graph->saveDocument (FilterGraph::getDefaultGraphDocumentOnMobile())) + else if (graphHolder == nullptr || graphHolder->graph->saveDocument (PluginGraph::getDefaultGraphDocumentOnMobile())) #else else if (graphHolder == nullptr || graphHolder->graph->saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) #endif @@ -221,9 +217,7 @@ void MainHostWindow::changeListenerCallback (ChangeBroadcaster* changed) // save the plugin list every time it gets changed, so that if we're scanning // and it crashes, we've still saved the previous ones - std::unique_ptr savedPluginList (knownPluginList.createXml()); - - if (savedPluginList != nullptr) + if (auto savedPluginList = std::unique_ptr (knownPluginList.createXml())) { getAppProperties().getUserSettings()->setValue ("pluginList", savedPluginList.get()); getAppProperties().saveIfNeeded(); @@ -352,10 +346,9 @@ void MainHostWindow::menuItemSelected (int menuItemID, int /*topLevelMenuIndex*/ } else { - if (auto* desc = getChosenType (menuItemID)) - createPlugin (*desc, - { proportionOfWidth (0.3f + Random::getSystemRandom().nextFloat() * 0.6f), - proportionOfHeight (0.3f + Random::getSystemRandom().nextFloat() * 0.6f) }); + if (KnownPluginList::getIndexChosenByMenu (pluginDescriptions, menuItemID) >= 0) + createPlugin (getChosenType (menuItemID), { proportionOfWidth (0.3f + Random::getSystemRandom().nextFloat() * 0.6f), + proportionOfHeight (0.3f + Random::getSystemRandom().nextFloat() * 0.6f) }); } } @@ -371,28 +364,29 @@ void MainHostWindow::createPlugin (const PluginDescription& desc, Point pos graphHolder->createNewPlugin (desc, pos); } -void MainHostWindow::addPluginsToMenu (PopupMenu& m) const +void MainHostWindow::addPluginsToMenu (PopupMenu& m) { if (graphHolder != nullptr) { int i = 0; - for (auto* t : internalTypes) - m.addItem (++i, t->name + " (" + t->pluginFormatName + ")", - graphHolder->graph->getNodeForName (t->name) == nullptr); + for (auto& t : internalTypes) + m.addItem (++i, t.name + " (" + t.pluginFormatName + ")", + graphHolder->graph->getNodeForName (t.name) == nullptr); } m.addSeparator(); - knownPluginList.addToMenu (m, pluginSortMethod); + pluginDescriptions = knownPluginList.getTypes(); + KnownPluginList::addToMenu (m, pluginDescriptions, pluginSortMethod); } -const PluginDescription* MainHostWindow::getChosenType (const int menuID) const +PluginDescription MainHostWindow::getChosenType (const int menuID) const { if (menuID >= 1 && menuID < 1 + internalTypes.size()) return internalTypes [menuID - 1]; - return knownPluginList.getType (knownPluginList.getIndexChosenByMenu (menuID)); + return pluginDescriptions[KnownPluginList::getIndexChosenByMenu (pluginDescriptions, menuID)]; } //============================================================================== @@ -580,7 +574,7 @@ void MainHostWindow::showAudioSettings() ModalCallbackFunction::create ([safeThis] (int) { - std::unique_ptr audioState (safeThis->deviceManager.createStateXml()); + auto audioState = safeThis->deviceManager.createStateXml(); getAppProperties().getUserSettings()->setValue ("audioDeviceState", audioState.get()); getAppProperties().getUserSettings()->saveIfNeeded(); @@ -613,11 +607,11 @@ void MainHostWindow::filesDropped (const StringArray& files, int x, int y) if (graphHolder != nullptr) { #if ! (JUCE_ANDROID || JUCE_IOS) - if (files.size() == 1 && File (files[0]).hasFileExtension (FilterGraph::getFilenameSuffix())) + if (files.size() == 1 && File (files[0]).hasFileExtension (PluginGraph::getFilenameSuffix())) { - if (auto* filterGraph = graphHolder->graph.get()) - if (filterGraph->saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) - filterGraph->loadFrom (File (files[0]), true); + if (auto* g = graphHolder->graph.get()) + if (g->saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) + g->loadFrom (File (files[0]), true); } else #endif diff --git a/extras/AudioPluginHost/Source/UI/MainHostWindow.h b/extras/AudioPluginHost/Source/UI/MainHostWindow.h index 78e87e89..ded302bf 100644 --- a/extras/AudioPluginHost/Source/UI/MainHostWindow.h +++ b/extras/AudioPluginHost/Source/UI/MainHostWindow.h @@ -26,7 +26,7 @@ #pragma once -#include "../Filters/FilterGraph.h" +#include "../Plugins/PluginGraph.h" #include "GraphEditorPanel.h" @@ -60,7 +60,7 @@ class MainHostWindow : public DocumentWindow, public: //============================================================================== MainHostWindow(); - ~MainHostWindow(); + ~MainHostWindow() override; //============================================================================== void closeButtonPressed() override; @@ -86,8 +86,8 @@ public: void createPlugin (const PluginDescription&, Point pos); - void addPluginsToMenu (PopupMenu&) const; - const PluginDescription* getChosenType (int menuID) const; + void addPluginsToMenu (PopupMenu&); + PluginDescription getChosenType (int menuID) const; bool isDoublePrecisionProcessing(); void updatePrecisionMenuItem (ApplicationCommandInfo& info); @@ -99,9 +99,10 @@ private: AudioDeviceManager deviceManager; AudioPluginFormatManager formatManager; - OwnedArray internalTypes; + Array internalTypes; KnownPluginList knownPluginList; KnownPluginList::SortMethod pluginSortMethod; + Array pluginDescriptions; class PluginListWindow; std::unique_ptr pluginListWindow; diff --git a/extras/AudioPluginHost/Source/UI/PluginWindow.h b/extras/AudioPluginHost/Source/UI/PluginWindow.h index 0fc39c3f..e2abee46 100644 --- a/extras/AudioPluginHost/Source/UI/PluginWindow.h +++ b/extras/AudioPluginHost/Source/UI/PluginWindow.h @@ -26,26 +26,26 @@ #pragma once -#include "../Filters/FilterIOConfiguration.h" +#include "../Plugins/IOConfigurationWindow.h" -class FilterGraph; +class PluginGraph; /** A window that shows a log of parameter change messagse sent by the plugin. */ -class FilterDebugWindow : public AudioProcessorEditor, +class PluginDebugWindow : public AudioProcessorEditor, public AudioProcessorParameter::Listener, public ListBoxModel, public AsyncUpdater { public: - FilterDebugWindow (AudioProcessor& proc) - : AudioProcessorEditor (proc), processor (proc) + PluginDebugWindow (AudioProcessor& proc) + : AudioProcessorEditor (proc), audioProc (proc) { setSize (500, 200); addAndMakeVisible (list); - for (auto* p : processor.getParameters()) + for (auto* p : audioProc.getParameters()) p->addListener (this); log.add ("Parameter debug log started"); @@ -53,7 +53,7 @@ public: void parameterValueChanged (int parameterIndex, float newValue) override { - auto* param = processor.getParameters()[parameterIndex]; + auto* param = audioProc.getParameters()[parameterIndex]; auto value = param->getCurrentValueAsText().quoted() + " (" + String (newValue, 4) + ")"; appendToLog ("parameter change", *param, value); @@ -61,7 +61,7 @@ public: void parameterGestureChanged (int parameterIndex, bool gestureIsStarting) override { - auto* param = processor.getParameters()[parameterIndex]; + auto* param = audioProc.getParameters()[parameterIndex]; appendToLog ("gesture", *param, gestureIsStarting ? "start" : "end"); } @@ -111,8 +111,8 @@ private: list.scrollToEnsureRowIsOnscreen (log.size() - 1); } - constexpr static int maxLogSize = 300; - constexpr static int logSizeTrimThreshold = 400; + JUCE_CONSTEXPR static const int maxLogSize = 300; + JUCE_CONSTEXPR static const int logSizeTrimThreshold = 400; ListBox list { "Log", this }; @@ -120,7 +120,7 @@ private: StringArray pendingLogEntries; CriticalSection pendingLogLock; - AudioProcessor& processor; + AudioProcessor& audioProc; }; //============================================================================== @@ -154,10 +154,10 @@ public: #if JUCE_IOS || JUCE_ANDROID auto screenBounds = Desktop::getInstance().getDisplays().getTotalBounds (true).toFloat(); - auto scaleFactor = jmin ((screenBounds.getWidth() - 50) / getWidth(), (screenBounds.getHeight() - 50) / getHeight()); + if (scaleFactor < 1.0f) - setSize (getWidth() * scaleFactor, getHeight() * scaleFactor); + setSize ((int) (getWidth() * scaleFactor), (int) (getHeight() * scaleFactor)); setTopLeftPosition (20, 20); #else @@ -170,7 +170,7 @@ public: setVisible (true); } - ~PluginWindow() + ~PluginWindow() override { clearContentComponent(); } @@ -198,7 +198,8 @@ public: private: float getDesktopScaleFactor() const override { return 1.0f; } - static AudioProcessorEditor* createProcessorEditor (AudioProcessor& processor, PluginWindow::Type type) + static AudioProcessorEditor* createProcessorEditor (AudioProcessor& processor, + PluginWindow::Type type) { if (type == PluginWindow::Type::normal) { @@ -208,17 +209,10 @@ private: type = PluginWindow::Type::generic; } - if (type == PluginWindow::Type::generic) - return new GenericAudioProcessorEditor (&processor); - - if (type == PluginWindow::Type::programs) - return new ProgramAudioProcessorEditor (processor); - - if (type == PluginWindow::Type::audioIO) - return new FilterIOConfigurationWindow (processor); - - if (type == PluginWindow::Type::debug) - return new FilterDebugWindow (processor); + if (type == PluginWindow::Type::generic) return new GenericAudioProcessorEditor (processor); + if (type == PluginWindow::Type::programs) return new ProgramAudioProcessorEditor (processor); + if (type == PluginWindow::Type::audioIO) return new IOConfigurationWindow (processor); + if (type == PluginWindow::Type::debug) return new PluginDebugWindow (processor); jassertfalse; return {}; @@ -287,7 +281,7 @@ private: owner.addListener (this); } - ~PropertyComp() + ~PropertyComp() override { owner.removeListener (this); } diff --git a/extras/BinaryBuilder/BinaryBuilder.jucer b/extras/BinaryBuilder/BinaryBuilder.jucer index c123888f..5efa1e04 100644 --- a/extras/BinaryBuilder/BinaryBuilder.jucer +++ b/extras/BinaryBuilder/BinaryBuilder.jucer @@ -1,7 +1,7 @@ @@ -25,7 +25,7 @@ - + @@ -33,7 +33,7 @@ - + diff --git a/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile b/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile index 6866b98a..64c5e96d 100644 --- a/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile +++ b/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile @@ -41,7 +41,7 @@ ifeq ($(CONFIG),Debug) JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) - JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs libcurl) -ldl -lpthread -lrt $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs libcurl) -lrt -ldl -lpthread $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -62,7 +62,7 @@ ifeq ($(CONFIG),Release) JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -Os $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) - JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs libcurl) -fvisibility=hidden -ldl -lpthread -lrt $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs libcurl) -fvisibility=hidden -lrt -ldl -lpthread $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif diff --git a/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj b/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj index a49dd354..a6b08ca8 100644 --- a/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj +++ b/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj @@ -268,7 +268,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; @@ -287,7 +287,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "BinaryBuilder"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Debug; @@ -314,7 +314,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; @@ -331,7 +331,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "BinaryBuilder"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Release; @@ -402,13 +402,14 @@ 36B6F402BC83F21646259DEF = { isa = PBXProject; buildConfigurationList = E4C85B0464A93027D035AA1F; - attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; }; + attributes = { LastUpgradeCheck = 1100; ORGANIZATIONNAME = "ROLI Ltd."; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = C18D022743CF5BD14D6A6A9E; projectDirPath = ""; projectRoot = ""; targets = (80B70DE094998C267F152DD5); + knownRegions = (en, Base); }; }; rootObject = 36B6F402BC83F21646259DEF; diff --git a/extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder.sln b/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder.sln similarity index 95% rename from extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder.sln rename to extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder.sln index 329844cd..017ba022 100644 --- a/extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder.sln +++ b/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2017 +# Visual Studio 2019 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BinaryBuilder - ConsoleApp", "BinaryBuilder_ConsoleApp.vcxproj", "{88983F7C-DB65-9E04-84E7-05F8979E0383}" EndProject diff --git a/extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj b/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj similarity index 96% rename from extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj rename to extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj index e0633a77..34d798a8 100644 --- a/extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj +++ b/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj @@ -1,7 +1,7 @@ @@ -22,16 +22,16 @@ Application false false - v141 - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + v142 + 10.0 Application false true - v141 - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + v142 + 10.0 @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;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 @@ -105,7 +105,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;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 @@ -564,6 +564,7 @@ + diff --git a/extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj.filters b/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj.filters similarity index 97% rename from extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj.filters rename to extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj.filters index bd6ded2a..ce4e94ce 100644 --- a/extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj.filters +++ b/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj.filters @@ -1,6 +1,6 @@ - + {5B0DB3D7-8E47-D519-6890-CB8CEA6FE601} @@ -762,6 +762,9 @@ JUCE Modules\juce_core\unit_tests + + JUCE Modules\juce_core\unit_tests + JUCE Modules\juce_core\xml diff --git a/extras/BinaryBuilder/Builds/VisualStudio2017/resources.rc b/extras/BinaryBuilder/Builds/VisualStudio2019/resources.rc similarity index 100% rename from extras/BinaryBuilder/Builds/VisualStudio2017/resources.rc rename to extras/BinaryBuilder/Builds/VisualStudio2019/resources.rc diff --git a/extras/BinaryBuilder/JuceLibraryCode/AppConfig.h b/extras/BinaryBuilder/JuceLibraryCode/AppConfig.h index f2408918..16358316 100644 --- a/extras/BinaryBuilder/JuceLibraryCode/AppConfig.h +++ b/extras/BinaryBuilder/JuceLibraryCode/AppConfig.h @@ -76,7 +76,7 @@ #endif #ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL 0 + //#define JUCE_USE_CURL 1 #endif #ifndef JUCE_LOAD_CURL_SYMBOLS_LAZILY @@ -84,11 +84,11 @@ #endif #ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 0 #endif #ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 0 #endif #ifndef JUCE_STRICT_REFCOUNTEDPOINTER diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt b/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt index 43d0981e..6da7075a 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt +++ b/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt @@ -8,7 +8,7 @@ SET(BINARY_NAME "juce_jni") add_library("cpufeatures" STATIC "${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c") set_source_files_properties("${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c" PROPERTIES COMPILE_FLAGS "-Wno-sign-conversion -Wno-gnu-statement-expression") -add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=16" "-DJUCE_PUSH_NOTIFICATIONS=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000") +add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=16" "-DJUCE_PUSH_NOTIFICATIONS=1" "-DJUCE_PUSH_NOTIFICATIONS_ACTIVITY=\"com/roli/juce/JuceActivity\"" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000") include_directories( AFTER "../../../JuceLibraryCode" @@ -105,8 +105,9 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_basics/utilities/juce_IIRFilter.h" "../../../../../modules/juce_audio_basics/utilities/juce_LagrangeInterpolator.cpp" "../../../../../modules/juce_audio_basics/utilities/juce_LagrangeInterpolator.h" - "../../../../../modules/juce_audio_basics/utilities/juce_LinearSmoothedValue.h" "../../../../../modules/juce_audio_basics/utilities/juce_Reverb.h" + "../../../../../modules/juce_audio_basics/utilities/juce_SmoothedValue.cpp" + "../../../../../modules/juce_audio_basics/utilities/juce_SmoothedValue.h" "../../../../../modules/juce_audio_basics/juce_audio_basics.cpp" "../../../../../modules/juce_audio_basics/juce_audio_basics.mm" "../../../../../modules/juce_audio_basics/juce_audio_basics.h" @@ -117,11 +118,10 @@ 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/juce_MidiInput.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" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.h" - "../../../../../modules/juce_audio_devices/midi_io/juce_MidiOutput.cpp" - "../../../../../modules/juce_audio_devices/midi_io/juce_MidiOutput.h" "../../../../../modules/juce_audio_devices/native/juce_android_Audio.cpp" "../../../../../modules/juce_audio_devices/native/juce_android_Midi.cpp" "../../../../../modules/juce_audio_devices/native/juce_android_Oboe.cpp" @@ -324,6 +324,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/thread/include/flock.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/thread/source/flock.cpp" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/LICENSE.txt" + "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/README.md" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/conststringtable.cpp" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/conststringtable.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/coreiids.cpp" @@ -369,11 +370,13 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstprefetchablesupport.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstprocesscontext.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstrepresentation.h" + "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivsttestplugprovider.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstunits.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vstpshpack4.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vstspeaker.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vsttypes.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/LICENSE.txt" + "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/README.md" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/memorystream.cpp" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/memorystream.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/pluginview.cpp" @@ -396,6 +399,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstpresetfile.cpp" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstpresetfile.h" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/LICENSE.txt" + "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/README.md" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/LICENSE.txt" "../../../../../modules/juce_audio_processors/format_types/VST3_SDK/README.md" "../../../../../modules/juce_audio_processors/format_types/juce_AU_Shared.h" @@ -434,14 +438,19 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.h" "../../../../../modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp" "../../../../../modules/juce_audio_processors/scanning/juce_PluginListComponent.h" + "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp" "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterBool.h" + "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp" "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h" + "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterFloat.cpp" "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h" + "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp" "../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterInt.h" - "../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorParameters.cpp" + "../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.cpp" "../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h" "../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp" "../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h" + "../../../../../modules/juce_audio_processors/utilities/juce_RangedAudioParameter.cpp" "../../../../../modules/juce_audio_processors/utilities/juce_RangedAudioParameter.h" "../../../../../modules/juce_audio_processors/juce_audio_processors.cpp" "../../../../../modules/juce_audio_processors/juce_audio_processors.mm" @@ -689,6 +698,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_core/time/juce_Time.h" "../../../../../modules/juce_core/unit_tests/juce_UnitTest.cpp" "../../../../../modules/juce_core/unit_tests/juce_UnitTest.h" + "../../../../../modules/juce_core/unit_tests/juce_UnitTestCategories.h" "../../../../../modules/juce_core/xml/juce_XmlDocument.cpp" "../../../../../modules/juce_core/xml/juce_XmlDocument.h" "../../../../../modules/juce_core/xml/juce_XmlElement.cpp" @@ -918,6 +928,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_graphics/image_formats/pnglib/png.c" "../../../../../modules/juce_graphics/image_formats/pnglib/png.h" "../../../../../modules/juce_graphics/image_formats/pnglib/pngconf.h" + "../../../../../modules/juce_graphics/image_formats/pnglib/pngdebug.h" "../../../../../modules/juce_graphics/image_formats/pnglib/pngerror.c" "../../../../../modules/juce_graphics/image_formats/pnglib/pngget.c" "../../../../../modules/juce_graphics/image_formats/pnglib/pnginfo.h" @@ -1081,7 +1092,6 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_gui_basics/layout/juce_Grid.h" "../../../../../modules/juce_gui_basics/layout/juce_GridItem.cpp" "../../../../../modules/juce_gui_basics/layout/juce_GridItem.h" - "../../../../../modules/juce_gui_basics/layout/juce_GridUnitTests.cpp" "../../../../../modules/juce_gui_basics/layout/juce_GroupComponent.cpp" "../../../../../modules/juce_gui_basics/layout/juce_GroupComponent.h" "../../../../../modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp" @@ -1460,8 +1470,9 @@ set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/ set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/juce_IIRFilter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/juce_LagrangeInterpolator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/juce_LagrangeInterpolator.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/juce_LinearSmoothedValue.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/juce_Reverb.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/juce_SmoothedValue.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_basics/utilities/juce_SmoothedValue.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/juce_audio_basics.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/juce_audio_basics.mm" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/juce_audio_basics.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1472,11 +1483,10 @@ 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/juce_MidiInput.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) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiOutput.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiOutput.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Audio.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Midi.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Oboe.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1679,6 +1689,7 @@ set_source_files_properties("../../../../../modules/juce_audio_processors/format set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/thread/include/flock.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/thread/source/flock.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/LICENSE.txt" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/base/README.md" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/conststringtable.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/conststringtable.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/coreiids.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1724,11 +1735,13 @@ set_source_files_properties("../../../../../modules/juce_audio_processors/format set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstprefetchablesupport.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstprocesscontext.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstrepresentation.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivsttestplugprovider.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstunits.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vstpshpack4.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vstspeaker.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vsttypes.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/LICENSE.txt" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/README.md" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/memorystream.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/memorystream.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/pluginview.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1751,6 +1764,7 @@ set_source_files_properties("../../../../../modules/juce_audio_processors/format set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstpresetfile.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstpresetfile.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/LICENSE.txt" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/README.md" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/LICENSE.txt" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/VST3_SDK/README.md" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/format_types/juce_AU_Shared.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1789,14 +1803,19 @@ set_source_files_properties("../../../../../modules/juce_audio_processors/scanni set_source_files_properties("../../../../../modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/scanning/juce_PluginListComponent.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterBool.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterFloat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioParameterInt.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorParameters.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_RangedAudioParameter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/utilities/juce_RangedAudioParameter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/juce_audio_processors.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_processors/juce_audio_processors.mm" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -2044,6 +2063,7 @@ set_source_files_properties("../../../../../modules/juce_core/time/juce_Time.cpp set_source_files_properties("../../../../../modules/juce_core/time/juce_Time.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/unit_tests/juce_UnitTest.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/unit_tests/juce_UnitTest.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_core/unit_tests/juce_UnitTestCategories.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/xml/juce_XmlDocument.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/xml/juce_XmlDocument.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/xml/juce_XmlElement.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -2273,6 +2293,7 @@ set_source_files_properties("../../../../../modules/juce_graphics/image_formats/ set_source_files_properties("../../../../../modules/juce_graphics/image_formats/pnglib/png.c" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/image_formats/pnglib/png.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/image_formats/pnglib/pngconf.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_graphics/image_formats/pnglib/pngdebug.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/image_formats/pnglib/pngerror.c" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/image_formats/pnglib/pngget.c" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/image_formats/pnglib/pnginfo.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -2436,7 +2457,6 @@ set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_ set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_Grid.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_GridItem.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_GridItem.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_GridUnitTests.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_GroupComponent.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_GroupComponent.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/build.gradle b/extras/NetworkGraphicsDemo/Builds/Android/app/build.gradle index 8d8d7bc7..7ae8705b 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/app/build.gradle +++ b/extras/NetworkGraphicsDemo/Builds/Android/app/build.gradle @@ -86,7 +86,8 @@ android { main.java.srcDirs += ["../../../../../modules/juce_core/native/javacore/init", "../../../../../modules/juce_core/native/javacore/app", - "../../../../../modules/juce_gui_basics/native/javacore/app"] + "../../../../../modules/juce_gui_basics/native/javacore/app", + "../../../../../modules/juce_gui_basics/native/javaopt/app"] main.res.srcDirs += [] @@ -99,5 +100,6 @@ android { } + } diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml b/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml index ddb9f1db..87a55c1e 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml +++ b/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml @@ -11,7 +11,7 @@ - diff --git a/extras/NetworkGraphicsDemo/Builds/Android/settings.gradle b/extras/NetworkGraphicsDemo/Builds/Android/settings.gradle index 9d495b34..988df402 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/settings.gradle +++ b/extras/NetworkGraphicsDemo/Builds/Android/settings.gradle @@ -1 +1,2 @@ +rootProject.name = 'NetworkGraphicsDemo' include ':app' \ No newline at end of file diff --git a/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile b/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile index f1408d02..c457c924 100644 --- a/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile +++ b/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile @@ -35,13 +35,13 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) 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 JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) - JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -lGL -ldl -lpthread -lrt $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -lrt -ldl -lpthread -lGL $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -56,13 +56,13 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) 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 JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) - JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -lGL -ldl -lpthread -lrt $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -91,7 +91,7 @@ all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : $(OBJECTS_APP) $(RESOURCES) @command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } - @pkg-config --print-errors alsa freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl + @pkg-config --print-errors alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl @echo Linking "NetworkGraphicsDemo - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) -$(V_AT)mkdir -p $(JUCE_LIBDIR) diff --git a/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj b/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj index 4691d844..bf306b31 100644 --- a/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj +++ b/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj @@ -29,6 +29,10 @@ isa = PBXBuildFile; fileRef = 6799B056504F9F017998B9E2; }; + 770AB74B1D3A0108F764DD47 = { + isa = PBXBuildFile; + fileRef = 4D1DB6D77B6F3DE7A569780B; + }; CA694B2A73FCF12D7F9E7E49 = { isa = PBXBuildFile; fileRef = 448838BE6E937D450A3C84CE; @@ -202,6 +206,13 @@ path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; }; + 4D1DB6D77B6F3DE7A569780B = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = CoreAudioKit.framework; + path = System/Library/Frameworks/CoreAudioKit.framework; + sourceTree = SDKROOT; + }; 4FF648D72D6F1A78956CDA1B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; @@ -581,6 +592,7 @@ 398A945EFD9ED923162982B1, C78806A6727F44EACFDED4A5, 6799B056504F9F017998B9E2, + 4D1DB6D77B6F3DE7A569780B, 448838BE6E937D450A3C84CE, CB82A14817C3E2ABBBBC3864, F3292E3563DB7ABB076DB400, @@ -720,7 +732,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; @@ -739,7 +751,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "JUCE Network Graphics Demo"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Debug; @@ -766,7 +778,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; @@ -783,7 +795,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "JUCE Network Graphics Demo"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Release; @@ -851,6 +863,7 @@ BED88ADEA4DC91AA8C810FA8, 3C30D7C28C86F4054257DCD5, 67DF295E93E54432043126DF, + 770AB74B1D3A0108F764DD47, CA694B2A73FCF12D7F9E7E49, 80B9F7ED2009922C693B7DD4, 77745BF98931B91341FE17F6, @@ -878,13 +891,14 @@ A5398ADB6F5B128C00EB935C = { isa = PBXProject; buildConfigurationList = 02715337C584F3C721251428; - attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; 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; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1100; ORGANIZATIONNAME = "ROLI Ltd."; 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; projectDirPath = ""; projectRoot = ""; targets = (4311FBCBD02948A0ED96C7DD); + knownRegions = (en, Base); }; }; rootObject = A5398ADB6F5B128C00EB935C; diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/resources.rc b/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/resources.rc deleted file mode 100644 index a21c41a7..00000000 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/resources.rc +++ /dev/null @@ -1,34 +0,0 @@ -#ifdef JUCE_USER_DEFINED_RC_FILE - #include JUCE_USER_DEFINED_RC_FILE -#else - -#undef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#include - -VS_VERSION_INFO VERSIONINFO -FILEVERSION 1,0,0,0 -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - BEGIN - VALUE "CompanyName", "ROLI Ltd.\0" - VALUE "LegalCopyright", "ROLI Ltd.\0" - VALUE "FileDescription", "NetworkGraphicsDemo\0" - VALUE "FileVersion", "1.0.0\0" - VALUE "ProductName", "NetworkGraphicsDemo\0" - VALUE "ProductVersion", "1.0.0\0" - END - END - - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - -#endif - -IDI_ICON1 ICON DISCARDABLE "icon.ico" -IDI_ICON2 ICON DISCARDABLE "icon.ico" \ No newline at end of file diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo.sln b/extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo.sln deleted file mode 100644 index b98581bc..00000000 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo.sln +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2017 - -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetworkGraphicsDemo - App", "NetworkGraphicsDemo_App.vcxproj", "{2F8ABED0-7428-13A5-07CD-EF1F3B43B926}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Debug|x64.ActiveCfg = Debug|x64 - {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Debug|x64.Build.0 = Debug|x64 - {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Release|x64.ActiveCfg = Release|x64 - {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo.sln b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo.sln similarity index 95% rename from extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo.sln rename to extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo.sln index 83dc778f..b36a7021 100644 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo.sln +++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2013 +# Visual Studio 2019 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetworkGraphicsDemo - App", "NetworkGraphicsDemo_App.vcxproj", "{2F8ABED0-7428-13A5-07CD-EF1F3B43B926}" EndProject diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo_App.vcxproj b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj similarity index 97% rename from extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo_App.vcxproj rename to extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj index bb103ca6..69815331 100644 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo_App.vcxproj +++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj @@ -1,7 +1,7 @@ @@ -22,16 +22,16 @@ Application false false - v141 - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + v142 + 10.0 Application false true - v141 - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + v142 + 10.0 @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;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 @@ -105,7 +105,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;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 @@ -232,6 +232,9 @@ true + + true + true @@ -244,10 +247,10 @@ true - + true - + true @@ -589,12 +592,27 @@ true - + + true + + + true + + + true + + + true + + true true + + true + true @@ -1510,9 +1528,6 @@ true - - true - true @@ -1962,16 +1977,15 @@ - + - + - @@ -2126,6 +2140,7 @@ + @@ -2300,6 +2315,7 @@ + @@ -2403,6 +2419,7 @@ + @@ -2625,8 +2642,11 @@ + + + diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo_App.vcxproj.filters b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj.filters similarity index 97% rename from extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo_App.vcxproj.filters rename to extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj.filters index 1113fe87..aa2ae0b1 100644 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo_App.vcxproj.filters +++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj.filters @@ -1,6 +1,6 @@ - + {6803489B-B275-0512-8D8B-D30728E17A76} @@ -514,6 +514,9 @@ JUCE Modules\juce_audio_basics\utilities + + JUCE Modules\juce_audio_basics\utilities + JUCE Modules\juce_audio_basics @@ -529,10 +532,10 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io - + JUCE Modules\juce_audio_devices\midi_io @@ -883,12 +886,27 @@ JUCE Modules\juce_audio_processors\scanning - + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities JUCE Modules\juce_audio_processors\utilities + + JUCE Modules\juce_audio_processors\utilities + JUCE Modules\juce_audio_processors @@ -1864,9 +1882,6 @@ JUCE Modules\juce_gui_basics\layout - - JUCE Modules\juce_gui_basics\layout - JUCE Modules\juce_gui_basics\layout @@ -2475,10 +2490,10 @@ JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities - + JUCE Modules\juce_audio_basics\utilities @@ -2496,15 +2511,12 @@ JUCE Modules\juce_audio_devices\audio_io - + JUCE Modules\juce_audio_devices\midi_io JUCE Modules\juce_audio_devices\midi_io - - JUCE Modules\juce_audio_devices\midi_io - JUCE Modules\juce_audio_devices\native @@ -2967,6 +2979,9 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\vst @@ -3489,6 +3504,9 @@ JUCE Modules\juce_core\unit_tests + + JUCE Modules\juce_core\unit_tests + JUCE Modules\juce_core\xml @@ -3798,6 +3816,9 @@ JUCE Modules\juce_graphics\image_formats\pnglib + + JUCE Modules\juce_graphics\image_formats\pnglib + JUCE Modules\juce_graphics\image_formats\pnglib @@ -4460,12 +4481,21 @@ JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + + JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk + JUCE Modules\juce_audio_processors\format_types\VST3_SDK @@ -4481,9 +4511,6 @@ JUCE Modules\juce_graphics\image_formats\pnglib - - JUCE Library Code - diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2017/resources.rc b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/resources.rc similarity index 100% rename from extras/NetworkGraphicsDemo/Builds/VisualStudio2017/resources.rc rename to extras/NetworkGraphicsDemo/Builds/VisualStudio2019/resources.rc diff --git a/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj b/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj index b10a7654..e1c662c3 100644 --- a/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj +++ b/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj @@ -771,7 +771,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; @@ -793,7 +793,7 @@ PRODUCT_NAME = "JUCE Network Graphics Demo"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Debug; @@ -821,7 +821,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; @@ -841,7 +841,7 @@ PRODUCT_NAME = "JUCE Network Graphics Demo"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Release; @@ -940,13 +940,14 @@ A5398ADB6F5B128C00EB935C = { isa = PBXProject; buildConfigurationList = 02715337C584F3C721251428; - attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; 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; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1100; ORGANIZATIONNAME = "ROLI Ltd."; 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; projectDirPath = ""; projectRoot = ""; targets = (4311FBCBD02948A0ED96C7DD); + knownRegions = (en, Base); }; }; rootObject = A5398ADB6F5B128C00EB935C; diff --git a/extras/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h b/extras/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h index ac4e6435..22f64728 100644 --- a/extras/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h +++ b/extras/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h @@ -189,7 +189,7 @@ #endif #ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL 0 + //#define JUCE_USE_CURL 1 #endif #ifndef JUCE_LOAD_CURL_SYMBOLS_LAZILY @@ -197,11 +197,11 @@ #endif #ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 0 #endif #ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 0 #endif #ifndef JUCE_STRICT_REFCOUNTEDPOINTER diff --git a/extras/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer b/extras/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer index 79deb263..f8843645 100644 --- a/extras/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer +++ b/extras/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer @@ -1,7 +1,7 @@ @@ -38,29 +38,7 @@ - - - - - - - - - - - - - - - - - - - - - - - + @@ -81,7 +59,7 @@ - + @@ -127,12 +105,12 @@ + androidCpp11="1" targetFolder="Builds/Android" bigIcon="Ww6bQw" + gradleToolchainVersion="3.6"> - + diff --git a/extras/NetworkGraphicsDemo/Source/Demos.h b/extras/NetworkGraphicsDemo/Source/Demos.h index 505e50f1..e9c0dcfc 100644 --- a/extras/NetworkGraphicsDemo/Source/Demos.h +++ b/extras/NetworkGraphicsDemo/Source/Demos.h @@ -84,7 +84,7 @@ struct BackgroundLogo : public AnimatedContent )blahblah"; - logo.reset (Drawable::createFromSVG (*parseXML (logoData))); + logo = Drawable::createFromSVG (*parseXML (logoData)); } String getName() const override { return "Background Image"; } diff --git a/extras/Projucer/Builds/LinuxMakefile/Makefile b/extras/Projucer/Builds/LinuxMakefile/Makefile index 4eb662e5..ccf330cb 100644 --- a/extras/Projucer/Builds/LinuxMakefile/Makefile +++ b/extras/Projucer/Builds/LinuxMakefile/Makefile @@ -35,13 +35,13 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.4.2 -DJUCE_APP_VERSION_HEX=0x50402 $(shell pkg-config --cflags freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.4.4 -DJUCE_APP_VERSION_HEX=0x50404 $(shell pkg-config --cflags x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0 -DJucePlugin_Build_Unity=0 JUCE_TARGET_APP := Projucer JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++11 $(CXXFLAGS) - JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -ldl -lpthread -lrt $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0) -lrt -ldl -lpthread $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -56,13 +56,13 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.4.2 -DJUCE_APP_VERSION_HEX=0x50402 $(shell pkg-config --cflags freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.4.4 -DJUCE_APP_VERSION_HEX=0x50404 $(shell pkg-config --cflags x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0 -DJucePlugin_Build_Unity=0 JUCE_TARGET_APP := Projucer JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++11 $(CXXFLAGS) - JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -ldl -lpthread -lrt $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0) -fvisibility=hidden -lrt -ldl -lpthread $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -136,7 +136,7 @@ all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : $(OBJECTS_APP) $(RESOURCES) @command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } - @pkg-config --print-errors freetype2 x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 libcurl + @pkg-config --print-errors x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 @echo Linking "Projucer - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) -$(V_AT)mkdir -p $(JUCE_LIBDIR) diff --git a/extras/Projucer/Builds/MacOSX/Info-App.plist b/extras/Projucer/Builds/MacOSX/Info-App.plist index 8a280739..00eb365f 100644 --- a/extras/Projucer/Builds/MacOSX/Info-App.plist +++ b/extras/Projucer/Builds/MacOSX/Info-App.plist @@ -33,9 +33,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 5.4.2 + 5.4.4 CFBundleVersion - 5.4.2 + 5.4.4 NSHumanReadableCopyright ROLI Ltd. NSHighResolutionCapable diff --git a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj index f3350050..e5af3062 100644 --- a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj +++ b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj @@ -3207,8 +3207,8 @@ "_DEBUG=1", "DEBUG=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=5.4.2", - "JUCE_APP_VERSION_HEX=0x50402", + "JUCE_APP_VERSION=5.4.4", + "JUCE_APP_VERSION_HEX=0x50404", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -3228,7 +3228,7 @@ INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wno-missing-field-initializers -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 -Wno-ignored-qualifiers -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wundefined-func-template -Wnullable-to-nonnull-conversion"; + 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"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.theprojucer; PRODUCT_NAME = "Projucer"; USE_HEADERMAP = NO; @@ -3250,8 +3250,8 @@ "_NDEBUG=1", "NDEBUG=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=5.4.2", - "JUCE_APP_VERSION_HEX=0x50402", + "JUCE_APP_VERSION=5.4.4", + "JUCE_APP_VERSION_HEX=0x50404", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -3271,9 +3271,8 @@ INFOPLIST_FILE = Info-App.plist; INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; - LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.11; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wno-missing-field-initializers -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 -Wno-ignored-qualifiers -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wundefined-func-template -Wnullable-to-nonnull-conversion"; + 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"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.theprojucer; PRODUCT_NAME = "Projucer"; USE_HEADERMAP = NO; @@ -3302,7 +3301,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; @@ -3321,7 +3320,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "Projucer"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Debug; @@ -3348,7 +3347,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf"; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; @@ -3365,7 +3364,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "Projucer"; - WARNING_CFLAGS = -Wreorder; + WARNING_CFLAGS = "-Wreorder"; ZERO_LINK = NO; }; name = Release; @@ -3509,13 +3508,14 @@ 74EA481348A24104E6ACE009 = { isa = PBXProject; buildConfigurationList = F90407F24422C589DA251604; - attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; 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; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1100; ORGANIZATIONNAME = "ROLI Ltd."; 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; projectDirPath = ""; projectRoot = ""; targets = (0039FE1A254FE518518BF8B8); + knownRegions = (en, Base); }; }; rootObject = 74EA481348A24104E6ACE009; diff --git a/extras/Projucer/Builds/VisualStudio2013/icon.ico b/extras/Projucer/Builds/VisualStudio2013/icon.ico deleted file mode 100644 index 09d32ad703e414097a17e969e7d765325e912c77..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 33530 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

(u1;L6(cQ?)GnM#vbq;}_8j8w4Fi2^0KYHDQh@ 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 Application false - true + false v140 8.1 @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.2;JUCE_APP_VERSION_HEX=0x50402;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.4;JUCE_APP_VERSION_HEX=0x50404;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 @@ -74,6 +74,7 @@ Level4 true true + /bigobj %(AdditionalOptions) stdcpp14 @@ -105,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.2;JUCE_APP_VERSION_HEX=0x50402;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.4;JUCE_APP_VERSION_HEX=0x50404;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 @@ -115,6 +116,7 @@ Level4 true true + /bigobj %(AdditionalOptions) stdcpp14 @@ -1114,9 +1116,6 @@ true - - true - true @@ -1772,6 +1771,7 @@ + @@ -1875,6 +1875,7 @@ + diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters index a9ef4daf..7bc5135c 100644 --- a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters @@ -1435,9 +1435,6 @@ JUCE Modules\juce_gui_basics\layout - - JUCE Modules\juce_gui_basics\layout - JUCE Modules\juce_gui_basics\layout @@ -2775,6 +2772,9 @@ JUCE Modules\juce_core\unit_tests + + JUCE Modules\juce_core\unit_tests + JUCE Modules\juce_core\xml @@ -3084,6 +3084,9 @@ JUCE Modules\juce_graphics\image_formats\pnglib + + JUCE Modules\juce_graphics\image_formats\pnglib + JUCE Modules\juce_graphics\image_formats\pnglib diff --git a/extras/Projucer/Builds/VisualStudio2015/resources.rc b/extras/Projucer/Builds/VisualStudio2015/resources.rc index 8e93e51b..6ac9b991 100644 --- a/extras/Projucer/Builds/VisualStudio2015/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2015/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,4,2,0 +FILEVERSION 5,4,4,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +16,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "ROLI Ltd.\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "5.4.2\0" + VALUE "FileVersion", "5.4.4\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "5.4.2\0" + VALUE "ProductVersion", "5.4.4\0" END END diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj index b58e36c2..3e780f2f 100644 --- a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj @@ -29,7 +29,7 @@ Label="Configuration"> Application false - true + false v141 $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.2;JUCE_APP_VERSION_HEX=0x50402;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.4;JUCE_APP_VERSION_HEX=0x50404;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.2;JUCE_APP_VERSION_HEX=0x50402;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.4;JUCE_APP_VERSION_HEX=0x50404;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 @@ -1116,9 +1116,6 @@ true - - true - true @@ -1774,6 +1771,7 @@ + @@ -1877,6 +1875,7 @@ + diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters index f71a483e..a2ec767b 100644 --- a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters @@ -1435,9 +1435,6 @@ JUCE Modules\juce_gui_basics\layout - - JUCE Modules\juce_gui_basics\layout - JUCE Modules\juce_gui_basics\layout @@ -2775,6 +2772,9 @@ JUCE Modules\juce_core\unit_tests + + JUCE Modules\juce_core\unit_tests + JUCE Modules\juce_core\xml @@ -3084,6 +3084,9 @@ JUCE Modules\juce_graphics\image_formats\pnglib + + JUCE Modules\juce_graphics\image_formats\pnglib + JUCE Modules\juce_graphics\image_formats\pnglib diff --git a/extras/Projucer/Builds/VisualStudio2017/resources.rc b/extras/Projucer/Builds/VisualStudio2017/resources.rc index 8e93e51b..6ac9b991 100644 --- a/extras/Projucer/Builds/VisualStudio2017/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2017/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,4,2,0 +FILEVERSION 5,4,4,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +16,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "ROLI Ltd.\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "5.4.2\0" + VALUE "FileVersion", "5.4.4\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "5.4.2\0" + VALUE "ProductVersion", "5.4.4\0" END END diff --git a/extras/Projucer/Builds/VisualStudio2013/Projucer.sln b/extras/Projucer/Builds/VisualStudio2019/Projucer.sln similarity index 95% rename from extras/Projucer/Builds/VisualStudio2013/Projucer.sln rename to extras/Projucer/Builds/VisualStudio2019/Projucer.sln index 8c3cf0cb..c0224fe3 100644 --- a/extras/Projucer/Builds/VisualStudio2013/Projucer.sln +++ b/extras/Projucer/Builds/VisualStudio2019/Projucer.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2013 +# Visual Studio 2019 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Projucer - App", "Projucer_App.vcxproj", "{E4CFCE31-1AF5-C360-751D-9682E333BE4D}" EndProject diff --git a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj similarity index 97% rename from extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj rename to extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj index 9ae4b536..d13b3cde 100644 --- a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj @@ -1,7 +1,7 @@ @@ -22,16 +22,16 @@ Application false false - v120 - 8.1 + v142 + 10.0 Application false - true - v120 - 8.1 + false + v142 + 10.0 @@ -64,8 +64,8 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.4.2;JUCE_APP_VERSION_HEX=0x50402;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 + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=5.4.4;JUCE_APP_VERSION_HEX=0x50404;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 $(IntDir)\ @@ -74,6 +74,7 @@ Level4 true true + /w44265 /w45038 /w44062 %(AdditionalOptions) stdcpp14 @@ -105,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.4.2;JUCE_APP_VERSION_HEX=0x50402;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=5.4.4;JUCE_APP_VERSION_HEX=0x50404;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 @@ -115,6 +116,7 @@ Level4 true true + /w44265 /w45038 /w44062 %(AdditionalOptions) stdcpp14 @@ -1114,9 +1116,6 @@ true - - true - true @@ -1772,6 +1771,7 @@ + @@ -1875,6 +1875,7 @@ + diff --git a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters similarity index 97% rename from extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters rename to extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters index 18c185f1..754d0ff9 100644 --- a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters @@ -1,6 +1,6 @@ - + {DC7E18A5-E854-3D99-627F-AAA88246B712} @@ -1435,9 +1435,6 @@ JUCE Modules\juce_gui_basics\layout - - JUCE Modules\juce_gui_basics\layout - JUCE Modules\juce_gui_basics\layout @@ -2775,6 +2772,9 @@ JUCE Modules\juce_core\unit_tests + + JUCE Modules\juce_core\unit_tests + JUCE Modules\juce_core\xml @@ -3084,6 +3084,9 @@ JUCE Modules\juce_graphics\image_formats\pnglib + + JUCE Modules\juce_graphics\image_formats\pnglib + JUCE Modules\juce_graphics\image_formats\pnglib diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/icon.ico b/extras/Projucer/Builds/VisualStudio2019/icon.ico similarity index 100% rename from extras/NetworkGraphicsDemo/Builds/VisualStudio2013/icon.ico rename to extras/Projucer/Builds/VisualStudio2019/icon.ico diff --git a/extras/Projucer/Builds/VisualStudio2013/resources.rc b/extras/Projucer/Builds/VisualStudio2019/resources.rc similarity index 76% rename from extras/Projucer/Builds/VisualStudio2013/resources.rc rename to extras/Projucer/Builds/VisualStudio2019/resources.rc index 8e93e51b..6ac9b991 100644 --- a/extras/Projucer/Builds/VisualStudio2013/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2019/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,4,2,0 +FILEVERSION 5,4,4,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +16,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "ROLI Ltd.\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "5.4.2\0" + VALUE "FileVersion", "5.4.4\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "5.4.2\0" + VALUE "ProductVersion", "5.4.4\0" END END diff --git a/extras/Projucer/JuceLibraryCode/AppConfig.h b/extras/Projucer/JuceLibraryCode/AppConfig.h index f4ba9f5b..3620ea15 100644 --- a/extras/Projucer/JuceLibraryCode/AppConfig.h +++ b/extras/Projucer/JuceLibraryCode/AppConfig.h @@ -106,11 +106,11 @@ #endif #ifndef JUCE_LOAD_CURL_SYMBOLS_LAZILY - //#define JUCE_LOAD_CURL_SYMBOLS_LAZILY 0 + #define JUCE_LOAD_CURL_SYMBOLS_LAZILY 1 #endif #ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 0 #endif #ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES diff --git a/extras/Projucer/JuceLibraryCode/JuceHeader.h b/extras/Projucer/JuceLibraryCode/JuceHeader.h index 015347e7..f3f49db0 100644 --- a/extras/Projucer/JuceLibraryCode/JuceHeader.h +++ b/extras/Projucer/JuceLibraryCode/JuceHeader.h @@ -36,7 +36,7 @@ namespace ProjectInfo { const char* const projectName = "Projucer"; const char* const companyName = "ROLI Ltd."; - const char* const versionString = "5.4.2"; - const int versionNumber = 0x50402; + const char* const versionString = "5.4.4"; + const int versionNumber = 0x50404; } #endif diff --git a/extras/Projucer/Projucer.jucer b/extras/Projucer/Projucer.jucer index eb327827..4f6b4077 100644 --- a/extras/Projucer/Projucer.jucer +++ b/extras/Projucer/Projucer.jucer @@ -1,21 +1,19 @@ + jucerVersion="5.4.4" version="5.4.4" bundleIdentifier="com.juce.theprojucer" + splashScreenColour="Dark" displaySplashScreen="0" reportAppUsage="0" + companyName="ROLI Ltd." companyCopyright="ROLI Ltd." cppLanguageStandard="11"> - - + + @@ -28,14 +26,12 @@ - + - - + @@ -47,14 +43,12 @@ - - + + - - + + @@ -66,12 +60,12 @@ - - + + + debugInformationFormat="None" useRuntimeLibDLL="0" linkTimeOptimisation="0"/> @@ -83,14 +77,11 @@ - - + + - - + + @@ -720,7 +711,7 @@ + JUCE_STRICT_REFCOUNTEDPOINTER="1" JUCE_LOAD_CURL_SYMBOLS_LAZILY="1"/> @@ -732,7 +723,7 @@ - + diff --git a/extras/Projucer/Source/Application/Windows/jucer_GlobalPathsWindowComponent.h b/extras/Projucer/Source/Application/Windows/jucer_GlobalPathsWindowComponent.h index a59393dd..94505ffd 100644 --- a/extras/Projucer/Source/Application/Windows/jucer_GlobalPathsWindowComponent.h +++ b/extras/Projucer/Source/Application/Windows/jucer_GlobalPathsWindowComponent.h @@ -198,7 +198,7 @@ private: String ("This should be the path to the folder containing the JUCE modules that you wish to use, typically the \"modules\" directory of your JUCE folder.") + (isThisOS ? " Use the button below to re-scan a new path." : "")); builder.add (new FilePathPropertyComponent (userModulePathValue, "User Modules", true, isThisOS, {}, {}, true), - String ("A semicolon-separated list of user module paths. These paths will be used to display any non-JUCE modules that are available.") + String ("A path to a folder containing any custom modules that you wish to use.") + (isThisOS ? " Use the button below to re-scan new paths." : "")); builder.add (new LabelPropertyComponent ("SDKs"), {}); @@ -214,7 +214,7 @@ private: { builder.add (new FilePathPropertyComponent (aaxPathValue, "AAX SDK", true, isThisOS), "If you are building AAX plug-ins, this should be the path to the AAX SDK folder."); - builder.add (new FilePathPropertyComponent (rtasPathValue, "RTAS SDK", true, isThisOS), + builder.add (new FilePathPropertyComponent (rtasPathValue, "RTAS SDK (deprecated)", true, isThisOS), "If you are building RTAS plug-ins, this should be the path to the RTAS SDK folder."); } diff --git a/extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h b/extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h index caa591da..ddadb3fe 100644 --- a/extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h +++ b/extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h @@ -113,6 +113,12 @@ private: } }; + void lookAndFeelChanged() override + { + lf->setColourScheme (ProjucerApplication::getApp().lookAndFeel.getCurrentColourScheme()); + lf->setupColours(); + } + //============================================================================== void buildProps() { @@ -203,11 +209,6 @@ private: } } - void valueTreeChildAdded (ValueTree&, ValueTree&) override {} - void valueTreeChildRemoved (ValueTree&, ValueTree&, int) override {} - void valueTreeChildOrderChanged (ValueTree&, int, int) override {} - void valueTreeParentChanged (ValueTree&) override {} - //============================================================================== String getFormattedMetadataString() const noexcept { @@ -322,7 +323,7 @@ private: mainClassValue { pipTree, Ids::mainClass, nullptr, "MyComponent" }, useLocalCopyValue { pipTree, Ids::useLocalCopy, nullptr, false }; - std::unique_ptr lf; + std::unique_ptr lf; Viewport propertyViewport; PropertyGroupComponent propertyGroup { "PIP Creator", { getIcons().juceLogo, Colours::transparentBlack } }; diff --git a/extras/Projucer/Source/Application/jucer_Application.cpp b/extras/Projucer/Source/Application/jucer_Application.cpp index 58c18572..67f20243 100644 --- a/extras/Projucer/Source/Application/jucer_Application.cpp +++ b/extras/Projucer/Source/Application/jucer_Application.cpp @@ -174,7 +174,8 @@ void ProjucerApplication::handleAsyncUpdate() MenuBarModel::setMacMainMenu (menuModel.get(), &extraAppleMenuItems); //, "Open Recent"); #endif - versionChecker.reset (new LatestVersionChecker()); + if (getGlobalProperties().getValue (Ids::dontQueryForUpdate, {}).isEmpty()) + LatestVersionCheckerAndUpdater::getInstance()->checkForNewVersion (false); if (licenseController != nullptr) { @@ -217,7 +218,6 @@ void ProjucerApplication::shutdown() Logger::writeToLog ("Server shutdown cleanly"); } - versionChecker.reset(); utf8Window.reset(); svgPathWindow.reset(); aboutWindow.reset(); @@ -359,8 +359,6 @@ enum recentProjectsBaseID = 100, openWindowsBaseID = 300, activeDocumentsBaseID = 400, - colourSchemeBaseID = 1000, - codeEditorColourSchemeBaseID = 1500, showPathsID = 1999, examplesBaseID = 2000 }; @@ -438,6 +436,7 @@ void ProjucerApplication::createFileMenu (PopupMenu& menu) #if ! JUCE_MAC menu.addCommandItem (commandManager.get(), CommandIDs::showAboutWindow); menu.addCommandItem (commandManager.get(), CommandIDs::showAppUsageWindow); + menu.addCommandItem (commandManager.get(), CommandIDs::checkForNewVersion); menu.addCommandItem (commandManager.get(), CommandIDs::showGlobalPathsWindow); menu.addSeparator(); menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::quit); @@ -495,16 +494,24 @@ void ProjucerApplication::createBuildMenu (PopupMenu& menu) void ProjucerApplication::createColourSchemeItems (PopupMenu& menu) { - PopupMenu colourSchemes; + PopupMenu colourSchemeMenu; - colourSchemes.addItem (colourSchemeBaseID + 0, "Dark", true, selectedColourSchemeIndex == 0); - colourSchemes.addItem (colourSchemeBaseID + 1, "Grey", true, selectedColourSchemeIndex == 1); - colourSchemes.addItem (colourSchemeBaseID + 2, "Light", true, selectedColourSchemeIndex == 2); + colourSchemeMenu.addItem (PopupMenu::Item ("Dark") + .setTicked (selectedColourSchemeIndex == 0) + .setAction ([this] { setColourScheme (0, true); updateEditorColourSchemeIfNeeded(); })); - menu.addSubMenu ("Colour Scheme", colourSchemes); + colourSchemeMenu.addItem (PopupMenu::Item ("Grey") + .setTicked (selectedColourSchemeIndex == 1) + .setAction ([this] { setColourScheme (1, true); updateEditorColourSchemeIfNeeded(); })); + + colourSchemeMenu.addItem (PopupMenu::Item ("Light") + .setTicked (selectedColourSchemeIndex == 2) + .setAction ([this] { setColourScheme (2, true); updateEditorColourSchemeIfNeeded(); })); + + menu.addSubMenu ("Colour Scheme", colourSchemeMenu); //========================================================================== - PopupMenu editorColourSchemes; + PopupMenu editorColourSchemeMenu; auto& appearanceSettings = getAppSettings().appearance; @@ -512,21 +519,22 @@ void ProjucerApplication::createColourSchemeItems (PopupMenu& menu) auto schemes = appearanceSettings.getPresetSchemes(); auto i = 0; - for (auto s : schemes) + + for (auto& s : schemes) { - editorColourSchemes.addItem (codeEditorColourSchemeBaseID + i, s, - editorColourSchemeWindow == nullptr, - selectedEditorColourSchemeIndex == i); + editorColourSchemeMenu.addItem (PopupMenu::Item (s) + .setEnabled (editorColourSchemeWindow == nullptr) + .setTicked (selectedEditorColourSchemeIndex == i) + .setAction ([this, i] { setEditorColourScheme (i, true); })); ++i; } - numEditorColourSchemes = i; - - editorColourSchemes.addSeparator(); - editorColourSchemes.addItem (codeEditorColourSchemeBaseID + numEditorColourSchemes, - "Create...", editorColourSchemeWindow == nullptr); + editorColourSchemeMenu.addSeparator(); + editorColourSchemeMenu.addItem (PopupMenu::Item ("Create...") + .setEnabled (editorColourSchemeWindow == nullptr) + .setAction ([this] { showEditorColourSchemeWindow(); })); - menu.addSubMenu ("Editor Colour Scheme", editorColourSchemes); + menu.addSubMenu ("Editor Colour Scheme", editorColourSchemeMenu); } void ProjucerApplication::createWindowMenu (PopupMenu& menu) @@ -537,14 +545,11 @@ void ProjucerApplication::createWindowMenu (PopupMenu& menu) menu.addSeparator(); int counter = 0; + for (auto* window : mainWindowList.windows) - { if (window != nullptr) - { if (auto* project = window->getProject()) menu.addItem (openWindowsBaseID + counter++, project->getProjectNameString()); - } - } menu.addSeparator(); menu.addCommandItem (commandManager.get(), CommandIDs::closeAllWindows); @@ -589,6 +594,7 @@ void ProjucerApplication::createExtraAppleMenuItems (PopupMenu& menu) { menu.addCommandItem (commandManager.get(), CommandIDs::showAboutWindow); menu.addCommandItem (commandManager.get(), CommandIDs::showAppUsageWindow); + menu.addCommandItem (commandManager.get(), CommandIDs::checkForNewVersion); menu.addSeparator(); menu.addCommandItem (commandManager.get(), CommandIDs::showGlobalPathsWindow); } @@ -954,19 +960,6 @@ void ProjucerApplication::handleMainMenuCommand (int menuItemID) else jassertfalse; } - else if (menuItemID >= colourSchemeBaseID && menuItemID < (colourSchemeBaseID + 3)) - { - setColourScheme (menuItemID - colourSchemeBaseID, true); - updateEditorColourSchemeIfNeeded(); - } - else if (menuItemID >= codeEditorColourSchemeBaseID && menuItemID < (codeEditorColourSchemeBaseID + numEditorColourSchemes)) - { - setEditorColourScheme (menuItemID - codeEditorColourSchemeBaseID, true); - } - else if (menuItemID == (codeEditorColourSchemeBaseID + numEditorColourSchemes)) - { - showEditorColourSchemeWindow(); - } else if (menuItemID == showPathsID) { showPathsWindow (true); @@ -1000,6 +993,7 @@ void ProjucerApplication::getAllCommands (Array & commands) CommandIDs::showSVGPathTool, CommandIDs::showAboutWindow, CommandIDs::showAppUsageWindow, + CommandIDs::checkForNewVersion, CommandIDs::showForum, CommandIDs::showAPIModules, CommandIDs::showAPIClasses, @@ -1090,6 +1084,10 @@ void ProjucerApplication::getCommandInfo (CommandID commandID, ApplicationComman result.setInfo ("Application Usage Data", "Shows the application usage data agreement window", CommandCategories::general, 0); break; + case CommandIDs::checkForNewVersion: + result.setInfo ("Check for New Version...", "Checks the web server for a new version of JUCE", CommandCategories::general, 0); + break; + case CommandIDs::showForum: result.setInfo ("JUCE Community Forum", "Shows the JUCE community forum in a browser", CommandCategories::general, 0); break; @@ -1149,6 +1147,7 @@ bool ProjucerApplication::perform (const InvocationInfo& info) case CommandIDs::showGlobalPathsWindow: showPathsWindow (false); break; case CommandIDs::showAboutWindow: showAboutWindow(); break; case CommandIDs::showAppUsageWindow: showApplicationUsageDataAgreementPopup(); break; + case CommandIDs::checkForNewVersion: LatestVersionCheckerAndUpdater::getInstance()->checkForNewVersion (true); break; case CommandIDs::showForum: launchForumBrowser(); break; case CommandIDs::showAPIModules: launchModulesBrowser(); break; case CommandIDs::showAPIClasses: launchClassesBrowser(); break; @@ -1490,35 +1489,22 @@ void ProjucerApplication::showSetJUCEPathAlert() } -void ProjucerApplication::rescanJUCEPathModules() +void rescanModules (AvailableModuleList& list, const Array& paths, bool async) { - File jucePath (getAppSettings().getStoredPath (Ids::defaultJuceModulePath, TargetOS::getThisOS()).get().toString()); - - if (isRunningCommandLine) - jucePathModuleList.scanPaths ({ jucePath }); + if (async) + list.scanPathsAsync (paths); else - jucePathModuleList.scanPathsAsync ({ jucePath }); + list.scanPaths (paths); } -static Array getSanitisedUserModulePaths() +void ProjucerApplication::rescanJUCEPathModules() { - Array paths; - - for (auto p : StringArray::fromTokens (getAppSettings().getStoredPath (Ids::defaultUserModulePath, TargetOS::getThisOS()).get().toString(), ";", {})) - { - p = p.replace ("~", File::getSpecialLocation (File::userHomeDirectory).getFullPathName()); - paths.add (File::createFileWithoutCheckingPath (p.trim())); - } - - return paths; + rescanModules (jucePathModuleList, { getAppSettings().getStoredPath (Ids::defaultJuceModulePath, TargetOS::getThisOS()).get().toString() }, ! isRunningCommandLine); } void ProjucerApplication::rescanUserPathModules() { - if (isRunningCommandLine) - userPathsModuleList.scanPaths (getSanitisedUserModulePaths()); - else - userPathsModuleList.scanPathsAsync (getSanitisedUserModulePaths()); + rescanModules (userPathsModuleList, { getAppSettings().getStoredPath (Ids::defaultUserModulePath, TargetOS::getThisOS()).get().toString() }, ! isRunningCommandLine); } void ProjucerApplication::selectEditorColourSchemeWithName (const String& schemeName) diff --git a/extras/Projucer/Source/Application/jucer_Application.h b/extras/Projucer/Source/Application/jucer_Application.h index 7a7c5786..3552ef53 100644 --- a/extras/Projucer/Source/Application/jucer_Application.h +++ b/extras/Projucer/Source/Application/jucer_Application.h @@ -123,7 +123,6 @@ public: void launchTutorialsBrowser(); void updateAllBuildTabs(); - LatestVersionChecker* createVersionChecker() const; //============================================================================== void licenseStateChanged (const LicenseState&) override; @@ -196,7 +195,6 @@ private: //============================================================================== void* server = nullptr; - std::unique_ptr versionChecker; TooltipWindow tooltipWindow; AvailableModuleList jucePathModuleList, userPathsModuleList; @@ -210,7 +208,7 @@ private: ChildProcess makeProcess; #endif - int selectedColourSchemeIndex = 0, selectedEditorColourSchemeIndex = 0, numEditorColourSchemes = 0; + int selectedColourSchemeIndex = 0, selectedEditorColourSchemeIndex = 0; //============================================================================== JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProjucerApplication) diff --git a/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp b/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp index 2cfc53a2..a54b5273 100644 --- a/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp +++ b/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp @@ -28,808 +28,523 @@ #include "jucer_Application.h" #include "jucer_AutoUpdater.h" -LatestVersionChecker::JuceVersionTriple::JuceVersionTriple() - : major ((ProjectInfo::versionNumber & 0xff0000) >> 16), - minor ((ProjectInfo::versionNumber & 0x00ff00) >> 8), - build ((ProjectInfo::versionNumber & 0x0000ff) >> 0) -{} - -LatestVersionChecker::JuceVersionTriple::JuceVersionTriple (int juceVersionNumber) - : major ((juceVersionNumber & 0xff0000) >> 16), - minor ((juceVersionNumber & 0x00ff00) >> 8), - build ((juceVersionNumber & 0x0000ff) >> 0) -{} - -LatestVersionChecker::JuceVersionTriple::JuceVersionTriple (int majorInt, int minorInt, int buildNumber) - : major (majorInt), - minor (minorInt), - build (buildNumber) -{} - -bool LatestVersionChecker::JuceVersionTriple::fromString (const String& versionString, - LatestVersionChecker::JuceVersionTriple& result) +//============================================================================== +LatestVersionCheckerAndUpdater::LatestVersionCheckerAndUpdater() + : Thread ("VersionChecker") { - StringArray tokenizedString = StringArray::fromTokens (versionString, ".", StringRef()); - - if (tokenizedString.size() != 3) - return false; - - result.major = tokenizedString [0].getIntValue(); - result.minor = tokenizedString [1].getIntValue(); - result.build = tokenizedString [2].getIntValue(); - - return true; } -String LatestVersionChecker::JuceVersionTriple::toString() const +LatestVersionCheckerAndUpdater::~LatestVersionCheckerAndUpdater() { - String retval; - retval << major << '.' << minor << '.' << build; - return retval; + stopThread (1000); + clearSingletonInstance(); } -bool LatestVersionChecker::JuceVersionTriple::operator> (const LatestVersionChecker::JuceVersionTriple& b) const noexcept +void LatestVersionCheckerAndUpdater::checkForNewVersion (bool showAlerts) { - if (major == b.major) + if (! isThreadRunning()) { - if (minor == b.minor) - return build > b.build; - - return minor > b.minor; + showAlertWindows = showAlerts; + startThread (3); } +} + +//============================================================================== +void LatestVersionCheckerAndUpdater::run() +{ + queryUpdateServer(); - return major > b.major; + if (! threadShouldExit()) + MessageManager::callAsync ([this] { processResult(); }); } //============================================================================== -struct RelaunchTimer : private Timer +String getOSString() +{ + #if JUCE_MAC + return "OSX"; + #elif JUCE_WINDOWS + return "Windows"; + #elif JUCE_LINUX + return "Linux"; + #else + jassertfalse; + return "Unknown"; + #endif +} + +namespace VersionHelpers { - RelaunchTimer (const File& f) : parentFolder (f) + String formatProductVersion (int versionNum) { - startTimer (1500); + int major = (versionNum & 0xff0000) >> 16; + int minor = (versionNum & 0x00ff00) >> 8; + int build = (versionNum & 0x0000ff) >> 0; + + return String (major) + '.' + String (minor) + '.' + String (build); } - void timerCallback() override + String getProductVersionString() { - stopTimer(); + return formatProductVersion (ProjectInfo::versionNumber); + } - File app = parentFolder.getChildFile ( - #if JUCE_MAC - "Projucer.app"); - #elif JUCE_WINDOWS - "Projucer.exe"); - #elif JUCE_LINUX - "Projucer"); - #endif + bool isNewVersion (const String& current, const String& other) + { + auto currentTokens = StringArray::fromTokens (current, ".", {}); + auto otherTokens = StringArray::fromTokens (other, ".", {}); - JUCEApplication::quit(); + jassert (currentTokens.size() == 3 && otherTokens.size() == 3); - if (app.exists()) + if (currentTokens[0].getIntValue() == otherTokens[0].getIntValue()) { - app.setExecutePermission (true); + if (currentTokens[1].getIntValue() == otherTokens[1].getIntValue()) + return currentTokens[2].getIntValue() < otherTokens[2].getIntValue(); - #if JUCE_MAC - app.getChildFile ("Contents") - .getChildFile ("MacOS") - .getChildFile ("Projucer").setExecutePermission (true); - #endif - - app.startAsProcess(); + return currentTokens[1].getIntValue() < otherTokens[1].getIntValue(); } - delete this; + return currentTokens[0].getIntValue() < otherTokens[0].getIntValue(); } +} - File parentFolder; -}; - -//============================================================================== -class DownloadNewVersionThread : public ThreadWithProgressWindow +void LatestVersionCheckerAndUpdater::queryUpdateServer() { -public: - DownloadNewVersionThread (LatestVersionChecker& versionChecker,URL u, - const String& extraHeaders, File target) - : ThreadWithProgressWindow ("Downloading New Version", true, true), - owner (versionChecker), - result (Result::ok()), - url (u), headers (extraHeaders), targetFolder (target) - { - } + StringPairArray responseHeaders; - static void performDownload (LatestVersionChecker& versionChecker, URL u, - const String& extraHeaders, File targetFolder) - { - DownloadNewVersionThread d (versionChecker, u, extraHeaders, targetFolder); + URL latestVersionURL ("https://my.roli.com/software_versions/update_to/Projucer/" + + VersionHelpers::getProductVersionString() + '/' + getOSString() + + "?language=" + SystemStats::getUserLanguage()); - if (d.runThread()) - { - if (d.result.failed()) - { - AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, - "Installation Failed", - d.result.getErrorMessage()); - } - else - { - new RelaunchTimer (targetFolder); - } - } - } + std::unique_ptr inStream (latestVersionURL.createInputStream (false, nullptr, nullptr, + "X-API-Key: 265441b-343403c-20f6932-76361d\nContent-Type: " + "application/json\nAccept: application/json; version=1", + 0, &responseHeaders, &statusCode, 0)); - void run() override + if (threadShouldExit()) + return; + + if (inStream.get() != nullptr && (statusCode == 303 || statusCode == 400)) { - setProgress (-1.0); + if (statusCode == 303) + relativeDownloadPath = responseHeaders["Location"]; - MemoryBlock zipData; - result = download (zipData); + jassert (relativeDownloadPath.isNotEmpty()); - if (result.wasOk() && ! threadShouldExit()) - { - setStatusMessage ("Installing..."); - result = owner.performUpdate (zipData, targetFolder); - } + jsonReply = JSON::parse (inStream->readEntireStreamAsString()); } - - Result download (MemoryBlock& dest) + else if (showAlertWindows) { - setStatusMessage ("Downloading..."); - - int statusCode = 302; - const int maxRedirects = 5; - - // we need to do the redirecting manually due to inconsistencies on the way headers are handled on redirects - std::unique_ptr in; - - for (int redirect = 0; redirect < maxRedirects; ++redirect) - { - StringPairArray responseHeaders; - - in.reset (url.createInputStream (false, nullptr, nullptr, headers, - 10000, &responseHeaders, &statusCode, 0)); - - if (in == nullptr || statusCode != 302) - break; + if (statusCode == 204) + AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon, "No New Version Available", "Your JUCE version is up to date."); + else + AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, "Network Error", "Could not connect to the web server.\n" + "Please check your internet connection and try again."); + } +} - String redirectPath = responseHeaders ["Location"]; - if (redirectPath.isEmpty()) - break; +void LatestVersionCheckerAndUpdater::processResult() +{ + if (! jsonReply.isObject()) + return; - url = owner.getLatestVersionURL (headers, redirectPath); - } + if (statusCode == 400) + { + auto errorObject = jsonReply.getDynamicObject()->getProperty ("error"); - if (in != nullptr && statusCode == 200) + if (errorObject.isObject()) { - int64 total = 0; - MemoryOutputStream mo (dest, true); - - for (;;) - { - if (threadShouldExit()) - return Result::fail ("cancel"); - - int64 written = mo.writeFromInputStream (*in, 8192); - - if (written == 0) - break; - - total += written; - - setStatusMessage (String (TRANS("Downloading... (123)")) - .replace ("123", File::descriptionOfSizeInBytes (total))); - } + auto message = errorObject.getProperty ("message", {}).toString(); - return Result::ok(); + if (message.isNotEmpty()) + AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, "JUCE Updater", message); } - - return Result::fail ("Failed to download from: " + url.toString (false)); } - - LatestVersionChecker& owner; - Result result; - URL url; - String headers; - File targetFolder; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DownloadNewVersionThread) -}; + else if (statusCode == 303) + { + askUserAboutNewVersion (jsonReply.getProperty ("version", {}).toString(), + jsonReply.getProperty ("notes", {}).toString()); + } +} //============================================================================== -class UpdateUserDialog : public Component +class UpdateDialog : public Component { public: - UpdateUserDialog (const LatestVersionChecker::JuceVersionTriple& version, - const String& productName, - const String& releaseNotes, - const char* overwriteFolderPath) - : hasOverwriteButton (overwriteFolderPath != nullptr) + UpdateDialog (const String& newVersion, const String& releaseNotes) { - titleLabel.reset (new Label ("Title Label", - TRANS("Download \"123\" version 456?") - .replace ("123", productName) - .replace ("456", version.toString()))); - addAndMakeVisible (titleLabel.get()); - - titleLabel->setFont (Font (15.00f, Font::bold)); - titleLabel->setJustificationType (Justification::centredLeft); - titleLabel->setEditable (false, false, false); - - contentLabel.reset(new Label ("Content Label", - TRANS("A new version of \"123\" is available - would you like to download it?") - .replace ("123", productName))); - addAndMakeVisible (contentLabel.get()); - contentLabel->setFont (Font (15.00f, Font::plain)); - contentLabel->setJustificationType (Justification::topLeft); - contentLabel->setEditable (false, false, false); - - okButton.reset (new TextButton ("OK Button")); - addAndMakeVisible (okButton.get()); - okButton->setButtonText (TRANS(hasOverwriteButton ? "Choose Another Folder..." : "OK")); - okButton->onClick = [this] { exitParentDialog (2); }; - - cancelButton.reset (new TextButton ("Cancel Button")); - addAndMakeVisible (cancelButton.get()); - cancelButton->setButtonText (TRANS("Cancel")); - cancelButton->onClick = [this] { exitParentDialog (-1); }; - - changeLogLabel.reset (new Label ("Change Log Label", TRANS("Release Notes:"))); - addAndMakeVisible (changeLogLabel.get()); - changeLogLabel->setFont (Font (15.00f, Font::plain)); - changeLogLabel->setJustificationType (Justification::topLeft); - changeLogLabel->setEditable (false, false, false); - - changeLog.reset (new TextEditor ("Change Log")); - addAndMakeVisible (changeLog.get()); - changeLog->setMultiLine (true); - changeLog->setReturnKeyStartsNewLine (true); - changeLog->setReadOnly (true); - changeLog->setScrollbarsShown (true); - changeLog->setCaretVisible (false); - changeLog->setPopupMenuEnabled (false); - changeLog->setText (releaseNotes); - - if (hasOverwriteButton) + titleLabel.setText ("JUCE version " + newVersion, dontSendNotification); + titleLabel.setFont ({ 15.0f, Font::bold }); + titleLabel.setJustificationType (Justification::centred); + addAndMakeVisible (titleLabel); + + contentLabel.setText ("A new version of JUCE is available - would you like to download it?", dontSendNotification); + contentLabel.setFont (15.0f); + contentLabel.setJustificationType (Justification::topLeft); + addAndMakeVisible (contentLabel); + + releaseNotesLabel.setText ("Release notes:", dontSendNotification); + releaseNotesLabel.setFont (15.0f); + releaseNotesLabel.setJustificationType (Justification::topLeft); + addAndMakeVisible (releaseNotesLabel); + + releaseNotesEditor.setMultiLine (true); + releaseNotesEditor.setReadOnly (true); + releaseNotesEditor.setText (releaseNotes); + addAndMakeVisible (releaseNotesEditor); + + addAndMakeVisible (chooseButton); + chooseButton.onClick = [this] { exitModalStateWithResult (1); }; + + addAndMakeVisible (cancelButton); + cancelButton.onClick = [this] { - overwriteLabel.reset (new Label ("Overwrite Label", - TRANS("Updating will overwrite everything in the following folder:"))); - addAndMakeVisible (overwriteLabel.get()); - overwriteLabel->setFont (Font (15.00f, Font::plain)); - overwriteLabel->setJustificationType (Justification::topLeft); - overwriteLabel->setEditable (false, false, false); - - overwritePath.reset (new Label ("Overwrite Path", overwriteFolderPath)); - addAndMakeVisible (overwritePath.get()); - overwritePath->setFont (Font (15.00f, Font::bold)); - overwritePath->setJustificationType (Justification::topLeft); - overwritePath->setEditable (false, false, false); - - overwriteButton.reset (new TextButton ("Overwrite Button")); - addAndMakeVisible (overwriteButton.get()); - overwriteButton->setButtonText (TRANS("Overwrite")); - overwriteButton->onClick = [this] { exitParentDialog (1); }; - } + if (dontAskAgainButton.getToggleState()) + getGlobalProperties().setValue (Ids::dontQueryForUpdate.toString(), 1); + else + getGlobalProperties().removeValue (Ids::dontQueryForUpdate); - juceIcon.reset (Drawable::createFromImageData (BinaryData::juce_icon_png, - BinaryData::juce_icon_pngSize)); + exitModalStateWithResult (-1); + }; - setSize (518, overwritePath != nullptr ? 345 : 269); + dontAskAgainButton.setToggleState (getGlobalProperties().getValue (Ids::dontQueryForUpdate, {}).isNotEmpty(), dontSendNotification); + addAndMakeVisible (dontAskAgainButton); + juceIcon = Drawable::createFromImageData (BinaryData::juce_icon_png, + BinaryData::juce_icon_pngSize); lookAndFeelChanged(); + + setSize (500, 280); } - ~UpdateUserDialog() override + void resized() override { - titleLabel.reset(); - contentLabel.reset(); - okButton.reset(); - cancelButton.reset(); - changeLogLabel.reset(); - changeLog.reset(); - overwriteLabel.reset(); - overwritePath.reset(); - overwriteButton.reset(); - juceIcon.reset(); + auto b = getLocalBounds().reduced (10); + + auto topSlice = b.removeFromTop (juceIconBounds.getHeight()) + .withTrimmedLeft (juceIconBounds.getWidth()); + + titleLabel.setBounds (topSlice.removeFromTop (25)); + topSlice.removeFromTop (5); + contentLabel.setBounds (topSlice.removeFromTop (25)); + + auto buttonBounds = b.removeFromBottom (60); + buttonBounds.removeFromBottom (25); + chooseButton.setBounds (buttonBounds.removeFromLeft (buttonBounds.getWidth() / 2).reduced (20, 0)); + cancelButton.setBounds (buttonBounds.reduced (20, 0)); + dontAskAgainButton.setBounds (cancelButton.getBounds().withY (cancelButton.getBottom() + 5).withHeight (20)); + + releaseNotesEditor.setBounds (b.reduced (0, 10)); } void paint (Graphics& g) override { g.fillAll (findColour (backgroundColourId)); - g.setColour (findColour (defaultTextColourId)); if (juceIcon != nullptr) - juceIcon->drawWithin (g, Rectangle (20, 17, 64, 64), - RectanglePlacement::stretchToFit, 1.000f); + juceIcon->drawWithin (g, juceIconBounds.toFloat(), + RectanglePlacement::stretchToFit, 1.0f); } - void resized() override + static std::unique_ptr launchDialog (const String& newVersion, const String& releaseNotes) { - titleLabel->setBounds (88, 10, 397, 24); - contentLabel->setBounds (88, 40, 397, 51); - changeLogLabel->setBounds (22, 92, 341, 24); - changeLog->setBounds (24, 112, 476, 102); + DialogWindow::LaunchOptions options; - if (hasOverwriteButton) - { - okButton->setBounds (getWidth() - 24 - 174, getHeight() - 37, 174, 28); - overwriteButton->setBounds ((getWidth() - 24 - 174) + -14 - 86, getHeight() - 37, 86, 28); - cancelButton->setBounds (24, getHeight() - 37, 70, 28); + options.dialogTitle = "Download JUCE version " + newVersion + "?"; + options.resizable = false; - overwriteLabel->setBounds (24, 238, 472, 16); - overwritePath->setBounds (24, 262, 472, 40); - } - else - { - okButton->setBounds (getWidth() - 24 - 47, getHeight() - 37, 47, 28); - cancelButton->setBounds ((getWidth() - 24 - 47) + -14 - 70, getHeight() - 37, 70, 28); - } + auto* content = new UpdateDialog (newVersion, releaseNotes); + options.content.set (content, true); + + std::unique_ptr dialog (options.create()); + + content->setParentWindow (dialog.get()); + dialog->enterModalState (true, nullptr, true); + + return dialog; } - void exitParentDialog (int returnVal) +private: + void lookAndFeelChanged() override { - if (auto* parentDialog = findParentComponentOfClass()) - parentDialog->exitModalState (returnVal); - else - jassertfalse; + cancelButton.setColour (TextButton::buttonColourId, findColour (secondaryButtonBackgroundColourId)); + releaseNotesEditor.applyFontToAllText (releaseNotesEditor.getFont()); } - static DialogWindow* launch (const LatestVersionChecker::JuceVersionTriple& version, - const String& productName, - const String& releaseNotes, - const char* overwritePath = nullptr) + void setParentWindow (DialogWindow* parent) { - OptionalScopedPointer userDialog (new UpdateUserDialog (version, productName, - releaseNotes, overwritePath), true); - - DialogWindow::LaunchOptions lo; - lo.dialogTitle = TRANS("Download \"123\" version 456?").replace ("456", version.toString()) - .replace ("123", productName); - lo.dialogBackgroundColour = userDialog->findColour (backgroundColourId); - lo.content = userDialog; - lo.componentToCentreAround = nullptr; - lo.escapeKeyTriggersCloseButton = true; - lo.useNativeTitleBar = true; - lo.resizable = false; - lo.useBottomRightCornerResizer = false; - - return lo.launchAsync(); + parentWindow = parent; } -private: - bool hasOverwriteButton; - std::unique_ptr - + diff --git a/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp b/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp index ba3c5717..7c92bbba 100644 --- a/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp +++ b/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp @@ -141,6 +141,8 @@ void ThreadedAnalyticsDestination::EventDispatcher::addToQueue (const AnalyticsE eventQueue.push_back (event); } + +//============================================================================== //============================================================================== #if JUCE_UNIT_TESTS @@ -158,7 +160,7 @@ namespace DestinationTestHelpers startAnalyticsThread (20); } - ~BasicDestination() + ~BasicDestination() override { stopAnalyticsThread (1000); } @@ -213,7 +215,7 @@ namespace DestinationTestHelpers struct ThreadedAnalyticsDestinationTests : public UnitTest { ThreadedAnalyticsDestinationTests() - : UnitTest ("ThreadedAnalyticsDestination") + : UnitTest ("ThreadedAnalyticsDestination", UnitTestCategories::analytics) {} void compareEventQueues (const std::deque& a, diff --git a/modules/juce_analytics/juce_analytics.h b/modules/juce_analytics/juce_analytics.h index ef8d77c7..f119738f 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: 5.4.2 + version: 5.4.4 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/buffers/juce_AudioChannelSet.cpp b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp index a86a5544..40ba2992 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp +++ b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp @@ -171,7 +171,7 @@ AudioChannelSet::ChannelType AudioChannelSet::getChannelTypeFromAbbreviation (co { if (abbr.length() > 0 && (abbr[0] >= '0' && abbr[0] <= '9')) return static_cast (static_cast (discreteChannel0) - + abbr.getIntValue() + 1); + + abbr.getIntValue() - 1); if (abbr == "L") return left; if (abbr == "R") return right; @@ -557,12 +557,17 @@ int JUCE_CALLTYPE AudioChannelSet::getAmbisonicOrderForNumChannels (int numChann return (static_cast (ambisonicOrder) == sqrtMinusOne ? ambisonicOrder : -1); } + +//============================================================================== //============================================================================== #if JUCE_UNIT_TESTS + class AudioChannelSetUnitTest : public UnitTest { public: - AudioChannelSetUnitTest() : UnitTest ("AudioChannelSetUnitTest", "Audio") {} + AudioChannelSetUnitTest() + : UnitTest ("AudioChannelSetUnitTest", UnitTestCategories::audio) + {} void runTest() override { @@ -645,6 +650,7 @@ private: }; static AudioChannelSetUnitTest audioChannelSetUnitTest; + #endif } // namespace juce diff --git a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp index 162fd1a8..a441a8f0 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp +++ b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp @@ -460,13 +460,16 @@ void AudioDataConverters::deinterleaveSamples (const float* source, float** dest } +//============================================================================== //============================================================================== #if JUCE_UNIT_TESTS class AudioConversionTests : public UnitTest { public: - AudioConversionTests() : UnitTest ("Audio data conversion", "Audio") {} + AudioConversionTests() + : UnitTest ("Audio data conversion", UnitTestCategories::audio) + {} template struct Test5 @@ -480,7 +483,9 @@ public: static void test (UnitTest& unitTest, bool inPlace, Random& r) { const int numSamples = 2048; - int32 original[numSamples], converted[numSamples], reversed[numSamples]; + int32 original [(size_t) numSamples], + converted[(size_t) numSamples], + reversed [(size_t) numSamples]; { AudioData::Pointer d (original); diff --git a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h index 47edc642..e8e1fed6 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h +++ b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h @@ -102,9 +102,9 @@ public: inline void advance() noexcept { ++data; } inline void skip (int numSamples) noexcept { data += numSamples; } - inline float getAsFloatLE() const noexcept { return (float) (*data * (1.0 / (1.0 + maxValue))); } + inline float getAsFloatLE() const noexcept { return (float) (*data * (1.0 / (1.0 + (double) maxValue))); } inline float getAsFloatBE() const noexcept { return getAsFloatLE(); } - inline void setAsFloatLE (float newValue) noexcept { *data = (int8) jlimit ((int) -maxValue, (int) maxValue, roundToInt (newValue * (1.0 + maxValue))); } + inline void setAsFloatLE (float newValue) noexcept { *data = (int8) jlimit ((int) -maxValue, (int) maxValue, roundToInt (newValue * (1.0 + (double) maxValue))); } inline void setAsFloatBE (float newValue) noexcept { setAsFloatLE (newValue); } inline int32 getAsInt32LE() const noexcept { return (int) (*((uint8*) data) << 24); } inline int32 getAsInt32BE() const noexcept { return getAsInt32LE(); } @@ -127,9 +127,9 @@ public: inline void advance() noexcept { ++data; } inline void skip (int numSamples) noexcept { data += numSamples; } - inline float getAsFloatLE() const noexcept { return (float) ((*data - 128) * (1.0 / (1.0 + maxValue))); } + inline float getAsFloatLE() const noexcept { return (float) ((*data - 128) * (1.0 / (1.0 + (double) maxValue))); } inline float getAsFloatBE() const noexcept { return getAsFloatLE(); } - inline void setAsFloatLE (float newValue) noexcept { *data = (uint8) jlimit (0, 255, 128 + roundToInt (newValue * (1.0 + maxValue))); } + inline void setAsFloatLE (float newValue) noexcept { *data = (uint8) jlimit (0, 255, 128 + roundToInt (newValue * (1.0 + (double) maxValue))); } inline void setAsFloatBE (float newValue) noexcept { setAsFloatLE (newValue); } inline int32 getAsInt32LE() const noexcept { return (int) (((uint8) (*data - 128)) << 24); } inline int32 getAsInt32BE() const noexcept { return getAsInt32LE(); } @@ -152,10 +152,10 @@ public: inline void advance() noexcept { ++data; } inline void skip (int numSamples) noexcept { data += numSamples; } - inline float getAsFloatLE() const noexcept { return (float) ((1.0 / (1.0 + maxValue)) * (int16) ByteOrder::swapIfBigEndian (*data)); } - inline float getAsFloatBE() const noexcept { return (float) ((1.0 / (1.0 + maxValue)) * (int16) ByteOrder::swapIfLittleEndian (*data)); } - inline void setAsFloatLE (float newValue) noexcept { *data = ByteOrder::swapIfBigEndian ((uint16) jlimit ((int) -maxValue, (int) maxValue, roundToInt (newValue * (1.0 + maxValue)))); } - inline void setAsFloatBE (float newValue) noexcept { *data = ByteOrder::swapIfLittleEndian ((uint16) jlimit ((int) -maxValue, (int) maxValue, roundToInt (newValue * (1.0 + maxValue)))); } + inline float getAsFloatLE() const noexcept { return (float) ((1.0 / (1.0 + (double) maxValue)) * (int16) ByteOrder::swapIfBigEndian (*data)); } + inline float getAsFloatBE() const noexcept { return (float) ((1.0 / (1.0 + (double) maxValue)) * (int16) ByteOrder::swapIfLittleEndian (*data)); } + inline void setAsFloatLE (float newValue) noexcept { *data = ByteOrder::swapIfBigEndian ((uint16) jlimit ((int) -maxValue, (int) maxValue, roundToInt (newValue * (1.0 + (double) maxValue)))); } + inline void setAsFloatBE (float newValue) noexcept { *data = ByteOrder::swapIfLittleEndian ((uint16) jlimit ((int) -maxValue, (int) maxValue, roundToInt (newValue * (1.0 + (double) maxValue)))); } inline int32 getAsInt32LE() const noexcept { return (int32) (ByteOrder::swapIfBigEndian ((uint16) *data) << 16); } inline int32 getAsInt32BE() const noexcept { return (int32) (ByteOrder::swapIfLittleEndian ((uint16) *data) << 16); } inline void setAsInt32LE (int32 newValue) noexcept { *data = ByteOrder::swapIfBigEndian ((uint16) (newValue >> 16)); } @@ -177,10 +177,10 @@ public: inline void advance() noexcept { data += 3; } inline void skip (int numSamples) noexcept { data += 3 * numSamples; } - inline float getAsFloatLE() const noexcept { return (float) (ByteOrder::littleEndian24Bit (data) * (1.0 / (1.0 + maxValue))); } - inline float getAsFloatBE() const noexcept { return (float) (ByteOrder::bigEndian24Bit (data) * (1.0 / (1.0 + maxValue))); } - inline void setAsFloatLE (float newValue) noexcept { ByteOrder::littleEndian24BitToChars (jlimit ((int) -maxValue, (int) maxValue, roundToInt (newValue * (1.0 + maxValue))), data); } - inline void setAsFloatBE (float newValue) noexcept { ByteOrder::bigEndian24BitToChars (jlimit ((int) -maxValue, (int) maxValue, roundToInt (newValue * (1.0 + maxValue))), data); } + inline float getAsFloatLE() const noexcept { return (float) (ByteOrder::littleEndian24Bit (data) * (1.0 / (1.0 + (double) maxValue))); } + inline float getAsFloatBE() const noexcept { return (float) (ByteOrder::bigEndian24Bit (data) * (1.0 / (1.0 + (double) maxValue))); } + inline void setAsFloatLE (float newValue) noexcept { ByteOrder::littleEndian24BitToChars (jlimit ((int) -maxValue, (int) maxValue, roundToInt (newValue * (1.0 + (double) maxValue))), data); } + inline void setAsFloatBE (float newValue) noexcept { ByteOrder::bigEndian24BitToChars (jlimit ((int) -maxValue, (int) maxValue, roundToInt (newValue * (1.0 + (double) maxValue))), data); } inline int32 getAsInt32LE() const noexcept { return (int32) (((unsigned int) ByteOrder::littleEndian24Bit (data)) << 8); } inline int32 getAsInt32BE() const noexcept { return (int32) (((unsigned int) ByteOrder::bigEndian24Bit (data)) << 8); } inline void setAsInt32LE (int32 newValue) noexcept { ByteOrder::littleEndian24BitToChars (newValue >> 8, data); } @@ -202,10 +202,10 @@ public: inline void advance() noexcept { ++data; } inline void skip (int numSamples) noexcept { data += numSamples; } - inline float getAsFloatLE() const noexcept { return (float) ((1.0 / (1.0 + maxValue)) * (int32) ByteOrder::swapIfBigEndian (*data)); } - inline float getAsFloatBE() const noexcept { return (float) ((1.0 / (1.0 + maxValue)) * (int32) ByteOrder::swapIfLittleEndian (*data)); } - inline void setAsFloatLE (float newValue) noexcept { *data = ByteOrder::swapIfBigEndian ((uint32) (int32) (maxValue * jlimit (-1.0, 1.0, (double) newValue))); } - inline void setAsFloatBE (float newValue) noexcept { *data = ByteOrder::swapIfLittleEndian ((uint32) (int32) (maxValue * jlimit (-1.0, 1.0, (double) newValue))); } + inline float getAsFloatLE() const noexcept { return (float) ((1.0 / (1.0 + (double) maxValue)) * (int32) ByteOrder::swapIfBigEndian (*data)); } + inline float getAsFloatBE() const noexcept { return (float) ((1.0 / (1.0 + (double) maxValue)) * (int32) ByteOrder::swapIfLittleEndian (*data)); } + inline void setAsFloatLE (float newValue) noexcept { *data = ByteOrder::swapIfBigEndian ((uint32) (int32) ((double) maxValue * jlimit (-1.0, 1.0, (double) newValue))); } + inline void setAsFloatBE (float newValue) noexcept { *data = ByteOrder::swapIfLittleEndian ((uint32) (int32) ((double) maxValue * jlimit (-1.0, 1.0, (double) newValue))); } inline int32 getAsInt32LE() const noexcept { return (int32) ByteOrder::swapIfBigEndian (*data); } inline int32 getAsInt32BE() const noexcept { return (int32) ByteOrder::swapIfLittleEndian (*data); } inline void setAsInt32LE (int32 newValue) noexcept { *data = ByteOrder::swapIfBigEndian ((uint32) newValue); } @@ -226,10 +226,10 @@ public: public: inline Int24in32 (void* d) noexcept : Int32 (d) {} - inline float getAsFloatLE() const noexcept { return (float) ((1.0 / (1.0 + maxValue)) * (int32) ByteOrder::swapIfBigEndian (*data)); } - inline float getAsFloatBE() const noexcept { return (float) ((1.0 / (1.0 + maxValue)) * (int32) ByteOrder::swapIfLittleEndian (*data)); } - inline void setAsFloatLE (float newValue) noexcept { *data = ByteOrder::swapIfBigEndian ((uint32) (maxValue * jlimit (-1.0, 1.0, (double) newValue))); } - inline void setAsFloatBE (float newValue) noexcept { *data = ByteOrder::swapIfLittleEndian ((uint32) (maxValue * jlimit (-1.0, 1.0, (double) newValue))); } + inline float getAsFloatLE() const noexcept { return (float) ((1.0 / (1.0 + (double) maxValue)) * (int32) ByteOrder::swapIfBigEndian (*data)); } + inline float getAsFloatBE() const noexcept { return (float) ((1.0 / (1.0 + (double) maxValue)) * (int32) ByteOrder::swapIfLittleEndian (*data)); } + inline void setAsFloatLE (float newValue) noexcept { *data = ByteOrder::swapIfBigEndian ((uint32) ((double) maxValue * jlimit (-1.0, 1.0, (double) newValue))); } + inline void setAsFloatBE (float newValue) noexcept { *data = ByteOrder::swapIfLittleEndian ((uint32) ((double) maxValue * jlimit (-1.0, 1.0, (double) newValue))); } inline int32 getAsInt32LE() const noexcept { return (int32) ByteOrder::swapIfBigEndian (*data) << 8; } inline int32 getAsInt32BE() const noexcept { return (int32) ByteOrder::swapIfLittleEndian (*data) << 8; } inline void setAsInt32LE (int32 newValue) noexcept { *data = ByteOrder::swapIfBigEndian ((uint32) newValue >> 8); } @@ -261,8 +261,8 @@ public: #endif inline int32 getAsInt32LE() const noexcept { return (int32) roundToInt (jlimit (-1.0, 1.0, (double) getAsFloatLE()) * (double) maxValue); } inline int32 getAsInt32BE() const noexcept { return (int32) roundToInt (jlimit (-1.0, 1.0, (double) getAsFloatBE()) * (double) maxValue); } - inline void setAsInt32LE (int32 newValue) noexcept { setAsFloatLE ((float) (newValue * (1.0 / (1.0 + maxValue)))); } - inline void setAsInt32BE (int32 newValue) noexcept { setAsFloatBE ((float) (newValue * (1.0 / (1.0 + maxValue)))); } + inline void setAsInt32LE (int32 newValue) noexcept { setAsFloatLE ((float) (newValue * (1.0 / (1.0 + (double) maxValue)))); } + inline void setAsInt32BE (int32 newValue) noexcept { setAsFloatBE ((float) (newValue * (1.0 / (1.0 + (double) maxValue)))); } inline void clear() noexcept { *data = 0; } inline void clearMultiple (int num) noexcept { zeromem (data, (size_t) (num * bytesPerSample)) ;} template inline void copyFromLE (SourceType& source) noexcept { setAsFloatLE (source.getAsFloat()); } @@ -528,8 +528,8 @@ public: if (v < mn) mn = v; } - return Range (mn * (float) (1.0 / (1.0 + Int32::maxValue)), - mx * (float) (1.0 / (1.0 + Int32::maxValue))); + return Range (mn * (float) (1.0 / (1.0 + (double) Int32::maxValue)), + mx * (float) (1.0 / (1.0 + (double) Int32::maxValue))); } /** Scans a block of data, returning the lowest and highest levels as floats */ diff --git a/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h b/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h index 9072ae97..5e68694a 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h +++ b/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h @@ -180,7 +180,7 @@ public: size (other.size), allocatedBytes (other.allocatedBytes), allocatedData (std::move (other.allocatedData)), - isClear (other.isClear) + isClear (other.isClear.load()) { if (numChannels < (int) numElementsInArray (preallocatedChannelSpace)) { @@ -206,7 +206,7 @@ public: size = other.size; allocatedBytes = other.allocatedBytes; allocatedData = std::move (other.allocatedData); - isClear = other.isClear; + isClear = other.isClear.load(); if (numChannels < (int) numElementsInArray (preallocatedChannelSpace)) { @@ -340,7 +340,7 @@ public: if (newNumSamples != size || newNumChannels != numChannels) { auto allocatedSamplesPerChannel = ((size_t) newNumSamples + 3) & ~3u; - auto channelListSize = ((sizeof (Type*) * (size_t) (newNumChannels + 1)) + 15) & ~15u; + auto channelListSize = ((static_cast (1 + newNumChannels) * sizeof (Type*)) + 15) & ~15u; auto newTotalBytes = ((size_t) newNumChannels * (size_t) allocatedSamplesPerChannel * sizeof (Type)) + channelListSize + 32; @@ -1071,12 +1071,12 @@ private: Type** channels; HeapBlock allocatedData; Type* preallocatedChannelSpace[32]; - bool isClear = false; + std::atomic isClear { false }; void allocateData() { jassert (size >= 0); - auto channelListSize = sizeof (Type*) * (size_t) (numChannels + 1); + auto channelListSize = (size_t) (numChannels + 1) * sizeof (Type*); allocatedBytes = (size_t) numChannels * (size_t) size * sizeof (Type) + channelListSize + 32; allocatedData.malloc (allocatedBytes); channels = reinterpret_cast (allocatedData.get()); diff --git a/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp b/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp index da999286..a01ad84a 100644 --- a/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp +++ b/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp @@ -1139,6 +1139,7 @@ ScopedNoDenormals::~ScopedNoDenormals() noexcept #endif } + //============================================================================== //============================================================================== #if JUCE_UNIT_TESTS @@ -1146,7 +1147,9 @@ ScopedNoDenormals::~ScopedNoDenormals() noexcept class FloatVectorOperationsTests : public UnitTest { public: - FloatVectorOperationsTests() : UnitTest ("FloatVectorOperations", "Audio") {} + FloatVectorOperationsTests() + : UnitTest ("FloatVectorOperations", UnitTestCategories::audio) + {} template struct TestRunner diff --git a/modules/juce_audio_basics/juce_audio_basics.cpp b/modules/juce_audio_basics/juce_audio_basics.cpp index acf49880..c142c6d6 100644 --- a/modules/juce_audio_basics/juce_audio_basics.cpp +++ b/modules/juce_audio_basics/juce_audio_basics.cpp @@ -60,6 +60,7 @@ #include "utilities/juce_IIRFilter.cpp" #include "utilities/juce_LagrangeInterpolator.cpp" #include "utilities/juce_CatmullRomInterpolator.cpp" +#include "utilities/juce_SmoothedValue.cpp" #include "midi/juce_MidiBuffer.cpp" #include "midi/juce_MidiFile.cpp" #include "midi/juce_MidiKeyboardState.cpp" diff --git a/modules/juce_audio_basics/juce_audio_basics.h b/modules/juce_audio_basics/juce_audio_basics.h index c5a135d7..617c7ced 100644 --- a/modules/juce_audio_basics/juce_audio_basics.h +++ b/modules/juce_audio_basics/juce_audio_basics.h @@ -31,7 +31,7 @@ ID: juce_audio_basics vendor: juce - version: 5.4.2 + version: 5.4.4 name: JUCE audio and MIDI data classes description: Classes for audio buffer manipulation, midi message handling, synthesis, etc. website: http://www.juce.com/juce @@ -89,7 +89,7 @@ #include "utilities/juce_IIRFilter.h" #include "utilities/juce_LagrangeInterpolator.h" #include "utilities/juce_CatmullRomInterpolator.h" -#include "utilities/juce_LinearSmoothedValue.h" +#include "utilities/juce_SmoothedValue.h" #include "utilities/juce_Reverb.h" #include "utilities/juce_ADSR.h" #include "midi/juce_MidiMessage.h" diff --git a/modules/juce_audio_basics/midi/juce_MidiBuffer.cpp b/modules/juce_audio_basics/midi/juce_MidiBuffer.cpp index 55e2597b..0501698b 100644 --- a/modules/juce_audio_basics/midi/juce_MidiBuffer.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiBuffer.cpp @@ -25,58 +25,53 @@ namespace juce namespace MidiBufferHelpers { - inline int getEventTime (const void* const d) noexcept + inline int getEventTime (const void* d) noexcept { return readUnaligned (d); } - inline uint16 getEventDataSize (const void* const d) noexcept + inline uint16 getEventDataSize (const void* d) noexcept { return readUnaligned (static_cast (d) + sizeof (int32)); } - inline uint16 getEventTotalSize (const void* const d) noexcept + inline uint16 getEventTotalSize (const void* d) noexcept { return (uint16) (getEventDataSize (d) + sizeof (int32) + sizeof (uint16)); } - static int findActualEventLength (const uint8* const data, const int maxBytes) noexcept + static int findActualEventLength (const uint8* data, int maxBytes) noexcept { - unsigned int byte = (unsigned int) *data; - int size = 0; + auto byte = (unsigned int) *data; if (byte == 0xf0 || byte == 0xf7) { - const uint8* d = data + 1; + int i = 1; - while (d < data + maxBytes) - if (*d++ == 0xf7) + while (i < maxBytes) + if (data[i++] == 0xf7) break; - size = (int) (d - data); + return i; } - else if (byte == 0xff) + + if (byte == 0xff) { if (maxBytes == 1) - { - size = 1; - } - else - { - int n; - const int bytesLeft = MidiMessage::readVariableLengthVal (data + 1, n); - size = jmin (maxBytes, n + 2 + bytesLeft); - } - } - else if (byte >= 0x80) - { - size = jmin (maxBytes, MidiMessage::getMessageLengthFromFirstByte ((uint8) byte)); + return 1; + + int n; + auto bytesLeft = MidiMessage::readVariableLengthVal (data + 1, n); + return jmin (maxBytes, n + 2 + bytesLeft); } - return size; + if (byte >= 0x80) + return jmin (maxBytes, MidiMessage::getMessageLengthFromFirstByte ((uint8) byte)); + + return 0; } - static uint8* findEventAfter (uint8* d, uint8* endData, const int samplePosition) noexcept + static uint8* findEventAfter (uint8* d, uint8* endData, int samplePosition) noexcept { while (d < endData && getEventTime (d) <= samplePosition) d += getEventTotalSize (d); @@ -107,41 +102,41 @@ void MidiBuffer::clear() noexcept { data.clearQuick(); void MidiBuffer::ensureSize (size_t minimumNumBytes) { data.ensureStorageAllocated ((int) minimumNumBytes); } bool MidiBuffer::isEmpty() const noexcept { return data.size() == 0; } -void MidiBuffer::clear (const int startSample, const int numSamples) +void MidiBuffer::clear (int startSample, int numSamples) { - uint8* const start = MidiBufferHelpers::findEventAfter (data.begin(), data.end(), startSample - 1); - uint8* const end = MidiBufferHelpers::findEventAfter (start, data.end(), startSample + numSamples - 1); + auto start = MidiBufferHelpers::findEventAfter (data.begin(), data.end(), startSample - 1); + auto end = MidiBufferHelpers::findEventAfter (start, data.end(), startSample + numSamples - 1); data.removeRange ((int) (start - data.begin()), (int) (end - data.begin())); } -void MidiBuffer::addEvent (const MidiMessage& m, const int sampleNumber) +void MidiBuffer::addEvent (const MidiMessage& m, int sampleNumber) { addEvent (m.getRawData(), m.getRawDataSize(), sampleNumber); } -void MidiBuffer::addEvent (const void* const newData, const int maxBytes, const int sampleNumber) +void MidiBuffer::addEvent (const void* newData, int maxBytes, int sampleNumber) { - const int numBytes = MidiBufferHelpers::findActualEventLength (static_cast (newData), maxBytes); + auto numBytes = MidiBufferHelpers::findActualEventLength (static_cast (newData), maxBytes); if (numBytes > 0) { - const size_t newItemSize = (size_t) numBytes + sizeof (int32) + sizeof (uint16); - const int offset = (int) (MidiBufferHelpers::findEventAfter (data.begin(), data.end(), sampleNumber) - data.begin()); + auto newItemSize = (size_t) numBytes + sizeof (int32) + sizeof (uint16); + auto offset = (int) (MidiBufferHelpers::findEventAfter (data.begin(), data.end(), sampleNumber) - data.begin()); data.insertMultiple (offset, 0, (int) newItemSize); - uint8* const d = data.begin() + offset; + auto* d = data.begin() + offset; writeUnaligned (d, sampleNumber); - writeUnaligned (d + 4, static_cast (numBytes)); - memcpy (d + 6, newData, (size_t) numBytes); + d += sizeof (int32); + writeUnaligned (d, static_cast (numBytes)); + d += sizeof (uint16); + memcpy (d, newData, (size_t) numBytes); } } void MidiBuffer::addEvents (const MidiBuffer& otherBuffer, - const int startSample, - const int numSamples, - const int sampleDeltaToAdd) + int startSample, int numSamples, int sampleDeltaToAdd) { Iterator i (otherBuffer); i.setNextSamplePosition (startSample); @@ -159,9 +154,9 @@ void MidiBuffer::addEvents (const MidiBuffer& otherBuffer, int MidiBuffer::getNumEvents() const noexcept { int n = 0; - const uint8* const end = data.end(); + auto end = data.end(); - for (const uint8* d = data.begin(); d < end; ++n) + for (auto d = data.begin(); d < end; ++n) d += MidiBufferHelpers::getEventTotalSize (d); return n; @@ -177,11 +172,11 @@ int MidiBuffer::getLastEventTime() const noexcept if (data.size() == 0) return 0; - const uint8* const endData = data.end(); + auto endData = data.end(); - for (const uint8* d = data.begin();;) + for (auto d = data.begin();;) { - const uint8* const nextOne = d + MidiBufferHelpers::getEventTotalSize (d); + auto nextOne = d + MidiBufferHelpers::getEventTotalSize (d); if (nextOne >= endData) return MidiBufferHelpers::getEventTime (d); @@ -196,24 +191,24 @@ MidiBuffer::Iterator::Iterator (const MidiBuffer& b) noexcept { } -MidiBuffer::Iterator::~Iterator() noexcept{} +MidiBuffer::Iterator::~Iterator() noexcept {} -void MidiBuffer::Iterator::setNextSamplePosition (const int samplePosition) noexcept +void MidiBuffer::Iterator::setNextSamplePosition (int samplePosition) noexcept { data = buffer.data.begin(); - const uint8* const dataEnd = buffer.data.end(); + auto dataEnd = buffer.data.end(); while (data < dataEnd && MidiBufferHelpers::getEventTime (data) < samplePosition) data += MidiBufferHelpers::getEventTotalSize (data); } -bool MidiBuffer::Iterator::getNextEvent (const uint8* &midiData, int& numBytes, int& samplePosition) noexcept +bool MidiBuffer::Iterator::getNextEvent (const uint8*& midiData, int& numBytes, int& samplePosition) noexcept { if (data >= buffer.data.end()) return false; samplePosition = MidiBufferHelpers::getEventTime (data); - const int itemSize = MidiBufferHelpers::getEventDataSize (data); + auto itemSize = MidiBufferHelpers::getEventDataSize (data); numBytes = itemSize; midiData = data + sizeof (int32) + sizeof (uint16); data += sizeof (int32) + sizeof (uint16) + (size_t) itemSize; @@ -227,7 +222,7 @@ bool MidiBuffer::Iterator::getNextEvent (MidiMessage& result, int& samplePositio return false; samplePosition = MidiBufferHelpers::getEventTime (data); - const int itemSize = MidiBufferHelpers::getEventDataSize (data); + auto itemSize = MidiBufferHelpers::getEventDataSize (data); result = MidiMessage (data + sizeof (int32) + sizeof (uint16), itemSize, samplePosition); data += sizeof (int32) + sizeof (uint16) + (size_t) itemSize; diff --git a/modules/juce_audio_basics/midi/juce_MidiBuffer.h b/modules/juce_audio_basics/midi/juce_MidiBuffer.h index 27e86c7c..8344a5ed 100644 --- a/modules/juce_audio_basics/midi/juce_MidiBuffer.h +++ b/modules/juce_audio_basics/midi/juce_MidiBuffer.h @@ -177,9 +177,6 @@ public: /** Creates a copy of an iterator. */ Iterator (const Iterator&) = default; - // VS2013 requires this, even if it's unused. - Iterator& operator= (const Iterator&) = delete; - /** Destructor. */ ~Iterator() noexcept; diff --git a/modules/juce_audio_basics/midi/juce_MidiFile.cpp b/modules/juce_audio_basics/midi/juce_MidiFile.cpp index edad27d2..58cbf7c9 100644 --- a/modules/juce_audio_basics/midi/juce_MidiFile.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiFile.cpp @@ -262,25 +262,26 @@ bool MidiFile::readFrom (InputStream& sourceStream, bool createMatchingNoteOffs) if (size > 16 && MidiFileHelpers::parseMidiHeader (d, timeFormat, fileType, expectedTracks)) { size -= (size_t) (d - static_cast (data.getData())); - int track = 0; - while (size > 0 && track < expectedTracks) + for (;;) { auto chunkType = (int) ByteOrder::bigEndianInt (d); d += 4; auto chunkSize = (int) ByteOrder::bigEndianInt (d); d += 4; - if (chunkSize <= 0) + if (chunkSize <= 0 || (size_t) chunkSize > size) break; if (chunkType == (int) ByteOrder::bigEndianInt ("MTrk")) readNextTrack (d, chunkSize, createMatchingNoteOffs); + if (++track >= expectedTracks) + break; + size -= (size_t) chunkSize + 8; d += chunkSize; - ++track; } return true; diff --git a/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp b/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp index 6477e7d7..f58fd788 100644 --- a/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp @@ -87,8 +87,10 @@ MidiMessageSequence::MidiEventHolder* MidiMessageSequence::getEventPointer (int return list[index]; } -MidiMessageSequence::MidiEventHolder** MidiMessageSequence::begin() const noexcept { return list.begin(); } -MidiMessageSequence::MidiEventHolder** MidiMessageSequence::end() const noexcept { return list.end(); } +MidiMessageSequence::MidiEventHolder** MidiMessageSequence::begin() noexcept { return list.begin(); } +MidiMessageSequence::MidiEventHolder* const* MidiMessageSequence::begin() const noexcept { return list.begin(); } +MidiMessageSequence::MidiEventHolder** MidiMessageSequence::end() noexcept { return list.end(); } +MidiMessageSequence::MidiEventHolder* const* MidiMessageSequence::end() const noexcept { return list.end(); } double MidiMessageSequence::getTimeOfMatchingKeyUp (int index) const noexcept { @@ -344,11 +346,16 @@ void MidiMessageSequence::createControllerUpdatesForTime (int channelNumber, dou } } + +//============================================================================== +//============================================================================== #if JUCE_UNIT_TESTS -struct MidiMessageSequenceTest : public juce::UnitTest +struct MidiMessageSequenceTest : public UnitTest { - MidiMessageSequenceTest() : juce::UnitTest ("MidiMessageSequence") {} + MidiMessageSequenceTest() + : UnitTest ("MidiMessageSequence", UnitTestCategories::midi) + {} void runTest() override { diff --git a/modules/juce_audio_basics/midi/juce_MidiMessageSequence.h b/modules/juce_audio_basics/midi/juce_MidiMessageSequence.h index d4f4f926..5d4187ea 100644 --- a/modules/juce_audio_basics/midi/juce_MidiMessageSequence.h +++ b/modules/juce_audio_basics/midi/juce_MidiMessageSequence.h @@ -103,10 +103,16 @@ public: MidiEventHolder* getEventPointer (int index) const noexcept; /** Iterator for the list of MidiEventHolders */ - MidiEventHolder** begin() const noexcept; + MidiEventHolder** begin() noexcept; /** Iterator for the list of MidiEventHolders */ - MidiEventHolder** end() const noexcept; + MidiEventHolder* const* begin() const noexcept; + + /** Iterator for the list of MidiEventHolders */ + MidiEventHolder** end() noexcept; + + /** Iterator for the list of MidiEventHolders */ + MidiEventHolder* const* end() const noexcept; /** Returns the time of the note-up that matches the note-on at this index. If the event at this index isn't a note-on, it'll just return 0. diff --git a/modules/juce_audio_basics/midi/juce_MidiRPN.cpp b/modules/juce_audio_basics/midi/juce_MidiRPN.cpp index 9e2c2df3..10e8e03a 100644 --- a/modules/juce_audio_basics/midi/juce_MidiRPN.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiRPN.cpp @@ -159,6 +159,7 @@ MidiBuffer MidiRPNGenerator::generate (int midiChannel, return buffer; } + //============================================================================== //============================================================================== #if JUCE_UNIT_TESTS @@ -166,7 +167,9 @@ MidiBuffer MidiRPNGenerator::generate (int midiChannel, class MidiRPNDetectorTests : public UnitTest { public: - MidiRPNDetectorTests() : UnitTest ("MidiRPNDetector class", "MIDI/MPE") {} + MidiRPNDetectorTests() + : UnitTest ("MidiRPNDetector class", UnitTestCategories::midi) + {} void runTest() override { @@ -308,7 +311,9 @@ static MidiRPNDetectorTests MidiRPNDetectorUnitTests; class MidiRPNGeneratorTests : public UnitTest { public: - MidiRPNGeneratorTests() : UnitTest ("MidiRPNGenerator class", "MIDI/MPE") {} + MidiRPNGeneratorTests() + : UnitTest ("MidiRPNGenerator class", UnitTestCategories::midi) + {} void runTest() override { @@ -371,6 +376,6 @@ private: static MidiRPNGeneratorTests MidiRPNGeneratorUnitTests; -#endif // JUCE_UNIT_TESTS +#endif } // namespace juce diff --git a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp index a9a0075d..df2e4660 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp @@ -151,6 +151,7 @@ void MPEInstrument::processNextMidiEvent (const MidiMessage& message) else if (message.isPitchWheel()) processMidiPitchWheelMessage (message); else if (message.isChannelPressure()) processMidiChannelPressureMessage (message); else if (message.isController()) processMidiControllerMessage (message); + else if (message.isAftertouch()) processMidiAfterTouchMessage (message); } //============================================================================== @@ -241,7 +242,7 @@ void MPEInstrument::processMidiResetAllControllersMessage (const MidiMessage& me { auto& note = notes.getReference (i); - if (zone.isUsingChannelAsMemberChannel (note.midiChannel)) + if (zone.isUsing (note.midiChannel)) { note.keyState = MPENote::off; note.noteOffVelocity = MPEValue::from7BitInt (64); // some reasonable number @@ -252,6 +253,15 @@ void MPEInstrument::processMidiResetAllControllersMessage (const MidiMessage& me } } +void MPEInstrument::processMidiAfterTouchMessage (const MidiMessage& message) +{ + if (! isMasterChannel (message.getChannel())) + return; + + polyAftertouch (message.getChannel(), message.getNoteNumber(), + MPEValue::from7BitInt (message.getAfterTouchValue())); +} + //============================================================================== void MPEInstrument::handlePressureMSB (int midiChannel, int value) noexcept { @@ -284,7 +294,7 @@ void MPEInstrument::noteOn (int midiChannel, int midiNoteNumber, MPEValue midiNoteOnVelocity) { - if (! isMemberChannel (midiChannel)) + if (! isUsingChannel (midiChannel)) return; MPENote newNote (midiChannel, @@ -316,7 +326,7 @@ void MPEInstrument::noteOff (int midiChannel, int midiNoteNumber, MPEValue midiNoteOffVelocity) { - if (notes.isEmpty() || ! isMemberChannel (midiChannel)) + if (notes.isEmpty() || ! isUsingChannel (midiChannel)) return; const ScopedLock sl (lock); @@ -326,11 +336,13 @@ void MPEInstrument::noteOff (int midiChannel, note->keyState = (note->keyState == MPENote::keyDownAndSustained) ? MPENote::sustained : MPENote::off; note->noteOffVelocity = midiNoteOffVelocity; - // last dimension values received for this note should not be re-used for - // any new notes, so reset them: - pressureDimension.lastValueReceivedOnChannel[midiChannel - 1] = MPEValue::minValue(); - pitchbendDimension.lastValueReceivedOnChannel[midiChannel - 1] = MPEValue::centreValue(); - timbreDimension.lastValueReceivedOnChannel[midiChannel - 1] = MPEValue::centreValue(); + // If no more notes are playing on this channel, reset the dimension values + if (getLastNotePlayedPtr (midiChannel) == nullptr) + { + pressureDimension.lastValueReceivedOnChannel[midiChannel - 1] = MPEValue::minValue(); + pitchbendDimension.lastValueReceivedOnChannel[midiChannel - 1] = MPEValue::centreValue(); + timbreDimension.lastValueReceivedOnChannel[midiChannel - 1] = MPEValue::centreValue(); + } if (note->keyState == MPENote::off) { @@ -363,6 +375,24 @@ void MPEInstrument::timbre (int midiChannel, MPEValue value) updateDimension (midiChannel, timbreDimension, value); } +void MPEInstrument::polyAftertouch (int midiChannel, int midiNoteNumber, MPEValue value) +{ + const ScopedLock sl (lock); + + for (auto i = notes.size(); --i >= 0;) + { + auto& note = notes.getReference (i); + + if (note.midiChannel == midiChannel + && note.initialNote == midiNoteNumber + && pressureDimension.getValue (note) != value) + { + pressureDimension.getValue (note) = value; + callListenersDimensionChanged (note, pressureDimension); + } + } +} + MPEValue MPEInstrument::getInitialValueForNewNote (int midiChannel, MPEDimension& dimension) const { if (getLastNotePlayedPtr (midiChannel) != nullptr) @@ -416,7 +446,7 @@ void MPEInstrument::updateDimensionMaster (bool isLowerZone, MPEDimension& dimen { auto& note = notes.getReference (i); - if (! zone.isUsingChannelAsMemberChannel (note.midiChannel)) + if (! zone.isUsing (note.midiChannel)) continue; if (&dimension == &pitchbendDimension) @@ -467,9 +497,9 @@ void MPEInstrument::updateNoteTotalPitchbend (MPENote& note) { auto zone = zoneLayout.getLowerZone(); - if (! zone.isUsingChannelAsMemberChannel (note.midiChannel)) + if (! zone.isUsing (note.midiChannel)) { - if (zoneLayout.getUpperZone().isUsingChannelAsMemberChannel (note.midiChannel)) + if (zoneLayout.getUpperZone().isUsing (note.midiChannel)) { zone = zoneLayout.getUpperZone(); } @@ -481,7 +511,10 @@ void MPEInstrument::updateNoteTotalPitchbend (MPENote& note) } } - auto notePitchbendInSemitones = note.pitchbend.asSignedFloat() * zone.perNotePitchbendRange; + auto notePitchbendInSemitones = 0.0f; + + if (zone.isUsingChannelAsMemberChannel (note.midiChannel)) + notePitchbendInSemitones = note.pitchbend.asSignedFloat() * zone.perNotePitchbendRange; auto masterPitchbendInSemitones = pitchbendDimension.lastValueReceivedOnChannel[zone.getMasterChannel() - 1] .asSignedFloat() @@ -520,7 +553,7 @@ void MPEInstrument::handleSustainOrSostenuto (int midiChannel, bool isDown, bool { auto& note = notes.getReference (i); - if (legacyMode.isEnabled ? (note.midiChannel == midiChannel) : zone.isUsingChannelAsMemberChannel (note.midiChannel)) + if (legacyMode.isEnabled ? (note.midiChannel == midiChannel) : zone.isUsing (note.midiChannel)) { if (note.keyState == MPENote::keyDown && isDown) note.keyState = MPENote::keyDownAndSustained; @@ -560,7 +593,7 @@ void MPEInstrument::handleSustainOrSostenuto (int midiChannel, bool isDown, bool } //============================================================================== -bool MPEInstrument::isMemberChannel (int midiChannel) noexcept +bool MPEInstrument::isMemberChannel (int midiChannel) const noexcept { if (legacyMode.isEnabled) return legacyMode.channelRange.contains (midiChannel); @@ -574,8 +607,22 @@ bool MPEInstrument::isMasterChannel (int midiChannel) const noexcept if (legacyMode.isEnabled) return false; - return (midiChannel == 1 || midiChannel == 16); + const auto lowerZone = zoneLayout.getLowerZone(); + const auto upperZone = zoneLayout.getUpperZone(); + + return (lowerZone.isActive() && midiChannel == lowerZone.getMasterChannel()) + || (upperZone.isActive() && midiChannel == upperZone.getMasterChannel()); +} + +bool MPEInstrument::isUsingChannel (int midiChannel) const noexcept +{ + if (legacyMode.isEnabled) + return legacyMode.channelRange.contains (midiChannel); + + return zoneLayout.getLowerZone().isUsing (midiChannel) + || zoneLayout.getUpperZone().isUsing (midiChannel); } + //============================================================================== int MPEInstrument::getNumPlayingNotes() const noexcept { @@ -679,7 +726,7 @@ MPENote* MPEInstrument::getLastNotePlayedPtr (int midiChannel) noexcept const MPENote* MPEInstrument::getHighestNotePtr (int midiChannel) const noexcept { int initialNoteMax = -1; - MPENote* result = nullptr; + const MPENote* result = nullptr; for (auto i = notes.size(); --i >= 0;) { @@ -705,7 +752,7 @@ MPENote* MPEInstrument::getHighestNotePtr (int midiChannel) noexcept const MPENote* MPEInstrument::getLowestNotePtr (int midiChannel) const noexcept { int initialNoteMin = 128; - MPENote* result = nullptr; + const MPENote* result = nullptr; for (auto i = notes.size(); --i >= 0;) { @@ -744,6 +791,7 @@ void MPEInstrument::releaseAllNotes() notes.clear(); } + //============================================================================== //============================================================================== #if JUCE_UNIT_TESTS @@ -752,7 +800,7 @@ class MPEInstrumentTests : public UnitTest { public: MPEInstrumentTests() - : UnitTest ("MPEInstrument class", "MIDI/MPE") + : UnitTest ("MPEInstrument class", UnitTestCategories::midi) { // using lower and upper MPE zones with the following layout for testing // @@ -798,12 +846,7 @@ public: UnitTestInstrument test; test.setZoneLayout (testLayout); - // note-on on master channel - ignore - test.noteOn (1, 60, MPEValue::from7BitInt (100)); - expectEquals (test.getNumPlayingNotes(), 0); - expectEquals (test.noteAddedCallCounter, 0); - - // note-on on any other channel - ignore + // note-on on unused channel - ignore test.noteOn (7, 60, MPEValue::from7BitInt (100)); expectEquals (test.getNumPlayingNotes(), 0); expectEquals (test.noteAddedCallCounter, 0); @@ -819,7 +862,21 @@ public: expectEquals (test.getNumPlayingNotes(), 0); expectEquals (test.noteReleasedCallCounter, 1); expectHasFinishedNote (test, 3, 60, 33); + + + // note-on on master channel - create new note + test.noteOn (1, 62, MPEValue::from7BitInt (100)); + expectEquals (test.getNumPlayingNotes(), 1); + expectEquals (test.noteAddedCallCounter, 2); + expectNote (test.getNote (1, 62), 100, 0, 8192, 64, MPENote::keyDown); + + // note-off + test.noteOff (1, 62, MPEValue::from7BitInt (33)); + expectEquals (test.getNumPlayingNotes(), 0); + expectEquals (test.noteReleasedCallCounter, 2); + expectHasFinishedNote (test, 1, 62, 33); } + { UnitTestInstrument test; test.setZoneLayout (testLayout); @@ -837,6 +894,7 @@ public: expectNote (test.getNote (3, 60), 100, 0, 8192, 64, MPENote::keyDown); expectEquals (test.noteReleasedCallCounter, 0); } + { // can have multiple notes on the same channel UnitTestInstrument test; @@ -1187,6 +1245,22 @@ public: expectNote (test.getNote (3, 60), 100, 78, 8192, 64, MPENote::keyDown); expectNote (test.getNote (3, 61), 100, 77, 8192, 64, MPENote::keyDown); } + + { + UnitTestInstrument test; + test.setZoneLayout (testLayout); + + // master channel will use poly-aftertouch for pressure + test.noteOn (16, 60, MPEValue::from7BitInt (100)); + expectNote (test.getNote (16, 60), 100, 0, 8192, 64, MPENote::keyDown); + test.aftertouch (16, 60, MPEValue::from7BitInt (27)); + expectNote (test.getNote (16, 60), 100, 27, 8192, 64, MPENote::keyDown); + + // member channels will not respond to poly-aftertouch + test.noteOn (3, 60, MPEValue::from7BitInt (100)); + test.aftertouch (3, 60, MPEValue::from7BitInt (50)); + expectNote (test.getNote (3, 60), 100, 0, 8192, 64, MPENote::keyDown); + } } beginTest ("pitchbend"); @@ -2142,6 +2216,12 @@ private: lastSostenutoPedalValueReceived = value; } + void aftertouch (int midiChannel, int midiNoteNumber, MPEValue value) + { + const auto message = juce::MidiMessage::aftertouchChange (midiChannel, midiNoteNumber, value.as7BitInt()); + processNextMidiEvent (message); + } + int noteOnCallCounter, noteOffCallCounter, pitchbendCallCounter, pressureCallCounter, timbreCallCounter, sustainPedalCallCounter, sostenutoPedalCallCounter, noteAddedCallCounter, @@ -2207,6 +2287,6 @@ private: static MPEInstrumentTests MPEInstrumentUnitTests; -#endif // JUCE_UNIT_TESTS +#endif } // namespace juce diff --git a/modules/juce_audio_basics/mpe/juce_MPEInstrument.h b/modules/juce_audio_basics/mpe/juce_MPEInstrument.h index 436bb7b9..1f0b132d 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEInstrument.h +++ b/modules/juce_audio_basics/mpe/juce_MPEInstrument.h @@ -90,7 +90,7 @@ public: When in legacy mode, this will return true if the given channel is contained in the current legacy mode channel range; false otherwise. */ - bool isMemberChannel (int midiChannel) noexcept; + bool isMemberChannel (int midiChannel) const noexcept; /** Returns true if the given MIDI channel (1-16) is a master channel (channel 1 or 16). @@ -99,6 +99,14 @@ public: */ bool isMasterChannel (int midiChannel) const noexcept; + /** Returns true if the given MIDI channel (1-16) is used by any of the + MPEInstrument's MPE zones; false otherwise. + + When in legacy mode, this will return true if the given channel is + contained in the current legacy mode channel range; false otherwise. + */ + bool isUsingChannel (int midiChannel) const noexcept; + //============================================================================== /** The MPE note tracking mode. In case there is more than one note playing simultaneously on the same MIDI channel, this determines which of these @@ -177,6 +185,13 @@ public: */ virtual void timbre (int midiChannel, MPEValue value); + /** Request a poly-aftertouch change for a given note number. + + The change will be broadcast to all notes sharing the channel and note + number of the change message. + */ + virtual void polyAftertouch (int midiChannel, int midiNoteNumber, MPEValue value); + /** Request a sustain pedal press or release. If midiChannel is a zone's master channel, this will act on all notes in @@ -246,12 +261,12 @@ public: /** Implement this callback to be informed whenever a new expressive MIDI note is triggered. */ - virtual void noteAdded (MPENote newNote) = 0; + virtual void noteAdded (MPENote newNote) { ignoreUnused (newNote); } /** Implement this callback to be informed whenever a currently playing MPE note's pressure value changes. */ - virtual void notePressureChanged (MPENote changedNote) = 0; + virtual void notePressureChanged (MPENote changedNote) { ignoreUnused (changedNote); } /** Implement this callback to be informed whenever a currently playing MPE note's pitchbend value changes. @@ -260,12 +275,12 @@ public: master channel pitchbend event, or if both occur simultaneously. Call MPENote::getFrequencyInHertz to get the effective note frequency. */ - virtual void notePitchbendChanged (MPENote changedNote) = 0; + virtual void notePitchbendChanged (MPENote changedNote) { ignoreUnused (changedNote); } /** Implement this callback to be informed whenever a currently playing MPE note's timbre value changes. */ - virtual void noteTimbreChanged (MPENote changedNote) = 0; + virtual void noteTimbreChanged (MPENote changedNote) { ignoreUnused (changedNote); } /** Implement this callback to be informed whether a currently playing MPE note's key state (whether the key is down and/or the note is @@ -274,14 +289,14 @@ public: Note: If the key state changes to MPENote::off, noteReleased is called instead. */ - virtual void noteKeyStateChanged (MPENote changedNote) = 0; + virtual void noteKeyStateChanged (MPENote changedNote) { ignoreUnused (changedNote); } /** Implement this callback to be informed whenever an MPE note is released (either by a note-off message, or by a sustain/sostenuto pedal release for a note that already received a note-off), and should therefore stop playing. */ - virtual void noteReleased (MPENote finishedNote) = 0; + virtual void noteReleased (MPENote finishedNote) { ignoreUnused (finishedNote); } }; //============================================================================== @@ -373,6 +388,7 @@ private: void processMidiChannelPressureMessage (const MidiMessage&); void processMidiControllerMessage (const MidiMessage&); void processMidiResetAllControllersMessage (const MidiMessage&); + void processMidiAfterTouchMessage (const MidiMessage&); void handlePressureMSB (int midiChannel, int value) noexcept; void handlePressureLSB (int midiChannel, int value) noexcept; void handleTimbreMSB (int midiChannel, int value) noexcept; diff --git a/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp b/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp index 37c332fb..214df7cf 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp @@ -106,6 +106,7 @@ MidiBuffer MPEMessages::setZoneLayout (MPEZoneLayout layout) return buffer; } + //============================================================================== //============================================================================== #if JUCE_UNIT_TESTS @@ -113,7 +114,9 @@ MidiBuffer MPEMessages::setZoneLayout (MPEZoneLayout layout) class MPEMessagesTests : public UnitTest { public: - MPEMessagesTests() : UnitTest ("MPEMessages class", "MIDI/MPE") {} + MPEMessagesTests() + : UnitTest ("MPEMessages class", UnitTestCategories::midi) + {} void runTest() override { @@ -233,6 +236,6 @@ private: static MPEMessagesTests MPEMessagesUnitTests; -#endif // JUCE_UNIT_TESTS +#endif } // namespace juce diff --git a/modules/juce_audio_basics/mpe/juce_MPENote.cpp b/modules/juce_audio_basics/mpe/juce_MPENote.cpp index c4c5707c..742c7786 100644 --- a/modules/juce_audio_basics/mpe/juce_MPENote.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPENote.cpp @@ -84,6 +84,7 @@ bool MPENote::operator!= (const MPENote& other) const noexcept return noteID != other.noteID; } + //============================================================================== //============================================================================== #if JUCE_UNIT_TESTS @@ -91,7 +92,9 @@ bool MPENote::operator!= (const MPENote& other) const noexcept class MPENoteTests : public UnitTest { public: - MPENoteTests() : UnitTest ("MPENote class", "MIDI/MPE") {} + MPENoteTests() + : UnitTest ("MPENote class", UnitTestCategories::midi) + {} //============================================================================== void runTest() override @@ -119,6 +122,6 @@ private: static MPENoteTests MPENoteUnitTests; -#endif // JUCE_UNIT_TESTS +#endif } // namespace juce diff --git a/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp b/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp index fc76d407..8eaf95ce 100644 --- a/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp @@ -299,10 +299,14 @@ void MPESynthesiser::reduceNumVoices (const int newNumVoices) void MPESynthesiser::turnOffAllVoices (bool allowTailOff) { - // first turn off all voices (it's more efficient to do this immediately - // rather than to go through the MPEInstrument for this). - for (auto* voice : voices) - voice->noteStopped (allowTailOff); + { + const ScopedLock sl (voicesLock); + + // first turn off all voices (it's more efficient to do this immediately + // rather than to go through the MPEInstrument for this). + for (auto* voice : voices) + voice->noteStopped (allowTailOff); + } // finally make sure the MPE Instrument also doesn't have any notes anymore. instrument->releaseAllNotes(); @@ -311,6 +315,8 @@ void MPESynthesiser::turnOffAllVoices (bool allowTailOff) //============================================================================== void MPESynthesiser::renderNextSubBlock (AudioBuffer& buffer, int startSample, int numSamples) { + const ScopedLock sl (voicesLock); + for (auto* voice : voices) { if (voice->isActive()) @@ -320,6 +326,8 @@ void MPESynthesiser::renderNextSubBlock (AudioBuffer& buffer, int startSa void MPESynthesiser::renderNextSubBlock (AudioBuffer& buffer, int startSample, int numSamples) { + const ScopedLock sl (voicesLock); + for (auto* voice : voices) { if (voice->isActive()) diff --git a/modules/juce_audio_basics/mpe/juce_MPESynthesiser.h b/modules/juce_audio_basics/mpe/juce_MPESynthesiser.h index 1dfae9d8..587ce4df 100644 --- a/modules/juce_audio_basics/mpe/juce_MPESynthesiser.h +++ b/modules/juce_audio_basics/mpe/juce_MPESynthesiser.h @@ -69,7 +69,7 @@ public: @see MPESynthesiserBase, MPEInstrument */ - MPESynthesiser (MPEInstrument* instrument); + MPESynthesiser (MPEInstrument* instrumentToUse); /** Destructor. */ ~MPESynthesiser() override; diff --git a/modules/juce_audio_basics/mpe/juce_MPEUtils.cpp b/modules/juce_audio_basics/mpe/juce_MPEUtils.cpp index 18efd66f..b8d973c2 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEUtils.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEUtils.cpp @@ -84,15 +84,29 @@ int MPEChannelAssigner::findMidiChannelForNewNote (int noteNumber) noexcept return midiChannelLastAssigned; } -void MPEChannelAssigner::noteOff (int noteNumber) +void MPEChannelAssigner::noteOff (int noteNumber, int midiChannel) { - for (auto& ch : midiChannels) + const auto removeNote = [] (MidiChannel& ch, int noteNum) { - if (ch.notes.removeAllInstancesOf (noteNumber) > 0) + if (ch.notes.removeAllInstancesOf (noteNum) > 0) { - ch.lastNotePlayed = noteNumber; - return; + ch.lastNotePlayed = noteNum; + return true; } + + return false; + }; + + if (midiChannel >= 0 && midiChannel < 17) + { + removeNote (midiChannels[midiChannel], noteNumber); + return; + } + + for (auto& ch : midiChannels) + { + if (removeNote (ch, noteNumber)) + return; } } @@ -255,6 +269,7 @@ void MPEChannelRemapper::zeroArrays() } } + //============================================================================== //============================================================================== #if JUCE_UNIT_TESTS @@ -262,7 +277,7 @@ void MPEChannelRemapper::zeroArrays() struct MPEUtilsUnitTests : public UnitTest { MPEUtilsUnitTests() - : UnitTest ("MPE Utilities", "MIDI/MPE") + : UnitTest ("MPE Utilities", UnitTestCategories::midi) {} void runTest() override @@ -475,4 +490,5 @@ struct MPEUtilsUnitTests : public UnitTest static MPEUtilsUnitTests MPEUtilsUnitTests; #endif + } // namespace juce diff --git a/modules/juce_audio_basics/mpe/juce_MPEUtils.h b/modules/juce_audio_basics/mpe/juce_MPEUtils.h index 7cbfd2b1..3f5f7dd7 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEUtils.h +++ b/modules/juce_audio_basics/mpe/juce_MPEUtils.h @@ -65,8 +65,11 @@ public: /** You must call this method for all note-offs that you receive so that this class can keep track of the currently playing notes internally. + + You can specify the channel number the note off happened on. If you don't, it will + look through all channels to find the registered midi note matching the given note number. */ - void noteOff (int noteNumber); + void noteOff (int noteNumber, int midiChannel = -1); /** Call this to clear all currently playing notes. */ void allNotesOff(); diff --git a/modules/juce_audio_basics/mpe/juce_MPEValue.cpp b/modules/juce_audio_basics/mpe/juce_MPEValue.cpp index b9a07130..ccc20ab1 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEValue.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEValue.cpp @@ -82,6 +82,7 @@ bool MPEValue::operator!= (const MPEValue& other) const noexcept return ! operator== (other); } + //============================================================================== //============================================================================== #if JUCE_UNIT_TESTS @@ -89,7 +90,9 @@ bool MPEValue::operator!= (const MPEValue& other) const noexcept class MPEValueTests : public UnitTest { public: - MPEValueTests() : UnitTest ("MPEValue class", "MIDI/MPE") {} + MPEValueTests() + : UnitTest ("MPEValue class", UnitTestCategories::midi) + {} void runTest() override { @@ -165,6 +168,6 @@ private: static MPEValueTests MPEValueUnitTests; -#endif // JUCE_UNIT_TESTS +#endif } // namespace juce diff --git a/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp b/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp index 7f94dee8..dfcba78e 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp @@ -205,6 +205,7 @@ void MPEZoneLayout::checkAndLimitZoneParameters (int minValue, int maxValue, } } + //============================================================================== //============================================================================== #if JUCE_UNIT_TESTS @@ -212,7 +213,9 @@ void MPEZoneLayout::checkAndLimitZoneParameters (int minValue, int maxValue, class MPEZoneLayoutTests : public UnitTest { public: - MPEZoneLayoutTests() : UnitTest ("MPEZoneLayout class", "MIDI/MPE") {} + MPEZoneLayoutTests() + : UnitTest ("MPEZoneLayout class", UnitTestCategories::midi) + {} void runTest() override { @@ -382,6 +385,6 @@ public: static MPEZoneLayoutTests MPEZoneLayoutUnitTests; -#endif // JUCE_UNIT_TESTS +#endif } // namespace juce diff --git a/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h b/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h index 955deb37..58523ee5 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h +++ b/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h @@ -98,6 +98,11 @@ public: : (channel < 16 && channel >= 16 - numMemberChannels); } + bool isUsing (int channel) const noexcept + { + return isUsingChannelAsMemberChannel (channel) || channel == getMasterChannel(); + } + bool operator== (const Zone& other) const noexcept { return lowerZone == other.lowerZone && numMemberChannels == other.numMemberChannels && perNotePitchbendRange == other.perNotePitchbendRange diff --git a/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.cpp b/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.cpp index 3cec2213..d5263ac5 100644 --- a/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.cpp +++ b/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.cpp @@ -145,9 +145,9 @@ void ChannelRemappingAudioSource::getNextAudioBlock (const AudioSourceChannelInf } //============================================================================== -XmlElement* ChannelRemappingAudioSource::createXml() const +std::unique_ptr ChannelRemappingAudioSource::createXml() const { - XmlElement* e = new XmlElement ("MAPPINGS"); + auto e = std::make_unique ("MAPPINGS"); String ins, outs; const ScopedLock sl (lock); diff --git a/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h b/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h index 69761faf..928a20c5 100644 --- a/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h +++ b/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h @@ -112,7 +112,7 @@ public: /** Returns an XML object to encapsulate the state of the mappings. @see restoreFromXml */ - XmlElement* createXml() const; + std::unique_ptr createXml() const; /** Restores the mappings from an XML object created by createXML(). @see createXml diff --git a/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.cpp b/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.cpp index 13770713..d123e4cf 100644 --- a/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.cpp +++ b/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.cpp @@ -27,11 +27,6 @@ ResamplingAudioSource::ResamplingAudioSource (AudioSource* const inputSource, const bool deleteInputWhenDeleted, const int channels) : input (inputSource, deleteInputWhenDeleted), - ratio (1.0), - lastRatio (1.0), - bufferPos (0), - sampsInBuffer (0), - subSampleOffset (0), numChannels (channels) { jassert (input != nullptr); @@ -67,6 +62,8 @@ void ResamplingAudioSource::prepareToPlay (int samplesPerBlockExpected, double s void ResamplingAudioSource::flushBuffers() { + const ScopedLock sl (callbackLock); + buffer.clear(); bufferPos = 0; sampsInBuffer = 0; @@ -82,10 +79,12 @@ void ResamplingAudioSource::releaseResources() void ResamplingAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& info) { + const ScopedLock sl (callbackLock); + double localRatio; { - const SpinLock::ScopedLockType sl (ratioLock); + const SpinLock::ScopedLockType ratioSl (ratioLock); localRatio = ratio; } diff --git a/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.h b/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.h index e33396b8..49b4974b 100644 --- a/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.h +++ b/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.h @@ -76,12 +76,13 @@ public: private: //============================================================================== OptionalScopedPointer input; - double ratio, lastRatio; + double ratio = 1.0, lastRatio = 1.0; AudioBuffer buffer; - int bufferPos, sampsInBuffer; - double subSampleOffset; + int bufferPos = 0, sampsInBuffer = 0; + double subSampleOffset = 0.0; double coefficients[6]; SpinLock ratioLock; + CriticalSection callbackLock; const int numChannels; HeapBlock destBuffers; HeapBlock srcBuffers; diff --git a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h index cdff3778..7c39c814 100644 --- a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h +++ b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h @@ -274,11 +274,6 @@ private: AudioBuffer tempBuffer; - #if JUCE_CATCH_DEPRECATED_CODE_MISUSE - // Note the new parameters for this method. - virtual int stopNote (bool) { return 0; } - #endif - JUCE_LEAK_DETECTOR (SynthesiserVoice) }; diff --git a/modules/juce_audio_basics/utilities/juce_ADSR.h b/modules/juce_audio_basics/utilities/juce_ADSR.h index 3821333f..6de3e8da 100644 --- a/modules/juce_audio_basics/utilities/juce_ADSR.h +++ b/modules/juce_audio_basics/utilities/juce_ADSR.h @@ -71,6 +71,9 @@ public: sustainLevel = newParameters.sustain; calculateRates (newParameters); + + if (currentState != State::idle) + checkCurrentState(); } /** Returns the parameters currently being used by an ADSR object. @@ -99,14 +102,30 @@ public: { envelopeVal = 0.0f; currentState = State::idle; + + if (resetReleaseRate) + { + releaseRate = static_cast (sustainLevel / (currentParameters.release * sr)); + resetReleaseRate = false; + } } /** Starts the attack phase of the envelope. */ void noteOn() { - if (attackRate > 0.0f) currentState = State::attack; - else if (decayRate > 0.0f) currentState = State::decay; - else currentState = State::sustain; + if (attackRate > 0.0f) + { + currentState = State::attack; + } + else if (decayRate > 0.0f) + { + envelopeVal = 1.0f; + currentState = State::decay; + } + else + { + currentState = State::sustain; + } } /** Starts the release phase of the envelope. */ @@ -115,9 +134,19 @@ public: if (currentState != State::idle) { if (releaseRate > 0.0f) + { + if (currentState != State::sustain) + { + releaseRate = static_cast (envelopeVal / (currentParameters.release * sr)); + resetReleaseRate = true; + } + currentState = State::release; + } else + { reset(); + } } } @@ -205,6 +234,13 @@ private: releaseRate = (parameters.release > 0.0f ? static_cast (sustainLevel / (parameters.release * sr)) : -1.0f); } + void checkCurrentState() + { + if (currentState == State::attack && attackRate <= 0.0f) currentState = decayRate > 0.0f ? State::decay : State::sustain; + else if (currentState == State::decay && decayRate <= 0.0f) currentState = State::sustain; + else if (currentState == State::release && releaseRate <= 0.0f) reset(); + } + //============================================================================== enum class State { idle, attack, decay, sustain, release }; @@ -212,11 +248,8 @@ private: Parameters currentParameters; double sr = 0.0; - - float envelopeVal = 0.0f; - - float sustainLevel = 0.0f; - float attackRate = 0.0f, decayRate = 0.0f, releaseRate = 0.0f; + float envelopeVal = 0.0f, sustainLevel = 0.0f, attackRate = 0.0f, decayRate = 0.0f, releaseRate = 0.0f; + bool resetReleaseRate = false; }; } // namespace juce diff --git a/modules/juce_audio_basics/utilities/juce_LinearSmoothedValue.h b/modules/juce_audio_basics/utilities/juce_LinearSmoothedValue.h deleted file mode 100644 index 3087b079..00000000 --- a/modules/juce_audio_basics/utilities/juce_LinearSmoothedValue.h +++ /dev/null @@ -1,213 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. - - JUCE is an open source library subject to commercial or open-source - licensing. - - 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 -{ - -//============================================================================== -/** - Utility class for linearly smoothed values like volume etc. that should - not change abruptly but as a linear ramp, to avoid audio glitches. - - @tags{Audio} -*/ -template -class LinearSmoothedValue -{ -public: - /** Constructor. */ - LinearSmoothedValue() = default; - - /** Constructor. */ - LinearSmoothedValue (FloatType initialValue) noexcept - : currentValue (initialValue), target (initialValue) - { - } - - //============================================================================== - /** Reset to a new sample rate and ramp length. - @param sampleRate The sampling rate - @param rampLengthInSeconds The duration of the ramp in seconds - */ - void reset (double sampleRate, double rampLengthInSeconds) noexcept - { - jassert (sampleRate > 0 && rampLengthInSeconds >= 0); - stepsToTarget = (int) std::floor (rampLengthInSeconds * sampleRate); - currentValue = target; - countdown = 0; - } - - //============================================================================== - /** Set a new target value. - - @param newValue The new target value - @param force If true, the value will be set immediately, bypassing the ramp - */ - void setValue (FloatType newValue, bool force = false) noexcept - { - if (force) - { - target = currentValue = newValue; - countdown = 0; - return; - } - - if (target != newValue) - { - target = newValue; - countdown = stepsToTarget; - - if (countdown <= 0) - currentValue = target; - else - step = (target - currentValue) / (FloatType) countdown; - } - } - - //============================================================================== - /** Compute the next value. - @returns Smoothed value - */ - FloatType getNextValue() noexcept - { - if (countdown <= 0) - return target; - - --countdown; - currentValue += step; - return currentValue; - } - - /** Returns true if the current value is currently being interpolated. */ - bool isSmoothing() const noexcept - { - return countdown > 0; - } - - /** Returns the target value towards which the smoothed value is currently moving. */ - FloatType getTargetValue() const noexcept - { - return target; - } - - //============================================================================== - /** Applies a linear smoothed gain to a stream of samples - S[i] *= gain - @param samples Pointer to a raw array of samples - @param numSamples Length of array of samples - */ - void applyGain (FloatType* samples, int numSamples) noexcept - { - jassert(numSamples >= 0); - - if (isSmoothing()) - { - for (int i = 0; i < numSamples; i++) - samples[i] *= getNextValue(); - } - else - { - FloatVectorOperations::multiply (samples, target, numSamples); - } - } - - //============================================================================== - /** Computes output as linear smoothed gain applied to a stream of samples. - Sout[i] = Sin[i] * gain - @param samplesOut A pointer to a raw array of output samples - @param samplesIn A pointer to a raw array of input samples - @param numSamples The length of the array of samples - */ - void applyGain (FloatType* samplesOut, const FloatType* samplesIn, int numSamples) noexcept - { - jassert (numSamples >= 0); - - if (isSmoothing()) - { - for (int i = 0; i < numSamples; i++) - samplesOut[i] = samplesIn[i] * getNextValue(); - } - else - { - FloatVectorOperations::multiply (samplesOut, samplesIn, target, numSamples); - } - } - - //============================================================================== - /** Applies a linear smoothed gain to a buffer */ - void applyGain (AudioBuffer& buffer, int numSamples) noexcept - { - jassert (numSamples >= 0); - - if (isSmoothing()) - { - if (buffer.getNumChannels() == 1) - { - auto samples = buffer.getWritePointer(0); - - for (int i = 0; i < numSamples; ++i) - samples[i] *= getNextValue(); - } - else - { - for (int i = 0; i < numSamples; ++i) - { - auto gain = getNextValue(); - - for (int channel = 0; channel < buffer.getNumChannels(); channel++) - buffer.setSample (channel, i, buffer.getSample (channel, i) * gain); - } - } - } - else - { - buffer.applyGain (0, numSamples, target); - } - } - - //============================================================================== - /** Skip the next numSamples samples. - This is identical to calling getNextValue numSamples times. It returns - the new current value. - @see getNextValue - */ - FloatType skip (int numSamples) noexcept - { - if (numSamples >= countdown) - { - currentValue = target; - countdown = 0; - return target; - } - - currentValue += (step * static_cast (numSamples)); - countdown -= numSamples; - return currentValue; - } - -private: - //============================================================================== - FloatType currentValue = 0, target = 0, step = 0; - int countdown = 0, stepsToTarget = 0; -}; - -} // namespace juce diff --git a/modules/juce_audio_basics/utilities/juce_Reverb.h b/modules/juce_audio_basics/utilities/juce_Reverb.h index 6244351e..0ed72b80 100644 --- a/modules/juce_audio_basics/utilities/juce_Reverb.h +++ b/modules/juce_audio_basics/utilities/juce_Reverb.h @@ -72,9 +72,9 @@ public: const float dryScaleFactor = 2.0f; const float wet = newParams.wetLevel * wetScaleFactor; - dryGain.setValue (newParams.dryLevel * dryScaleFactor); - wetGain1.setValue (0.5f * wet * (1.0f + newParams.width)); - wetGain2.setValue (0.5f * wet * (1.0f - newParams.width)); + dryGain.setTargetValue (newParams.dryLevel * dryScaleFactor); + wetGain1.setTargetValue (0.5f * wet * (1.0f + newParams.width)); + wetGain2.setTargetValue (0.5f * wet * (1.0f - newParams.width)); gain = isFrozen (newParams.freezeMode) ? 0.0f : 0.015f; parameters = newParams; @@ -207,8 +207,8 @@ private: void setDamping (const float dampingToUse, const float roomSizeToUse) noexcept { - damping.setValue (dampingToUse); - feedback.setValue (roomSizeToUse); + damping.setTargetValue (dampingToUse); + feedback.setTargetValue (roomSizeToUse); } //============================================================================== @@ -305,7 +305,7 @@ private: CombFilter comb [numChannels][numCombs]; AllPassFilter allPass [numChannels][numAllPasses]; - LinearSmoothedValue damping, feedback, dryGain, wetGain1, wetGain2; + SmoothedValue damping, feedback, dryGain, wetGain1, wetGain2; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Reverb) }; diff --git a/modules/juce_audio_basics/utilities/juce_SmoothedValue.cpp b/modules/juce_audio_basics/utilities/juce_SmoothedValue.cpp new file mode 100644 index 00000000..643dfd19 --- /dev/null +++ b/modules/juce_audio_basics/utilities/juce_SmoothedValue.cpp @@ -0,0 +1,92 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2018 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + The code included in this file is provided under the terms of the ISC license + http://www.isc.org/downloads/software-support-policy/isc-license. Permission + To use, copy, modify, and/or distribute this software for any purpose with or + without fee is hereby granted provided that the above copyright notice and + this permission notice appear in all copies. + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +namespace juce +{ + +#if JUCE_UNIT_TESTS + +static CommonSmoothedValueTests > commonLinearSmoothedValueTests; +static CommonSmoothedValueTests > commonMultiplicativeSmoothedValueTests; + +class SmoothedValueTests : public UnitTest +{ +public: + SmoothedValueTests() + : UnitTest ("SmoothedValueTests", UnitTestCategories::smoothedValues) + {} + + void runTest() override + { + beginTest ("Linear moving target"); + { + SmoothedValue sv; + + sv.reset (12); + float initialValue = 0.0f; + sv.setCurrentAndTargetValue (initialValue); + sv.setTargetValue (1.0f); + + auto delta = sv.getNextValue() - initialValue; + + sv.skip (6); + + auto newInitialValue = sv.getCurrentValue(); + sv.setTargetValue (newInitialValue + 2.0f); + auto doubleDelta = sv.getNextValue() - newInitialValue; + + expectWithinAbsoluteError (doubleDelta, delta * 2.0f, 1.0e-7f); + } + + beginTest ("Multiplicative curve"); + { + SmoothedValue sv; + + auto numSamples = 12; + AudioBuffer values (2, numSamples + 1); + + sv.reset (numSamples); + sv.setCurrentAndTargetValue (1.0); + sv.setTargetValue (2.0f); + + values.setSample (0, 0, sv.getCurrentValue()); + + for (int i = 1; i < values.getNumSamples(); ++i) + values.setSample (0, i, sv.getNextValue()); + + sv.setTargetValue (1.0f); + values.setSample (1, values.getNumSamples() - 1, sv.getCurrentValue()); + + for (int i = values.getNumSamples() - 2; i >= 0 ; --i) + values.setSample (1, i, sv.getNextValue()); + + for (int i = 0; i < values.getNumSamples(); ++i) + expectWithinAbsoluteError (values.getSample (0, i), values.getSample (1, i), 1.0e-9); + } + } +}; + +static SmoothedValueTests smoothedValueTests; + +#endif + +} // namespace juce diff --git a/modules/juce_audio_basics/utilities/juce_SmoothedValue.h b/modules/juce_audio_basics/utilities/juce_SmoothedValue.h new file mode 100644 index 00000000..ac6073e3 --- /dev/null +++ b/modules/juce_audio_basics/utilities/juce_SmoothedValue.h @@ -0,0 +1,622 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + The code included in this file is provided under the terms of the ISC license + http://www.isc.org/downloads/software-support-policy/isc-license. Permission + To use, copy, modify, and/or distribute this software for any purpose with or + without fee is hereby granted provided that the above copyright notice and + this permission notice appear in all copies. + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +namespace juce +{ + +//============================================================================== +/** + A base class for the smoothed value classes. + + This class is used to provide common functionality to the SmoothedValue and + dsp::LogRampedValue classes. + + @tags{Audio} +*/ +template +class SmoothedValueBase +{ +private: + //============================================================================== + template struct FloatTypeHelper; + + template