New upstream version 5.3.2~repack
authorIOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org>
Mon, 14 May 2018 07:42:14 +0000 (09:42 +0200)
committerIOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org>
Mon, 14 May 2018 07:42:14 +0000 (09:42 +0200)
677 files changed:
BREAKING-CHANGES.txt
ChangeList.txt
examples/Assets/DSPDemos_Common.h
examples/Assets/DemoUtilities.h
examples/Assets/WavefrontObjParser.h
examples/Audio/AudioLatencyDemo.h
examples/Audio/AudioPlaybackDemo.h
examples/Audio/AudioRecordingDemo.h
examples/Audio/AudioSettingsDemo.h
examples/Audio/AudioSynthesiserDemo.h
examples/Audio/MidiDemo.h
examples/BLOCKS/BlocksDrawingDemo.h
examples/BLOCKS/BlocksMonitorDemo.h
examples/BLOCKS/BlocksSynthDemo.h
examples/DSP/ConvolutionDemo.h
examples/DSP/SIMDRegisterDemo.h
examples/DemoRunner/Builds/Android/app/CMakeLists.txt
examples/DemoRunner/Builds/Android/app/build.gradle
examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml
examples/DemoRunner/Builds/Android/app/src/main/assets/DSPDemos_Common.h
examples/DemoRunner/Builds/Android/app/src/main/assets/DemoUtilities.h
examples/DemoRunner/Builds/Android/app/src/main/assets/WavefrontObjParser.h
examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/DemoRunner.java [new file with mode: 0644]
examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/SharingContentProvider.java [new file with mode: 0644]
examples/DemoRunner/Builds/Android/app/src/main/java/com/roli/juce/demorunner/DemoRunner.java
examples/DemoRunner/Builds/LinuxMakefile/Makefile
examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj
examples/DemoRunner/Builds/MacOSX/Info-App.plist
examples/DemoRunner/Builds/VisualStudio2013/DemoRunner.sln
examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj
examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj.filters
examples/DemoRunner/Builds/VisualStudio2013/resources.rc
examples/DemoRunner/Builds/VisualStudio2015/DemoRunner.sln
examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj
examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters
examples/DemoRunner/Builds/VisualStudio2015/resources.rc
examples/DemoRunner/Builds/VisualStudio2017/DemoRunner.sln
examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj
examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters
examples/DemoRunner/Builds/VisualStudio2017/resources.rc
examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj
examples/DemoRunner/Builds/iOS/Info-App.plist
examples/DemoRunner/DemoRunner.jucer
examples/DemoRunner/JuceLibraryCode/AppConfig.h
examples/DemoRunner/JuceLibraryCode/JuceHeader.h
examples/DemoRunner/Source/Demos/DemoPIPs1.cpp
examples/DemoRunner/Source/Demos/DemoPIPs2.cpp
examples/DemoRunner/Source/Demos/JUCEDemos.cpp
examples/DemoRunner/Source/Demos/JUCEDemos.h
examples/DemoRunner/Source/Main.cpp
examples/DemoRunner/Source/UI/DemoContentComponent.cpp
examples/DemoRunner/Source/UI/DemoContentComponent.h
examples/DemoRunner/Source/UI/MainComponent.cpp
examples/DemoRunner/Source/UI/MainComponent.h
examples/DemoRunner/Source/UI/SettingsContent.h
examples/GUI/CameraDemo.h
examples/GUI/CodeEditorDemo.h
examples/GUI/ComponentTransformsDemo.h
examples/GUI/DialogsDemo.h
examples/GUI/FontsDemo.h
examples/GUI/GraphicsDemo.h
examples/GUI/MDIDemo.h
examples/GUI/MenusDemo.h
examples/GUI/OpenGLAppDemo.h
examples/GUI/OpenGLDemo.h
examples/GUI/OpenGLDemo2D.h
examples/GUI/WebBrowserDemo.h
examples/GUI/WidgetsDemo.h
examples/Plugins/AUv3SynthPluginDemo.h
examples/Plugins/AudioPluginDemo.h
examples/Plugins/DSPModulePluginDemo.h
examples/Plugins/InterAppAudioEffectPluginDemo.h
examples/Plugins/MultiOutSynthPluginDemo.h
examples/Plugins/SamplerPluginDemo.h
examples/Utilities/AnalyticsCollectionDemo.h
examples/Utilities/Box2DDemo.h
examples/Utilities/ChildProcessDemo.h
examples/Utilities/InAppPurchasesDemo.h
examples/Utilities/JavaScriptDemo.h
examples/Utilities/NetworkingDemo.h
examples/Utilities/UnitTestsDemo.h
examples/Utilities/ValueTreesDemo.h
examples/Utilities/XMLandJSONDemo.h
extras/AudioPerformanceTest/AudioPerformanceTest.jucer
extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt
extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/juce/audioperformancetest/AudioPerformanceTest.java
extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj
extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest.sln [new file with mode: 0644]
extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj [new file with mode: 0644]
extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj.filters [new file with mode: 0644]
extras/AudioPerformanceTest/Builds/VisualStudio2017/resources.rc [new file with mode: 0644]
extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj
extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h
extras/AudioPerformanceTest/Source/Main.cpp
extras/AudioPluginHost/AudioPluginHost.jucer
extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt
extras/AudioPluginHost/Builds/Android/app/src/main/java/com/roli/juce/pluginhost/AudioPluginHost.java
extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj
extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj
extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj.filters
extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj
extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters
extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj
extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters
extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj
extras/AudioPluginHost/JuceLibraryCode/AppConfig.h
extras/AudioPluginHost/JuceLibraryCode/BinaryData.cpp
extras/AudioPluginHost/JuceLibraryCode/BinaryData.h
extras/AudioPluginHost/Source/Filters/FilterGraph.cpp
extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.cpp
extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.h
extras/AudioPluginHost/Source/HostStartup.cpp
extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp
extras/AudioPluginHost/Source/UI/GraphEditorPanel.h
extras/AudioPluginHost/Source/UI/MainHostWindow.cpp
extras/AudioPluginHost/Source/UI/MainHostWindow.h
extras/BinaryBuilder/BinaryBuilder.jucer
extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj
extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj
extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj.filters
extras/BinaryBuilder/Source/Main.cpp
extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt
extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/JUCENetworkGraphicsDemo.java
extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj
extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo_App.vcxproj
extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo_App.vcxproj.filters
extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo_App.vcxproj
extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo_App.vcxproj.filters
extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj
extras/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h
extras/NetworkGraphicsDemo/JuceLibraryCode/BinaryData.cpp
extras/NetworkGraphicsDemo/JuceLibraryCode/BinaryData.h
extras/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer
extras/NetworkGraphicsDemo/Source/Demos.h
extras/NetworkGraphicsDemo/Source/MasterComponent.h
extras/Projucer/Builds/LinuxMakefile/Makefile
extras/Projucer/Builds/MacOSX/Info-App.plist
extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj
extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj
extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters
extras/Projucer/Builds/VisualStudio2013/resources.rc
extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj
extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters
extras/Projucer/Builds/VisualStudio2015/resources.rc
extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj
extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters
extras/Projucer/Builds/VisualStudio2017/resources.rc
extras/Projucer/JuceLibraryCode/BinaryData.cpp
extras/Projucer/JuceLibraryCode/BinaryData.h
extras/Projucer/JuceLibraryCode/JuceHeader.h
extras/Projucer/Projucer.jucer
extras/Projucer/Source/Application/Windows/jucer_AboutWindowComponent.h
extras/Projucer/Source/Application/Windows/jucer_ApplicationUsageDataWindowComponent.h
extras/Projucer/Source/Application/Windows/jucer_EditorColourSchemeWindowComponent.h
extras/Projucer/Source/Application/Windows/jucer_FloatingToolWindow.h
extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h
extras/Projucer/Source/Application/Windows/jucer_SVGPathDataWindowComponent.h
extras/Projucer/Source/Application/jucer_Application.cpp
extras/Projucer/Source/Application/jucer_Application.h
extras/Projucer/Source/Application/jucer_AutoUpdater.cpp
extras/Projucer/Source/Application/jucer_CommandLine.cpp
extras/Projucer/Source/Application/jucer_MainWindow.cpp
extras/Projucer/Source/Application/jucer_MainWindow.h
extras/Projucer/Source/BinaryData/Templates/jucer_MainTemplate_SimpleWindow.cpp
extras/Projucer/Source/BinaryData/Templates/jucer_MainTemplate_Window.cpp
extras/Projucer/Source/BinaryData/Templates/jucer_PIPMain.cpp
extras/Projucer/Source/CodeEditor/jucer_ItemPreviewComponent.h
extras/Projucer/Source/CodeEditor/jucer_LiveBuildCodeEditor.h
extras/Projucer/Source/CodeEditor/jucer_SourceCodeEditor.h
extras/Projucer/Source/ComponentEditor/Components/jucer_ButtonHandler.h
extras/Projucer/Source/ComponentEditor/Components/jucer_ComboBoxHandler.h
extras/Projucer/Source/ComponentEditor/Components/jucer_ComponentTypeHandler.cpp
extras/Projucer/Source/ComponentEditor/Components/jucer_SliderHandler.h
extras/Projucer/Source/ComponentEditor/Components/jucer_TabbedComponentHandler.h
extras/Projucer/Source/ComponentEditor/Components/jucer_ViewportHandler.h
extras/Projucer/Source/ComponentEditor/Documents/jucer_ButtonDocument.cpp
extras/Projucer/Source/ComponentEditor/Documents/jucer_ButtonDocument.h
extras/Projucer/Source/ComponentEditor/Documents/jucer_ComponentDocument.cpp
extras/Projucer/Source/ComponentEditor/Documents/jucer_ComponentDocument.h
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_ColouredElement.cpp
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElement.cpp
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElement.h
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementGroup.cpp
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementImage.cpp
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementPath.cpp
extras/Projucer/Source/ComponentEditor/Properties/jucer_ColourPropertyComponent.h
extras/Projucer/Source/ComponentEditor/Properties/jucer_PositionPropertyBase.h
extras/Projucer/Source/ComponentEditor/UI/jucer_ComponentLayoutEditor.cpp
extras/Projucer/Source/ComponentEditor/UI/jucer_ComponentOverlayComponent.cpp
extras/Projucer/Source/ComponentEditor/UI/jucer_ComponentOverlayComponent.h
extras/Projucer/Source/ComponentEditor/UI/jucer_EditingPanelBase.cpp
extras/Projucer/Source/ComponentEditor/UI/jucer_JucerCommandIDs.h
extras/Projucer/Source/ComponentEditor/UI/jucer_JucerDocumentEditor.cpp
extras/Projucer/Source/ComponentEditor/UI/jucer_JucerDocumentEditor.h
extras/Projucer/Source/ComponentEditor/UI/jucer_PaintRoutineEditor.cpp
extras/Projucer/Source/ComponentEditor/UI/jucer_PaintRoutinePanel.cpp
extras/Projucer/Source/ComponentEditor/UI/jucer_ResourceEditorPanel.cpp
extras/Projucer/Source/ComponentEditor/UI/jucer_ResourceEditorPanel.h
extras/Projucer/Source/ComponentEditor/UI/jucer_TestComponent.cpp
extras/Projucer/Source/ComponentEditor/UI/jucer_TestComponent.h
extras/Projucer/Source/ComponentEditor/jucer_BinaryResources.h
extras/Projucer/Source/ComponentEditor/jucer_ComponentLayout.cpp
extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp
extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.h
extras/Projucer/Source/ComponentEditor/jucer_ObjectTypes.cpp
extras/Projucer/Source/ComponentEditor/jucer_PaintRoutine.cpp
extras/Projucer/Source/Licenses/jucer_LicenseController.cpp
extras/Projucer/Source/Licenses/jucer_LicenseController.h
extras/Projucer/Source/Licenses/jucer_LicenseThread.h
extras/Projucer/Source/Licenses/jucer_LicenseWebview.h
extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineClient.cpp
extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineClient.h
extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineServer.cpp
extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineSettings.h
extras/Projucer/Source/LiveBuildEngine/jucer_DiagnosticMessage.h
extras/Projucer/Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp
extras/Projucer/Source/Project/UI/Sidebar/jucer_ExporterTreeItems.h
extras/Projucer/Source/Project/UI/Sidebar/jucer_FileTreeItems.h
extras/Projucer/Source/Project/UI/Sidebar/jucer_LiveBuildTab.h
extras/Projucer/Source/Project/UI/Sidebar/jucer_ProjectTreeItemBase.h
extras/Projucer/Source/Project/UI/Sidebar/jucer_TabComponents.h
extras/Projucer/Source/Project/UI/jucer_FileGroupInformationComponent.h
extras/Projucer/Source/Project/UI/jucer_HeaderComponent.cpp
extras/Projucer/Source/Project/UI/jucer_HeaderComponent.h
extras/Projucer/Source/Project/UI/jucer_ProjectContentComponent.cpp
extras/Projucer/Source/Project/UI/jucer_ProjectContentComponent.h
extras/Projucer/Source/Project/jucer_Module.cpp
extras/Projucer/Source/Project/jucer_Project.cpp
extras/Projucer/Source/Project/jucer_Project.h
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp
extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.h
extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.cpp
extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.h
extras/Projucer/Source/ProjectSaving/jucer_ResourceFile.cpp
extras/Projucer/Source/Settings/jucer_AppearanceSettings.cpp
extras/Projucer/Source/Settings/jucer_StoredSettings.cpp
extras/Projucer/Source/Settings/jucer_StoredSettings.h
extras/Projucer/Source/Utility/Helpers/jucer_FileHelpers.cpp
extras/Projucer/Source/Utility/Helpers/jucer_MiscUtilities.cpp
extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h
extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp
extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.h
extras/Projucer/Source/Utility/UI/jucer_Icons.cpp
extras/Projucer/Source/Utility/UI/jucer_JucerTreeViewBase.cpp
extras/Projucer/Source/Utility/UI/jucer_JucerTreeViewBase.h
extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.cpp
extras/Projucer/Source/Utility/UI/jucer_SlidingPanelComponent.cpp
extras/Projucer/Source/Utility/UI/jucer_SlidingPanelComponent.h
extras/Projucer/Source/Utility/UI/jucer_UserSettingsPopup.h
extras/Projucer/Source/Wizards/jucer_NewProjectWizard.h
extras/Projucer/Source/Wizards/jucer_NewProjectWizardClasses.cpp
extras/Projucer/Source/Wizards/jucer_NewProjectWizardComponent.h
extras/Projucer/Source/Wizards/jucer_ProjectWizard_AudioPlugin.h
extras/Projucer/Source/Wizards/jucer_TemplateThumbnailsComponent.h
extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj
extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj
extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters
extras/UnitTestRunner/JuceLibraryCode/AppConfig.h
extras/WindowsDLL/Builds/VisualStudio2017/WindowsDLL_StaticLibrary.vcxproj
extras/WindowsDLL/Builds/VisualStudio2017/WindowsDLL_StaticLibrary.vcxproj.filters
extras/WindowsDLL/JuceLibraryCode/AppConfig.h
extras/WindowsDLL/WindowsDLL.jucer
modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp
modules/juce_analytics/juce_analytics.h
modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp
modules/juce_audio_basics/buffers/juce_AudioDataConverters.h
modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h
modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp
modules/juce_audio_basics/juce_audio_basics.h
modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp
modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h
modules/juce_audio_basics/mpe/juce_MPEUtils.h
modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp
modules/juce_audio_basics/sources/juce_BufferingAudioSource.h
modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp
modules/juce_audio_basics/sources/juce_ReverbAudioSource.h
modules/juce_audio_basics/synthesisers/juce_Synthesiser.h
modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp
modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h
modules/juce_audio_devices/juce_audio_devices.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
modules/juce_audio_devices/native/juce_android_OpenSL.cpp
modules/juce_audio_devices/native/juce_ios_Audio.cpp
modules/juce_audio_devices/native/juce_ios_Audio.h
modules/juce_audio_devices/native/juce_linux_ALSA.cpp
modules/juce_audio_devices/native/juce_linux_Midi.cpp
modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp
modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp
modules/juce_audio_devices/native/juce_win32_ASIO.cpp
modules/juce_audio_devices/native/juce_win32_DirectSound.cpp
modules/juce_audio_devices/native/juce_win32_Midi.cpp
modules/juce_audio_devices/native/juce_win32_WASAPI.cpp
modules/juce_audio_devices/sources/juce_AudioTransportSource.cpp
modules/juce_audio_devices/sources/juce_AudioTransportSource.h
modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp
modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp
modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp
modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp
modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp
modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp
modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp
modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp
modules/juce_audio_formats/format/juce_AudioFormatManager.cpp
modules/juce_audio_formats/format/juce_AudioFormatReader.h
modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h
modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp
modules/juce_audio_formats/format/juce_AudioFormatWriter.h
modules/juce_audio_formats/format/juce_BufferingAudioFormatReader.h
modules/juce_audio_formats/format/juce_MemoryMappedAudioFormatReader.h
modules/juce_audio_formats/juce_audio_formats.h
modules/juce_audio_formats/sampler/juce_Sampler.h
modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp
modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp
modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h
modules/juce_audio_plugin_client/VST/juce_VSTCallbackHandler.h
modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
modules/juce_audio_plugin_client/juce_audio_plugin_client.h
modules/juce_audio_plugin_client/utility/juce_FakeMouseMoveGenerator.h
modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp
modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp
modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm
modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp
modules/juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp
modules/juce_audio_processors/format_types/juce_VST3Common.h
modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp
modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
modules/juce_audio_processors/juce_audio_processors.cpp
modules/juce_audio_processors/juce_audio_processors.h
modules/juce_audio_processors/processors/juce_AudioPluginInstance.cpp
modules/juce_audio_processors/processors/juce_AudioProcessor.cpp
modules/juce_audio_processors/processors/juce_AudioProcessor.h
modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h
modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp
modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h
modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h
modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.cpp
modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.h
modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp
modules/juce_audio_processors/scanning/juce_KnownPluginList.h
modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp
modules/juce_audio_processors/scanning/juce_PluginListComponent.h
modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp
modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h
modules/juce_audio_utils/audio_cd/juce_AudioCDBurner.h
modules/juce_audio_utils/audio_cd/juce_AudioCDReader.h
modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp
modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.h
modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp
modules/juce_audio_utils/gui/juce_AudioThumbnail.h
modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp
modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.h
modules/juce_audio_utils/juce_audio_utils.h
modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp
modules/juce_audio_utils/native/juce_ios_BluetoothMidiDevicePairingDialogue.mm
modules/juce_audio_utils/native/juce_linux_BluetoothMidiDevicePairingDialogue.cpp
modules/juce_audio_utils/native/juce_mac_AudioCDBurner.mm
modules/juce_audio_utils/native/juce_mac_AudioCDReader.mm
modules/juce_audio_utils/native/juce_mac_BluetoothMidiDevicePairingDialogue.mm
modules/juce_audio_utils/native/juce_win32_AudioCDBurner.cpp
modules/juce_audio_utils/native/juce_win32_AudioCDReader.cpp
modules/juce_audio_utils/native/juce_win_BluetoothMidiDevicePairingDialogue.cpp
modules/juce_audio_utils/players/juce_SoundPlayer.cpp
modules/juce_blocks_basics/blocks/juce_BlockConfigManager.h
modules/juce_blocks_basics/juce_blocks_basics.cpp
modules/juce_blocks_basics/juce_blocks_basics.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
modules/juce_blocks_basics/topology/juce_RuleBasedTopologySource.h
modules/juce_box2d/box2d/Collision/Shapes/b2ChainShape.cpp
modules/juce_box2d/box2d/Collision/Shapes/b2CircleShape.cpp
modules/juce_box2d/box2d/Collision/Shapes/b2EdgeShape.cpp
modules/juce_box2d/box2d/Collision/Shapes/b2PolygonShape.cpp
modules/juce_box2d/box2d/Collision/b2BroadPhase.cpp
modules/juce_box2d/box2d/Collision/b2Collision.h
modules/juce_box2d/box2d/Common/b2BlockAllocator.cpp
modules/juce_box2d/box2d/Common/b2Math.h
modules/juce_box2d/box2d/Common/b2Settings.cpp
modules/juce_box2d/box2d/Common/b2Settings.h
modules/juce_box2d/box2d/Common/b2Timer.cpp
modules/juce_box2d/box2d/Common/b2Timer.h
modules/juce_box2d/box2d/Dynamics/b2Body.h
modules/juce_box2d/juce_box2d.cpp
modules/juce_box2d/juce_box2d.h
modules/juce_core/containers/juce_Array.h
modules/juce_core/containers/juce_DynamicObject.h
modules/juce_core/containers/juce_ElementComparator.h
modules/juce_core/containers/juce_HashMap.h
modules/juce_core/containers/juce_ListenerList.h
modules/juce_core/containers/juce_OwnedArray.h
modules/juce_core/containers/juce_ReferenceCountedArray.h
modules/juce_core/containers/juce_SortedSet.h
modules/juce_core/containers/juce_SparseSet.cpp [new file with mode: 0644]
modules/juce_core/containers/juce_SparseSet.h
modules/juce_core/containers/juce_Variant.cpp
modules/juce_core/containers/juce_Variant.h
modules/juce_core/files/juce_DirectoryIterator.h
modules/juce_core/files/juce_File.cpp
modules/juce_core/files/juce_File.h
modules/juce_core/files/juce_TemporaryFile.h
modules/juce_core/javascript/juce_Javascript.cpp
modules/juce_core/juce_core.cpp
modules/juce_core/juce_core.h
modules/juce_core/maths/juce_Expression.cpp
modules/juce_core/maths/juce_MathsFunctions.h
modules/juce_core/maths/juce_NormalisableRange.h
modules/juce_core/memory/juce_Atomic.h
modules/juce_core/memory/juce_LeakedObjectDetector.h
modules/juce_core/memory/juce_Memory.h
modules/juce_core/memory/juce_ReferenceCountedObject.h
modules/juce_core/memory/juce_ScopedPointer.h
modules/juce_core/memory/juce_SharedResourcePointer.h
modules/juce_core/memory/juce_WeakReference.h
modules/juce_core/misc/juce_RuntimePermissions.h
modules/juce_core/misc/juce_StdFunctionCompat.cpp
modules/juce_core/misc/juce_Uuid.cpp
modules/juce_core/misc/juce_Uuid.h
modules/juce_core/native/java/AndroidCamera.java [new file with mode: 0644]
modules/juce_core/native/java/JuceAppActivity.java
modules/juce_core/native/juce_android_JNIHelpers.h
modules/juce_core/native/juce_mac_Network.mm
modules/juce_core/native/juce_osx_ObjCHelpers.h
modules/juce_core/native/juce_posix_NamedPipe.cpp
modules/juce_core/native/juce_posix_SharedCode.h
modules/juce_core/native/juce_win32_Threads.cpp
modules/juce_core/network/juce_NamedPipe.h
modules/juce_core/network/juce_Socket.cpp
modules/juce_core/network/juce_Socket.h
modules/juce_core/network/juce_URL.cpp
modules/juce_core/network/juce_URL.h
modules/juce_core/streams/juce_OutputStream.cpp
modules/juce_core/streams/juce_OutputStream.h
modules/juce_core/system/juce_CompilerSupport.h
modules/juce_core/system/juce_PlatformDefs.h
modules/juce_core/system/juce_StandardHeader.h
modules/juce_core/text/juce_CharPointer_ASCII.h
modules/juce_core/text/juce_CharPointer_UTF16.h
modules/juce_core/text/juce_CharPointer_UTF32.h
modules/juce_core/text/juce_CharPointer_UTF8.h
modules/juce_core/text/juce_CharacterFunctions.h
modules/juce_core/text/juce_LocalisedStrings.cpp
modules/juce_core/text/juce_LocalisedStrings.h
modules/juce_core/text/juce_String.cpp
modules/juce_core/text/juce_String.h
modules/juce_core/text/juce_StringArray.cpp
modules/juce_core/text/juce_StringArray.h
modules/juce_core/text/juce_StringRef.h
modules/juce_core/threads/juce_ChildProcess.h
modules/juce_core/threads/juce_HighResolutionTimer.h
modules/juce_core/threads/juce_InterProcessLock.h
modules/juce_core/threads/juce_Thread.cpp
modules/juce_core/threads/juce_Thread.h
modules/juce_core/threads/juce_ThreadPool.cpp
modules/juce_core/threads/juce_ThreadPool.h
modules/juce_core/xml/juce_XmlDocument.cpp
modules/juce_core/xml/juce_XmlDocument.h
modules/juce_core/zip/juce_GZIPCompressorOutputStream.h
modules/juce_core/zip/juce_GZIPDecompressorInputStream.h
modules/juce_core/zip/juce_ZipFile.cpp
modules/juce_core/zip/juce_ZipFile.h
modules/juce_cryptography/juce_cryptography.h
modules/juce_data_structures/app_properties/juce_ApplicationProperties.h
modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp
modules/juce_data_structures/app_properties/juce_PropertiesFile.h
modules/juce_data_structures/juce_data_structures.h
modules/juce_data_structures/undomanager/juce_UndoManager.cpp
modules/juce_data_structures/values/juce_ValueTree.cpp
modules/juce_data_structures/values/juce_ValueTree.h
modules/juce_dsp/containers/juce_AudioBlock.h
modules/juce_dsp/containers/juce_SIMDRegister.h
modules/juce_dsp/containers/juce_SIMDRegister_Impl.h [new file with mode: 0644]
modules/juce_dsp/containers/juce_SIMDRegister_test.cpp
modules/juce_dsp/frequency/juce_Convolution.cpp
modules/juce_dsp/frequency/juce_Convolution.h
modules/juce_dsp/frequency/juce_FFT.cpp
modules/juce_dsp/frequency/juce_FFT.h
modules/juce_dsp/juce_dsp.cpp
modules/juce_dsp/juce_dsp.h
modules/juce_dsp/native/juce_avx_SIMDNativeOps.h
modules/juce_dsp/native/juce_fallback_SIMDNativeOps.h
modules/juce_dsp/native/juce_neon_SIMDNativeOps.h
modules/juce_dsp/native/juce_sse_SIMDNativeOps.h
modules/juce_dsp/processors/juce_Oscillator.h
modules/juce_dsp/processors/juce_WaveShaper.h
modules/juce_events/interprocess/juce_ConnectedChildProcess.h
modules/juce_events/interprocess/juce_InterprocessConnection.cpp
modules/juce_events/interprocess/juce_InterprocessConnection.h
modules/juce_events/interprocess/juce_InterprocessConnectionServer.cpp
modules/juce_events/interprocess/juce_InterprocessConnectionServer.h
modules/juce_events/juce_events.h
modules/juce_events/messages/juce_ApplicationBase.cpp
modules/juce_events/messages/juce_ApplicationBase.h
modules/juce_events/messages/juce_Message.h
modules/juce_events/messages/juce_MessageManager.cpp
modules/juce_events/messages/juce_MessageManager.h
modules/juce_events/messages/juce_MountedVolumeListChangeDetector.h
modules/juce_events/native/juce_android_Messaging.cpp
modules/juce_events/native/juce_ios_MessageManager.mm
modules/juce_events/native/juce_linux_Messaging.cpp
modules/juce_events/native/juce_win32_Messaging.cpp
modules/juce_graphics/colour/juce_FillType.cpp
modules/juce_graphics/colour/juce_FillType.h
modules/juce_graphics/contexts/juce_GraphicsContext.h
modules/juce_graphics/fonts/juce_TextLayout.cpp
modules/juce_graphics/fonts/juce_Typeface.h
modules/juce_graphics/geometry/juce_AffineTransform.cpp
modules/juce_graphics/geometry/juce_AffineTransform.h
modules/juce_graphics/image_formats/juce_GIFLoader.cpp
modules/juce_graphics/images/juce_Image.cpp
modules/juce_graphics/images/juce_Image.h
modules/juce_graphics/juce_graphics.h
modules/juce_graphics/native/juce_RenderingHelpers.h
modules/juce_graphics/native/juce_android_Fonts.cpp
modules/juce_graphics/native/juce_freetype_Fonts.cpp
modules/juce_graphics/native/juce_linux_Fonts.cpp
modules/juce_graphics/native/juce_mac_CoreGraphicsContext.h
modules/juce_graphics/native/juce_mac_Fonts.mm
modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.h
modules/juce_graphics/native/juce_win32_Fonts.cpp
modules/juce_gui_basics/application/juce_Application.h
modules/juce_gui_basics/buttons/juce_Button.cpp
modules/juce_gui_basics/buttons/juce_Button.h
modules/juce_gui_basics/buttons/juce_DrawableButton.h
modules/juce_gui_basics/buttons/juce_ToolbarButton.h
modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h
modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp
modules/juce_gui_basics/components/juce_Component.cpp
modules/juce_gui_basics/components/juce_Component.h
modules/juce_gui_basics/components/juce_Desktop.cpp
modules/juce_gui_basics/components/juce_Desktop.h
modules/juce_gui_basics/components/juce_ModalComponentManager.cpp
modules/juce_gui_basics/drawables/juce_Drawable.cpp
modules/juce_gui_basics/drawables/juce_Drawable.h
modules/juce_gui_basics/drawables/juce_SVGParser.cpp
modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp
modules/juce_gui_basics/filebrowser/juce_ContentSharer.h
modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.cpp
modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.h
modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h
modules/juce_gui_basics/filebrowser/juce_FileChooser.h
modules/juce_gui_basics/filebrowser/juce_FilenameComponent.h
modules/juce_gui_basics/filebrowser/juce_ImagePreviewComponent.cpp
modules/juce_gui_basics/juce_gui_basics.cpp
modules/juce_gui_basics/juce_gui_basics.h
modules/juce_gui_basics/keyboard/juce_KeyPress.cpp
modules/juce_gui_basics/keyboard/juce_ModifierKeys.cpp
modules/juce_gui_basics/keyboard/juce_ModifierKeys.h
modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp
modules/juce_gui_basics/layout/juce_ComponentBuilder.h
modules/juce_gui_basics/layout/juce_ConcertinaPanel.h
modules/juce_gui_basics/layout/juce_Grid.cpp
modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp
modules/juce_gui_basics/layout/juce_MultiDocumentPanel.h
modules/juce_gui_basics/layout/juce_ScrollBar.h
modules/juce_gui_basics/layout/juce_TabbedButtonBar.h
modules/juce_gui_basics/layout/juce_TabbedComponent.h
modules/juce_gui_basics/layout/juce_Viewport.cpp
modules/juce_gui_basics/layout/juce_Viewport.h
modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp
modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h
modules/juce_gui_basics/menus/juce_PopupMenu.cpp
modules/juce_gui_basics/menus/juce_PopupMenu.h
modules/juce_gui_basics/misc/juce_JUCESplashScreen.cpp
modules/juce_gui_basics/misc/juce_JUCESplashScreen.h
modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp
modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp
modules/juce_gui_basics/native/juce_android_ContentSharer.cpp
modules/juce_gui_basics/native/juce_android_Windowing.cpp
modules/juce_gui_basics/native/juce_ios_ContentSharer.cpp
modules/juce_gui_basics/native/juce_ios_FileChooser.mm
modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm
modules/juce_gui_basics/native/juce_ios_Windowing.mm
modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp
modules/juce_gui_basics/native/juce_mac_FileChooser.mm
modules/juce_gui_basics/native/juce_mac_MainMenu.mm
modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm
modules/juce_gui_basics/native/juce_mac_Windowing.mm
modules/juce_gui_basics/native/juce_win32_FileChooser.cpp
modules/juce_gui_basics/native/juce_win32_Windowing.cpp
modules/juce_gui_basics/properties/juce_MultiChoicePropertyComponent.cpp
modules/juce_gui_basics/properties/juce_TextPropertyComponent.h
modules/juce_gui_basics/widgets/juce_ComboBox.cpp
modules/juce_gui_basics/widgets/juce_ComboBox.h
modules/juce_gui_basics/widgets/juce_Label.cpp
modules/juce_gui_basics/widgets/juce_Label.h
modules/juce_gui_basics/widgets/juce_ListBox.cpp
modules/juce_gui_basics/widgets/juce_ListBox.h
modules/juce_gui_basics/widgets/juce_Slider.cpp
modules/juce_gui_basics/widgets/juce_Slider.h
modules/juce_gui_basics/widgets/juce_TableHeaderComponent.cpp
modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h
modules/juce_gui_basics/widgets/juce_TextEditor.cpp
modules/juce_gui_basics/widgets/juce_TextEditor.h
modules/juce_gui_basics/widgets/juce_Toolbar.h
modules/juce_gui_basics/widgets/juce_ToolbarItemComponent.h
modules/juce_gui_basics/widgets/juce_TreeView.cpp
modules/juce_gui_basics/widgets/juce_TreeView.h
modules/juce_gui_basics/windows/juce_AlertWindow.cpp
modules/juce_gui_basics/windows/juce_CallOutBox.cpp
modules/juce_gui_basics/windows/juce_ComponentPeer.cpp
modules/juce_gui_basics/windows/juce_ComponentPeer.h
modules/juce_gui_basics/windows/juce_DocumentWindow.h
modules/juce_gui_basics/windows/juce_ResizableWindow.h
modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h
modules/juce_gui_basics/windows/juce_TooltipWindow.cpp
modules/juce_gui_basics/windows/juce_TopLevelWindow.cpp
modules/juce_gui_basics/windows/juce_TopLevelWindow.h
modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.h
modules/juce_gui_extra/embedding/juce_ActiveXControlComponent.h
modules/juce_gui_extra/embedding/juce_AndroidViewComponent.h
modules/juce_gui_extra/embedding/juce_UIViewComponent.h
modules/juce_gui_extra/embedding/juce_XEmbedComponent.h
modules/juce_gui_extra/juce_gui_extra.h
modules/juce_gui_extra/misc/juce_ColourSelector.h
modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp
modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.h
modules/juce_gui_extra/misc/juce_LiveConstantEditor.h
modules/juce_gui_extra/misc/juce_PreferencesPanel.h
modules/juce_gui_extra/misc/juce_PushNotifications.h
modules/juce_gui_extra/misc/juce_SystemTrayIconComponent.h
modules/juce_gui_extra/misc/juce_WebBrowserComponent.h
modules/juce_gui_extra/native/juce_AndroidViewComponent.cpp
modules/juce_gui_extra/native/juce_android_PushNotifications.cpp
modules/juce_gui_extra/native/juce_android_WebBrowserComponent.cpp
modules/juce_gui_extra/native/juce_ios_PushNotifications.cpp
modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp
modules/juce_gui_extra/native/juce_linux_XEmbedComponent.cpp
modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm
modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp
modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp
modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp
modules/juce_gui_extra/native/juce_win32_SystemTrayIcon.cpp
modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp
modules/juce_opengl/geometry/juce_Draggable3DOrientation.h
modules/juce_opengl/juce_opengl.h
modules/juce_opengl/native/juce_OpenGL_win32.h
modules/juce_opengl/opengl/juce_OpenGLContext.cpp
modules/juce_opengl/opengl/juce_OpenGLContext.h
modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.cpp
modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.h
modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp
modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.h
modules/juce_opengl/opengl/juce_OpenGLImage.cpp
modules/juce_osc/juce_osc.cpp
modules/juce_osc/juce_osc.h
modules/juce_osc/osc/juce_OSCAddress.cpp
modules/juce_osc/osc/juce_OSCBundle.cpp
modules/juce_osc/osc/juce_OSCBundle.h
modules/juce_osc/osc/juce_OSCReceiver.cpp
modules/juce_osc/osc/juce_OSCReceiver.h
modules/juce_osc/osc/juce_OSCSender.h
modules/juce_product_unlocking/in_app_purchases/juce_InAppPurchases.h
modules/juce_product_unlocking/juce_product_unlocking.h
modules/juce_product_unlocking/marketplace/juce_OnlineUnlockForm.cpp
modules/juce_product_unlocking/marketplace/juce_OnlineUnlockForm.h
modules/juce_product_unlocking/marketplace/juce_OnlineUnlockStatus.cpp
modules/juce_product_unlocking/marketplace/juce_TracktionMarketplaceStatus.h
modules/juce_product_unlocking/native/juce_android_InAppPurchases.cpp
modules/juce_product_unlocking/native/juce_ios_InAppPurchases.cpp
modules/juce_video/capture/juce_CameraDevice.cpp
modules/juce_video/capture/juce_CameraDevice.h
modules/juce_video/juce_video.h
modules/juce_video/native/juce_android_CameraDevice.h
modules/juce_video/native/juce_ios_CameraDevice.h [new file with mode: 0644]
modules/juce_video/native/juce_mac_CameraDevice.h
modules/juce_video/native/juce_win32_CameraDevice.h
modules/juce_video/native/juce_win32_Video.h
modules/juce_video/playback/juce_VideoComponent.h

index c9c90571059fd2ae720bd770fff273cbc704cbe9..937d84996982dad76615c060b8143cffe13ee52e 100644 (file)
@@ -4,39 +4,86 @@ JUCE breaking changes
 Develop\r
 =======\r
 \r
+\r
+Version 5.3.2\r
+=============\r
+\r
+Change\r
+------\r
+The behaviour of an UndoManager used by an AudioProcessorValueTreeState has\r
+been improved.\r
+\r
+Possible Issues\r
+---------------\r
+If your plug-in contains an UndoManager used by an AudioProcessorValueTreeState\r
+and relies upon the old behaviour of the UndoManager then it is possible that\r
+the new behaviour is no longer appropriate for your use case.\r
+\r
+Workaround\r
+----------\r
+Use an external UndoManager to reproduce the old behaviour manually.\r
+\r
+Rationale\r
+---------\r
+This change fixes a few bugs in the behaviour of an UndoManager used by an\r
+AudioProcessorValueTreeState.\r
+\r
+\r
+Change\r
+------\r
+JUCE no longer supports OS X deployment targets earlier than 10.7.\r
+\r
+Possible Issues\r
+---------------\r
+If you were previously targeting OS X 10.5 or 10.6 you will no longer be able\r
+to build JUCE-based products compatible with those platforms.\r
+\r
+Workaround\r
+----------\r
+None. With the appropriate JUCE licence you may be able to backport new JUCE\r
+features, but there will be no official support for this.\r
+\r
+Rationale\r
+---------\r
+Increasing the minimum supported OS X version allows the JUCE codebase to make\r
+use of the more modern C++ features found in the 10.7 standard library, which\r
+in turn will increase thread and memory safety.\r
+\r
+\r
 Version 5.3.0\r
 =============\r
 \r
 Change\r
 ------\r
-The JUCE examples have been cleaned up, modernised and converted into \r
-PIPs (Projucer Instant Projects). The JUCE Demo has been removed and replaced by the \r
-DemoRunner application and larger projects such as the Audio Plugin Host and the \r
-Network Graphics Demo have been moved into the extras directory.\r
+The JUCE examples have been cleaned up, modernised and converted into PIPs\r
+(Projucer Instant Projects). The JUCE Demo has been removed and replaced by the\r
+DemoRunner application and larger projects such as the Audio Plugin Host and\r
+the Network Graphics Demo have been moved into the extras directory.\r
 \r
 Possible Issues\r
 ---------------\r
-1. Due to the large number of changes that have occured in the JUCE Git repository, \r
-pulling this version may result in a messy folder structure with empty directories \r
-that have been removed.\r
+1. Due to the large number of changes that have occured in the JUCE Git\r
+   repository, pulling this version may result in a messy folder structure with\r
+   empty directories that have been removed.\r
 2. The JUCE Demo project is no longer in the JUCE repository.\r
-3. The Audio Plugin Host project has moved from the examples directory to the extras\r
-directory.\r
+3. The Audio Plugin Host project has moved from the examples directory to the\r
+   extras directory.\r
 \r
 Workaround\r
 ----------\r
-1. Run a Git clean command (git clean -xdf) in your JUCE directory to remove all untracked \r
-files, directories and build products.\r
-2. The new DemoRunner application, located in extras/DemoRunner, can be used to preview\r
-all the JUCE examples and see the code side-by-side.\r
-3. Change any file paths that depended on the plugin host project being located in the examples\r
-directory to use the extras directory instead.\r
+1. Run a Git clean command (git clean -xdf) in your JUCE directory to remove\r
+   all untracked files, directories and build products.\r
+2. The new DemoRunner application, located in extras/DemoRunner, can be used to\r
+   preview all the JUCE examples and see the code side-by-side.\r
+3. Change any file paths that depended on the plugin host project being located\r
+   in the examples directory to use the extras directory instead.\r
 \r
 Rationale\r
 ---------\r
-The JUCE examples had inconsistent naming, coding styles and the projects and build products\r
-took up a large amount of space in the repository. Replacing them with PIPs reduces the file size\r
-and allows us to categorise the examples better, as well as cleaning up the code.\r
+The JUCE examples had inconsistent naming, coding styles and the projects and\r
+build products took up a large amount of space in the repository. Replacing\r
+them with PIPs reduces the file size and allows us to categorise the examples\r
+better, as well as cleaning up the code.\r
 \r
 \r
 Change\r
@@ -74,8 +121,8 @@ InAppPurchases object yourself.
 \r
 Possible Issues\r
 ---------------\r
-Any code using InAppPurchases needs to be updated to retrieve a singleton pointer\r
-to InAppPurchases.\r
+Any code using InAppPurchases needs to be updated to retrieve a singleton\r
+pointer to InAppPurchases.\r
 \r
 Workaround\r
 ----------\r
index 38978ff288d07e48648bb39292b6d0eee680038e..54ae34b6eef5e0c1e4cbff5204467058893b56dd 100644 (file)
@@ -3,7 +3,22 @@
 \r
 This file just lists the more notable headline features. For more detailed info\r
 about minor changes and bugfixes, please see the git log!\r
-
+\r
+Version 5.3.2\r
+  - Removed the OSX 10.5 and 10.6 deployment target options from the Projucer and enabled more C++11 features across all platforms\r
+  - Replaced all usage of ScopedPointer with std::unique_ptr\r
+  - Added camera support for iOS and Android\r
+  - Fixed some issues using an UndoManager with an AudioProcessorValueTreeState\r
+  - Added MIDI input to IAA plug-ins\r
+  - Made multiple calls to MidiInput::openDevice share the same underlying win32 MIDI handle\r
+  - Added a config flag to juce_audio_processors for enabling LADSPA plugin hosting and enabled it in the AudioPluginHost\r
+  - Added a "plug-in can do" callback to the VSTCallbackHandler interface\r
+  - Fixed various undefined behavior in SIMDRegister\r
+  - Added the methods AudioBlock::copyTo/AudioBlock::copyFrom which facilitate copying to/from an AudioBuffer\r
+  - Added a lambda callback to OpenGLGraphicsContextCustomShader to allow custom set-up when the shader is activated\r
+  - Fixed a bug causing an unintentional menu item highlight disco party when using a popup menu in a plug-in's UI\r
+  - Marked as deprecated: String::empty, var::null, File::nonexistent, ValueTree::invalid and other problematic statically-initialised null values\r
+\r
 Version 5.3.1\r
   - Add Android and iOS support to AudioPluginHost\r
   - Added support for Bela in the form of an AudioIODeviceType\r
@@ -21,7 +36,7 @@ Version 5.3.1
   - Added options for setting plugin categories and characteristics with MultiChoicePropertyComponent in the Projucer\r
   - Fixed a Projucer bug where the OSX base SDK version was not being set\r
   - Added a command-line option to use LF as linefeeds rather than CRLF in the Projucer cleanup tools\r
-  - Multiple documentation updates
+  - Multiple documentation updates\r
 \r
 Version 5.3.0\r
   - Added support for Android OBOE (developer preview)\r
index 3ec6f72a8a65b24cf32232d72c6994dd4d5791df..dc9dfcb59eb4b9c640d232f92eb610dd0e46b3e3 100644 (file)
@@ -602,7 +602,7 @@ private:
                     return;\r
                 }\r
 \r
-                fileChooser = new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif");\r
+                fileChooser.reset (new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif"));\r
 \r
                 fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles,\r
                                           [safeThis] (const FileChooser& fc) mutable\r
@@ -639,7 +639,7 @@ private:
         ToggleButton loopButton { "Loop File" };\r
 \r
         AudioFileReaderComponent& audioFileReader;\r
-        ScopedPointer<FileChooser> fileChooser;\r
+        std::unique_ptr<FileChooser> fileChooser;\r
     };\r
 \r
     //==============================================================================\r
@@ -671,10 +671,10 @@ private:
     uint32 currentBlockSize = 512;\r
     uint32 currentNumChannels = 2;\r
 \r
-    ScopedPointer<AudioFormatReader> reader;\r
-    ScopedPointer<AudioFormatReaderSource> readerSource;\r
-    ScopedPointer<AudioTransportSource> transportSource;\r
-    ScopedPointer<DSPDemo<DemoType>> currentDemo;\r
+    std::unique_ptr<AudioFormatReader> reader;\r
+    std::unique_ptr<AudioFormatReaderSource> readerSource;\r
+    std::unique_ptr<AudioTransportSource> transportSource;\r
+    std::unique_ptr<DSPDemo<DemoType>> currentDemo;\r
 \r
     AudioSourcePlayer audioSourcePlayer;\r
 \r
@@ -682,5 +682,5 @@ private:
 \r
     AudioBuffer<float> fileReadBuffer;\r
 \r
-    ScopedPointer<DemoParametersComponent> parametersComponent;\r
+    std::unique_ptr<DemoParametersComponent> parametersComponent;\r
 };\r
index 92108d8490bb9896268ed7c338dbbeb0d29f31d9..c6438e27edab4b84399199d38bed9b03ccf599d4 100644 (file)
@@ -54,6 +54,7 @@ inline File getExamplesDirectory() noexcept
     MemoryOutputStream mo;\r
 \r
     auto success = Base64::convertFromBase64 (mo, JUCE_STRINGIFY (PIP_JUCE_EXAMPLES_DIRECTORY));\r
+    ignoreUnused (success);\r
     jassert (success);\r
 \r
     return mo.toString();\r
@@ -82,6 +83,12 @@ inline InputStream* createAssetInputStream (const char* resourcePath)
    #if JUCE_IOS\r
     auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)\r
                           .getParentDirectory().getChildFile ("Assets");\r
+   #elif JUCE_MAC\r
+    auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)\r
+                          .getParentDirectory().getParentDirectory().getChildFile ("Resources").getChildFile ("Assets");\r
+\r
+    if (! assetsDir.exists())\r
+        assetsDir = getExamplesDirectory().getChildFile ("Assets");\r
    #else\r
     auto assetsDir = getExamplesDirectory().getChildFile ("Assets");\r
    #endif\r
@@ -100,7 +107,7 @@ inline Image getImageFromAssets (const char* assetName)
 \r
     if (img.isNull())\r
     {\r
-        ScopedPointer<InputStream> juceIconStream (createAssetInputStream (assetName));\r
+        std::unique_ptr<InputStream> juceIconStream (createAssetInputStream (assetName));\r
 \r
         if (juceIconStream == nullptr)\r
             return {};\r
@@ -115,7 +122,7 @@ inline Image getImageFromAssets (const char* assetName)
 \r
 inline String loadEntireAssetIntoString (const char* assetName)\r
 {\r
-    ScopedPointer<InputStream> input (createAssetInputStream (assetName));\r
+    std::unique_ptr<InputStream> input (createAssetInputStream (assetName));\r
 \r
     if (input == nullptr)\r
         return {};\r
index f2a05265154592b0328b9ec67e54c1d40b2766d3..696214ce57001071ab2063914f080c2a0d644ae1 100644 (file)
@@ -250,7 +250,7 @@ private:
         if (faceGroup.size() == 0)\r
             return nullptr;\r
 \r
-        ScopedPointer<Shape> shape (new Shape());\r
+        std::unique_ptr<Shape> shape (new Shape());\r
         shape->name = name;\r
         shape->material = material;\r
 \r
index 7920d453dedf19f75984536dd51ae8aecdb95c7f..45733d37d45eb02bbe682daef5dea59950dee326 100644 (file)
@@ -391,8 +391,8 @@ private:
     AudioDeviceManager& audioDeviceManager { getSharedAudioDeviceManager (1, 2) };\r
    #endif\r
 \r
-    ScopedPointer<LatencyTester> latencyTester;\r
-    ScopedPointer<LiveScrollingAudioDisplay> liveAudioScroller;\r
+    std::unique_ptr<LatencyTester> latencyTester;\r
+    std::unique_ptr<LiveScrollingAudioDisplay> liveAudioScroller;\r
 \r
     TextButton startTestButton  { "Test Latency" };\r
     TextEditor resultsBox;\r
index b0f942f9c7b83661a816d5207ac9fec5b5cacbcb..e4da079e728c80b5030684d8daf01731ce0dded6 100644 (file)
@@ -400,7 +400,7 @@ private:
     TimeSliceThread thread  { "audio file preview" };\r
 \r
    #if (JUCE_ANDROID || JUCE_IOS)\r
-    ScopedPointer<FileChooser> fileChooser;\r
+    std::unique_ptr<FileChooser> fileChooser;\r
     TextButton chooseFileButton {"Choose Audio File...", "Choose an audio file for playback"};\r
    #else\r
     DirectoryContentsList directoryList {nullptr, thread};\r
@@ -410,9 +410,9 @@ private:
     URL currentAudioFile;\r
     AudioSourcePlayer audioSourcePlayer;\r
     AudioTransportSource transportSource;\r
-    ScopedPointer<AudioFormatReaderSource> currentAudioFileSource;\r
+    std::unique_ptr<AudioFormatReaderSource> currentAudioFileSource;\r
 \r
-    ScopedPointer<DemoThumbnailComp> thumbnail;\r
+    std::unique_ptr<DemoThumbnailComp> thumbnail;\r
     Label zoomLabel   { {}, "zoom:" },\r
           explanation { {}, "Select an audio file in the treeview above, and this page will display its waveform, and let you play it.." };\r
     Slider zoomSlider                   { Slider::LinearHorizontal, Slider::NoTextBox };\r
@@ -487,7 +487,7 @@ private:
    #if (JUCE_ANDROID || JUCE_IOS)\r
     void buttonClicked (Button* btn) override\r
     {\r
-        if (btn == &chooseFileButton && fileChooser == nullptr)\r
+        if (btn == &chooseFileButton && fileChooser.get() == nullptr)\r
         {\r
             SafePointer<AudioPlaybackDemo> safeThis (this);\r
 \r
@@ -504,7 +504,7 @@ private:
 \r
             if (FileChooser::isPlatformDialogAvailable())\r
             {\r
-                fileChooser = new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif");\r
+                fileChooser.reset (new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif"));\r
 \r
                 fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles,\r
                                           [safeThis] (const FileChooser& fc) mutable\r
index 932832569d55d50a36df4a909f1be04137806896..8266a0d1d7c89a5966142108c29e788bad0c623a 100644 (file)
@@ -76,7 +76,7 @@ public:
         {\r
             // Create an OutputStream to write to our destination file...\r
             file.deleteFile();\r
-            ScopedPointer<FileOutputStream> fileStream (file.createOutputStream());\r
+            std::unique_ptr<FileOutputStream> fileStream (file.createOutputStream());\r
 \r
             if (fileStream.get() != nullptr)\r
             {\r
@@ -120,7 +120,7 @@ public:
 \r
     bool isRecording() const\r
     {\r
-        return activeWriter != nullptr;\r
+        return activeWriter.load() != nullptr;\r
     }\r
 \r
     //==============================================================================\r
@@ -140,9 +140,9 @@ public:
     {\r
         const ScopedLock sl (writerLock);\r
 \r
-        if (activeWriter != nullptr && numInputChannels >= thumbnail.getNumChannels())\r
+        if (activeWriter.load() != nullptr && numInputChannels >= thumbnail.getNumChannels())\r
         {\r
-            activeWriter->write (inputChannelData, numSamples);\r
+            activeWriter.load()->write (inputChannelData, numSamples);\r
 \r
             // Create an AudioBuffer to wrap our incoming data, note that this does no allocations or copies, it simply references our input data\r
             AudioBuffer<float> buffer (const_cast<float**> (inputChannelData), thumbnail.getNumChannels(), numSamples);\r
@@ -158,13 +158,13 @@ public:
 \r
 private:\r
     AudioThumbnail& thumbnail;\r
-    TimeSliceThread backgroundThread  { "Audio Recorder Thread" }; // the thread that will write our audio data to disk\r
-    ScopedPointer<AudioFormatWriter::ThreadedWriter> threadedWriter; // the FIFO used to buffer the incoming data\r
-    double sampleRate   = 0.0;\r
+    TimeSliceThread backgroundThread { "Audio Recorder Thread" }; // the thread that will write our audio data to disk\r
+    std::unique_ptr<AudioFormatWriter::ThreadedWriter> threadedWriter; // the FIFO used to buffer the incoming data\r
+    double sampleRate = 0.0;\r
     int64 nextSampleNum = 0;\r
 \r
     CriticalSection writerLock;\r
-    AudioFormatWriter::ThreadedWriter* volatile activeWriter = nullptr;\r
+    std::atomic<AudioFormatWriter::ThreadedWriter*> activeWriter { nullptr };\r
 };\r
 \r
 //==============================================================================\r
index 08ff2b9df319948a8e3f50dc4230a5342045e374..d93377bc0febec64cfa97e3e5c348297ac64f740 100644 (file)
@@ -143,7 +143,7 @@ private:
     AudioDeviceManager& audioDeviceManager { getSharedAudioDeviceManager() };\r
    #endif\r
 \r
-    ScopedPointer<AudioDeviceSelectorComponent> audioSetupComp;\r
+    std::unique_ptr<AudioDeviceSelectorComponent> audioSetupComp;\r
     TextEditor diagnosticsBox;\r
 \r
     void changeListenerCallback (ChangeBroadcaster*) override\r
index cfed6dfe5a1e997446f45d96f93862ebb3738c56..5e1e7cad52405d999661989c5872e067f416fe1e 100644 (file)
@@ -178,7 +178,7 @@ struct SynthAudioSource  : public AudioSource
     {\r
         WavAudioFormat wavFormat;\r
 \r
-        ScopedPointer<AudioFormatReader> audioReader (wavFormat.createReaderFor (createAssetInputStream ("cello.wav"), true));\r
+        std::unique_ptr<AudioFormatReader> audioReader (wavFormat.createReaderFor (createAssetInputStream ("cello.wav"), true));\r
 \r
         BigInteger allNotes;\r
         allNotes.setRange (0, 128, true);\r
index 6b6e33f2c45add44dccde4cbed4f3ba6371b5cff..4f576711eb2c9ca7c12fa6890235a2d75c6bba88 100644 (file)
@@ -53,10 +53,10 @@ struct MidiDeviceListEntry : ReferenceCountedObject
     MidiDeviceListEntry (const String& deviceName) : name (deviceName) {}\r
 \r
     String name;\r
-    ScopedPointer<MidiInput> inDevice;\r
-    ScopedPointer<MidiOutput> outDevice;\r
+    std::unique_ptr<MidiInput> inDevice;\r
+    std::unique_ptr<MidiOutput> outDevice;\r
 \r
-    typedef ReferenceCountedObjectPtr<MidiDeviceListEntry> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<MidiDeviceListEntry>;\r
 };\r
 \r
 //==============================================================================\r
@@ -476,8 +476,8 @@ private:
     TextEditor midiMonitor  { "MIDI Monitor" };\r
     TextButton pairButton   { "MIDI Bluetooth devices..." };\r
 \r
-    ScopedPointer<MidiDeviceListBox> midiInputSelector;\r
-    ScopedPointer<MidiDeviceListBox> midiOutputSelector;\r
+    std::unique_ptr<MidiDeviceListBox> midiInputSelector;\r
+    std::unique_ptr<MidiDeviceListBox> midiOutputSelector;\r
 \r
     ReferenceCountedArray<MidiDeviceListEntry> midiInputs;\r
     ReferenceCountedArray<MidiDeviceListEntry> midiOutputs;\r
index a2b241785e8c1d5bf54ea011d38b6a29872a80ae..5ea9708c255954a152cc4681a96112ef45a7036c 100644 (file)
@@ -305,7 +305,7 @@ public:
 \r
        #if JUCE_IOS\r
         connectButton.setButtonText ("Connect");\r
-        connectButton.onClick = [this] { BluetoothMidiDevicePairingDialogue::open(); };\r
+        connectButton.onClick = [] { BluetoothMidiDevicePairingDialogue::open(); };\r
         connectButton.setAlwaysOnTop (true);\r
         addAndMakeVisible (connectButton);\r
        #endif\r
index 9c064ffac82c19575d1065d7130303cbf024c007..7c32040b70743c1d59cc9f12d8eacdb8e6682263 100644 (file)
@@ -597,7 +597,7 @@ public:
 \r
        #if JUCE_IOS\r
         connectButton.setButtonText ("Connect");\r
-        connectButton.onClick = [this] { BluetoothMidiDevicePairingDialogue::open(); };\r
+        connectButton.onClick = [] { BluetoothMidiDevicePairingDialogue::open(); };\r
         connectButton.setAlwaysOnTop (true);\r
         addAndMakeVisible (connectButton);\r
        #endif\r
index b2ab1e1c6b63f96d967ad3f5d88246ccf7043f94..3476b759d4d9fa625ab90a2c34ef4f1c534ce1d7 100644 (file)
@@ -596,7 +596,7 @@ public:
 \r
        #if JUCE_IOS\r
         connectButton.setButtonText ("Connect");\r
-        connectButton.onClick = [this] { BluetoothMidiDevicePairingDialogue::open(); };\r
+        connectButton.onClick = [] { BluetoothMidiDevicePairingDialogue::open(); };\r
         addAndMakeVisible (connectButton);\r
        #endif\r
 \r
index 1391f4523171cd60d17febf32b2c52916156b56a..d9db0aef0bc50c0027c00723f37a9f1b7f4e203a 100644 (file)
@@ -88,7 +88,7 @@ struct ConvolutionDemoDSP
                 auto selectedType = cabinetTypeParameter->getCurrentSelectedID();\r
                 auto assetName = (selectedType == 2 ? "guitar_amp.wav" : "cassette_recorder.wav");\r
 \r
-                ScopedPointer<InputStream> assetInputStream (createAssetInputStream (assetName));\r
+                std::unique_ptr<InputStream> assetInputStream (createAssetInputStream (assetName));\r
                 if (assetInputStream != nullptr)\r
                 {\r
                     currentCabinetData.reset();\r
index d17ba27edfef25c74e0668429b1b38d4d5bd6ecd..da338865fe06a4394f25385a69b8fa8a201ed0fa 100644 (file)
@@ -124,7 +124,7 @@ struct SIMDRegisterDemoDSP
 \r
     //==============================================================================\r
     IIR::Coefficients<float>::Ptr iirCoefficients;\r
-    ScopedPointer<IIR::Filter<SIMDRegister<float>>> iir;\r
+    std::unique_ptr<IIR::Filter<SIMDRegister<float>>> iir;\r
 \r
     AudioBlock<SIMDRegister<float>> interleaved;\r
     AudioBlock<float> zero;\r
index e9de472a27f65db0a49a1e32c6cbeac64d044343..e6ad817f028e87a2495410dcf9e1cb02687c6ca6 100644 (file)
@@ -8,7 +8,7 @@ SET(BINARY_NAME "juce_jni")
 add_library("cpufeatures" STATIC "${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c")\r
 set_source_files_properties("${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c" PROPERTIES COMPILE_FLAGS "-Wno-sign-conversion -Wno-gnu-statement-expression")\r
 \r
-add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=23" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_roli_juce_demorunner_DemoRunner" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=\"com/roli/juce/demorunner/DemoRunner\"" "-DJUCE_ANDROID_SHARING_CONTENT_PROVIDER_CLASSNAME=com_roli_juce_demorunner_SharingContentProvider" "-DJUCE_ANDROID_SHARING_CONTENT_PROVIDER_CLASSPATH=\"com/roli/juce/demorunner/SharingContentProvider\"" "-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.3.1" "-DJUCE_APP_VERSION_HEX=0x50301")\r
+add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=23" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_juce_demorunner_DemoRunner" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=\"com/juce/demorunner/DemoRunner\"" "-DJUCE_ANDROID_SHARING_CONTENT_PROVIDER_CLASSNAME=com_juce_demorunner_SharingContentProvider" "-DJUCE_ANDROID_SHARING_CONTENT_PROVIDER_CLASSPATH=\"com/juce/demorunner/SharingContentProvider\"" "-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.3.2" "-DJUCE_APP_VERSION_HEX=0x50302")\r
 \r
 include_directories( AFTER\r
     "../../../JuceLibraryCode"\r
@@ -546,6 +546,7 @@ add_library( ${BINARY_NAME}
     "../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h"\r
     "../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h"\r
     "../../../../../modules/juce_core/containers/juce_SortedSet.h"\r
+    "../../../../../modules/juce_core/containers/juce_SparseSet.cpp"\r
     "../../../../../modules/juce_core/containers/juce_SparseSet.h"\r
     "../../../../../modules/juce_core/containers/juce_Variant.cpp"\r
     "../../../../../modules/juce_core/containers/juce_Variant.h"\r
@@ -796,6 +797,7 @@ add_library( ${BINARY_NAME}
     "../../../../../modules/juce_data_structures/juce_data_structures.h"\r
     "../../../../../modules/juce_dsp/containers/juce_AudioBlock.h"\r
     "../../../../../modules/juce_dsp/containers/juce_SIMDRegister.h"\r
+    "../../../../../modules/juce_dsp/containers/juce_SIMDRegister_Impl.h"\r
     "../../../../../modules/juce_dsp/containers/juce_SIMDRegister_test.cpp"\r
     "../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.cpp"\r
     "../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.h"\r
@@ -1465,6 +1467,7 @@ add_library( ${BINARY_NAME}
     "../../../../../modules/juce_video/capture/juce_CameraDevice.cpp"\r
     "../../../../../modules/juce_video/capture/juce_CameraDevice.h"\r
     "../../../../../modules/juce_video/native/juce_android_CameraDevice.h"\r
+    "../../../../../modules/juce_video/native/juce_ios_CameraDevice.h"\r
     "../../../../../modules/juce_video/native/juce_mac_CameraDevice.h"\r
     "../../../../../modules/juce_video/native/juce_mac_Video.h"\r
     "../../../../../modules/juce_video/native/juce_win32_CameraDevice.h"\r
@@ -2008,6 +2011,7 @@ set_source_files_properties("../../../../../modules/juce_core/containers/juce_Pr
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_SortedSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
+set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
@@ -2258,6 +2262,7 @@ set_source_files_properties("../../../../../modules/juce_data_structures/juce_da
 set_source_files_properties("../../../../../modules/juce_data_structures/juce_data_structures.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_AudioBlock.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_SIMDRegister.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
+set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_SIMDRegister_Impl.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_SIMDRegister_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
@@ -2927,6 +2932,7 @@ set_source_files_properties("../../../../../modules/juce_product_unlocking/juce_
 set_source_files_properties("../../../../../modules/juce_video/capture/juce_CameraDevice.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_video/capture/juce_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_video/native/juce_android_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
+set_source_files_properties("../../../../../modules/juce_video/native/juce_ios_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_video/native/juce_mac_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_video/native/juce_mac_Video.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_video/native/juce_win32_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
index 1bbe7b6c87ee3ac66f95487b5e1cc66f01a1069c..b2250b3f20515df5037b290341acab83d3c03569 100644 (file)
@@ -19,7 +19,7 @@ android {
     }\r
 \r
     defaultConfig {\r
-        applicationId "com.roli.juce.demorunner"\r
+        applicationId "com.juce.demorunner"\r
         minSdkVersion    23\r
         targetSdkVersion 23\r
         externalNativeBuild {\r
index b1d2d7dba6d76ffa47607dce05a1be4350f49ec2..6d7c487af092cd90c8b34a126b5d60df474129a5 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="5.3.1"
-          package="com.roli.juce.demorunner">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="5.3.2"
+          package="com.juce.demorunner">
   <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true"/>
   <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="23"/>
   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
@@ -9,18 +9,19 @@
   <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
   <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
   <uses-permission android:name="android.permission.BLUETOOTH"/>
+  <uses-permission android:name="android.permission.CAMERA"/>
   <uses-permission android:name="android.permission.RECORD_AUDIO"/>
   <uses-permission android:name="android.permission.INTERNET"/>
   <uses-feature android:glEsVersion="0x00030000" android:required="true"/>
   <application android:label="@string/app_name" android:icon="@drawable/icon" android:hardwareAccelerated="false">
     <activity android:name="DemoRunner" android:label="@string/app_name" android:configChanges="keyboardHidden|orientation|screenSize"
-              android:screenOrientation="userLandscape" android:launchMode="singleTask" android:hardwareAccelerated="true">
+              android:screenOrientation="unspecified" android:launchMode="singleTask" android:hardwareAccelerated="true">
       <intent-filter>
         <action android:name="android.intent.action.MAIN"/>
         <category android:name="android.intent.category.LAUNCHER"/>
       </intent-filter>
     </activity>
-    <provider android:name="com.roli.juce.demorunner.SharingContentProvider" android:authorities="com.roli.juce.demorunner.sharingcontentprovider"
+    <provider android:name="com.juce.demorunner.SharingContentProvider" android:authorities="com.juce.demorunner.sharingcontentprovider"
               android:grantUriPermissions="true" android:exported="false"/>
   </application>
 </manifest>
index 3ec6f72a8a65b24cf32232d72c6994dd4d5791df..dc9dfcb59eb4b9c640d232f92eb610dd0e46b3e3 100644 (file)
@@ -602,7 +602,7 @@ private:
                     return;\r
                 }\r
 \r
-                fileChooser = new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif");\r
+                fileChooser.reset (new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif"));\r
 \r
                 fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles,\r
                                           [safeThis] (const FileChooser& fc) mutable\r
@@ -639,7 +639,7 @@ private:
         ToggleButton loopButton { "Loop File" };\r
 \r
         AudioFileReaderComponent& audioFileReader;\r
-        ScopedPointer<FileChooser> fileChooser;\r
+        std::unique_ptr<FileChooser> fileChooser;\r
     };\r
 \r
     //==============================================================================\r
@@ -671,10 +671,10 @@ private:
     uint32 currentBlockSize = 512;\r
     uint32 currentNumChannels = 2;\r
 \r
-    ScopedPointer<AudioFormatReader> reader;\r
-    ScopedPointer<AudioFormatReaderSource> readerSource;\r
-    ScopedPointer<AudioTransportSource> transportSource;\r
-    ScopedPointer<DSPDemo<DemoType>> currentDemo;\r
+    std::unique_ptr<AudioFormatReader> reader;\r
+    std::unique_ptr<AudioFormatReaderSource> readerSource;\r
+    std::unique_ptr<AudioTransportSource> transportSource;\r
+    std::unique_ptr<DSPDemo<DemoType>> currentDemo;\r
 \r
     AudioSourcePlayer audioSourcePlayer;\r
 \r
@@ -682,5 +682,5 @@ private:
 \r
     AudioBuffer<float> fileReadBuffer;\r
 \r
-    ScopedPointer<DemoParametersComponent> parametersComponent;\r
+    std::unique_ptr<DemoParametersComponent> parametersComponent;\r
 };\r
index 92108d8490bb9896268ed7c338dbbeb0d29f31d9..c6438e27edab4b84399199d38bed9b03ccf599d4 100644 (file)
@@ -54,6 +54,7 @@ inline File getExamplesDirectory() noexcept
     MemoryOutputStream mo;\r
 \r
     auto success = Base64::convertFromBase64 (mo, JUCE_STRINGIFY (PIP_JUCE_EXAMPLES_DIRECTORY));\r
+    ignoreUnused (success);\r
     jassert (success);\r
 \r
     return mo.toString();\r
@@ -82,6 +83,12 @@ inline InputStream* createAssetInputStream (const char* resourcePath)
    #if JUCE_IOS\r
     auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)\r
                           .getParentDirectory().getChildFile ("Assets");\r
+   #elif JUCE_MAC\r
+    auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)\r
+                          .getParentDirectory().getParentDirectory().getChildFile ("Resources").getChildFile ("Assets");\r
+\r
+    if (! assetsDir.exists())\r
+        assetsDir = getExamplesDirectory().getChildFile ("Assets");\r
    #else\r
     auto assetsDir = getExamplesDirectory().getChildFile ("Assets");\r
    #endif\r
@@ -100,7 +107,7 @@ inline Image getImageFromAssets (const char* assetName)
 \r
     if (img.isNull())\r
     {\r
-        ScopedPointer<InputStream> juceIconStream (createAssetInputStream (assetName));\r
+        std::unique_ptr<InputStream> juceIconStream (createAssetInputStream (assetName));\r
 \r
         if (juceIconStream == nullptr)\r
             return {};\r
@@ -115,7 +122,7 @@ inline Image getImageFromAssets (const char* assetName)
 \r
 inline String loadEntireAssetIntoString (const char* assetName)\r
 {\r
-    ScopedPointer<InputStream> input (createAssetInputStream (assetName));\r
+    std::unique_ptr<InputStream> input (createAssetInputStream (assetName));\r
 \r
     if (input == nullptr)\r
         return {};\r
index f2a05265154592b0328b9ec67e54c1d40b2766d3..696214ce57001071ab2063914f080c2a0d644ae1 100644 (file)
@@ -250,7 +250,7 @@ private:
         if (faceGroup.size() == 0)\r
             return nullptr;\r
 \r
-        ScopedPointer<Shape> shape (new Shape());\r
+        std::unique_ptr<Shape> shape (new Shape());\r
         shape->name = name;\r
         shape->material = material;\r
 \r
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
new file mode 100644 (file)
index 0000000..6320a60
--- /dev/null
@@ -0,0 +1,2992 @@
+/*\r
+  ==============================================================================\r
+\r
+   This file is part of the JUCE library.\r
+   Copyright (c) 2017 - ROLI Ltd.\r
+\r
+   JUCE is an open source library subject to commercial or open-source\r
+   licensing.\r
+\r
+   The code included in this file is provided under the terms of the ISC license\r
+   http://www.isc.org/downloads/software-support-policy/isc-license. Permission\r
+   To use, copy, modify, and/or distribute this software for any purpose with or\r
+   without fee is hereby granted provided that the above copyright notice and\r
+   this permission notice appear in all copies.\r
+\r
+   JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r
+   EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r
+   DISCLAIMED.\r
+\r
+  ==============================================================================\r
+*/\r
+\r
+package com.juce.demorunner;\r
+\r
+import android.app.Activity;\r
+import android.app.AlertDialog;\r
+import android.content.DialogInterface;\r
+import android.content.Context;\r
+import android.content.Intent;\r
+import android.content.res.Configuration;\r
+import android.content.pm.PackageInfo;\r
+import android.content.pm.PackageManager;\r
+import android.hardware.camera2.*;\r
+import android.net.http.SslError;\r
+import android.net.Uri;\r
+import android.os.Bundle;\r
+import android.os.Looper;\r
+import android.os.Handler;\r
+import android.os.Message;\r
+import android.os.ParcelUuid;\r
+import android.os.Environment;\r
+import android.view.*;\r
+import android.view.inputmethod.BaseInputConnection;\r
+import android.view.inputmethod.EditorInfo;\r
+import android.view.inputmethod.InputConnection;\r
+import android.view.inputmethod.InputMethodManager;\r
+import android.graphics.*;\r
+import android.text.ClipboardManager;\r
+import android.text.InputType;\r
+import android.util.DisplayMetrics;\r
+import android.util.Log;\r
+import android.util.Pair;\r
+import android.webkit.SslErrorHandler;\r
+import android.webkit.WebChromeClient;\r
+import android.webkit.WebResourceError;\r
+import android.webkit.WebResourceRequest;\r
+import android.webkit.WebResourceResponse;\r
+import android.webkit.WebView;\r
+import android.webkit.WebViewClient;\r
+import java.lang.Runnable;\r
+import java.lang.ref.WeakReference;\r
+import java.lang.reflect.*;\r
+import java.util.*;\r
+import java.io.*;\r
+import java.net.URL;\r
+import java.net.HttpURLConnection;\r
+import android.media.AudioManager;\r
+import android.Manifest;\r
+import java.util.concurrent.CancellationException;\r
+import java.util.concurrent.Future;\r
+import java.util.concurrent.Executors;\r
+import java.util.concurrent.ExecutorService;\r
+import java.util.concurrent.ExecutionException;\r
+import java.util.concurrent.TimeUnit;\r
+import java.util.concurrent.Callable;\r
+import java.util.concurrent.TimeoutException;\r
+import java.util.concurrent.locks.ReentrantLock;\r
+import java.util.concurrent.atomic.*;\r
+\r
+import android.media.midi.*;\r
+import android.bluetooth.*;\r
+import android.bluetooth.le.*;\r
+\r
+\r
+//==============================================================================\r
+public class DemoRunner   extends Activity\r
+{\r
+    //==============================================================================\r
+    static\r
+    {\r
+        System.loadLibrary ("juce_jni");\r
+    }\r
+\r
+    //==============================================================================\r
+    public boolean isPermissionDeclaredInManifest (int permissionID)\r
+    {\r
+        String permissionToCheck = getAndroidPermissionName(permissionID);\r
+\r
+        try\r
+        {\r
+            PackageInfo info = getPackageManager().getPackageInfo(getApplicationContext().getPackageName(), PackageManager.GET_PERMISSIONS);\r
+\r
+            if (info.requestedPermissions != null)\r
+                for (String permission : info.requestedPermissions)\r
+                    if (permission.equals (permissionToCheck))\r
+                        return true;\r
+        }\r
+        catch (PackageManager.NameNotFoundException e)\r
+        {\r
+            Log.d ("JUCE", "isPermissionDeclaredInManifest: PackageManager.NameNotFoundException = " + e.toString());\r
+        }\r
+\r
+        Log.d ("JUCE", "isPermissionDeclaredInManifest: could not find requested permission " + permissionToCheck);\r
+        return false;\r
+    }\r
+\r
+    //==============================================================================\r
+    // these have to match the values of enum PermissionID in C++ class RuntimePermissions:\r
+    private static final int JUCE_PERMISSIONS_RECORD_AUDIO = 1;\r
+    private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2;\r
+    private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3;\r
+    private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4;\r
+    private static final int JUCE_PERMISSIONS_CAMERA = 5;\r
+\r
+    private static String getAndroidPermissionName (int permissionID)\r
+    {\r
+        switch (permissionID)\r
+        {\r
+            case JUCE_PERMISSIONS_RECORD_AUDIO:           return Manifest.permission.RECORD_AUDIO;\r
+            case JUCE_PERMISSIONS_BLUETOOTH_MIDI:         return Manifest.permission.ACCESS_COARSE_LOCATION;\r
+                                                          // use string value as this is not defined in SDKs < 16\r
+            case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE:  return "android.permission.READ_EXTERNAL_STORAGE";\r
+            case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE;\r
+            case JUCE_PERMISSIONS_CAMERA:                 return Manifest.permission.CAMERA;\r
+        }\r
+\r
+        // unknown permission ID!\r
+        assert false;\r
+        return new String();\r
+    }\r
+\r
+    public boolean isPermissionGranted (int permissionID)\r
+    {\r
+        return getApplicationContext().checkCallingOrSelfPermission (getAndroidPermissionName (permissionID)) == PackageManager.PERMISSION_GRANTED;\r
+    }\r
+\r
+    private Map<Integer, Long> permissionCallbackPtrMap;\r
+\r
+    public void requestRuntimePermission (int permissionID, long ptrToCallback)\r
+    {\r
+        String permissionName = getAndroidPermissionName (permissionID);\r
+\r
+        if (getApplicationContext().checkCallingOrSelfPermission (permissionName) != PackageManager.PERMISSION_GRANTED)\r
+        {\r
+            // remember callbackPtr, request permissions, and let onRequestPermissionResult call callback asynchronously\r
+            permissionCallbackPtrMap.put (permissionID, ptrToCallback);\r
+            requestPermissionsCompat (new String[]{permissionName}, permissionID);\r
+        }\r
+        else\r
+        {\r
+            // permissions were already granted before, we can call callback directly\r
+            androidRuntimePermissionsCallback (true, ptrToCallback);\r
+        }\r
+    }\r
+\r
+    private native void androidRuntimePermissionsCallback (boolean permissionWasGranted, long ptrToCallback);\r
+\r
+    @Override\r
+    public void onRequestPermissionsResult (int permissionID, String permissions[], int[] grantResults)\r
+    {\r
+        boolean permissionsGranted = (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED);\r
+\r
+        if (! permissionsGranted)\r
+            Log.d ("JUCE", "onRequestPermissionsResult: runtime permission was DENIED: " + getAndroidPermissionName (permissionID));\r
+\r
+        Long ptrToCallback = permissionCallbackPtrMap.get (permissionID);\r
+        permissionCallbackPtrMap.remove (permissionID);\r
+        androidRuntimePermissionsCallback (permissionsGranted, ptrToCallback);\r
+    }\r
+\r
+    //==============================================================================\r
+    public interface JuceMidiPort\r
+    {\r
+        boolean isInputPort();\r
+\r
+        // start, stop does nothing on an output port\r
+        void start();\r
+        void stop();\r
+\r
+        void close();\r
+\r
+        // send will do nothing on an input port\r
+        void sendMidi (byte[] msg, int offset, int count);\r
+    }\r
+\r
+    //==============================================================================\r
+    //==============================================================================\r
+    public class BluetoothManager extends ScanCallback\r
+    {\r
+        BluetoothManager()\r
+        {\r
+        }\r
+\r
+        public String[] getMidiBluetoothAddresses()\r
+        {\r
+            return bluetoothMidiDevices.toArray (new String[bluetoothMidiDevices.size()]);\r
+        }\r
+\r
+        public String getHumanReadableStringForBluetoothAddress (String address)\r
+        {\r
+            BluetoothDevice btDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice (address);\r
+            return btDevice.getName();\r
+        }\r
+\r
+        public int getBluetoothDeviceStatus (String address)\r
+        {\r
+            return getAndroidMidiDeviceManager().getBluetoothDeviceStatus (address);\r
+        }\r
+\r
+        public void startStopScan (boolean shouldStart)\r
+        {\r
+            BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\r
+\r
+            if (bluetoothAdapter == null)\r
+            {\r
+                Log.d ("JUCE", "BluetoothManager error: could not get default Bluetooth adapter");\r
+                return;\r
+            }\r
+\r
+            BluetoothLeScanner bluetoothLeScanner = bluetoothAdapter.getBluetoothLeScanner();\r
+\r
+            if (bluetoothLeScanner == null)\r
+            {\r
+                Log.d ("JUCE", "BluetoothManager error: could not get Bluetooth LE scanner");\r
+                return;\r
+            }\r
+\r
+            if (shouldStart)\r
+            {\r
+                ScanFilter.Builder scanFilterBuilder = new ScanFilter.Builder();\r
+                scanFilterBuilder.setServiceUuid (ParcelUuid.fromString (bluetoothLEMidiServiceUUID));\r
+\r
+                ScanSettings.Builder scanSettingsBuilder = new ScanSettings.Builder();\r
+                scanSettingsBuilder.setCallbackType (ScanSettings.CALLBACK_TYPE_ALL_MATCHES)\r
+                                   .setScanMode (ScanSettings.SCAN_MODE_LOW_POWER)\r
+                                   .setScanMode (ScanSettings.MATCH_MODE_STICKY);\r
+\r
+                bluetoothLeScanner.startScan (Arrays.asList (scanFilterBuilder.build()),\r
+                                              scanSettingsBuilder.build(),\r
+                                              this);\r
+            }\r
+            else\r
+            {\r
+                bluetoothLeScanner.stopScan (this);\r
+            }\r
+        }\r
+\r
+        public boolean pairBluetoothMidiDevice(String address)\r
+        {\r
+            BluetoothDevice btDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice (address);\r
+\r
+            if (btDevice == null)\r
+            {\r
+                Log.d ("JUCE", "failed to create buletooth device from address");\r
+                return false;\r
+            }\r
+\r
+            return getAndroidMidiDeviceManager().pairBluetoothDevice (btDevice);\r
+        }\r
+\r
+        public void unpairBluetoothMidiDevice (String address)\r
+        {\r
+            getAndroidMidiDeviceManager().unpairBluetoothDevice (address);\r
+        }\r
+\r
+        public void onScanFailed (int errorCode)\r
+        {\r
+        }\r
+\r
+        public void onScanResult (int callbackType, ScanResult result)\r
+        {\r
+            if (callbackType == ScanSettings.CALLBACK_TYPE_ALL_MATCHES\r
+                 || callbackType == ScanSettings.CALLBACK_TYPE_FIRST_MATCH)\r
+            {\r
+                BluetoothDevice device = result.getDevice();\r
+\r
+                if (device != null)\r
+                    bluetoothMidiDevices.add (device.getAddress());\r
+            }\r
+\r
+            if (callbackType == ScanSettings.CALLBACK_TYPE_MATCH_LOST)\r
+            {\r
+                Log.d ("JUCE", "ScanSettings.CALLBACK_TYPE_MATCH_LOST");\r
+                BluetoothDevice device = result.getDevice();\r
+\r
+                if (device != null)\r
+                {\r
+                    bluetoothMidiDevices.remove (device.getAddress());\r
+                    unpairBluetoothMidiDevice (device.getAddress());\r
+                }\r
+            }\r
+        }\r
+\r
+        public void onBatchScanResults (List<ScanResult> results)\r
+        {\r
+            for (ScanResult result : results)\r
+                onScanResult (ScanSettings.CALLBACK_TYPE_ALL_MATCHES, result);\r
+        }\r
+\r
+        private BluetoothLeScanner scanner;\r
+        private static final String bluetoothLEMidiServiceUUID = "03B80E5A-EDE8-4B33-A751-6CE34EC4C700";\r
+\r
+        private HashSet<String> bluetoothMidiDevices = new HashSet<String>();\r
+    }\r
+\r
+    public static class JuceMidiInputPort extends MidiReceiver implements JuceMidiPort\r
+    {\r
+        private native void handleReceive (long host, byte[] msg, int offset, int count, long timestamp);\r
+\r
+        public JuceMidiInputPort (MidiDeviceManager mm, MidiOutputPort actualPort, MidiPortPath portPathToUse, long hostToUse)\r
+        {\r
+            owner = mm;\r
+            androidPort = actualPort;\r
+            portPath = portPathToUse;\r
+            juceHost = hostToUse;\r
+            isConnected = false;\r
+        }\r
+\r
+        @Override\r
+        protected void finalize() throws Throwable\r
+        {\r
+            close();\r
+            super.finalize();\r
+        }\r
+\r
+        @Override\r
+        public boolean isInputPort()\r
+        {\r
+            return true;\r
+        }\r
+\r
+        @Override\r
+        public void start()\r
+        {\r
+            if (owner != null && androidPort != null && ! isConnected) {\r
+                androidPort.connect(this);\r
+                isConnected = true;\r
+            }\r
+        }\r
+\r
+        @Override\r
+        public void stop()\r
+        {\r
+            if (owner != null && androidPort != null && isConnected) {\r
+                androidPort.disconnect(this);\r
+                isConnected = false;\r
+            }\r
+        }\r
+\r
+        @Override\r
+        public void close()\r
+        {\r
+            if (androidPort != null) {\r
+                try {\r
+                    androidPort.close();\r
+                } catch (IOException exception) {\r
+                    Log.d("JUCE", "IO Exception while closing port");\r
+                }\r
+            }\r
+\r
+            if (owner != null)\r
+                owner.removePort (portPath);\r
+\r
+            owner = null;\r
+            androidPort = null;\r
+        }\r
+\r
+        @Override\r
+        public void onSend (byte[] msg, int offset, int count, long timestamp)\r
+        {\r
+            if (count > 0)\r
+                handleReceive (juceHost, msg, offset, count, timestamp);\r
+        }\r
+\r
+        @Override\r
+        public void onFlush()\r
+        {}\r
+\r
+        @Override\r
+        public void sendMidi (byte[] msg, int offset, int count)\r
+        {\r
+        }\r
+\r
+        MidiDeviceManager owner;\r
+        MidiOutputPort androidPort;\r
+        MidiPortPath portPath;\r
+        long juceHost;\r
+        boolean isConnected;\r
+    }\r
+\r
+    public static class JuceMidiOutputPort implements JuceMidiPort\r
+    {\r
+        public JuceMidiOutputPort (MidiDeviceManager mm, MidiInputPort actualPort, MidiPortPath portPathToUse)\r
+        {\r
+            owner = mm;\r
+            androidPort = actualPort;\r
+            portPath = portPathToUse;\r
+        }\r
+\r
+        @Override\r
+        protected void finalize() throws Throwable\r
+        {\r
+            close();\r
+            super.finalize();\r
+        }\r
+\r
+        @Override\r
+        public boolean isInputPort()\r
+        {\r
+            return false;\r
+        }\r
+\r
+        @Override\r
+        public void start()\r
+        {\r
+        }\r
+\r
+        @Override\r
+        public void stop()\r
+        {\r
+        }\r
+\r
+        @Override\r
+        public void sendMidi (byte[] msg, int offset, int count)\r
+        {\r
+            if (androidPort != null)\r
+            {\r
+                try {\r
+                    androidPort.send(msg, offset, count);\r
+                } catch (IOException exception)\r
+                {\r
+                    Log.d ("JUCE", "send midi had IO exception");\r
+                }\r
+            }\r
+        }\r
+\r
+        @Override\r
+        public void close()\r
+        {\r
+            if (androidPort != null) {\r
+                try {\r
+                    androidPort.close();\r
+                } catch (IOException exception) {\r
+                    Log.d("JUCE", "IO Exception while closing port");\r
+                }\r
+            }\r
+\r
+            if (owner != null)\r
+                owner.removePort (portPath);\r
+\r
+            owner = null;\r
+            androidPort = null;\r
+        }\r
+\r
+        MidiDeviceManager owner;\r
+        MidiInputPort androidPort;\r
+        MidiPortPath portPath;\r
+    }\r
+\r
+    private static class MidiPortPath extends Object\r
+    {\r
+        public MidiPortPath (int deviceIdToUse, boolean direction, int androidIndex)\r
+        {\r
+            deviceId = deviceIdToUse;\r
+            isInput = direction;\r
+            portIndex = androidIndex;\r
+\r
+        }\r
+\r
+        public int deviceId;\r
+        public int portIndex;\r
+        public boolean isInput;\r
+\r
+        @Override\r
+        public int hashCode()\r
+        {\r
+            Integer i = new Integer ((deviceId * 128) + (portIndex < 128 ? portIndex : 127));\r
+            return i.hashCode() * (isInput ? -1 : 1);\r
+        }\r
+\r
+        @Override\r
+        public boolean equals (Object obj)\r
+        {\r
+            if (obj == null)\r
+                return false;\r
+\r
+            if (getClass() != obj.getClass())\r
+                return false;\r
+\r
+            MidiPortPath other = (MidiPortPath) obj;\r
+            return (portIndex == other.portIndex && isInput == other.isInput && deviceId == other.deviceId);\r
+        }\r
+    }\r
+\r
+    //==============================================================================\r
+    public class MidiDeviceManager extends MidiManager.DeviceCallback implements MidiManager.OnDeviceOpenedListener\r
+    {\r
+        //==============================================================================\r
+        private class DummyBluetoothGattCallback extends BluetoothGattCallback\r
+        {\r
+            public DummyBluetoothGattCallback (MidiDeviceManager mm)\r
+            {\r
+                super();\r
+                owner = mm;\r
+            }\r
+\r
+            public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState)\r
+            {\r
+                if (newState == BluetoothProfile.STATE_CONNECTED)\r
+                {\r
+                    gatt.requestConnectionPriority(BluetoothGatt.CONNECTION_PRIORITY_HIGH);\r
+                    owner.pairBluetoothDeviceStepTwo (gatt.getDevice());\r
+                }\r
+            }\r
+            public void onServicesDiscovered(BluetoothGatt gatt, int status) {}\r
+            public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {}\r
+            public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {}\r
+            public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {}\r
+            public void onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {}\r
+            public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {}\r
+            public void onReliableWriteCompleted(BluetoothGatt gatt, int status) {}\r
+            public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) {}\r
+            public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) {}\r
+\r
+            private MidiDeviceManager owner;\r
+        }\r
+\r
+        //==============================================================================\r
+        private class MidiDeviceOpenTask extends java.util.TimerTask\r
+        {\r
+            public MidiDeviceOpenTask (MidiDeviceManager deviceManager, MidiDevice device, BluetoothGatt gattToUse)\r
+            {\r
+                owner = deviceManager;\r
+                midiDevice = device;\r
+                btGatt = gattToUse;\r
+            }\r
+\r
+            @Override\r
+            public boolean cancel()\r
+            {\r
+                synchronized (MidiDeviceOpenTask.class)\r
+                {\r
+                    owner = null;\r
+                    boolean retval = super.cancel();\r
+\r
+                    if (btGatt != null)\r
+                    {\r
+                        btGatt.disconnect();\r
+                        btGatt.close();\r
+\r
+                        btGatt = null;\r
+                    }\r
+\r
+                    if (midiDevice != null)\r
+                    {\r
+                        try\r
+                        {\r
+                            midiDevice.close();\r
+                        }\r
+                        catch (IOException e)\r
+                        {}\r
+\r
+                        midiDevice = null;\r
+                    }\r
+\r
+                    return retval;\r
+                }\r
+            }\r
+\r
+            public String getBluetoothAddress()\r
+            {\r
+                synchronized (MidiDeviceOpenTask.class)\r
+                {\r
+                    if (midiDevice != null)\r
+                    {\r
+                        MidiDeviceInfo info = midiDevice.getInfo();\r
+                        if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH)\r
+                        {\r
+                            BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE);\r
+                            if (btDevice != null)\r
+                                return btDevice.getAddress();\r
+                        }\r
+                    }\r
+                }\r
+\r
+                return "";\r
+            }\r
+\r
+            public BluetoothGatt getGatt() { return btGatt; }\r
+\r
+            public int getID()\r
+            {\r
+                return midiDevice.getInfo().getId();\r
+            }\r
+\r
+            @Override\r
+            public void run()\r
+            {\r
+                synchronized (MidiDeviceOpenTask.class)\r
+                {\r
+                    if (owner != null && midiDevice != null)\r
+                        owner.onDeviceOpenedDelayed (midiDevice);\r
+                }\r
+            }\r
+\r
+            private MidiDeviceManager owner;\r
+            private MidiDevice midiDevice;\r
+            private BluetoothGatt btGatt;\r
+        }\r
+\r
+        //==============================================================================\r
+        public MidiDeviceManager()\r
+        {\r
+            manager = (MidiManager) getSystemService (MIDI_SERVICE);\r
+\r
+            if (manager == null)\r
+            {\r
+                Log.d ("JUCE", "MidiDeviceManager error: could not get MidiManager system service");\r
+                return;\r
+            }\r
+\r
+            openPorts = new HashMap<MidiPortPath, WeakReference<JuceMidiPort>> ();\r
+            midiDevices = new ArrayList<Pair<MidiDevice,BluetoothGatt>>();\r
+            openTasks = new HashMap<Integer, MidiDeviceOpenTask>();\r
+            btDevicesPairing = new HashMap<String, BluetoothGatt>();\r
+\r
+            MidiDeviceInfo[] foundDevices = manager.getDevices();\r
+            for (MidiDeviceInfo info : foundDevices)\r
+                onDeviceAdded (info);\r
+\r
+            manager.registerDeviceCallback (this, null);\r
+        }\r
+\r
+        protected void finalize() throws Throwable\r
+        {\r
+            manager.unregisterDeviceCallback (this);\r
+\r
+            synchronized (MidiDeviceManager.class)\r
+            {\r
+                btDevicesPairing.clear();\r
+\r
+                for (Integer deviceID : openTasks.keySet())\r
+                    openTasks.get (deviceID).cancel();\r
+\r
+                openTasks = null;\r
+            }\r
+\r
+            for (MidiPortPath key : openPorts.keySet())\r
+                openPorts.get (key).get().close();\r
+\r
+            openPorts = null;\r
+\r
+            for (Pair<MidiDevice, BluetoothGatt> device : midiDevices)\r
+            {\r
+                if (device.second != null)\r
+                {\r
+                    device.second.disconnect();\r
+                    device.second.close();\r
+                }\r
+\r
+                device.first.close();\r
+            }\r
+\r
+            midiDevices.clear();\r
+\r
+            super.finalize();\r
+        }\r
+\r
+        public String[] getJuceAndroidMidiInputDevices()\r
+        {\r
+            return getJuceAndroidMidiDevices (MidiDeviceInfo.PortInfo.TYPE_OUTPUT);\r
+        }\r
+\r
+        public String[] getJuceAndroidMidiOutputDevices()\r
+        {\r
+            return getJuceAndroidMidiDevices (MidiDeviceInfo.PortInfo.TYPE_INPUT);\r
+        }\r
+\r
+        private String[] getJuceAndroidMidiDevices (int portType)\r
+        {\r
+            // only update the list when JUCE asks for a new list\r
+            synchronized (MidiDeviceManager.class)\r
+            {\r
+                deviceInfos = getDeviceInfos();\r
+            }\r
+\r
+            ArrayList<String> portNames = new ArrayList<String>();\r
+\r
+            int index = 0;\r
+            for (MidiPortPath portInfo = getPortPathForJuceIndex (portType, index); portInfo != null; portInfo = getPortPathForJuceIndex (portType, ++index))\r
+                portNames.add (getPortName (portInfo));\r
+\r
+            String[] names = new String[portNames.size()];\r
+            return portNames.toArray (names);\r
+        }\r
+\r
+        private JuceMidiPort openMidiPortWithJuceIndex (int index, long host, boolean isInput)\r
+        {\r
+            synchronized (MidiDeviceManager.class)\r
+            {\r
+                int portTypeToFind = (isInput ? MidiDeviceInfo.PortInfo.TYPE_OUTPUT : MidiDeviceInfo.PortInfo.TYPE_INPUT);\r
+                MidiPortPath portInfo = getPortPathForJuceIndex (portTypeToFind, index);\r
+\r
+                if (portInfo != null)\r
+                {\r
+                    // ports must be opened exclusively!\r
+                    if (openPorts.containsKey (portInfo))\r
+                        return null;\r
+\r
+                    Pair<MidiDevice,BluetoothGatt> devicePair = getMidiDevicePairForId (portInfo.deviceId);\r
+\r
+                    if (devicePair != null)\r
+                    {\r
+                        MidiDevice device = devicePair.first;\r
+                        if (device != null)\r
+                        {\r
+                            JuceMidiPort juceMidiPort = null;\r
+\r
+                            if (isInput)\r
+                            {\r
+                                MidiOutputPort outputPort = device.openOutputPort(portInfo.portIndex);\r
+\r
+                                if (outputPort != null)\r
+                                    juceMidiPort = new JuceMidiInputPort(this, outputPort, portInfo, host);\r
+                            }\r
+                            else\r
+                            {\r
+                                MidiInputPort inputPort = device.openInputPort(portInfo.portIndex);\r
+\r
+                                if (inputPort != null)\r
+                                    juceMidiPort = new JuceMidiOutputPort(this, inputPort, portInfo);\r
+                            }\r
+\r
+                            if (juceMidiPort != null)\r
+                            {\r
+                                openPorts.put(portInfo, new WeakReference<JuceMidiPort>(juceMidiPort));\r
+\r
+                                return juceMidiPort;\r
+                            }\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+\r
+            return null;\r
+        }\r
+\r
+        public JuceMidiPort openMidiInputPortWithJuceIndex (int index, long host)\r
+        {\r
+            return openMidiPortWithJuceIndex (index, host, true);\r
+        }\r
+\r
+        public JuceMidiPort openMidiOutputPortWithJuceIndex (int index)\r
+        {\r
+            return openMidiPortWithJuceIndex (index, 0, false);\r
+        }\r
+\r
+        /* 0: unpaired, 1: paired, 2: pairing */\r
+        public int getBluetoothDeviceStatus (String address)\r
+        {\r
+            synchronized (MidiDeviceManager.class)\r
+            {\r
+                if (! address.isEmpty())\r
+                {\r
+                    if (findMidiDeviceForBluetoothAddress (address) != null)\r
+                        return 1;\r
+\r
+                    if (btDevicesPairing.containsKey (address))\r
+                        return 2;\r
+\r
+                    if (findOpenTaskForBluetoothAddress (address) != null)\r
+                        return 2;\r
+                }\r
+            }\r
+\r
+            return 0;\r
+        }\r
+\r
+        public boolean pairBluetoothDevice (BluetoothDevice btDevice)\r
+        {\r
+            String btAddress = btDevice.getAddress();\r
+            if (btAddress.isEmpty())\r
+                return false;\r
+\r
+            synchronized (MidiDeviceManager.class)\r
+            {\r
+                if (getBluetoothDeviceStatus (btAddress) != 0)\r
+                    return false;\r
+\r
+\r
+                btDevicesPairing.put (btDevice.getAddress(), null);\r
+                BluetoothGatt gatt = btDevice.connectGatt (getApplicationContext(), true, new DummyBluetoothGattCallback (this));\r
+\r
+                if (gatt != null)\r
+                {\r
+                    btDevicesPairing.put (btDevice.getAddress(), gatt);\r
+                }\r
+                else\r
+                {\r
+                    pairBluetoothDeviceStepTwo (btDevice);\r
+                }\r
+            }\r
+\r
+            return true;\r
+        }\r
+\r
+        public void pairBluetoothDeviceStepTwo (BluetoothDevice btDevice)\r
+        {\r
+            manager.openBluetoothDevice(btDevice, this, null);\r
+        }\r
+\r
+        public void unpairBluetoothDevice (String address)\r
+        {\r
+            if (address.isEmpty())\r
+                return;\r
+\r
+            synchronized (MidiDeviceManager.class)\r
+            {\r
+                if (btDevicesPairing.containsKey (address))\r
+                {\r
+                    BluetoothGatt gatt = btDevicesPairing.get (address);\r
+                    if (gatt != null)\r
+                    {\r
+                        gatt.disconnect();\r
+                        gatt.close();\r
+                    }\r
+\r
+                    btDevicesPairing.remove (address);\r
+                }\r
+\r
+                MidiDeviceOpenTask openTask = findOpenTaskForBluetoothAddress (address);\r
+                if (openTask != null)\r
+                {\r
+                    int deviceID = openTask.getID();\r
+                    openTask.cancel();\r
+                    openTasks.remove (deviceID);\r
+                }\r
+\r
+                Pair<MidiDevice, BluetoothGatt> midiDevicePair = findMidiDeviceForBluetoothAddress (address);\r
+                if (midiDevicePair != null)\r
+                {\r
+                    MidiDevice midiDevice = midiDevicePair.first;\r
+                    onDeviceRemoved (midiDevice.getInfo());\r
+\r
+                    try {\r
+                        midiDevice.close();\r
+                    }\r
+                    catch (IOException exception)\r
+                    {\r
+                        Log.d ("JUCE", "IOException while closing midi device");\r
+                    }\r
+                }\r
+            }\r
+        }\r
+\r
+        private Pair<MidiDevice, BluetoothGatt> findMidiDeviceForBluetoothAddress (String address)\r
+        {\r
+            for (Pair<MidiDevice,BluetoothGatt> midiDevice : midiDevices)\r
+            {\r
+                MidiDeviceInfo info = midiDevice.first.getInfo();\r
+                if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH)\r
+                {\r
+                    BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE);\r
+                    if (btDevice != null && btDevice.getAddress().equals (address))\r
+                        return midiDevice;\r
+                }\r
+            }\r
+\r
+            return null;\r
+        }\r
+\r
+        private MidiDeviceOpenTask findOpenTaskForBluetoothAddress (String address)\r
+        {\r
+            for (Integer deviceID : openTasks.keySet())\r
+            {\r
+                MidiDeviceOpenTask openTask = openTasks.get (deviceID);\r
+                if (openTask.getBluetoothAddress().equals (address))\r
+                    return openTask;\r
+            }\r
+\r
+            return null;\r
+        }\r
+\r
+        public void removePort (MidiPortPath path)\r
+        {\r
+            openPorts.remove (path);\r
+        }\r
+\r
+        public String getInputPortNameForJuceIndex (int index)\r
+        {\r
+            MidiPortPath portInfo = getPortPathForJuceIndex (MidiDeviceInfo.PortInfo.TYPE_OUTPUT, index);\r
+            if (portInfo != null)\r
+                return getPortName (portInfo);\r
+\r
+            return "";\r
+        }\r
+\r
+        public String getOutputPortNameForJuceIndex (int index)\r
+        {\r
+            MidiPortPath portInfo = getPortPathForJuceIndex (MidiDeviceInfo.PortInfo.TYPE_INPUT, index);\r
+            if (portInfo != null)\r
+                return getPortName (portInfo);\r
+\r
+            return "";\r
+        }\r
+\r
+        public void onDeviceAdded (MidiDeviceInfo info)\r
+        {\r
+            // only add standard midi devices\r
+            if (info.getType() == info.TYPE_BLUETOOTH)\r
+                return;\r
+\r
+            manager.openDevice (info, this, null);\r
+        }\r
+\r
+        public void onDeviceRemoved (MidiDeviceInfo info)\r
+        {\r
+            synchronized (MidiDeviceManager.class)\r
+            {\r
+                Pair<MidiDevice, BluetoothGatt> devicePair = getMidiDevicePairForId (info.getId());\r
+\r
+                if (devicePair != null)\r
+                {\r
+                    MidiDevice midiDevice = devicePair.first;\r
+                    BluetoothGatt gatt = devicePair.second;\r
+\r
+                    // close all ports that use this device\r
+                    boolean removedPort = true;\r
+\r
+                    while (removedPort == true)\r
+                    {\r
+                        removedPort = false;\r
+                        for (MidiPortPath key : openPorts.keySet())\r
+                        {\r
+                            if (key.deviceId == info.getId())\r
+                            {\r
+                                openPorts.get(key).get().close();\r
+                                removedPort = true;\r
+                                break;\r
+                            }\r
+                        }\r
+                    }\r
+\r
+                    if (gatt != null)\r
+                    {\r
+                        gatt.disconnect();\r
+                        gatt.close();\r
+                    }\r
+\r
+                    midiDevices.remove (devicePair);\r
+                }\r
+            }\r
+        }\r
+\r
+        public void onDeviceStatusChanged (MidiDeviceStatus status)\r
+        {\r
+        }\r
+\r
+        @Override\r
+        public void onDeviceOpened (MidiDevice theDevice)\r
+        {\r
+            synchronized (MidiDeviceManager.class)\r
+            {\r
+                MidiDeviceInfo info = theDevice.getInfo();\r
+                int deviceID = info.getId();\r
+                BluetoothGatt gatt = null;\r
+                boolean isBluetooth = false;\r
+\r
+                if (! openTasks.containsKey (deviceID))\r
+                {\r
+                    if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH)\r
+                    {\r
+                        isBluetooth = true;\r
+                        BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE);\r
+                        if (btDevice != null)\r
+                        {\r
+                            String btAddress = btDevice.getAddress();\r
+                            if (btDevicesPairing.containsKey (btAddress))\r
+                            {\r
+                                gatt = btDevicesPairing.get (btAddress);\r
+                                btDevicesPairing.remove (btAddress);\r
+                            }\r
+                            else\r
+                            {\r
+                                // unpair was called in the mean time\r
+                                try\r
+                                {\r
+                                    Pair<MidiDevice, BluetoothGatt> midiDevicePair = findMidiDeviceForBluetoothAddress (btDevice.getAddress());\r
+                                    if (midiDevicePair != null)\r
+                                    {\r
+                                        gatt = midiDevicePair.second;\r
+\r
+                                        if (gatt != null)\r
+                                        {\r
+                                            gatt.disconnect();\r
+                                            gatt.close();\r
+                                        }\r
+                                    }\r
+\r
+                                    theDevice.close();\r
+                                }\r
+                                catch (IOException e)\r
+                                {}\r
+\r
+                                return;\r
+                            }\r
+                        }\r
+                    }\r
+\r
+                    MidiDeviceOpenTask openTask = new MidiDeviceOpenTask (this, theDevice, gatt);\r
+                    openTasks.put (deviceID, openTask);\r
+\r
+                    new java.util.Timer().schedule (openTask, (isBluetooth ? 2000 : 100));\r
+                }\r
+            }\r
+        }\r
+\r
+        public void onDeviceOpenedDelayed (MidiDevice theDevice)\r
+        {\r
+            synchronized (MidiDeviceManager.class)\r
+            {\r
+                int deviceID = theDevice.getInfo().getId();\r
+\r
+                if (openTasks.containsKey (deviceID))\r
+                {\r
+                    if (! midiDevices.contains(theDevice))\r
+                    {\r
+                        BluetoothGatt gatt = openTasks.get (deviceID).getGatt();\r
+                        openTasks.remove (deviceID);\r
+                        midiDevices.add (new Pair<MidiDevice,BluetoothGatt> (theDevice, gatt));\r
+                    }\r
+                }\r
+                else\r
+                {\r
+                    // unpair was called in the mean time\r
+                    MidiDeviceInfo info = theDevice.getInfo();\r
+                    BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE);\r
+                    if (btDevice != null)\r
+                    {\r
+                        String btAddress = btDevice.getAddress();\r
+                        Pair<MidiDevice, BluetoothGatt> midiDevicePair = findMidiDeviceForBluetoothAddress (btDevice.getAddress());\r
+                        if (midiDevicePair != null)\r
+                        {\r
+                            BluetoothGatt gatt = midiDevicePair.second;\r
+\r
+                            if (gatt != null)\r
+                            {\r
+                                gatt.disconnect();\r
+                                gatt.close();\r
+                            }\r
+                        }\r
+                    }\r
+\r
+                    try\r
+                    {\r
+                        theDevice.close();\r
+                    }\r
+                    catch (IOException e)\r
+                    {}\r
+                }\r
+            }\r
+        }\r
+\r
+        public String getPortName(MidiPortPath path)\r
+        {\r
+            int portTypeToFind = (path.isInput ? MidiDeviceInfo.PortInfo.TYPE_INPUT : MidiDeviceInfo.PortInfo.TYPE_OUTPUT);\r
+\r
+            synchronized (MidiDeviceManager.class)\r
+            {\r
+                for (MidiDeviceInfo info : deviceInfos)\r
+                {\r
+                    int localIndex = 0;\r
+                    if (info.getId() == path.deviceId)\r
+                    {\r
+                        for (MidiDeviceInfo.PortInfo portInfo : info.getPorts())\r
+                        {\r
+                            int portType = portInfo.getType();\r
+                            if (portType == portTypeToFind)\r
+                            {\r
+                                int portIndex = portInfo.getPortNumber();\r
+                                if (portIndex == path.portIndex)\r
+                                {\r
+                                    String portName = portInfo.getName();\r
+                                    if (portName.isEmpty())\r
+                                        portName = (String) info.getProperties().get(info.PROPERTY_NAME);\r
+\r
+                                    return portName;\r
+                                }\r
+                            }\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+\r
+            return "";\r
+        }\r
+\r
+        public MidiPortPath getPortPathForJuceIndex (int portType, int juceIndex)\r
+        {\r
+            int portIdx = 0;\r
+            for (MidiDeviceInfo info : deviceInfos)\r
+            {\r
+                for (MidiDeviceInfo.PortInfo portInfo : info.getPorts())\r
+                {\r
+                    if (portInfo.getType() == portType)\r
+                    {\r
+                        if (portIdx == juceIndex)\r
+                            return new MidiPortPath (info.getId(),\r
+                                    (portType == MidiDeviceInfo.PortInfo.TYPE_INPUT),\r
+                                    portInfo.getPortNumber());\r
+\r
+                        portIdx++;\r
+                    }\r
+                }\r
+            }\r
+\r
+            return null;\r
+        }\r
+\r
+        private MidiDeviceInfo[] getDeviceInfos()\r
+        {\r
+            synchronized (MidiDeviceManager.class)\r
+            {\r
+                MidiDeviceInfo[] infos = new MidiDeviceInfo[midiDevices.size()];\r
+\r
+                int idx = 0;\r
+                for (Pair<MidiDevice,BluetoothGatt> midiDevice : midiDevices)\r
+                    infos[idx++] = midiDevice.first.getInfo();\r
+\r
+                return infos;\r
+            }\r
+        }\r
+\r
+        private Pair<MidiDevice, BluetoothGatt> getMidiDevicePairForId (int deviceId)\r
+        {\r
+            synchronized (MidiDeviceManager.class)\r
+            {\r
+                for (Pair<MidiDevice,BluetoothGatt> midiDevice : midiDevices)\r
+                    if (midiDevice.first.getInfo().getId() == deviceId)\r
+                        return midiDevice;\r
+            }\r
+\r
+            return null;\r
+        }\r
+\r
+        private MidiManager manager;\r
+        private HashMap<String, BluetoothGatt> btDevicesPairing;\r
+        private HashMap<Integer, MidiDeviceOpenTask> openTasks;\r
+        private ArrayList<Pair<MidiDevice, BluetoothGatt>> midiDevices;\r
+        private MidiDeviceInfo[] deviceInfos;\r
+        private HashMap<MidiPortPath, WeakReference<JuceMidiPort>> openPorts;\r
+    }\r
+\r
+    public MidiDeviceManager getAndroidMidiDeviceManager()\r
+    {\r
+        if (getSystemService (MIDI_SERVICE) == null)\r
+            return null;\r
+\r
+        synchronized (DemoRunner.class)\r
+        {\r
+            if (midiDeviceManager == null)\r
+                midiDeviceManager = new MidiDeviceManager();\r
+        }\r
+\r
+        return midiDeviceManager;\r
+    }\r
+\r
+    public BluetoothManager getAndroidBluetoothManager()\r
+    {\r
+        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\r
+\r
+        if (adapter == null)\r
+            return null;\r
+\r
+        if (adapter.getBluetoothLeScanner() == null)\r
+            return null;\r
+\r
+        synchronized (DemoRunner.class)\r
+        {\r
+            if (bluetoothManager == null)\r
+                bluetoothManager = new BluetoothManager();\r
+        }\r
+\r
+        return bluetoothManager;\r
+    }\r
+\r
+    //==============================================================================\r
+    @Override\r
+    public void onCreate (Bundle savedInstanceState)\r
+    {\r
+        super.onCreate (savedInstanceState);\r
+\r
+        isScreenSaverEnabled = true;\r
+        hideActionBar();\r
+        viewHolder = new ViewHolder (this);\r
+        setContentView (viewHolder);\r
+\r
+        setVolumeControlStream (AudioManager.STREAM_MUSIC);\r
+\r
+        permissionCallbackPtrMap = new HashMap<Integer, Long>();\r
+        appPausedResumedListeners = new HashMap<Long, AppPausedResumedListener>();\r
+    }\r
+\r
+    @Override\r
+    protected void onDestroy()\r
+    {\r
+        quitApp();\r
+        super.onDestroy();\r
+\r
+        clearDataCache();\r
+    }\r
+\r
+    @Override\r
+    protected void onPause()\r
+    {\r
+        suspendApp();\r
+\r
+        Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+        for (Long k : keys)\r
+            appPausedResumedListeners.get (k).appPaused();\r
+\r
+        try\r
+        {\r
+            Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down\r
+                                 // openGL glitches when pausing/resuming apps..\r
+        } catch (InterruptedException e) {}\r
+\r
+        super.onPause();\r
+    }\r
+\r
+    @Override\r
+    protected void onResume()\r
+    {\r
+        super.onResume();\r
+        resumeApp();\r
+\r
+        Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+        for (Long k : keys)\r
+            appPausedResumedListeners.get (k).appResumed();\r
+    }\r
+\r
+    @Override\r
+    public void onConfigurationChanged (Configuration cfg)\r
+    {\r
+        super.onConfigurationChanged (cfg);\r
+        setContentView (viewHolder);\r
+    }\r
+\r
+    private void callAppLauncher()\r
+    {\r
+        launchApp (getApplicationInfo().publicSourceDir,\r
+                   getApplicationInfo().dataDir);\r
+    }\r
+\r
+    // Need to override this as the default implementation always finishes the activity.\r
+    @Override\r
+    public void onBackPressed()\r
+    {\r
+        ComponentPeerView focusedView = getViewWithFocusOrDefaultView();\r
+\r
+        if (focusedView == null)\r
+            return;\r
+\r
+        focusedView.backButtonPressed();\r
+    }\r
+\r
+    private ComponentPeerView getViewWithFocusOrDefaultView()\r
+    {\r
+        for (int i = 0; i < viewHolder.getChildCount(); ++i)\r
+        {\r
+            if (viewHolder.getChildAt (i).hasFocus())\r
+                return (ComponentPeerView) viewHolder.getChildAt (i);\r
+        }\r
+\r
+        if (viewHolder.getChildCount() > 0)\r
+            return (ComponentPeerView) viewHolder.getChildAt (0);\r
+\r
+        return null;\r
+    }\r
+\r
+    //==============================================================================\r
+    private void hideActionBar()\r
+    {\r
+        // get "getActionBar" method\r
+        java.lang.reflect.Method getActionBarMethod = null;\r
+        try\r
+        {\r
+            getActionBarMethod = this.getClass().getMethod ("getActionBar");\r
+        }\r
+        catch (SecurityException e)     { return; }\r
+        catch (NoSuchMethodException e) { return; }\r
+        if (getActionBarMethod == null) return;\r
+\r
+        // invoke "getActionBar" method\r
+        Object actionBar = null;\r
+        try\r
+        {\r
+            actionBar = getActionBarMethod.invoke (this);\r
+        }\r
+        catch (java.lang.IllegalArgumentException e) { return; }\r
+        catch (java.lang.IllegalAccessException e) { return; }\r
+        catch (java.lang.reflect.InvocationTargetException e) { return; }\r
+        if (actionBar == null) return;\r
+\r
+        // get "hide" method\r
+        java.lang.reflect.Method actionBarHideMethod = null;\r
+        try\r
+        {\r
+            actionBarHideMethod = actionBar.getClass().getMethod ("hide");\r
+        }\r
+        catch (SecurityException e)     { return; }\r
+        catch (NoSuchMethodException e) { return; }\r
+        if (actionBarHideMethod == null) return;\r
+\r
+        // invoke "hide" method\r
+        try\r
+        {\r
+            actionBarHideMethod.invoke (actionBar);\r
+        }\r
+        catch (java.lang.IllegalArgumentException e) {}\r
+        catch (java.lang.IllegalAccessException e) {}\r
+        catch (java.lang.reflect.InvocationTargetException e) {}\r
+    }\r
+\r
+    void requestPermissionsCompat (String[] permissions, int requestCode)\r
+    {\r
+        Method requestPermissionsMethod = null;\r
+        try\r
+        {\r
+            requestPermissionsMethod = this.getClass().getMethod ("requestPermissions",\r
+                                                                  String[].class, int.class);\r
+        }\r
+        catch (SecurityException e)     { return; }\r
+        catch (NoSuchMethodException e) { return; }\r
+        if (requestPermissionsMethod == null) return;\r
+\r
+        try\r
+        {\r
+            requestPermissionsMethod.invoke (this, permissions, requestCode);\r
+        }\r
+        catch (java.lang.IllegalArgumentException e) {}\r
+        catch (java.lang.IllegalAccessException e) {}\r
+        catch (java.lang.reflect.InvocationTargetException e) {}\r
+    }\r
+\r
+    //==============================================================================\r
+    private native void launchApp (String appFile, String appDataDir);\r
+    private native void quitApp();\r
+    private native void suspendApp();\r
+    private native void resumeApp();\r
+    private native void setScreenSize (int screenWidth, int screenHeight, int dpi);\r
+    private native void appActivityResult (int requestCode, int resultCode, Intent data);\r
+    private native void appNewIntent (Intent intent);\r
+\r
+    //==============================================================================\r
+    private ViewHolder viewHolder;\r
+    private MidiDeviceManager midiDeviceManager = null;\r
+    private BluetoothManager bluetoothManager = null;\r
+    private boolean isScreenSaverEnabled;\r
+    private java.util.Timer keepAliveTimer;\r
+\r
+    public final ComponentPeerView createNewView (boolean opaque, long host)\r
+    {\r
+        ComponentPeerView v = new ComponentPeerView (this, opaque, host);\r
+        viewHolder.addView (v);\r
+        addAppPausedResumedListener (v, host);\r
+        return v;\r
+    }\r
+\r
+    public final void deleteView (ComponentPeerView view)\r
+    {\r
+        removeAppPausedResumedListener (view, view.host);\r
+\r
+        view.host = 0;\r
+\r
+        ViewGroup group = (ViewGroup) (view.getParent());\r
+\r
+        if (group != null)\r
+            group.removeView (view);\r
+    }\r
+\r
+    public final void deleteNativeSurfaceView (NativeSurfaceView view)\r
+    {\r
+        ViewGroup group = (ViewGroup) (view.getParent());\r
+\r
+        if (group != null)\r
+            group.removeView (view);\r
+    }\r
+\r
+    final class ViewHolder  extends ViewGroup\r
+    {\r
+        public ViewHolder (Context context)\r
+        {\r
+            super (context);\r
+            setDescendantFocusability (ViewGroup.FOCUS_AFTER_DESCENDANTS);\r
+            setFocusable (false);\r
+        }\r
+\r
+        protected final void onLayout (boolean changed, int left, int top, int right, int bottom)\r
+        {\r
+            setScreenSize (getWidth(), getHeight(), getDPI());\r
+\r
+            if (isFirstResize)\r
+            {\r
+                isFirstResize = false;\r
+                callAppLauncher();\r
+            }\r
+        }\r
+\r
+        private final int getDPI()\r
+        {\r
+            DisplayMetrics metrics = new DisplayMetrics();\r
+            getWindowManager().getDefaultDisplay().getMetrics (metrics);\r
+            return metrics.densityDpi;\r
+        }\r
+\r
+        private boolean isFirstResize = true;\r
+    }\r
+\r
+    public final void excludeClipRegion (android.graphics.Canvas canvas, float left, float top, float right, float bottom)\r
+    {\r
+        canvas.clipRect (left, top, right, bottom, android.graphics.Region.Op.DIFFERENCE);\r
+    }\r
+\r
+    //==============================================================================\r
+    public final void setScreenSaver (boolean enabled)\r
+    {\r
+        if (isScreenSaverEnabled != enabled)\r
+        {\r
+            isScreenSaverEnabled = enabled;\r
+\r
+            if (keepAliveTimer != null)\r
+            {\r
+                keepAliveTimer.cancel();\r
+                keepAliveTimer = null;\r
+            }\r
+\r
+            if (enabled)\r
+            {\r
+                getWindow().clearFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\r
+            }\r
+            else\r
+            {\r
+                getWindow().addFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\r
+\r
+                // If no user input is received after about 3 seconds, the OS will lower the\r
+                // task's priority, so this timer forces it to be kept active.\r
+                keepAliveTimer = new java.util.Timer();\r
+\r
+                keepAliveTimer.scheduleAtFixedRate (new TimerTask()\r
+                {\r
+                    @Override\r
+                    public void run()\r
+                    {\r
+                        android.app.Instrumentation instrumentation = new android.app.Instrumentation();\r
+\r
+                        try\r
+                        {\r
+                            instrumentation.sendKeyDownUpSync (KeyEvent.KEYCODE_UNKNOWN);\r
+                        }\r
+                        catch (Exception e)\r
+                        {\r
+                        }\r
+                    }\r
+                }, 2000, 2000);\r
+            }\r
+        }\r
+    }\r
+\r
+    public final boolean getScreenSaver()\r
+    {\r
+        return isScreenSaverEnabled;\r
+    }\r
+\r
+    //==============================================================================\r
+    public final String getClipboardContent()\r
+    {\r
+        ClipboardManager clipboard = (ClipboardManager) getSystemService (CLIPBOARD_SERVICE);\r
+        return clipboard.getText().toString();\r
+    }\r
+\r
+    public final void setClipboardContent (String newText)\r
+    {\r
+        ClipboardManager clipboard = (ClipboardManager) getSystemService (CLIPBOARD_SERVICE);\r
+        clipboard.setText (newText);\r
+    }\r
+\r
+    //==============================================================================\r
+    public final void showMessageBox (String title, String message, final long callback)\r
+    {\r
+        AlertDialog.Builder builder = new AlertDialog.Builder (this);\r
+        builder.setTitle (title)\r
+               .setMessage (message)\r
+               .setCancelable (true)\r
+               .setOnCancelListener (new DialogInterface.OnCancelListener()\r
+                    {\r
+                        public void onCancel (DialogInterface dialog)\r
+                        {\r
+                            DemoRunner.this.alertDismissed (callback, 0);\r
+                        }\r
+                    })\r
+               .setPositiveButton ("OK", new DialogInterface.OnClickListener()\r
+                    {\r
+                        public void onClick (DialogInterface dialog, int id)\r
+                        {\r
+                            dialog.dismiss();\r
+                            DemoRunner.this.alertDismissed (callback, 0);\r
+                        }\r
+                    });\r
+\r
+        builder.create().show();\r
+    }\r
+\r
+    public final void showOkCancelBox (String title, String message, final long callback,\r
+                                       String okButtonText, String cancelButtonText)\r
+    {\r
+        AlertDialog.Builder builder = new AlertDialog.Builder (this);\r
+        builder.setTitle (title)\r
+               .setMessage (message)\r
+               .setCancelable (true)\r
+               .setOnCancelListener (new DialogInterface.OnCancelListener()\r
+                    {\r
+                        public void onCancel (DialogInterface dialog)\r
+                        {\r
+                            DemoRunner.this.alertDismissed (callback, 0);\r
+                        }\r
+                    })\r
+               .setPositiveButton (okButtonText.isEmpty() ? "OK" : okButtonText, new DialogInterface.OnClickListener()\r
+                    {\r
+                        public void onClick (DialogInterface dialog, int id)\r
+                        {\r
+                            dialog.dismiss();\r
+                            DemoRunner.this.alertDismissed (callback, 1);\r
+                        }\r
+                    })\r
+               .setNegativeButton (cancelButtonText.isEmpty() ? "Cancel" : cancelButtonText, new DialogInterface.OnClickListener()\r
+                    {\r
+                        public void onClick (DialogInterface dialog, int id)\r
+                        {\r
+                            dialog.dismiss();\r
+                            DemoRunner.this.alertDismissed (callback, 0);\r
+                        }\r
+                    });\r
+\r
+        builder.create().show();\r
+    }\r
+\r
+    public final void showYesNoCancelBox (String title, String message, final long callback)\r
+    {\r
+        AlertDialog.Builder builder = new AlertDialog.Builder (this);\r
+        builder.setTitle (title)\r
+               .setMessage (message)\r
+               .setCancelable (true)\r
+               .setOnCancelListener (new DialogInterface.OnCancelListener()\r
+                    {\r
+                        public void onCancel (DialogInterface dialog)\r
+                        {\r
+                            DemoRunner.this.alertDismissed (callback, 0);\r
+                        }\r
+                    })\r
+               .setPositiveButton ("Yes", new DialogInterface.OnClickListener()\r
+                    {\r
+                        public void onClick (DialogInterface dialog, int id)\r
+                        {\r
+                            dialog.dismiss();\r
+                            DemoRunner.this.alertDismissed (callback, 1);\r
+                        }\r
+                    })\r
+               .setNegativeButton ("No", new DialogInterface.OnClickListener()\r
+                    {\r
+                        public void onClick (DialogInterface dialog, int id)\r
+                        {\r
+                            dialog.dismiss();\r
+                            DemoRunner.this.alertDismissed (callback, 2);\r
+                        }\r
+                    })\r
+               .setNeutralButton ("Cancel", new DialogInterface.OnClickListener()\r
+                    {\r
+                        public void onClick (DialogInterface dialog, int id)\r
+                        {\r
+                            dialog.dismiss();\r
+                            DemoRunner.this.alertDismissed (callback, 0);\r
+                        }\r
+                    });\r
+\r
+        builder.create().show();\r
+    }\r
+\r
+    public native void alertDismissed (long callback, int id);\r
+\r
+    //==============================================================================\r
+    public interface AppPausedResumedListener\r
+    {\r
+        void appPaused();\r
+        void appResumed();\r
+    }\r
+\r
+    private Map<Long, AppPausedResumedListener> appPausedResumedListeners;\r
+\r
+    public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+    {\r
+        appPausedResumedListeners.put (new Long (listenerHost), l);\r
+    }\r
+\r
+    public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+    {\r
+        appPausedResumedListeners.remove (new Long (listenerHost));\r
+    }\r
+\r
+    //==============================================================================\r
+    public final class ComponentPeerView extends ViewGroup\r
+                                         implements View.OnFocusChangeListener, AppPausedResumedListener\r
+    {\r
+        public ComponentPeerView (Context context, boolean opaque_, long host)\r
+        {\r
+            super (context);\r
+            this.host = host;\r
+            setWillNotDraw (false);\r
+            opaque = opaque_;\r
+\r
+            setFocusable (true);\r
+            setFocusableInTouchMode (true);\r
+            setOnFocusChangeListener (this);\r
+\r
+            // swap red and blue colours to match internal opengl texture format\r
+            ColorMatrix colorMatrix = new ColorMatrix();\r
+\r
+            float[] colorTransform = { 0,    0,    1.0f, 0,    0,\r
+                                       0,    1.0f, 0,    0,    0,\r
+                                       1.0f, 0,    0,    0,    0,\r
+                                       0,    0,    0,    1.0f, 0 };\r
+\r
+            colorMatrix.set (colorTransform);\r
+            paint.setColorFilter (new ColorMatrixColorFilter (colorMatrix));\r
+\r
+            java.lang.reflect.Method method = null;\r
+\r
+            try\r
+            {\r
+                method = getClass().getMethod ("setLayerType", int.class, Paint.class);\r
+            }\r
+            catch (SecurityException e)     {}\r
+            catch (NoSuchMethodException e) {}\r
+\r
+            if (method != null)\r
+            {\r
+                try\r
+                {\r
+                    int layerTypeNone = 0;\r
+                    method.invoke (this, layerTypeNone, null);\r
+                }\r
+                catch (java.lang.IllegalArgumentException e) {}\r
+                catch (java.lang.IllegalAccessException e) {}\r
+                catch (java.lang.reflect.InvocationTargetException e) {}\r
+            }\r
+        }\r
+\r
+        //==============================================================================\r
+        private native void handlePaint (long host, Canvas canvas, Paint paint);\r
+\r
+        @Override\r
+        public void onDraw (Canvas canvas)\r
+        {\r
+            if (host == 0)\r
+                return;\r
+\r
+            handlePaint (host, canvas, paint);\r
+        }\r
+\r
+        @Override\r
+        public boolean isOpaque()\r
+        {\r
+            return opaque;\r
+        }\r
+\r
+        private boolean opaque;\r
+        private long host;\r
+        private Paint paint = new Paint();\r
+\r
+        //==============================================================================\r
+        private native void handleMouseDown (long host, int index, float x, float y, long time);\r
+        private native void handleMouseDrag (long host, int index, float x, float y, long time);\r
+        private native void handleMouseUp   (long host, int index, float x, float y, long time);\r
+\r
+        @Override\r
+        public boolean onTouchEvent (MotionEvent event)\r
+        {\r
+            if (host == 0)\r
+                return false;\r
+\r
+            int action = event.getAction();\r
+            long time = event.getEventTime();\r
+\r
+            switch (action & MotionEvent.ACTION_MASK)\r
+            {\r
+                case MotionEvent.ACTION_DOWN:\r
+                    handleMouseDown (host, event.getPointerId(0), event.getX(), event.getY(), time);\r
+                    return true;\r
+\r
+                case MotionEvent.ACTION_CANCEL:\r
+                case MotionEvent.ACTION_UP:\r
+                    handleMouseUp (host, event.getPointerId(0), event.getX(), event.getY(), time);\r
+                    return true;\r
+\r
+                case MotionEvent.ACTION_MOVE:\r
+                {\r
+                    int n = event.getPointerCount();\r
+                    for (int i = 0; i < n; ++i)\r
+                        handleMouseDrag (host, event.getPointerId(i), event.getX(i), event.getY(i), time);\r
+\r
+                    return true;\r
+                }\r
+\r
+                case MotionEvent.ACTION_POINTER_UP:\r
+                {\r
+                    int i = (action & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT;\r
+                    handleMouseUp (host, event.getPointerId(i), event.getX(i), event.getY(i), time);\r
+                    return true;\r
+                }\r
+\r
+                case MotionEvent.ACTION_POINTER_DOWN:\r
+                {\r
+                    int i = (action & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT;\r
+                    handleMouseDown (host, event.getPointerId(i), event.getX(i), event.getY(i), time);\r
+                    return true;\r
+                }\r
+\r
+                default:\r
+                    break;\r
+            }\r
+\r
+            return false;\r
+        }\r
+\r
+        //==============================================================================\r
+        private native void handleKeyDown (long host, int keycode, int textchar);\r
+        private native void handleKeyUp (long host, int keycode, int textchar);\r
+        private native void handleBackButton (long host);\r
+        private native void handleKeyboardHidden (long host);\r
+\r
+        public void showKeyboard (String type)\r
+        {\r
+            InputMethodManager imm = (InputMethodManager) getSystemService (Context.INPUT_METHOD_SERVICE);\r
+\r
+            if (imm != null)\r
+            {\r
+                if (type.length() > 0)\r
+                {\r
+                    imm.showSoftInput (this, android.view.inputmethod.InputMethodManager.SHOW_IMPLICIT);\r
+                    imm.setInputMethod (getWindowToken(), type);\r
+                    keyboardDismissListener.startListening();\r
+                }\r
+                else\r
+                {\r
+                    imm.hideSoftInputFromWindow (getWindowToken(), 0);\r
+                    keyboardDismissListener.stopListening();\r
+                }\r
+            }\r
+        }\r
+\r
+        public void backButtonPressed()\r
+        {\r
+            if (host == 0)\r
+                return;\r
+\r
+            handleBackButton (host);\r
+        }\r
+\r
+        @Override\r
+        public boolean onKeyDown (int keyCode, KeyEvent event)\r
+        {\r
+            if (host == 0)\r
+                return false;\r
+\r
+            switch (keyCode)\r
+            {\r
+                case KeyEvent.KEYCODE_VOLUME_UP:\r
+                case KeyEvent.KEYCODE_VOLUME_DOWN:\r
+                    return super.onKeyDown (keyCode, event);\r
+                case KeyEvent.KEYCODE_BACK:\r
+                {\r
+                    ((Activity) getContext()).onBackPressed();\r
+                    return true;\r
+                }\r
+\r
+                default:\r
+                    break;\r
+            }\r
+\r
+            handleKeyDown (host, keyCode, event.getUnicodeChar());\r
+            return true;\r
+        }\r
+\r
+        @Override\r
+        public boolean onKeyUp (int keyCode, KeyEvent event)\r
+        {\r
+            if (host == 0)\r
+                return false;\r
+\r
+            handleKeyUp (host, keyCode, event.getUnicodeChar());\r
+            return true;\r
+        }\r
+\r
+        @Override\r
+        public boolean onKeyMultiple (int keyCode, int count, KeyEvent event)\r
+        {\r
+            if (host == 0)\r
+                return false;\r
+\r
+            if (keyCode != KeyEvent.KEYCODE_UNKNOWN || event.getAction() != KeyEvent.ACTION_MULTIPLE)\r
+                return super.onKeyMultiple (keyCode, count, event);\r
+\r
+            if (event.getCharacters() != null)\r
+            {\r
+                int utf8Char = event.getCharacters().codePointAt (0);\r
+                handleKeyDown (host, utf8Char, utf8Char);\r
+                return true;\r
+            }\r
+\r
+            return false;\r
+        }\r
+\r
+        //==============================================================================\r
+        private final class KeyboardDismissListener\r
+        {\r
+            public KeyboardDismissListener (ComponentPeerView viewToUse)\r
+            {\r
+                view = viewToUse;\r
+            }\r
+\r
+            private void startListening()\r
+            {\r
+                view.getViewTreeObserver().addOnGlobalLayoutListener(viewTreeObserver);\r
+            }\r
+\r
+            private void stopListening()\r
+            {\r
+                view.getViewTreeObserver().removeGlobalOnLayoutListener(viewTreeObserver);\r
+            }\r
+\r
+            private class TreeObserver implements ViewTreeObserver.OnGlobalLayoutListener\r
+            {\r
+                TreeObserver()\r
+                {\r
+                    keyboardShown = false;\r
+                }\r
+\r
+                @Override\r
+                public void onGlobalLayout()\r
+                {\r
+                    Rect r = new Rect();\r
+\r
+                    ViewGroup parentView = (ViewGroup) getParent();\r
+\r
+                    if (parentView == null)\r
+                        return;\r
+\r
+                    parentView.getWindowVisibleDisplayFrame (r);\r
+\r
+                    int diff = parentView.getHeight() - (r.bottom - r.top);\r
+\r
+                    // Arbitrary threshold, surely keyboard would take more than 20 pix.\r
+                    if (diff < 20 && keyboardShown)\r
+                    {\r
+                        keyboardShown = false;\r
+                        handleKeyboardHidden (view.host);\r
+                    }\r
+\r
+                    if (! keyboardShown && diff > 20)\r
+                        keyboardShown = true;\r
+                };\r
+\r
+                private boolean keyboardShown;\r
+            };\r
+\r
+            private ComponentPeerView view;\r
+            private TreeObserver viewTreeObserver = new TreeObserver();\r
+        }\r
+\r
+        private KeyboardDismissListener keyboardDismissListener = new KeyboardDismissListener(this);\r
+\r
+        // this is here to make keyboard entry work on a Galaxy Tab2 10.1\r
+        @Override\r
+        public InputConnection onCreateInputConnection (EditorInfo outAttrs)\r
+        {\r
+            outAttrs.actionLabel = "";\r
+            outAttrs.hintText = "";\r
+            outAttrs.initialCapsMode = 0;\r
+            outAttrs.initialSelEnd = outAttrs.initialSelStart = -1;\r
+            outAttrs.label = "";\r
+            outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_EXTRACT_UI;\r
+            outAttrs.inputType = InputType.TYPE_NULL;\r
+\r
+            return new BaseInputConnection (this, false);\r
+        }\r
+\r
+        //==============================================================================\r
+        @Override\r
+        protected void onSizeChanged (int w, int h, int oldw, int oldh)\r
+        {\r
+            if (host == 0)\r
+                return;\r
+\r
+            super.onSizeChanged (w, h, oldw, oldh);\r
+            viewSizeChanged (host);\r
+        }\r
+\r
+        @Override\r
+        protected void onLayout (boolean changed, int left, int top, int right, int bottom)\r
+        {\r
+            for (int i = getChildCount(); --i >= 0;)\r
+                requestTransparentRegion (getChildAt (i));\r
+        }\r
+\r
+        private native void viewSizeChanged (long host);\r
+\r
+        @Override\r
+        public void onFocusChange (View v, boolean hasFocus)\r
+        {\r
+            if (host == 0)\r
+                return;\r
+\r
+            if (v == this)\r
+                focusChanged (host, hasFocus);\r
+        }\r
+\r
+        private native void focusChanged (long host, boolean hasFocus);\r
+\r
+        public void setViewName (String newName)    {}\r
+\r
+        public void setSystemUiVisibilityCompat (int visibility)\r
+        {\r
+            Method systemUIVisibilityMethod = null;\r
+            try\r
+            {\r
+                systemUIVisibilityMethod = this.getClass().getMethod ("setSystemUiVisibility", int.class);\r
+            }\r
+            catch (SecurityException e)     { return; }\r
+            catch (NoSuchMethodException e) { return; }\r
+            if (systemUIVisibilityMethod == null) return;\r
+\r
+            try\r
+            {\r
+                systemUIVisibilityMethod.invoke (this, visibility);\r
+            }\r
+            catch (java.lang.IllegalArgumentException e) {}\r
+            catch (java.lang.IllegalAccessException e) {}\r
+            catch (java.lang.reflect.InvocationTargetException e) {}\r
+        }\r
+\r
+        public boolean isVisible()                  { return getVisibility() == VISIBLE; }\r
+        public void setVisible (boolean b)          { setVisibility (b ? VISIBLE : INVISIBLE); }\r
+\r
+        public boolean containsPoint (int x, int y)\r
+        {\r
+            return true; //xxx needs to check overlapping views\r
+        }\r
+\r
+        //==============================================================================\r
+        private native void handleAppPaused (long host);\r
+        private native void handleAppResumed (long host);\r
+\r
+        @Override\r
+        public void appPaused()\r
+        {\r
+            if (host == 0)\r
+                return;\r
+\r
+            handleAppPaused (host);\r
+        }\r
+\r
+        @Override\r
+        public void appResumed()\r
+        {\r
+            if (host == 0)\r
+                return;\r
+\r
+            // Ensure that navigation/status bar visibility is correctly restored.\r
+            handleAppResumed (host);\r
+        }\r
+    }\r
+\r
+    //==============================================================================\r
+    public static class NativeSurfaceView    extends SurfaceView\r
+                                          implements SurfaceHolder.Callback\r
+    {\r
+        private long nativeContext = 0;\r
+\r
+        NativeSurfaceView (Context context, long nativeContextPtr)\r
+        {\r
+            super (context);\r
+            nativeContext = nativeContextPtr;\r
+        }\r
+\r
+        public Surface getNativeSurface()\r
+        {\r
+            Surface retval = null;\r
+\r
+            SurfaceHolder holder = getHolder();\r
+            if (holder != null)\r
+                retval = holder.getSurface();\r
+\r
+            return retval;\r
+        }\r
+\r
+        //==============================================================================\r
+        @Override\r
+        public void surfaceChanged (SurfaceHolder holder, int format, int width, int height)\r
+        {\r
+            surfaceChangedNative (nativeContext, holder, format, width, height);\r
+        }\r
+\r
+        @Override\r
+        public void surfaceCreated (SurfaceHolder holder)\r
+        {\r
+            surfaceCreatedNative (nativeContext, holder);\r
+        }\r
+\r
+        @Override\r
+        public void surfaceDestroyed (SurfaceHolder holder)\r
+        {\r
+            surfaceDestroyedNative (nativeContext, holder);\r
+        }\r
+\r
+        @Override\r
+        protected void dispatchDraw (Canvas canvas)\r
+        {\r
+            super.dispatchDraw (canvas);\r
+            dispatchDrawNative (nativeContext, canvas);\r
+        }\r
+\r
+        //==============================================================================\r
+        @Override\r
+        protected void onAttachedToWindow ()\r
+        {\r
+            super.onAttachedToWindow();\r
+            getHolder().addCallback (this);\r
+        }\r
+\r
+        @Override\r
+        protected void onDetachedFromWindow ()\r
+        {\r
+            super.onDetachedFromWindow();\r
+            getHolder().removeCallback (this);\r
+        }\r
+\r
+        //==============================================================================\r
+        private native void dispatchDrawNative (long nativeContextPtr, Canvas canvas);\r
+        private native void surfaceCreatedNative (long nativeContextptr, SurfaceHolder holder);\r
+        private native void surfaceDestroyedNative (long nativeContextptr, SurfaceHolder holder);\r
+        private native void surfaceChangedNative (long nativeContextptr, SurfaceHolder holder,\r
+                                                  int format, int width, int height);\r
+    }\r
+\r
+    public NativeSurfaceView createNativeSurfaceView (long nativeSurfacePtr)\r
+    {\r
+        return new NativeSurfaceView (this, nativeSurfacePtr);\r
+    }\r
+\r
+    //==============================================================================\r
+    public final int[] renderGlyph (char glyph1, char glyph2, Paint paint, android.graphics.Matrix matrix, Rect bounds)\r
+    {\r
+        Path p = new Path();\r
+\r
+        char[] str = { glyph1, glyph2 };\r
+        paint.getTextPath (str, 0, (glyph2 != 0 ? 2 : 1), 0.0f, 0.0f, p);\r
+\r
+        RectF boundsF = new RectF();\r
+        p.computeBounds (boundsF, true);\r
+        matrix.mapRect (boundsF);\r
+\r
+        boundsF.roundOut (bounds);\r
+        bounds.left--;\r
+        bounds.right++;\r
+\r
+        final int w = bounds.width();\r
+        final int h = Math.max (1, bounds.height());\r
+\r
+        Bitmap bm = Bitmap.createBitmap (w, h, Bitmap.Config.ARGB_8888);\r
+\r
+        Canvas c = new Canvas (bm);\r
+        matrix.postTranslate (-bounds.left, -bounds.top);\r
+        c.setMatrix (matrix);\r
+        c.drawPath (p, paint);\r
+\r
+        final int sizeNeeded = w * h;\r
+        if (cachedRenderArray.length < sizeNeeded)\r
+            cachedRenderArray = new int [sizeNeeded];\r
+\r
+        bm.getPixels (cachedRenderArray, 0, w, 0, 0, w, h);\r
+        bm.recycle();\r
+        return cachedRenderArray;\r
+    }\r
+\r
+    private int[] cachedRenderArray = new int [256];\r
+\r
+    //==============================================================================\r
+    public static class NativeInvocationHandler implements InvocationHandler\r
+    {\r
+        public NativeInvocationHandler (Activity activityToUse, long nativeContextRef)\r
+        {\r
+            activity = activityToUse;\r
+            nativeContext = nativeContextRef;\r
+        }\r
+\r
+        public void nativeContextDeleted()\r
+        {\r
+            nativeContext = 0;\r
+        }\r
+\r
+        @Override\r
+        public void finalize()\r
+        {\r
+            activity.runOnUiThread (new Runnable()\r
+                                    {\r
+                                        @Override\r
+                                        public void run()\r
+                                        {\r
+                                            if (nativeContext != 0)\r
+                                                dispatchFinalize (nativeContext);\r
+                                        }\r
+                                    });\r
+        }\r
+\r
+        @Override\r
+        public Object invoke (Object proxy, Method method, Object[] args) throws Throwable\r
+        {\r
+            return dispatchInvoke (nativeContext, proxy, method, args);\r
+        }\r
+\r
+        //==============================================================================\r
+        Activity activity;\r
+        private long nativeContext = 0;\r
+\r
+        private native void dispatchFinalize (long nativeContextRef);\r
+        private native Object dispatchInvoke (long nativeContextRef, Object proxy, Method method, Object[] args);\r
+    }\r
+\r
+    public InvocationHandler createInvocationHandler (long nativeContextRef)\r
+    {\r
+        return new NativeInvocationHandler (this, nativeContextRef);\r
+    }\r
+\r
+    public void invocationHandlerContextDeleted (InvocationHandler handler)\r
+    {\r
+        ((NativeInvocationHandler) handler).nativeContextDeleted();\r
+    }\r
+\r
+    //==============================================================================\r
+    public static class HTTPStream\r
+    {\r
+        public HTTPStream (String address, boolean isPostToUse, byte[] postDataToUse,\r
+                           String headersToUse, int timeOutMsToUse,\r
+                           int[] statusCodeToUse, StringBuffer responseHeadersToUse,\r
+                           int numRedirectsToFollowToUse, String httpRequestCmdToUse) throws IOException\r
+        {\r
+            isPost = isPostToUse;\r
+            postData = postDataToUse;\r
+            headers = headersToUse;\r
+            timeOutMs = timeOutMsToUse;\r
+            statusCode = statusCodeToUse;\r
+            responseHeaders = responseHeadersToUse;\r
+            totalLength = -1;\r
+            numRedirectsToFollow = numRedirectsToFollowToUse;\r
+            httpRequestCmd = httpRequestCmdToUse;\r
+\r
+            connection = createConnection (address, isPost, postData, headers, timeOutMs, httpRequestCmd);\r
+        }\r
+\r
+        private final HttpURLConnection createConnection (String address, boolean isPost, byte[] postData,\r
+                                                          String headers, int timeOutMs, String httpRequestCmdToUse) throws IOException\r
+        {\r
+            HttpURLConnection newConnection = (HttpURLConnection) (new URL(address).openConnection());\r
+\r
+            try\r
+            {\r
+                newConnection.setInstanceFollowRedirects (false);\r
+                newConnection.setConnectTimeout (timeOutMs);\r
+                newConnection.setReadTimeout (timeOutMs);\r
+\r
+                // 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.\r
+                // So convert headers string to an array, with an element for each line\r
+                String headerLines[] = headers.split("\\n");\r
+\r
+                // Set request headers\r
+                for (int i = 0; i < headerLines.length; ++i)\r
+                {\r
+                    int pos = headerLines[i].indexOf (":");\r
+\r
+                    if (pos > 0 && pos < headerLines[i].length())\r
+                    {\r
+                        String field = headerLines[i].substring (0, pos);\r
+                        String value = headerLines[i].substring (pos + 1);\r
+\r
+                        if (value.length() > 0)\r
+                            newConnection.setRequestProperty (field, value);\r
+                    }\r
+                }\r
+\r
+                newConnection.setRequestMethod (httpRequestCmd);\r
+\r
+                if (isPost)\r
+                {\r
+                    newConnection.setDoOutput (true);\r
+\r
+                    if (postData != null)\r
+                    {\r
+                        OutputStream out = newConnection.getOutputStream();\r
+                        out.write(postData);\r
+                        out.flush();\r
+                    }\r
+                }\r
+\r
+                return newConnection;\r
+            }\r
+            catch (Throwable e)\r
+            {\r
+                newConnection.disconnect();\r
+                throw new IOException ("Connection error");\r
+            }\r
+        }\r
+\r
+        private final InputStream getCancellableStream (final boolean isInput) throws ExecutionException\r
+        {\r
+            synchronized (createFutureLock)\r
+            {\r
+                if (hasBeenCancelled.get())\r
+                    return null;\r
+\r
+                streamFuture = executor.submit (new Callable<BufferedInputStream>()\r
+                {\r
+                    @Override\r
+                    public BufferedInputStream call() throws IOException\r
+                    {\r
+                        return new BufferedInputStream (isInput ? connection.getInputStream()\r
+                                                                : connection.getErrorStream());\r
+                    }\r
+                });\r
+            }\r
+\r
+            try\r
+            {\r
+                return streamFuture.get();\r
+            }\r
+            catch (InterruptedException e)\r
+            {\r
+                return null;\r
+            }\r
+            catch (CancellationException e)\r
+            {\r
+                return null;\r
+            }\r
+        }\r
+\r
+        public final boolean connect()\r
+        {\r
+            boolean result = false;\r
+            int numFollowedRedirects = 0;\r
+\r
+            while (true)\r
+            {\r
+                result = doConnect();\r
+\r
+                if (! result)\r
+                    return false;\r
+\r
+                if (++numFollowedRedirects > numRedirectsToFollow)\r
+                    break;\r
+\r
+                int status = statusCode[0];\r
+\r
+                if (status == 301 || status == 302 || status == 303 || status == 307)\r
+                {\r
+                    // Assumes only one occurrence of "Location"\r
+                    int pos1 = responseHeaders.indexOf ("Location:") + 10;\r
+                    int pos2 = responseHeaders.indexOf ("\n", pos1);\r
+\r
+                    if (pos2 > pos1)\r
+                    {\r
+                        String currentLocation = connection.getURL().toString();\r
+                        String newLocation = responseHeaders.substring (pos1, pos2);\r
+\r
+                        try\r
+                        {\r
+                            // Handle newLocation whether it's absolute or relative\r
+                            URL baseUrl = new URL (currentLocation);\r
+                            URL newUrl  = new URL (baseUrl, newLocation);\r
+                            String transformedNewLocation = newUrl.toString();\r
+\r
+                            if (transformedNewLocation != currentLocation)\r
+                            {\r
+                                // Clear responseHeaders before next iteration\r
+                                responseHeaders.delete (0, responseHeaders.length());\r
+\r
+                                synchronized (createStreamLock)\r
+                                {\r
+                                    if (hasBeenCancelled.get())\r
+                                        return false;\r
+\r
+                                    connection.disconnect();\r
+\r
+                                    try\r
+                                    {\r
+                                        connection = createConnection (transformedNewLocation, isPost,\r
+                                                                       postData, headers, timeOutMs,\r
+                                                                       httpRequestCmd);\r
+                                    }\r
+                                    catch (Throwable e)\r
+                                    {\r
+                                        return false;\r
+                                    }\r
+                                }\r
+                            }\r
+                            else\r
+                            {\r
+                                break;\r
+                            }\r
+                        }\r
+                        catch (Throwable e)\r
+                        {\r
+                            return false;\r
+                        }\r
+                    }\r
+                    else\r
+                    {\r
+                        break;\r
+                    }\r
+                }\r
+                else\r
+                {\r
+                    break;\r
+                }\r
+            }\r
+\r
+            return result;\r
+        }\r
+\r
+        private final boolean doConnect()\r
+        {\r
+            synchronized (createStreamLock)\r
+            {\r
+                if (hasBeenCancelled.get())\r
+                    return false;\r
+\r
+                try\r
+                {\r
+                    try\r
+                    {\r
+                        inputStream = getCancellableStream (true);\r
+                    }\r
+                    catch (ExecutionException e)\r
+                    {\r
+                        if (connection.getResponseCode() < 400)\r
+                        {\r
+                            statusCode[0] = connection.getResponseCode();\r
+                            connection.disconnect();\r
+                            return false;\r
+                        }\r
+                    }\r
+                    finally\r
+                    {\r
+                        statusCode[0] = connection.getResponseCode();\r
+                    }\r
+\r
+                    try\r
+                    {\r
+                        if (statusCode[0] >= 400)\r
+                            inputStream = getCancellableStream (false);\r
+                        else\r
+                            inputStream = getCancellableStream (true);\r
+                    }\r
+                    catch (ExecutionException e)\r
+                    {}\r
+\r
+                    for (java.util.Map.Entry<String, java.util.List<String>> entry : connection.getHeaderFields().entrySet())\r
+                    {\r
+                        if (entry.getKey() != null && entry.getValue() != null)\r
+                        {\r
+                            responseHeaders.append(entry.getKey() + ": "\r
+                                                   + android.text.TextUtils.join(",", entry.getValue()) + "\n");\r
+\r
+                            if (entry.getKey().compareTo ("Content-Length") == 0)\r
+                                totalLength = Integer.decode (entry.getValue().get (0));\r
+                        }\r
+                    }\r
+\r
+                    return true;\r
+                }\r
+                catch (IOException e)\r
+                {\r
+                    return false;\r
+                }\r
+            }\r
+        }\r
+\r
+        static class DisconnectionRunnable implements Runnable\r
+        {\r
+            public DisconnectionRunnable (HttpURLConnection theConnection,\r
+                                          InputStream theInputStream,\r
+                                          ReentrantLock theCreateStreamLock,\r
+                                          Object theCreateFutureLock,\r
+                                          Future<BufferedInputStream> theStreamFuture)\r
+            {\r
+                connectionToDisconnect = theConnection;\r
+                inputStream = theInputStream;\r
+                createStreamLock = theCreateStreamLock;\r
+                createFutureLock = theCreateFutureLock;\r
+                streamFuture = theStreamFuture;\r
+            }\r
+\r
+            public void run()\r
+            {\r
+                try\r
+                {\r
+                    if (! createStreamLock.tryLock())\r
+                    {\r
+                        synchronized (createFutureLock)\r
+                        {\r
+                            if (streamFuture != null)\r
+                                streamFuture.cancel (true);\r
+                        }\r
+\r
+                        createStreamLock.lock();\r
+                    }\r
+\r
+                    if (connectionToDisconnect != null)\r
+                        connectionToDisconnect.disconnect();\r
+\r
+                    if (inputStream != null)\r
+                        inputStream.close();\r
+                }\r
+                catch (IOException e)\r
+                {}\r
+                finally\r
+                {\r
+                    createStreamLock.unlock();\r
+                }\r
+            }\r
+\r
+            private HttpURLConnection connectionToDisconnect;\r
+            private InputStream inputStream;\r
+            private ReentrantLock createStreamLock;\r
+            private Object createFutureLock;\r
+            Future<BufferedInputStream> streamFuture;\r
+        }\r
+\r
+        public final void release()\r
+        {\r
+            DisconnectionRunnable disconnectionRunnable = new DisconnectionRunnable (connection,\r
+                                                                                     inputStream,\r
+                                                                                     createStreamLock,\r
+                                                                                     createFutureLock,\r
+                                                                                     streamFuture);\r
+\r
+            synchronized (createStreamLock)\r
+            {\r
+                hasBeenCancelled.set (true);\r
+\r
+                connection = null;\r
+            }\r
+\r
+            Thread disconnectionThread = new Thread(disconnectionRunnable);\r
+            disconnectionThread.start();\r
+        }\r
+\r
+        public final int read (byte[] buffer, int numBytes)\r
+        {\r
+            int num = 0;\r
+\r
+            try\r
+            {\r
+                synchronized (createStreamLock)\r
+                {\r
+                    if (inputStream != null)\r
+                        num = inputStream.read (buffer, 0, numBytes);\r
+                }\r
+            }\r
+            catch (IOException e)\r
+            {}\r
+\r
+            if (num > 0)\r
+                position += num;\r
+\r
+            return num;\r
+        }\r
+\r
+        public final long getPosition()                 { return position; }\r
+        public final long getTotalLength()              { return totalLength; }\r
+        public final boolean isExhausted()              { return false; }\r
+        public final boolean setPosition (long newPos)  { return false; }\r
+\r
+        private boolean isPost;\r
+        private byte[] postData;\r
+        private String headers;\r
+        private int timeOutMs;\r
+        String httpRequestCmd;\r
+        private HttpURLConnection connection;\r
+        private int[] statusCode;\r
+        private StringBuffer responseHeaders;\r
+        private int totalLength;\r
+        private int numRedirectsToFollow;\r
+        private InputStream inputStream;\r
+        private long position;\r
+        private final ReentrantLock createStreamLock = new ReentrantLock();\r
+        private final Object createFutureLock = new Object();\r
+        private AtomicBoolean hasBeenCancelled = new AtomicBoolean();\r
+\r
+        private final ExecutorService executor = Executors.newCachedThreadPool (Executors.defaultThreadFactory());\r
+        Future<BufferedInputStream> streamFuture;\r
+    }\r
+\r
+    public static final HTTPStream createHTTPStream (String address, boolean isPost, byte[] postData,\r
+                                                     String headers, int timeOutMs, int[] statusCode,\r
+                                                     StringBuffer responseHeaders, int numRedirectsToFollow,\r
+                                                     String httpRequestCmd)\r
+    {\r
+        // timeout parameter of zero for HttpUrlConnection is a blocking connect (negative value for juce::URL)\r
+        if (timeOutMs < 0)\r
+            timeOutMs = 0;\r
+        else if (timeOutMs == 0)\r
+            timeOutMs = 30000;\r
+\r
+        for (;;)\r
+        {\r
+            try\r
+            {\r
+                HTTPStream httpStream = new HTTPStream (address, isPost, postData, headers,\r
+                                                        timeOutMs, statusCode, responseHeaders,\r
+                                                        numRedirectsToFollow, httpRequestCmd);\r
+\r
+                return httpStream;\r
+            }\r
+            catch (Throwable e) {}\r
+\r
+            return null;\r
+        }\r
+    }\r
+\r
+    public final void launchURL (String url)\r
+    {\r
+        startActivity (new Intent (Intent.ACTION_VIEW, Uri.parse (url)));\r
+    }\r
+\r
+    private native boolean webViewPageLoadStarted (long host, WebView view, String url);\r
+    private native void webViewPageLoadFinished (long host, WebView view, String url);\r
+    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);\r
+    private native void webViewCloseWindowRequest (long host, WebView view);\r
+    private native void webViewCreateWindowRequest (long host, WebView view);\r
+\r
+    //==============================================================================\r
+    public class JuceWebViewClient   extends WebViewClient\r
+    {\r
+        public JuceWebViewClient (long hostToUse)\r
+        {\r
+            host = hostToUse;\r
+        }\r
+\r
+        public void hostDeleted()\r
+        {\r
+            synchronized (hostLock)\r
+            {\r
+                host = 0;\r
+            }\r
+        }\r
+\r
+        @Override\r
+        public void onPageFinished (WebView view, String url)\r
+        {\r
+            if (host == 0)\r
+                return;\r
+\r
+            webViewPageLoadFinished (host, view, url);\r
+        }\r
+\r
+        @Override\r
+        public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error)\r
+        {\r
+            if (host == 0)\r
+                return;\r
+\r
+            webViewReceivedSslError (host, view, handler, error);\r
+        }\r
+\r
+        @Override\r
+        public void onReceivedError (WebView view, WebResourceRequest request, WebResourceError error)\r
+        {\r
+            if (host == 0)\r
+                return;\r
+\r
+            webViewReceivedError (host, view, request, error);\r
+        }\r
+\r
+        @Override\r
+        public void onReceivedHttpError (WebView view, WebResourceRequest request, WebResourceResponse errorResponse)\r
+        {\r
+            if (host == 0)\r
+                return;\r
+\r
+            webViewReceivedHttpError (host, view, request, errorResponse);\r
+        }\r
+\r
+        @Override\r
+        public WebResourceResponse shouldInterceptRequest (WebView view, WebResourceRequest request)\r
+        {\r
+            synchronized (hostLock)\r
+            {\r
+                if (host != 0)\r
+                {\r
+                    boolean shouldLoad = webViewPageLoadStarted (host, view, request.getUrl().toString());\r
+\r
+                    if (shouldLoad)\r
+                        return null;\r
+                }\r
+            }\r
+\r
+            return new WebResourceResponse ("text/html", null, null);\r
+        }\r
+\r
+        private long host;\r
+        private final Object hostLock = new Object();\r
+    }\r
+\r
+    public class JuceWebChromeClient    extends WebChromeClient\r
+    {\r
+        public JuceWebChromeClient (long hostToUse)\r
+        {\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onCloseWindow (WebView window)\r
+        {\r
+            webViewCloseWindowRequest (host, window);\r
+        }\r
+\r
+        @Override\r
+        public boolean onCreateWindow (WebView view, boolean isDialog,\r
+                                       boolean isUserGesture, Message resultMsg)\r
+        {\r
+            webViewCreateWindowRequest (host, view);\r
+            return false;\r
+        }\r
+\r
+        private long host;\r
+        private final Object hostLock = new Object();\r
+    }\r
+\r
+\r
+    //==============================================================================\r
+    public class CameraDeviceStateCallback  extends CameraDevice.StateCallback\r
+    {\r
+        private native void cameraDeviceStateClosed       (long host, CameraDevice camera);\r
+        private native void cameraDeviceStateDisconnected (long host, CameraDevice camera);\r
+        private native void cameraDeviceStateError        (long host, CameraDevice camera, int error);\r
+        private native void cameraDeviceStateOpened       (long host, CameraDevice camera);\r
+\r
+        CameraDeviceStateCallback (long hostToUse)\r
+        {\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onClosed (CameraDevice camera)\r
+        {\r
+            cameraDeviceStateClosed (host, camera);\r
+        }\r
+\r
+        @Override\r
+        public void onDisconnected (CameraDevice camera)\r
+        {\r
+            cameraDeviceStateDisconnected (host, camera);\r
+        }\r
+\r
+        @Override\r
+        public void onError (CameraDevice camera, int error)\r
+        {\r
+            cameraDeviceStateError (host, camera, error);\r
+        }\r
+\r
+        @Override\r
+        public void onOpened (CameraDevice camera)\r
+        {\r
+            cameraDeviceStateOpened (host, camera);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+    //==============================================================================\r
+    public class CameraCaptureSessionStateCallback  extends CameraCaptureSession.StateCallback\r
+    {\r
+        private native void cameraCaptureSessionActive          (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionClosed          (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionConfigured      (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionReady           (long host, CameraCaptureSession session);\r
+\r
+        CameraCaptureSessionStateCallback (long hostToUse)\r
+        {\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onActive (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionActive (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onClosed (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionClosed (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onConfigureFailed (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionConfigureFailed (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onConfigured (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionConfigured (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onReady (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionReady (host, session);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+    //==============================================================================\r
+    public class CameraCaptureSessionCaptureCallback    extends CameraCaptureSession.CaptureCallback\r
+    {\r
+        private native void cameraCaptureSessionCaptureCompleted  (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, TotalCaptureResult result);\r
+        private native void cameraCaptureSessionCaptureFailed     (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureFailure failure);\r
+        private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureResult partialResult);\r
+        private native void cameraCaptureSessionCaptureStarted    (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, long timestamp, long frameNumber);\r
+        private native void cameraCaptureSessionCaptureSequenceAborted   (long host, boolean isPreview, CameraCaptureSession session, int sequenceId);\r
+        private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber);\r
+\r
+        CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview)\r
+        {\r
+            host = hostToUse;\r
+            preview = shouldBePreview;\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request,\r
+                                        TotalCaptureResult result)\r
+        {\r
+            cameraCaptureSessionCaptureCompleted (host, preview, session, request, result);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure)\r
+        {\r
+            cameraCaptureSessionCaptureFailed (host, preview, session, request, failure);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request,\r
+                                         CaptureResult partialResult)\r
+        {\r
+            cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId)\r
+        {\r
+            cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber)\r
+        {\r
+            cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp,\r
+                                      long frameNumber)\r
+        {\r
+            cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber);\r
+        }\r
+\r
+        private long host;\r
+        private boolean preview;\r
+    }\r
+\r
+    //==============================================================================\r
+    public class JuceOrientationEventListener    extends OrientationEventListener\r
+    {\r
+        private native void deviceOrientationChanged (long host, int orientation);\r
+\r
+        public JuceOrientationEventListener (long hostToUse, Context context, int rate)\r
+        {\r
+            super (context, rate);\r
+\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onOrientationChanged (int orientation)\r
+        {\r
+            deviceOrientationChanged (host, orientation);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+\r
+    //==============================================================================\r
+    public static final String getLocaleValue (boolean isRegion)\r
+    {\r
+        java.util.Locale locale = java.util.Locale.getDefault();\r
+\r
+        return isRegion ? locale.getCountry()\r
+                        : locale.getLanguage();\r
+    }\r
+\r
+    private static final String getFileLocation (String type)\r
+    {\r
+        return Environment.getExternalStoragePublicDirectory (type).getAbsolutePath();\r
+    }\r
+\r
+    public static final String getDocumentsFolder()\r
+    {\r
+        if (getAndroidSDKVersion() >= 19)\r
+            return getFileLocation ("Documents");\r
+\r
+        return Environment.getDataDirectory().getAbsolutePath();\r
+    }\r
+\r
+    public static final String getPicturesFolder()   { return getFileLocation (Environment.DIRECTORY_PICTURES); }\r
+    public static final String getMusicFolder()      { return getFileLocation (Environment.DIRECTORY_MUSIC); }\r
+    public static final String getMoviesFolder()     { return getFileLocation (Environment.DIRECTORY_MOVIES); }\r
+    public static final String getDownloadsFolder()  { return getFileLocation (Environment.DIRECTORY_DOWNLOADS); }\r
+\r
+    //==============================================================================\r
+    @Override\r
+    protected void onActivityResult (int requestCode, int resultCode, Intent data)\r
+    {\r
+        appActivityResult (requestCode, resultCode, data);\r
+    }\r
+\r
+    @Override\r
+    protected void onNewIntent (Intent intent)\r
+    {\r
+        super.onNewIntent(intent);\r
+        setIntent(intent);\r
+\r
+        appNewIntent (intent);\r
+    }\r
+\r
+    //==============================================================================\r
+    public final Typeface getTypeFaceFromAsset (String assetName)\r
+    {\r
+        try\r
+        {\r
+            return Typeface.createFromAsset (this.getResources().getAssets(), assetName);\r
+        }\r
+        catch (Throwable e) {}\r
+\r
+        return null;\r
+    }\r
+\r
+    final protected static char[] hexArray = "0123456789ABCDEF".toCharArray();\r
+\r
+    public static String bytesToHex (byte[] bytes)\r
+    {\r
+        char[] hexChars = new char[bytes.length * 2];\r
+\r
+        for (int j = 0; j < bytes.length; ++j)\r
+        {\r
+            int v = bytes[j] & 0xff;\r
+            hexChars[j * 2]     = hexArray[v >>> 4];\r
+            hexChars[j * 2 + 1] = hexArray[v & 0x0f];\r
+        }\r
+\r
+        return new String (hexChars);\r
+    }\r
+\r
+    final private java.util.Map dataCache = new java.util.HashMap();\r
+\r
+    synchronized private final File getDataCacheFile (byte[] data)\r
+    {\r
+        try\r
+        {\r
+            java.security.MessageDigest digest = java.security.MessageDigest.getInstance ("MD5");\r
+            digest.update (data);\r
+\r
+            String key = bytesToHex (digest.digest());\r
+\r
+            if (dataCache.containsKey (key))\r
+                return (File) dataCache.get (key);\r
+\r
+            File f = new File (this.getCacheDir(), "bindata_" + key);\r
+            f.delete();\r
+            FileOutputStream os = new FileOutputStream (f);\r
+            os.write (data, 0, data.length);\r
+            dataCache.put (key, f);\r
+            return f;\r
+        }\r
+        catch (Throwable e) {}\r
+\r
+        return null;\r
+    }\r
+\r
+    private final void clearDataCache()\r
+    {\r
+        java.util.Iterator it = dataCache.values().iterator();\r
+\r
+        while (it.hasNext())\r
+        {\r
+            File f = (File) it.next();\r
+            f.delete();\r
+        }\r
+    }\r
+\r
+    public final Typeface getTypeFaceFromByteArray (byte[] data)\r
+    {\r
+        try\r
+        {\r
+            File f = getDataCacheFile (data);\r
+\r
+            if (f != null)\r
+                return Typeface.createFromFile (f);\r
+        }\r
+        catch (Exception e)\r
+        {\r
+            Log.e ("JUCE", e.toString());\r
+        }\r
+\r
+        return null;\r
+    }\r
+\r
+    public static final int getAndroidSDKVersion()\r
+    {\r
+        return android.os.Build.VERSION.SDK_INT;\r
+    }\r
+\r
+    public final String audioManagerGetProperty (String property)\r
+    {\r
+        Object obj = getSystemService (AUDIO_SERVICE);\r
+        if (obj == null)\r
+            return null;\r
+\r
+        java.lang.reflect.Method method;\r
+\r
+        try\r
+        {\r
+            method = obj.getClass().getMethod ("getProperty", String.class);\r
+        }\r
+        catch (SecurityException e)     { return null; }\r
+        catch (NoSuchMethodException e) { return null; }\r
+\r
+        if (method == null)\r
+            return null;\r
+\r
+        try\r
+        {\r
+            return (String) method.invoke (obj, property);\r
+        }\r
+        catch (java.lang.IllegalArgumentException e) {}\r
+        catch (java.lang.IllegalAccessException e) {}\r
+        catch (java.lang.reflect.InvocationTargetException e) {}\r
+\r
+        return null;\r
+    }\r
+\r
+    public final boolean hasSystemFeature (String property)\r
+    {\r
+        return getPackageManager().hasSystemFeature (property);\r
+    }\r
+}\r
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
new file mode 100644 (file)
index 0000000..9afbbaa
--- /dev/null
@@ -0,0 +1,138 @@
+package com.juce.demorunner;\r
+\r
+import android.content.ContentProvider;\r
+import android.content.ContentValues;\r
+import android.content.res.AssetFileDescriptor;\r
+import android.content.res.Resources;\r
+import android.database.Cursor;\r
+import android.database.MatrixCursor;\r
+import android.net.Uri;\r
+import android.os.FileObserver;\r
+import android.os.ParcelFileDescriptor;\r
+import java.lang.String;\r
+\r
+public final class SharingContentProvider extends ContentProvider\r
+{\r
+    private Object lock = new Object();\r
+\r
+    private native void contentSharerFileObserverEvent (long host, int event, String path);\r
+\r
+    private native Cursor contentSharerQuery (Uri uri, String[] projection, String selection,\r
+                                              String[] selectionArgs, String sortOrder);\r
+\r
+    private native void contentSharerCursorClosed (long host);\r
+\r
+    private native AssetFileDescriptor contentSharerOpenFile (Uri uri, String mode);\r
+    private native String[] contentSharerGetStreamTypes (Uri uri, String mimeTypeFilter);\r
+\r
+    public final class ProviderFileObserver extends FileObserver\r
+    {\r
+        public ProviderFileObserver (long hostToUse, String path, int mask)\r
+        {\r
+            super (path, mask);\r
+\r
+            host = hostToUse;\r
+        }\r
+\r
+        public void onEvent (int event, String path)\r
+        {\r
+            contentSharerFileObserverEvent (host, event, path);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+    public final class ProviderCursor extends MatrixCursor\r
+    {\r
+        ProviderCursor (long hostToUse, String[] columnNames)\r
+        {\r
+            super (columnNames);\r
+\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void close()\r
+        {\r
+            super.close();\r
+\r
+            contentSharerCursorClosed (host);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+    @Override\r
+    public boolean onCreate()\r
+    {\r
+        return true;\r
+    }\r
+\r
+    @Override\r
+    public Cursor query (Uri url, String[] projection, String selection,\r
+                         String[] selectionArgs, String sortOrder)\r
+    {\r
+        synchronized (lock)\r
+        {\r
+            return contentSharerQuery (url, projection, selection, selectionArgs, sortOrder);\r
+        }\r
+    }\r
+\r
+    @Override\r
+    public Uri insert (Uri uri, ContentValues values)\r
+    {\r
+        return null;\r
+    }\r
+\r
+    @Override\r
+    public int update (Uri uri, ContentValues values, String selection,\r
+                       String[] selectionArgs)\r
+    {\r
+        return 0;\r
+    }\r
+\r
+    @Override\r
+    public int delete (Uri uri, String selection, String[] selectionArgs)\r
+    {\r
+        return 0;\r
+    }\r
+\r
+    @Override\r
+    public String getType (Uri uri)\r
+    {\r
+        return null;\r
+    }\r
+\r
+    @Override\r
+    public AssetFileDescriptor openAssetFile (Uri uri, String mode)\r
+    {\r
+        synchronized (lock)\r
+        {\r
+            return contentSharerOpenFile (uri, mode);\r
+        }\r
+    }\r
+\r
+    @Override\r
+    public ParcelFileDescriptor openFile (Uri uri, String mode)\r
+    {\r
+        synchronized (lock)\r
+        {\r
+            AssetFileDescriptor result = contentSharerOpenFile (uri, mode);\r
+\r
+            if (result != null)\r
+                return result.getParcelFileDescriptor();\r
+\r
+            return null;\r
+        }\r
+    }\r
+\r
+    @Override\r
+    public String[] getStreamTypes (Uri uri, String mimeTypeFilter)\r
+    {\r
+        synchronized (lock)\r
+        {\r
+            return contentSharerGetStreamTypes (uri, mimeTypeFilter);\r
+        }\r
+    }\r
+\r
+}\r
index af0505a40d4cb9fcd83b5614971761f63bf31621..7e4f1ae939c2e57235a302cda898c0d0a97137fa 100644 (file)
@@ -30,6 +30,7 @@ import android.content.Intent;
 import android.content.res.Configuration;\r
 import android.content.pm.PackageInfo;\r
 import android.content.pm.PackageManager;\r
+import android.hardware.camera2.*;\r
 import android.net.http.SslError;\r
 import android.net.Uri;\r
 import android.os.Bundle;\r
@@ -119,6 +120,7 @@ public class DemoRunner   extends Activity
     private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2;\r
     private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3;\r
     private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4;\r
+    private static final int JUCE_PERMISSIONS_CAMERA = 5;\r
 \r
     private static String getAndroidPermissionName (int permissionID)\r
     {\r
@@ -129,6 +131,7 @@ public class DemoRunner   extends Activity
                                                           // use string value as this is not defined in SDKs < 16\r
             case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE:  return "android.permission.READ_EXTERNAL_STORAGE";\r
             case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE;\r
+            case JUCE_PERMISSIONS_CAMERA:                 return Manifest.permission.CAMERA;\r
         }\r
 \r
         // unknown permission ID!\r
@@ -1205,6 +1208,7 @@ public class DemoRunner   extends Activity
         setVolumeControlStream (AudioManager.STREAM_MUSIC);\r
 \r
         permissionCallbackPtrMap = new HashMap<Integer, Long>();\r
+        appPausedResumedListeners = new HashMap<Long, AppPausedResumedListener>();\r
     }\r
 \r
     @Override\r
@@ -1221,6 +1225,11 @@ public class DemoRunner   extends Activity
     {\r
         suspendApp();\r
 \r
+        Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+        for (Long k : keys)\r
+            appPausedResumedListeners.get (k).appPaused();\r
+\r
         try\r
         {\r
             Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down\r
@@ -1236,12 +1245,10 @@ public class DemoRunner   extends Activity
         super.onResume();\r
         resumeApp();\r
 \r
-        // Ensure that navigation/status bar visibility is correctly restored.\r
-        for (int i = 0; i < viewHolder.getChildCount(); ++i)\r
-        {\r
-            if (viewHolder.getChildAt (i) instanceof ComponentPeerView)\r
-                ((ComponentPeerView) viewHolder.getChildAt (i)).appResumed();\r
-        }\r
+        Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+        for (Long k : keys)\r
+            appPausedResumedListeners.get (k).appResumed();\r
     }\r
 \r
     @Override\r
@@ -1368,11 +1375,14 @@ public class DemoRunner   extends Activity
     {\r
         ComponentPeerView v = new ComponentPeerView (this, opaque, host);\r
         viewHolder.addView (v);\r
+        addAppPausedResumedListener (v, host);\r
         return v;\r
     }\r
 \r
     public final void deleteView (ComponentPeerView view)\r
     {\r
+        removeAppPausedResumedListener (view, view.host);\r
+\r
         view.host = 0;\r
 \r
         ViewGroup group = (ViewGroup) (view.getParent());\r
@@ -1590,9 +1600,28 @@ public class DemoRunner   extends Activity
 \r
     public native void alertDismissed (long callback, int id);\r
 \r
+    //==============================================================================\r
+    public interface AppPausedResumedListener\r
+    {\r
+        void appPaused();\r
+        void appResumed();\r
+    }\r
+\r
+    private Map<Long, AppPausedResumedListener> appPausedResumedListeners;\r
+\r
+    public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+    {\r
+        appPausedResumedListeners.put (new Long (listenerHost), l);\r
+    }\r
+\r
+    public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+    {\r
+        appPausedResumedListeners.remove (new Long (listenerHost));\r
+    }\r
+\r
     //==============================================================================\r
     public final class ComponentPeerView extends ViewGroup\r
-                                         implements View.OnFocusChangeListener\r
+                                         implements View.OnFocusChangeListener, AppPausedResumedListener\r
     {\r
         public ComponentPeerView (Context context, boolean opaque_, long host)\r
         {\r
@@ -1940,13 +1969,25 @@ public class DemoRunner   extends Activity
         }\r
 \r
         //==============================================================================\r
+        private native void handleAppPaused (long host);\r
         private native void handleAppResumed (long host);\r
 \r
+        @Override\r
+        public void appPaused()\r
+        {\r
+            if (host == 0)\r
+                return;\r
+\r
+            handleAppPaused (host);\r
+        }\r
+\r
+        @Override\r
         public void appResumed()\r
         {\r
             if (host == 0)\r
                 return;\r
 \r
+            // Ensure that navigation/status bar visibility is correctly restored.\r
             handleAppResumed (host);\r
         }\r
     }\r
@@ -2616,6 +2657,179 @@ public class DemoRunner   extends Activity
         private final Object hostLock = new Object();\r
     }\r
 \r
+\r
+    //==============================================================================\r
+    public class CameraDeviceStateCallback  extends CameraDevice.StateCallback\r
+    {\r
+        private native void cameraDeviceStateClosed (long host, CameraDevice camera);\r
+        private native void cameraDeviceStateDisconnected (long host, CameraDevice camera);\r
+        private native void cameraDeviceStateError (long host, CameraDevice camera, int error);\r
+        private native void cameraDeviceStateOpened (long host, CameraDevice camera);\r
+\r
+        CameraDeviceStateCallback (long hostToUse)\r
+        {\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onClosed (CameraDevice camera)\r
+        {\r
+            cameraDeviceStateClosed (host, camera);\r
+        }\r
+\r
+        @Override\r
+        public void onDisconnected (CameraDevice camera)\r
+        {\r
+            cameraDeviceStateDisconnected (host, camera);\r
+        }\r
+\r
+        @Override\r
+        public void onError (CameraDevice camera, int error)\r
+        {\r
+            cameraDeviceStateError (host, camera, error);\r
+        }\r
+\r
+        @Override\r
+        public void onOpened (CameraDevice camera)\r
+        {\r
+            cameraDeviceStateOpened (host, camera);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+    //==============================================================================\r
+    public class CameraCaptureSessionStateCallback  extends CameraCaptureSession.StateCallback\r
+    {\r
+        private native void cameraCaptureSessionActive          (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionClosed          (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionConfigured      (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionReady           (long host, CameraCaptureSession session);\r
+\r
+        CameraCaptureSessionStateCallback (long hostToUse)\r
+        {\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onActive (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionActive (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onClosed (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionClosed (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onConfigureFailed (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionConfigureFailed (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onConfigured (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionConfigured (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onReady (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionReady (host, session);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+    //==============================================================================\r
+    public class CameraCaptureSessionCaptureCallback    extends CameraCaptureSession.CaptureCallback\r
+    {\r
+        private native void cameraCaptureSessionCaptureCompleted (long host, boolean isPreview, CameraCaptureSession session,\r
+                                                                  CaptureRequest request, TotalCaptureResult result);\r
+        private native void cameraCaptureSessionCaptureFailed (long host, boolean isPreview, CameraCaptureSession session,\r
+                                                               CaptureRequest request, CaptureFailure failure);\r
+        private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session,\r
+                                                                   CaptureRequest request, CaptureResult partialResult);\r
+        private native void cameraCaptureSessionCaptureSequenceAborted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId);\r
+        private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber);\r
+        private native void cameraCaptureSessionCaptureStarted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request,\r
+                                                                long timestamp, long frameNumber);\r
+\r
+        CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview)\r
+        {\r
+            host = hostToUse;\r
+            preview = shouldBePreview;\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request,\r
+                                        TotalCaptureResult result)\r
+        {\r
+            cameraCaptureSessionCaptureCompleted (host, preview, session, request, result);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure)\r
+        {\r
+            cameraCaptureSessionCaptureFailed (host, preview, session, request, failure);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request,\r
+                                         CaptureResult partialResult)\r
+        {\r
+            cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId)\r
+        {\r
+            cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber)\r
+        {\r
+            cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp,\r
+                                      long frameNumber)\r
+        {\r
+            cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber);\r
+        }\r
+\r
+        private long host;\r
+        private boolean preview;\r
+    }\r
+\r
+    //==============================================================================\r
+    public class JuceOrientationEventListener    extends OrientationEventListener\r
+    {\r
+        private native void deviceOrientationChanged (long host, int orientation);\r
+\r
+        public JuceOrientationEventListener (long hostToUse, Context context, int rate)\r
+        {\r
+            super (context, rate);\r
+\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onOrientationChanged (int orientation)\r
+        {\r
+            deviceOrientationChanged (host, orientation);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+\r
     //==============================================================================\r
     public static final String getLocaleValue (boolean isRegion)\r
     {\r
index 4943fc5b425dfa6d85233ac5a6fbee4892ae3fb7..56a39c08b1942a6f702231e45293c8c439a273d5 100644 (file)
@@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug)
     TARGET_ARCH := -march=native\r
   endif\r
 \r
-  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.3.1 -DJUCE_APP_VERSION_HEX=0x50301 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
+  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.3.2 -DJUCE_APP_VERSION_HEX=0x50302 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
   JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0
   JUCE_TARGET_APP := DemoRunner\r
 \r
@@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release)
     TARGET_ARCH := -march=native\r
   endif\r
 \r
-  JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.3.1 -DJUCE_APP_VERSION_HEX=0x50301 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
+  JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.3.2 -DJUCE_APP_VERSION_HEX=0x50302 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
   JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0
   JUCE_TARGET_APP := DemoRunner\r
 \r
index c4f0557fcd525f3a65aba33262694edf456dcd7d..9d9fc433a75ad3fdadcccbc87d415983495929e1 100644 (file)
        objectVersion = 46;
        objects = {
 
-               5665A011C7D125C8890D3260 = {isa = PBXBuildFile; fileRef = B953F5C249804F38B818AD2F; };
-               C8D093204643DE75CAA41A3F = {isa = PBXBuildFile; fileRef = E622C086CB768052D799CB95; };
-               7286A5BB489F25E6E3CF63D4 = {isa = PBXBuildFile; fileRef = A70E204AA2B7B904F9C08770; };
-               B6AB4CB9F0A0AD540028A3E1 = {isa = PBXBuildFile; fileRef = F10017EB39A3981DF2FFC565; };
-               71F90E5ABB1112D2D92EAB59 = {isa = PBXBuildFile; fileRef = 61BF1C5B6EB2C49337A028E7; };
-               30F8D005CCE03386DF30747F = {isa = PBXBuildFile; fileRef = 9647BC3EC0BFC192CD7D0643; };
-               C3ECBDFA83E3472AC36AAB1E = {isa = PBXBuildFile; fileRef = A65A103C9FA300E4AEF04066; };
-               AB53895F1E4193A2C9B51DB6 = {isa = PBXBuildFile; fileRef = 5AB31D4FDB61420CFE50FD52; };
-               2EF15A7E6ECFD861D719276A = {isa = PBXBuildFile; fileRef = BE800C80B08E6D722CACB487; };
-               9318D1152DE35146100C7594 = {isa = PBXBuildFile; fileRef = 95C3EC76835BB2151FA94A67; };
-               3AB93979B46C801A20E974C3 = {isa = PBXBuildFile; fileRef = 6D190D5FCC9592AB2135AC75; };
-               4A58CC8B8AEEF166B0E47D37 = {isa = PBXBuildFile; fileRef = BC2C11F10F5D2FB30550C95A; };
-               271D3EB069D6E01D56460721 = {isa = PBXBuildFile; fileRef = DB13FF3C61C11971D3D61C9B; };
-               3D2D1CCFB4B682162034225E = {isa = PBXBuildFile; fileRef = 6142F838E6568F8450BC93DB; };
-               AA910CD1304B21E21D30A37E = {isa = PBXBuildFile; fileRef = 8EACCB8CF4A520630C49BF8A; };
-               83BBBA16872A378CE2E35A9D = {isa = PBXBuildFile; fileRef = 8AC905F72A76E7D7275201A4; };
-               F657E50CA75FE6932E710CB0 = {isa = PBXBuildFile; fileRef = 2945A953347C882A8294DF82; };
-               F9EDB3A8F55A4499441401D6 = {isa = PBXBuildFile; fileRef = AE5650194191C6A04F0B5685; };
-               EACB962CC04BDC0369264A8F = {isa = PBXBuildFile; fileRef = 48A8B50CEB577DF7D3FCEFEC; };
-               557BA8FDD37630DF5EB84EE0 = {isa = PBXBuildFile; fileRef = 5FE974D1CE11D7658D57C580; };
-               5CFCACD6AF608BDC2E1E8BD1 = {isa = PBXBuildFile; fileRef = E40C7EC0CD57D5F92EC9C806; };
-               9263171BCE90616A9F350405 = {isa = PBXBuildFile; fileRef = 56280EAEBEAF619C3E98B5C6; };
-               2EF49BC29DA0951B1C43070F = {isa = PBXBuildFile; fileRef = 27FB5D78BF900B70101B3E48; };
-               8861132DCB0DE3F9EB0DD278 = {isa = PBXBuildFile; fileRef = BD545E9E8BA9D67A673AC8E8; };
-               CCDAEA12C17058099252FD3D = {isa = PBXBuildFile; fileRef = 44B4D9F7DBB239B6E57BC2E7; };
-               28778136A8C09DBDC980CB72 = {isa = PBXBuildFile; fileRef = 2CC2281747C1FE9EB940BD1A; };
-               DA696766645C964870153095 = {isa = PBXBuildFile; fileRef = F996277A397F3F21763BAC03; };
-               8F5FE1B5D44F55667509BC99 = {isa = PBXBuildFile; fileRef = 91195E76A94C136774686D97; };
-               3656169644FED0C525D5D30C = {isa = PBXBuildFile; fileRef = 3290EFAFF391EE790FF33FB9; };
-               2763512B6DFF68C0EEF72496 = {isa = PBXBuildFile; fileRef = 46A8BE3E064F7E01EF1E2D2D; };
-               480F45A17B4E83A26B1ACEF9 = {isa = PBXBuildFile; fileRef = 1442C6A9928B564A86D1597A; };
-               3D8EECDED13F0A46A6FA8D3E = {isa = PBXBuildFile; fileRef = 9A35450231D4C3F4DCF16AB3; };
-               E433C1C591D091AF71AD528E = {isa = PBXBuildFile; fileRef = 55479FCC6DB5293B12918CBA; };
-               A5F8F9904580960794429360 = {isa = PBXBuildFile; fileRef = 9733178D30027A7CC3E12510; };
-               B298295E61E5DD800B814DAF = {isa = PBXBuildFile; fileRef = 7445067DFFF67F28456DA9B0; };
-               A7E206DD280DC58E2A150642 = {isa = PBXBuildFile; fileRef = 1EF8C1691168417E42DF81ED; };
-               26260D259EFF13BD5044CD34 = {isa = PBXBuildFile; fileRef = 120B5B68C50C2992969E9CE1; };
-               591D5799ED6524DE9BD846D7 = {isa = PBXBuildFile; fileRef = 0996038E1E70A6ADD233418D; };
-               D09859BDBC491A9932637715 = {isa = PBXBuildFile; fileRef = 96FE3B2079CA29C6C2F5E2F2; };
-               7EC8A06F9290B16DFB16E346 = {isa = PBXBuildFile; fileRef = A477616D8A134C6E99C2BE9D; };
-               33C96917E46535D30B17B483 = {isa = PBXBuildFile; fileRef = 5F79F2C9508D0D7F5A6BF62D; };
-               8AA7BB967216BDBFF0371267 = {isa = PBXBuildFile; fileRef = 6B2332953FCDD3BD197E149A; };
-               FD5B59B8A0B8258531421E60 = {isa = PBXBuildFile; fileRef = F4AB4BBB26E536232D27BE83; };
-               0996038E1E70A6ADD233418D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_basics.mm"; path = "../../JuceLibraryCode/include_juce_gui_basics.mm"; sourceTree = "SOURCE_ROOT"; };
-               09AFF79B4D5593574507F03E = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_utils"; path = "../../../../modules/juce_audio_utils"; sourceTree = "SOURCE_ROOT"; };
-               0D328B4591EBFD9997C61535 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_product_unlocking"; path = "../../../../modules/juce_product_unlocking"; sourceTree = "SOURCE_ROOT"; };
-               120B5B68C50C2992969E9CE1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_graphics.mm"; path = "../../JuceLibraryCode/include_juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; };
-               1442C6A9928B564A86D1597A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_box2d.cpp"; path = "../../JuceLibraryCode/include_juce_box2d.cpp"; sourceTree = "SOURCE_ROOT"; };
-               18C1EBA9CB73E8E7389BBDCC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; };
-               191B33D36B749639B0FBE856 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainComponent.h; path = ../../Source/UI/MainComponent.h; sourceTree = "SOURCE_ROOT"; };
-               1EF8C1691168417E42DF81ED = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_events.mm"; path = "../../JuceLibraryCode/include_juce_events.mm"; sourceTree = "SOURCE_ROOT"; };
-               27FB5D78BF900B70101B3E48 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../Source/Main.cpp; sourceTree = "SOURCE_ROOT"; };
-               2945A953347C882A8294DF82 = {isa = PBXFileReference; lastKnownFileType = file.icns; name = Icon.icns; path = Icon.icns; sourceTree = "SOURCE_ROOT"; };
-               2CC2281747C1FE9EB940BD1A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_devices.mm"; path = "../../JuceLibraryCode/include_juce_audio_devices.mm"; sourceTree = "SOURCE_ROOT"; };
-               3290EFAFF391EE790FF33FB9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_utils.mm"; path = "../../JuceLibraryCode/include_juce_audio_utils.mm"; sourceTree = "SOURCE_ROOT"; };
-               3384C796C682AF43B57B42F2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JUCEDemos.h; path = ../../Source/Demos/JUCEDemos.h; sourceTree = "SOURCE_ROOT"; };
-               44B4D9F7DBB239B6E57BC2E7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_basics.mm"; path = "../../JuceLibraryCode/include_juce_audio_basics.mm"; sourceTree = "SOURCE_ROOT"; };
-               46A8BE3E064F7E01EF1E2D2D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_blocks_basics.cpp"; path = "../../JuceLibraryCode/include_juce_blocks_basics.cpp"; sourceTree = "SOURCE_ROOT"; };
-               47623ED30F98E053C07A9B11 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_dsp"; path = "../../../../modules/juce_dsp"; sourceTree = "SOURCE_ROOT"; };
-               483FAD2B91F1B2A248684D8D = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_graphics"; path = "../../../../modules/juce_graphics"; sourceTree = "SOURCE_ROOT"; };
-               48A8B50CEB577DF7D3FCEFEC = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs2.cpp; path = ../../Source/Demos/DemoPIPs2.cpp; sourceTree = "SOURCE_ROOT"; };
-               497F44004821C9FDC0B1A337 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DemoContentComponent.h; path = ../../Source/UI/DemoContentComponent.h; sourceTree = "SOURCE_ROOT"; };
-               4B2E65945C61CDD81D945CC3 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_analytics"; path = "../../../../modules/juce_analytics"; sourceTree = "SOURCE_ROOT"; };
-               531F8760E51457787457AC3D = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_opengl"; path = "../../../../modules/juce_opengl"; sourceTree = "SOURCE_ROOT"; };
-               53ED8C56ECA0B933135E6ED5 = {isa = PBXFileReference; lastKnownFileType = image.png; name = JUCEAppIcon.png; path = ../../Source/JUCEAppIcon.png; sourceTree = "SOURCE_ROOT"; };
-               55479FCC6DB5293B12918CBA = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_cryptography.mm"; path = "../../JuceLibraryCode/include_juce_cryptography.mm"; sourceTree = "SOURCE_ROOT"; };
-               56280EAEBEAF619C3E98B5C6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = MainComponent.cpp; path = ../../Source/UI/MainComponent.cpp; sourceTree = "SOURCE_ROOT"; };
-               5AB31D4FDB61420CFE50FD52 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
-               5F79F2C9508D0D7F5A6BF62D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_osc.cpp"; path = "../../JuceLibraryCode/include_juce_osc.cpp"; sourceTree = "SOURCE_ROOT"; };
-               5FE974D1CE11D7658D57C580 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JUCEDemos.cpp; path = ../../Source/Demos/JUCEDemos.cpp; sourceTree = "SOURCE_ROOT"; };
-               6142F838E6568F8450BC93DB = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
-               61BF1C5B6EB2C49337A028E7 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; };
-               62B6BD963ACD31048A939441 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_devices"; path = "../../../../modules/juce_audio_devices"; sourceTree = "SOURCE_ROOT"; };
-               6B2332953FCDD3BD197E149A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_product_unlocking.mm"; path = "../../JuceLibraryCode/include_juce_product_unlocking.mm"; sourceTree = "SOURCE_ROOT"; };
-               6D190D5FCC9592AB2135AC75 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = System/Library/Frameworks/DiscRecording.framework; sourceTree = SDKROOT; };
-               7445067DFFF67F28456DA9B0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_dsp.mm"; path = "../../JuceLibraryCode/include_juce_dsp.mm"; sourceTree = "SOURCE_ROOT"; };
-               74E8AB27C5B4246DA0590820 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IntroScreen.h; path = ../../Source/Demos/IntroScreen.h; sourceTree = "SOURCE_ROOT"; };
-               8AC905F72A76E7D7275201A4 = {isa = PBXFileReference; lastKnownFileType = file.nib; name = RecentFilesMenuTemplate.nib; path = RecentFilesMenuTemplate.nib; sourceTree = "SOURCE_ROOT"; };
-               8DA81A2479F1EF4B1064E3A0 = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-App.plist"; path = "Info-App.plist"; sourceTree = "SOURCE_ROOT"; };
-               8EACCB8CF4A520630C49BF8A = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
-               91195E76A94C136774686D97 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_processors.mm"; path = "../../JuceLibraryCode/include_juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; };
-               95C3EC76835BB2151FA94A67 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; };
-               9647BC3EC0BFC192CD7D0643 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
-               96FE3B2079CA29C6C2F5E2F2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_extra.mm"; path = "../../JuceLibraryCode/include_juce_gui_extra.mm"; sourceTree = "SOURCE_ROOT"; };
-               9733178D30027A7CC3E12510 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_data_structures.mm"; path = "../../JuceLibraryCode/include_juce_data_structures.mm"; sourceTree = "SOURCE_ROOT"; };
-               9A35450231D4C3F4DCF16AB3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_core.mm"; path = "../../JuceLibraryCode/include_juce_core.mm"; sourceTree = "SOURCE_ROOT"; };
-               9A974BD82436ED647B457D0B = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_data_structures"; path = "../../../../modules/juce_data_structures"; sourceTree = "SOURCE_ROOT"; };
-               9AA6843063F8D624808AA5FF = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_blocks_basics"; path = "../../../../modules/juce_blocks_basics"; sourceTree = "SOURCE_ROOT"; };
-               9D3C18C7CD24710A9D88CACB = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_osc"; path = "../../../../modules/juce_osc"; sourceTree = "SOURCE_ROOT"; };
-               A075E4A80B931C9431786CB4 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_formats"; path = "../../../../modules/juce_audio_formats"; sourceTree = "SOURCE_ROOT"; };
-               A477616D8A134C6E99C2BE9D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_opengl.mm"; path = "../../JuceLibraryCode/include_juce_opengl.mm"; sourceTree = "SOURCE_ROOT"; };
-               A65A103C9FA300E4AEF04066 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
-               A70E204AA2B7B904F9C08770 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-               AE309D5EC9B20A17B819B264 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_processors"; path = "../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; };
-               AE5650194191C6A04F0B5685 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs1.cpp; path = ../../Source/Demos/DemoPIPs1.cpp; sourceTree = "SOURCE_ROOT"; };
-               AE80AC9B628F8B74C6F1F29E = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_events"; path = "../../../../modules/juce_events"; sourceTree = "SOURCE_ROOT"; };
-               B953F5C249804F38B818AD2F = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoRunner.app; sourceTree = "BUILT_PRODUCTS_DIR"; };
-               BC2C11F10F5D2FB30550C95A = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
-               BD545E9E8BA9D67A673AC8E8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_analytics.cpp"; path = "../../JuceLibraryCode/include_juce_analytics.cpp"; sourceTree = "SOURCE_ROOT"; };
-               BE800C80B08E6D722CACB487 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-               BF3AA167B271DBCB79CE3510 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_basics"; path = "../../../../modules/juce_audio_basics"; sourceTree = "SOURCE_ROOT"; };
-               D869E1D6485900AB3406AF03 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SettingsContent.h; path = ../../Source/UI/SettingsContent.h; sourceTree = "SOURCE_ROOT"; };
-               D93CFD2601C0E84D357B7959 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_core"; path = "../../../../modules/juce_core"; sourceTree = "SOURCE_ROOT"; };
-               DB13FF3C61C11971D3D61C9B = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
-               E40C7EC0CD57D5F92EC9C806 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoContentComponent.cpp; path = ../../Source/UI/DemoContentComponent.cpp; sourceTree = "SOURCE_ROOT"; };
-               E4A1F27BDB0FEAB8FD971583 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_box2d"; path = "../../../../modules/juce_box2d"; sourceTree = "SOURCE_ROOT"; };
-               E5CF2486265244CD996876FE = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; };
-               E622C086CB768052D799CB95 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
-               ECFF9E66EC18BEAEF2B6C686 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_video"; path = "../../../../modules/juce_video"; sourceTree = "SOURCE_ROOT"; };
-               F10017EB39A3981DF2FFC565 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-               F124B2F09BEA556820420758 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_basics"; path = "../../../../modules/juce_gui_basics"; sourceTree = "SOURCE_ROOT"; };
-               F3C0C37FD6A1BBBB6588D182 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_extra"; path = "../../../../modules/juce_gui_extra"; sourceTree = "SOURCE_ROOT"; };
-               F4AB4BBB26E536232D27BE83 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_video.mm"; path = "../../JuceLibraryCode/include_juce_video.mm"; sourceTree = "SOURCE_ROOT"; };
-               F6E40DCC3B84C97202B9CC21 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_cryptography"; path = "../../../../modules/juce_cryptography"; sourceTree = "SOURCE_ROOT"; };
-               F996277A397F3F21763BAC03 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_formats.mm"; path = "../../JuceLibraryCode/include_juce_audio_formats.mm"; sourceTree = "SOURCE_ROOT"; };
-               5F0F17E75142C9F8EC4F9EA8 = {isa = PBXGroup; children = (
-                                       AE5650194191C6A04F0B5685,
-                                       48A8B50CEB577DF7D3FCEFEC,
-                                       74E8AB27C5B4246DA0590820,
-                                       5FE974D1CE11D7658D57C580,
-                                       3384C796C682AF43B57B42F2, ); name = Demos; sourceTree = "<group>"; };
-               C69C98BDBD8901865A10D03D = {isa = PBXGroup; children = (
-                                       E40C7EC0CD57D5F92EC9C806,
-                                       497F44004821C9FDC0B1A337,
-                                       56280EAEBEAF619C3E98B5C6,
-                                       191B33D36B749639B0FBE856,
-                                       D869E1D6485900AB3406AF03, ); name = UI; sourceTree = "<group>"; };
-               29499B4E21D547DC19E2AF25 = {isa = PBXGroup; children = (
-                                       5F0F17E75142C9F8EC4F9EA8,
-                                       C69C98BDBD8901865A10D03D,
-                                       27FB5D78BF900B70101B3E48,
-                                       53ED8C56ECA0B933135E6ED5, ); name = Source; sourceTree = "<group>"; };
-               927472CBD503E38DD7E37090 = {isa = PBXGroup; children = (
-                                       29499B4E21D547DC19E2AF25, ); name = DemoRunner; sourceTree = "<group>"; };
-               178FF737E5519A4D16208DEB = {isa = PBXGroup; children = (
-                                       4B2E65945C61CDD81D945CC3,
-                                       BF3AA167B271DBCB79CE3510,
-                                       62B6BD963ACD31048A939441,
-                                       A075E4A80B931C9431786CB4,
-                                       AE309D5EC9B20A17B819B264,
-                                       09AFF79B4D5593574507F03E,
-                                       9AA6843063F8D624808AA5FF,
-                                       E4A1F27BDB0FEAB8FD971583,
-                                       D93CFD2601C0E84D357B7959,
-                                       F6E40DCC3B84C97202B9CC21,
-                                       9A974BD82436ED647B457D0B,
-                                       47623ED30F98E053C07A9B11,
-                                       AE80AC9B628F8B74C6F1F29E,
-                                       483FAD2B91F1B2A248684D8D,
-                                       F124B2F09BEA556820420758,
-                                       F3C0C37FD6A1BBBB6588D182,
-                                       531F8760E51457787457AC3D,
-                                       9D3C18C7CD24710A9D88CACB,
-                                       0D328B4591EBFD9997C61535,
-                                       ECFF9E66EC18BEAEF2B6C686, ); name = "JUCE Modules"; sourceTree = "<group>"; };
-               16DD35D8533EE0BA94AAFBF8 = {isa = PBXGroup; children = (
-                                       18C1EBA9CB73E8E7389BBDCC,
-                                       BD545E9E8BA9D67A673AC8E8,
-                                       44B4D9F7DBB239B6E57BC2E7,
-                                       2CC2281747C1FE9EB940BD1A,
-                                       F996277A397F3F21763BAC03,
-                                       91195E76A94C136774686D97,
-                                       3290EFAFF391EE790FF33FB9,
-                                       46A8BE3E064F7E01EF1E2D2D,
-                                       1442C6A9928B564A86D1597A,
-                                       9A35450231D4C3F4DCF16AB3,
-                                       55479FCC6DB5293B12918CBA,
-                                       9733178D30027A7CC3E12510,
-                                       7445067DFFF67F28456DA9B0,
-                                       1EF8C1691168417E42DF81ED,
-                                       120B5B68C50C2992969E9CE1,
-                                       0996038E1E70A6ADD233418D,
-                                       96FE3B2079CA29C6C2F5E2F2,
-                                       A477616D8A134C6E99C2BE9D,
-                                       5F79F2C9508D0D7F5A6BF62D,
-                                       6B2332953FCDD3BD197E149A,
-                                       F4AB4BBB26E536232D27BE83,
-                                       E5CF2486265244CD996876FE, ); name = "JUCE Library Code"; sourceTree = "<group>"; };
-               FEE1C6574320FAB66F0238D2 = {isa = PBXGroup; children = (
-                                       8DA81A2479F1EF4B1064E3A0,
-                                       8AC905F72A76E7D7275201A4,
-                                       2945A953347C882A8294DF82, ); name = Resources; sourceTree = "<group>"; };
-               17F11FE561BD8D6EB93B64D4 = {isa = PBXGroup; children = (
-                                       E622C086CB768052D799CB95,
-                                       A70E204AA2B7B904F9C08770,
-                                       F10017EB39A3981DF2FFC565,
-                                       61BF1C5B6EB2C49337A028E7,
-                                       9647BC3EC0BFC192CD7D0643,
-                                       A65A103C9FA300E4AEF04066,
-                                       5AB31D4FDB61420CFE50FD52,
-                                       BE800C80B08E6D722CACB487,
-                                       95C3EC76835BB2151FA94A67,
-                                       6D190D5FCC9592AB2135AC75,
-                                       BC2C11F10F5D2FB30550C95A,
-                                       DB13FF3C61C11971D3D61C9B,
-                                       6142F838E6568F8450BC93DB,
-                                       8EACCB8CF4A520630C49BF8A, ); name = Frameworks; sourceTree = "<group>"; };
-               532CECDAA91A39864E7FFF80 = {isa = PBXGroup; children = (
-                                       B953F5C249804F38B818AD2F, ); name = Products; sourceTree = "<group>"; };
-               9979C8B054ED17C9E04C6BAB = {isa = PBXGroup; children = (
-                                       927472CBD503E38DD7E37090,
-                                       178FF737E5519A4D16208DEB,
-                                       16DD35D8533EE0BA94AAFBF8,
-                                       FEE1C6574320FAB66F0238D2,
-                                       17F11FE561BD8D6EB93B64D4,
-                                       532CECDAA91A39864E7FFF80, ); name = Source; sourceTree = "<group>"; };
-               CEC200AA273D1626F466FC27 = {isa = XCBuildConfiguration; buildSettings = {
+               63A2F309E55DAC206E9B97E3 = {isa = PBXBuildFile; fileRef = CFF2BBEB242CC8B3B904B5F9; };
+               48CF0B02E1D06E5DA51E6270 = {isa = PBXBuildFile; fileRef = A04E4408525F24F7DCBA000E; };
+               163B0CF2DD0990A63DF1D5A6 = {isa = PBXBuildFile; fileRef = 470C3E4553B513FFEF752779; };
+               7B4163348896EB1B86B15160 = {isa = PBXBuildFile; fileRef = DC192EFA899E6CBE6B5CD394; };
+               8C0AEA08A71075A6C765AEC9 = {isa = PBXBuildFile; fileRef = 3B99CF94C44E2EE04635A439; };
+               89BC6E2354102D975E08E918 = {isa = PBXBuildFile; fileRef = 440D507FD8F31DB62B1F95C7; };
+               9F15FD7A7CE83CFD98F07D59 = {isa = PBXBuildFile; fileRef = 02A2ED58B066B4D119F67913; };
+               1351A13E78F38741C6075600 = {isa = PBXBuildFile; fileRef = 4F0A137A4115946A346180E6; };
+               46071CE2B98B562B7BF27CB1 = {isa = PBXBuildFile; fileRef = 1CFE3935A3B810D5D68A2504; };
+               6A61CBB4E39BFD392D97528F = {isa = PBXBuildFile; fileRef = 61AE09C749B007B70A265D9B; };
+               9BEA1428416CE06BF72FBAB8 = {isa = PBXBuildFile; fileRef = 3DC90DA86565B0356B6E5E0B; };
+               8584640341100008744861A5 = {isa = PBXBuildFile; fileRef = 71A91516AFD980FEE694C0E1; };
+               028383D0577D0236899D8CA5 = {isa = PBXBuildFile; fileRef = 40BD06D4AB0D2C73E936A2F1; };
+               B1981F62F6A91FD2F579A198 = {isa = PBXBuildFile; fileRef = 23CD1A3F9067C3A0ECE7BB67; };
+               89AD16514B1F4133FFEA1DF9 = {isa = PBXBuildFile; fileRef = 96D99A08027CA35D6A4E5CFD; };
+               D3D8CDCE42E8BE31C7247E38 = {isa = PBXBuildFile; fileRef = 0ECB4FCD24794CE516792552; };
+               3B3952A9A14320312EF890A5 = {isa = PBXBuildFile; fileRef = 388A8209DBB1B08594266121; };
+               41BAB55E0D992708EF06E2C4 = {isa = PBXBuildFile; fileRef = 5CD17151385A69F1E07FE85B; };
+               1BA301E39E29966719B710A1 = {isa = PBXBuildFile; fileRef = 9EBAEBBD9093CB005D1692F2; };
+               E33E8FE2E7F8EC8EB4279F1B = {isa = PBXBuildFile; fileRef = 7B3243C92248D379A0489AA4; };
+               91CD2BCE4CA07E18229EB436 = {isa = PBXBuildFile; fileRef = 9672FCE6167ADB567A9EB2F8; };
+               75DB074DBAE04408A0A917B7 = {isa = PBXBuildFile; fileRef = E0A3F113BC27B7B4D6F1D693; };
+               E6F58FC3ACAE774DB4D06420 = {isa = PBXBuildFile; fileRef = 3AB62BFF806112585B54DDA3; };
+               36E115D98311F12AA06710E6 = {isa = PBXBuildFile; fileRef = 061AECBF1CC7056F4155812D; };
+               B38728296BB32B7994CE28DF = {isa = PBXBuildFile; fileRef = 934ACDCB3FD9D223A3481D8F; };
+               71DF4F5EB4C8305688416725 = {isa = PBXBuildFile; fileRef = E5BFC17E682AB426D203B3E6; };
+               4FBBB55F4E347757F74F1F41 = {isa = PBXBuildFile; fileRef = 25E5ED33876A2C752378C859; };
+               F619F3887CEC064441BB6EE6 = {isa = PBXBuildFile; fileRef = 260481E972425474BB8155B0; };
+               C2BB2B6DA237FE0CB64C7EDA = {isa = PBXBuildFile; fileRef = 5965349393850F41DF76F350; };
+               F28112945CEBEA4CE8975833 = {isa = PBXBuildFile; fileRef = 03B0F9318FD583525AB195A9; };
+               9EACEA6BE8D0ACC72C12C080 = {isa = PBXBuildFile; fileRef = 03A63C3CA6F24977F19C316D; };
+               26652AB1BB77C8A39434775F = {isa = PBXBuildFile; fileRef = E061A1C75FA5722167FC4997; };
+               2707968B431D83AC7E28E49B = {isa = PBXBuildFile; fileRef = E67AB94002886AF67437D6AE; };
+               712D81867EC698463252FA79 = {isa = PBXBuildFile; fileRef = EDDA01B246C6128CAF7A2914; };
+               49E7BBD46981F0035E4E9021 = {isa = PBXBuildFile; fileRef = 831A01C745C905F5715CD822; };
+               611298FAC1A543BDD10D4C41 = {isa = PBXBuildFile; fileRef = 4DF215D350FFE5E119CBA7E5; };
+               D183F8140174ACCDDCD230A2 = {isa = PBXBuildFile; fileRef = 3BC9753E0CD75A36DC742EE0; };
+               FF87532E62753EDFA3D29CAD = {isa = PBXBuildFile; fileRef = 6C5E26B4D28F8450435B8AE1; };
+               2F76CA28C8C0EFC7453D0EB8 = {isa = PBXBuildFile; fileRef = F5F2EA2238973488632FC322; };
+               6B5560283DEEBD6DD2D6C984 = {isa = PBXBuildFile; fileRef = C1E93FAF6C68A40A664422CD; };
+               1DBDFEDE359CFC84F8E3DE4C = {isa = PBXBuildFile; fileRef = FCD0D758C5767944BEC29730; };
+               CDABEA6258EC70C65C9ACCFE = {isa = PBXBuildFile; fileRef = 3E4ED41C374261CFFD309743; };
+               E2F44A968EC2598DAE33A997 = {isa = PBXBuildFile; fileRef = A1D6D36B96B6B37C31F32829; };
+               5CB78489F16E82144914972D = {isa = PBXBuildFile; fileRef = 979F23EA9E5E76131299E886; };
+               BC6036F22423CA0AFF0385A7 = {isa = PBXBuildFile; fileRef = 94B6C88FE30861A47CD28709; };
+               AEA090DAC5C747C50C7D3FA7 = {isa = PBXBuildFile; fileRef = CE38E6469D98462A2C22C915; };
+               CDEB6BA5341494AF51D07C72 = {isa = PBXBuildFile; fileRef = 0AB68DBAB6B7DAEDDDD5B683; };
+               0140787C0118A95E37DE90B4 = {isa = PBXBuildFile; fileRef = 9144821E003E15E4042B57DB; };
+               02A2ED58B066B4D119F67913 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+               03A63C3CA6F24977F19C316D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_devices.mm"; path = "../../JuceLibraryCode/include_juce_audio_devices.mm"; sourceTree = "SOURCE_ROOT"; };
+               03B0F9318FD583525AB195A9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_basics.mm"; path = "../../JuceLibraryCode/include_juce_audio_basics.mm"; sourceTree = "SOURCE_ROOT"; };
+               061AECBF1CC7056F4155812D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs2.cpp; path = ../../Source/Demos/DemoPIPs2.cpp; sourceTree = "SOURCE_ROOT"; };
+               0AB68DBAB6B7DAEDDDD5B683 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_product_unlocking.mm"; path = "../../JuceLibraryCode/include_juce_product_unlocking.mm"; sourceTree = "SOURCE_ROOT"; };
+               0B36C013D9790568B481634C = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_utils"; path = "../../../../modules/juce_audio_utils"; sourceTree = "SOURCE_ROOT"; };
+               0ECB4FCD24794CE516792552 = {isa = PBXFileReference; lastKnownFileType = folder; name = Audio; path = ../../../Audio; sourceTree = "<group>"; };
+               112FFCB73597157E721BCDF2 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_analytics"; path = "../../../../modules/juce_analytics"; sourceTree = "SOURCE_ROOT"; };
+               14CBD28B4887DAF89E27491C = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_cryptography"; path = "../../../../modules/juce_cryptography"; sourceTree = "SOURCE_ROOT"; };
+               1CFE3935A3B810D5D68A2504 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+               1FCD2145DE3FCFCF4F55A8AD = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DemoContentComponent.h; path = ../../Source/UI/DemoContentComponent.h; sourceTree = "SOURCE_ROOT"; };
+               23CD1A3F9067C3A0ECE7BB67 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+               25E5ED33876A2C752378C859 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = MainComponent.cpp; path = ../../Source/UI/MainComponent.cpp; sourceTree = "SOURCE_ROOT"; };
+               260481E972425474BB8155B0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../Source/Main.cpp; sourceTree = "SOURCE_ROOT"; };
+               346450C70C964FD9640B6086 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_processors"; path = "../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; };
+               388A8209DBB1B08594266121 = {isa = PBXFileReference; lastKnownFileType = folder; name = BLOCKS; path = ../../../BLOCKS; sourceTree = "<group>"; };
+               3AB62BFF806112585B54DDA3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs1.cpp; path = ../../Source/Demos/DemoPIPs1.cpp; sourceTree = "SOURCE_ROOT"; };
+               3B99CF94C44E2EE04635A439 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; };
+               3BC9753E0CD75A36DC742EE0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_core.mm"; path = "../../JuceLibraryCode/include_juce_core.mm"; sourceTree = "SOURCE_ROOT"; };
+               3DC90DA86565B0356B6E5E0B = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = System/Library/Frameworks/DiscRecording.framework; sourceTree = SDKROOT; };
+               3E4ED41C374261CFFD309743 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_graphics.mm"; path = "../../JuceLibraryCode/include_juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; };
+               40BD06D4AB0D2C73E936A2F1 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
+               440D507FD8F31DB62B1F95C7 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
+               470C3E4553B513FFEF752779 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+               491641F7632BCC81BBA0ED85 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_formats"; path = "../../../../modules/juce_audio_formats"; sourceTree = "SOURCE_ROOT"; };
+               4DF215D350FFE5E119CBA7E5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_box2d.cpp"; path = "../../JuceLibraryCode/include_juce_box2d.cpp"; sourceTree = "SOURCE_ROOT"; };
+               4E9AD0EAF3CA57B548622D9A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; };
+               4EC2782DE1779A130835B64D = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-App.plist"; path = "Info-App.plist"; sourceTree = "SOURCE_ROOT"; };
+               4F0A137A4115946A346180E6 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
+               4FE6029FF76BCE9698595DC5 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_product_unlocking"; path = "../../../../modules/juce_product_unlocking"; sourceTree = "SOURCE_ROOT"; };
+               5965349393850F41DF76F350 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_analytics.cpp"; path = "../../JuceLibraryCode/include_juce_analytics.cpp"; sourceTree = "SOURCE_ROOT"; };
+               5A9F2000C66D24E8B01BE60B = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_basics"; path = "../../../../modules/juce_gui_basics"; sourceTree = "SOURCE_ROOT"; };
+               5CD17151385A69F1E07FE85B = {isa = PBXFileReference; lastKnownFileType = folder; name = DSP; path = ../../../DSP; sourceTree = "<group>"; };
+               60F2869DC345EAF2314D6C09 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_devices"; path = "../../../../modules/juce_audio_devices"; sourceTree = "SOURCE_ROOT"; };
+               61AE09C749B007B70A265D9B = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; };
+               651ECE3C7BA845DDCFEE48F3 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_osc"; path = "../../../../modules/juce_osc"; sourceTree = "SOURCE_ROOT"; };
+               6847A9B2C5E3C2ED56D8D4E7 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_basics"; path = "../../../../modules/juce_audio_basics"; sourceTree = "SOURCE_ROOT"; };
+               6C198AF93E1F6E682189E2F6 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_opengl"; path = "../../../../modules/juce_opengl"; sourceTree = "SOURCE_ROOT"; };
+               6C2C1AC86623F457427965EF = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_box2d"; path = "../../../../modules/juce_box2d"; sourceTree = "SOURCE_ROOT"; };
+               6C5E26B4D28F8450435B8AE1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_cryptography.mm"; path = "../../JuceLibraryCode/include_juce_cryptography.mm"; sourceTree = "SOURCE_ROOT"; };
+               71A91516AFD980FEE694C0E1 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
+               72129757D2A553B90A7157C6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; };
+               7A5AAE9EE573FC6105CC4AAC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SettingsContent.h; path = ../../Source/UI/SettingsContent.h; sourceTree = "SOURCE_ROOT"; };
+               7B3243C92248D379A0489AA4 = {isa = PBXFileReference; lastKnownFileType = folder; name = Utilities; path = ../../../Utilities; sourceTree = "<group>"; };
+               831A01C745C905F5715CD822 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_blocks_basics.cpp"; path = "../../JuceLibraryCode/include_juce_blocks_basics.cpp"; sourceTree = "SOURCE_ROOT"; };
+               8CE533D611CD0984AD028D73 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_graphics"; path = "../../../../modules/juce_graphics"; sourceTree = "SOURCE_ROOT"; };
+               903CD4126C779884797EF915 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_core"; path = "../../../../modules/juce_core"; sourceTree = "SOURCE_ROOT"; };
+               9144821E003E15E4042B57DB = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_video.mm"; path = "../../JuceLibraryCode/include_juce_video.mm"; sourceTree = "SOURCE_ROOT"; };
+               934ACDCB3FD9D223A3481D8F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JUCEDemos.cpp; path = ../../Source/Demos/JUCEDemos.cpp; sourceTree = "SOURCE_ROOT"; };
+               94B6C88FE30861A47CD28709 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_opengl.mm"; path = "../../JuceLibraryCode/include_juce_opengl.mm"; sourceTree = "SOURCE_ROOT"; };
+               9672FCE6167ADB567A9EB2F8 = {isa = PBXFileReference; lastKnownFileType = file.nib; name = RecentFilesMenuTemplate.nib; path = RecentFilesMenuTemplate.nib; sourceTree = "SOURCE_ROOT"; };
+               96D99A08027CA35D6A4E5CFD = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
+               979F23EA9E5E76131299E886 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_extra.mm"; path = "../../JuceLibraryCode/include_juce_gui_extra.mm"; sourceTree = "SOURCE_ROOT"; };
+               9EBAEBBD9093CB005D1692F2 = {isa = PBXFileReference; lastKnownFileType = folder; name = GUI; path = ../../../GUI; sourceTree = "<group>"; };
+               A04E4408525F24F7DCBA000E = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
+               A1D6D36B96B6B37C31F32829 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_basics.mm"; path = "../../JuceLibraryCode/include_juce_gui_basics.mm"; sourceTree = "SOURCE_ROOT"; };
+               A5256778E2EBD206B337B555 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_video"; path = "../../../../modules/juce_video"; sourceTree = "SOURCE_ROOT"; };
+               A6F555BE0DDF01C285BD8BF5 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_dsp"; path = "../../../../modules/juce_dsp"; sourceTree = "SOURCE_ROOT"; };
+               A9315F8368A5771EC39631CB = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_extra"; path = "../../../../modules/juce_gui_extra"; sourceTree = "SOURCE_ROOT"; };
+               B2BC383CE102EECCF49C7AF7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IntroScreen.h; path = ../../Source/Demos/IntroScreen.h; sourceTree = "SOURCE_ROOT"; };
+               C1E93FAF6C68A40A664422CD = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_dsp.mm"; path = "../../JuceLibraryCode/include_juce_dsp.mm"; sourceTree = "SOURCE_ROOT"; };
+               CE38E6469D98462A2C22C915 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_osc.cpp"; path = "../../JuceLibraryCode/include_juce_osc.cpp"; sourceTree = "SOURCE_ROOT"; };
+               CFF2BBEB242CC8B3B904B5F9 = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoRunner.app; sourceTree = "BUILT_PRODUCTS_DIR"; };
+               D018D636A4DC9BEA11720129 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_blocks_basics"; path = "../../../../modules/juce_blocks_basics"; sourceTree = "SOURCE_ROOT"; };
+               DC192EFA899E6CBE6B5CD394 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+               E061A1C75FA5722167FC4997 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_formats.mm"; path = "../../JuceLibraryCode/include_juce_audio_formats.mm"; sourceTree = "SOURCE_ROOT"; };
+               E0A3F113BC27B7B4D6F1D693 = {isa = PBXFileReference; lastKnownFileType = file.icns; name = Icon.icns; path = Icon.icns; sourceTree = "SOURCE_ROOT"; };
+               E5BFC17E682AB426D203B3E6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoContentComponent.cpp; path = ../../Source/UI/DemoContentComponent.cpp; sourceTree = "SOURCE_ROOT"; };
+               E67AB94002886AF67437D6AE = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_processors.mm"; path = "../../JuceLibraryCode/include_juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; };
+               EB68BD1224CD9748BFA332C0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainComponent.h; path = ../../Source/UI/MainComponent.h; sourceTree = "SOURCE_ROOT"; };
+               ECE79F1433E92BB6213C86F5 = {isa = PBXFileReference; lastKnownFileType = image.png; name = JUCEAppIcon.png; path = ../../Source/JUCEAppIcon.png; sourceTree = "SOURCE_ROOT"; };
+               EDDA01B246C6128CAF7A2914 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_utils.mm"; path = "../../JuceLibraryCode/include_juce_audio_utils.mm"; sourceTree = "SOURCE_ROOT"; };
+               EE6BDC78B539D27E65E92265 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JUCEDemos.h; path = ../../Source/Demos/JUCEDemos.h; sourceTree = "SOURCE_ROOT"; };
+               F5F2EA2238973488632FC322 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_data_structures.mm"; path = "../../JuceLibraryCode/include_juce_data_structures.mm"; sourceTree = "SOURCE_ROOT"; };
+               FB1FC613CE260140F1CFD21B = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_events"; path = "../../../../modules/juce_events"; sourceTree = "SOURCE_ROOT"; };
+               FCD0D758C5767944BEC29730 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_events.mm"; path = "../../JuceLibraryCode/include_juce_events.mm"; sourceTree = "SOURCE_ROOT"; };
+               FDC3CA8D1403C169659F7D8C = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_data_structures"; path = "../../../../modules/juce_data_structures"; sourceTree = "SOURCE_ROOT"; };
+               CD575607FAA297480EE95F13 = {isa = PBXGroup; children = (
+                                       3AB62BFF806112585B54DDA3,
+                                       061AECBF1CC7056F4155812D,
+                                       B2BC383CE102EECCF49C7AF7,
+                                       934ACDCB3FD9D223A3481D8F,
+                                       EE6BDC78B539D27E65E92265, ); name = Demos; sourceTree = "<group>"; };
+               BB12537403CC24C02622582C = {isa = PBXGroup; children = (
+                                       E5BFC17E682AB426D203B3E6,
+                                       1FCD2145DE3FCFCF4F55A8AD,
+                                       25E5ED33876A2C752378C859,
+                                       EB68BD1224CD9748BFA332C0,
+                                       7A5AAE9EE573FC6105CC4AAC, ); name = UI; sourceTree = "<group>"; };
+               6F933968486D9AD9FE112622 = {isa = PBXGroup; children = (
+                                       CD575607FAA297480EE95F13,
+                                       BB12537403CC24C02622582C,
+                                       260481E972425474BB8155B0,
+                                       ECE79F1433E92BB6213C86F5, ); name = Source; sourceTree = "<group>"; };
+               9683F931FA1B8B85FA8C4BD8 = {isa = PBXGroup; children = (
+                                       6F933968486D9AD9FE112622, ); name = DemoRunner; sourceTree = "<group>"; };
+               5A0B2CEF393A25C6D4B1B76C = {isa = PBXGroup; children = (
+                                       112FFCB73597157E721BCDF2,
+                                       6847A9B2C5E3C2ED56D8D4E7,
+                                       60F2869DC345EAF2314D6C09,
+                                       491641F7632BCC81BBA0ED85,
+                                       346450C70C964FD9640B6086,
+                                       0B36C013D9790568B481634C,
+                                       D018D636A4DC9BEA11720129,
+                                       6C2C1AC86623F457427965EF,
+                                       903CD4126C779884797EF915,
+                                       14CBD28B4887DAF89E27491C,
+                                       FDC3CA8D1403C169659F7D8C,
+                                       A6F555BE0DDF01C285BD8BF5,
+                                       FB1FC613CE260140F1CFD21B,
+                                       8CE533D611CD0984AD028D73,
+                                       5A9F2000C66D24E8B01BE60B,
+                                       A9315F8368A5771EC39631CB,
+                                       6C198AF93E1F6E682189E2F6,
+                                       651ECE3C7BA845DDCFEE48F3,
+                                       4FE6029FF76BCE9698595DC5,
+                                       A5256778E2EBD206B337B555, ); name = "JUCE Modules"; sourceTree = "<group>"; };
+               61F3057D838D7DABB0FA3D34 = {isa = PBXGroup; children = (
+                                       72129757D2A553B90A7157C6,
+                                       5965349393850F41DF76F350,
+                                       03B0F9318FD583525AB195A9,
+                                       03A63C3CA6F24977F19C316D,
+                                       E061A1C75FA5722167FC4997,
+                                       E67AB94002886AF67437D6AE,
+                                       EDDA01B246C6128CAF7A2914,
+                                       831A01C745C905F5715CD822,
+                                       4DF215D350FFE5E119CBA7E5,
+                                       3BC9753E0CD75A36DC742EE0,
+                                       6C5E26B4D28F8450435B8AE1,
+                                       F5F2EA2238973488632FC322,
+                                       C1E93FAF6C68A40A664422CD,
+                                       FCD0D758C5767944BEC29730,
+                                       3E4ED41C374261CFFD309743,
+                                       A1D6D36B96B6B37C31F32829,
+                                       979F23EA9E5E76131299E886,
+                                       94B6C88FE30861A47CD28709,
+                                       CE38E6469D98462A2C22C915,
+                                       0AB68DBAB6B7DAEDDDD5B683,
+                                       9144821E003E15E4042B57DB,
+                                       4E9AD0EAF3CA57B548622D9A, ); name = "JUCE Library Code"; sourceTree = "<group>"; };
+               D87DCD5DA4EC8D78DFF37FCC = {isa = PBXGroup; children = (
+                                       0ECB4FCD24794CE516792552,
+                                       388A8209DBB1B08594266121,
+                                       5CD17151385A69F1E07FE85B,
+                                       9EBAEBBD9093CB005D1692F2,
+                                       7B3243C92248D379A0489AA4,
+                                       4EC2782DE1779A130835B64D,
+                                       9672FCE6167ADB567A9EB2F8,
+                                       E0A3F113BC27B7B4D6F1D693, ); name = Resources; sourceTree = "<group>"; };
+               4452EAA652B65A9AE648288C = {isa = PBXGroup; children = (
+                                       A04E4408525F24F7DCBA000E,
+                                       470C3E4553B513FFEF752779,
+                                       DC192EFA899E6CBE6B5CD394,
+                                       3B99CF94C44E2EE04635A439,
+                                       440D507FD8F31DB62B1F95C7,
+                                       02A2ED58B066B4D119F67913,
+                                       4F0A137A4115946A346180E6,
+                                       1CFE3935A3B810D5D68A2504,
+                                       61AE09C749B007B70A265D9B,
+                                       3DC90DA86565B0356B6E5E0B,
+                                       71A91516AFD980FEE694C0E1,
+                                       40BD06D4AB0D2C73E936A2F1,
+                                       23CD1A3F9067C3A0ECE7BB67,
+                                       96D99A08027CA35D6A4E5CFD, ); name = Frameworks; sourceTree = "<group>"; };
+               BFDAF16175D03695EEB466BC = {isa = PBXGroup; children = (
+                                       CFF2BBEB242CC8B3B904B5F9, ); name = Products; sourceTree = "<group>"; };
+               91A9A0FE9DF4F4E10009EEC7 = {isa = PBXGroup; children = (
+                                       9683F931FA1B8B85FA8C4BD8,
+                                       5A0B2CEF393A25C6D4B1B76C,
+                                       61F3057D838D7DABB0FA3D34,
+                                       D87DCD5DA4EC8D78DFF37FCC,
+                                       4452EAA652B65A9AE648288C,
+                                       BFDAF16175D03695EEB466BC, ); name = Source; sourceTree = "<group>"; };
+               B18D059E5616FA729F764229 = {isa = XCBuildConfiguration; buildSettings = {
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                        "JUCE_DEMO_RUNNER=1",
                                        "JUCE_UNIT_TESTS=1",
                                        "JUCER_XCODE_MAC_F6D2F4CF=1",
-                                       "JUCE_APP_VERSION=5.3.1",
-                                       "JUCE_APP_VERSION_HEX=0x50301",
+                                       "JUCE_APP_VERSION=5.3.2",
+                                       "JUCE_APP_VERSION_HEX=0x50302",
                                        "JucePlugin_Build_VST=0",
                                        "JucePlugin_Build_VST3=0",
                                        "JucePlugin_Build_AU=0",
                                MACOSX_DEPLOYMENT_TARGET = 10.11;
                                MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
                                OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion  -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code";
-                               PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.demorunner;
+                               PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner;
                                SDKROOT_ppc = macosx10.5;
                                USE_HEADERMAP = NO; }; name = Debug; };
-               878F062DF0F2D968EC322CF4 = {isa = XCBuildConfiguration; buildSettings = {
+               69330F27DD2C71609336C7D2 = {isa = XCBuildConfiguration; buildSettings = {
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                        "JUCE_DEMO_RUNNER=1",
                                        "JUCE_UNIT_TESTS=1",
                                        "JUCER_XCODE_MAC_F6D2F4CF=1",
-                                       "JUCE_APP_VERSION=5.3.1",
-                                       "JUCE_APP_VERSION_HEX=0x50301",
+                                       "JUCE_APP_VERSION=5.3.2",
+                                       "JUCE_APP_VERSION_HEX=0x50302",
                                        "JucePlugin_Build_VST=0",
                                        "JucePlugin_Build_VST3=0",
                                        "JucePlugin_Build_AU=0",
                                MACOSX_DEPLOYMENT_TARGET = 10.11;
                                MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
                                OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion  -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code";
-                               PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.demorunner;
+                               PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner;
                                SDKROOT_ppc = macosx10.5;
                                USE_HEADERMAP = NO; }; name = Release; };
-               49CDF00877DBD03D2C6D7313 = {isa = XCBuildConfiguration; buildSettings = {
+               C01EC82F42B640CA1E54AD53 = {isa = XCBuildConfiguration; buildSettings = {
                                ALWAYS_SEARCH_USER_PATHS = NO;
                                CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
                                CLANG_WARN_BOOL_CONVERSION = YES;
                                PRODUCT_NAME = "DemoRunner";
                                WARNING_CFLAGS = -Wreorder;
                                ZERO_LINK = NO; }; name = Debug; };
-               4CADE461B4B845777C2F3084 = {isa = XCBuildConfiguration; buildSettings = {
+               07EA85D22270E8EA13CA0BBE = {isa = XCBuildConfiguration; buildSettings = {
                                ALWAYS_SEARCH_USER_PATHS = NO;
                                CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
                                CLANG_WARN_BOOL_CONVERSION = YES;
                                PRODUCT_NAME = "DemoRunner";
                                WARNING_CFLAGS = -Wreorder;
                                ZERO_LINK = NO; }; name = Release; };
-               82C712E3A2B72D3FE08871AB = {isa = PBXTargetDependency; target = AF4A5EF10D3A095A9074F9CF; };
-               F63BE64D6F90B83AFFFBC14F = {isa = XCConfigurationList; buildConfigurations = (
-                                       49CDF00877DBD03D2C6D7313,
-                                       4CADE461B4B845777C2F3084, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
-               77311CC6EFE85E7117AD3242 = {isa = XCConfigurationList; buildConfigurations = (
-                                       CEC200AA273D1626F466FC27,
-                                       878F062DF0F2D968EC322CF4, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
-               2077585B61D41BDA5967E25C = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = (
-                                       83BBBA16872A378CE2E35A9D,
-                                       F657E50CA75FE6932E710CB0, ); runOnlyForDeploymentPostprocessing = 0; };
-               7C6E2E57520A67ACFE86097B = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = (
-                                       F9EDB3A8F55A4499441401D6,
-                                       EACB962CC04BDC0369264A8F,
-                                       557BA8FDD37630DF5EB84EE0,
-                                       5CFCACD6AF608BDC2E1E8BD1,
-                                       9263171BCE90616A9F350405,
-                                       2EF49BC29DA0951B1C43070F,
-                                       8861132DCB0DE3F9EB0DD278,
-                                       CCDAEA12C17058099252FD3D,
-                                       28778136A8C09DBDC980CB72,
-                                       DA696766645C964870153095,
-                                       8F5FE1B5D44F55667509BC99,
-                                       3656169644FED0C525D5D30C,
-                                       2763512B6DFF68C0EEF72496,
-                                       480F45A17B4E83A26B1ACEF9,
-                                       3D8EECDED13F0A46A6FA8D3E,
-                                       E433C1C591D091AF71AD528E,
-                                       A5F8F9904580960794429360,
-                                       B298295E61E5DD800B814DAF,
-                                       A7E206DD280DC58E2A150642,
-                                       26260D259EFF13BD5044CD34,
-                                       591D5799ED6524DE9BD846D7,
-                                       D09859BDBC491A9932637715,
-                                       7EC8A06F9290B16DFB16E346,
-                                       33C96917E46535D30B17B483,
-                                       8AA7BB967216BDBFF0371267,
-                                       FD5B59B8A0B8258531421E60, ); runOnlyForDeploymentPostprocessing = 0; };
-               FB8E53AB54C36DCB3C3FC501 = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = (
-                                       C8D093204643DE75CAA41A3F,
-                                       7286A5BB489F25E6E3CF63D4,
-                                       B6AB4CB9F0A0AD540028A3E1,
-                                       71F90E5ABB1112D2D92EAB59,
-                                       30F8D005CCE03386DF30747F,
-                                       C3ECBDFA83E3472AC36AAB1E,
-                                       AB53895F1E4193A2C9B51DB6,
-                                       2EF15A7E6ECFD861D719276A,
-                                       9318D1152DE35146100C7594,
-                                       3AB93979B46C801A20E974C3,
-                                       4A58CC8B8AEEF166B0E47D37,
-                                       271D3EB069D6E01D56460721,
-                                       3D2D1CCFB4B682162034225E,
-                                       AA910CD1304B21E21D30A37E, ); runOnlyForDeploymentPostprocessing = 0; };
-               AF4A5EF10D3A095A9074F9CF = {isa = PBXNativeTarget; buildConfigurationList = 77311CC6EFE85E7117AD3242; buildPhases = (
-                                       2077585B61D41BDA5967E25C,
-                                       7C6E2E57520A67ACFE86097B,
-                                       FB8E53AB54C36DCB3C3FC501, ); buildRules = ( ); dependencies = (  ); name = "DemoRunner - App"; productName = DemoRunner; productReference = B953F5C249804F38B818AD2F; productType = "com.apple.product-type.application"; };
-               15C553274AB25531D0A16FBE = {isa = PBXProject; buildConfigurationList = F63BE64D6F90B83AFFFBC14F; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { AF4A5EF10D3A095A9074F9CF = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 9979C8B054ED17C9E04C6BAB; projectDirPath = ""; projectRoot = ""; targets = (AF4A5EF10D3A095A9074F9CF); };
+               D87BAF6D1A7451B7A733B5F1 = {isa = PBXTargetDependency; target = 291E01DCBE746A376DBFA4D1; };
+               80E8AD1971F52B06F4D28891 = {isa = XCConfigurationList; buildConfigurations = (
+                                       C01EC82F42B640CA1E54AD53,
+                                       07EA85D22270E8EA13CA0BBE, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
+               413FBEAEC84DFEC41133C78B = {isa = XCConfigurationList; buildConfigurations = (
+                                       B18D059E5616FA729F764229,
+                                       69330F27DD2C71609336C7D2, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
+               57134FDD813875865F5B2057 = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = (
+                                       D3D8CDCE42E8BE31C7247E38,
+                                       3B3952A9A14320312EF890A5,
+                                       41BAB55E0D992708EF06E2C4,
+                                       1BA301E39E29966719B710A1,
+                                       E33E8FE2E7F8EC8EB4279F1B,
+                                       91CD2BCE4CA07E18229EB436,
+                                       75DB074DBAE04408A0A917B7, ); runOnlyForDeploymentPostprocessing = 0; };
+               ED916866997CA4F40C7C1016 = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = (
+                                       E6F58FC3ACAE774DB4D06420,
+                                       36E115D98311F12AA06710E6,
+                                       B38728296BB32B7994CE28DF,
+                                       71DF4F5EB4C8305688416725,
+                                       4FBBB55F4E347757F74F1F41,
+                                       F619F3887CEC064441BB6EE6,
+                                       C2BB2B6DA237FE0CB64C7EDA,
+                                       F28112945CEBEA4CE8975833,
+                                       9EACEA6BE8D0ACC72C12C080,
+                                       26652AB1BB77C8A39434775F,
+                                       2707968B431D83AC7E28E49B,
+                                       712D81867EC698463252FA79,
+                                       49E7BBD46981F0035E4E9021,
+                                       611298FAC1A543BDD10D4C41,
+                                       D183F8140174ACCDDCD230A2,
+                                       FF87532E62753EDFA3D29CAD,
+                                       2F76CA28C8C0EFC7453D0EB8,
+                                       6B5560283DEEBD6DD2D6C984,
+                                       1DBDFEDE359CFC84F8E3DE4C,
+                                       CDABEA6258EC70C65C9ACCFE,
+                                       E2F44A968EC2598DAE33A997,
+                                       5CB78489F16E82144914972D,
+                                       BC6036F22423CA0AFF0385A7,
+                                       AEA090DAC5C747C50C7D3FA7,
+                                       CDEB6BA5341494AF51D07C72,
+                                       0140787C0118A95E37DE90B4, ); runOnlyForDeploymentPostprocessing = 0; };
+               4B1F6E32C9FC8D779B21C1AF = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = (
+                                       48CF0B02E1D06E5DA51E6270,
+                                       163B0CF2DD0990A63DF1D5A6,
+                                       7B4163348896EB1B86B15160,
+                                       8C0AEA08A71075A6C765AEC9,
+                                       89BC6E2354102D975E08E918,
+                                       9F15FD7A7CE83CFD98F07D59,
+                                       1351A13E78F38741C6075600,
+                                       46071CE2B98B562B7BF27CB1,
+                                       6A61CBB4E39BFD392D97528F,
+                                       9BEA1428416CE06BF72FBAB8,
+                                       8584640341100008744861A5,
+                                       028383D0577D0236899D8CA5,
+                                       B1981F62F6A91FD2F579A198,
+                                       89AD16514B1F4133FFEA1DF9, ); runOnlyForDeploymentPostprocessing = 0; };
+               291E01DCBE746A376DBFA4D1 = {isa = PBXNativeTarget; buildConfigurationList = 413FBEAEC84DFEC41133C78B; buildPhases = (
+                                       57134FDD813875865F5B2057,
+                                       ED916866997CA4F40C7C1016,
+                                       4B1F6E32C9FC8D779B21C1AF, ); buildRules = ( ); dependencies = (  ); name = "DemoRunner - App"; productName = DemoRunner; productReference = CFF2BBEB242CC8B3B904B5F9; productType = "com.apple.product-type.application"; };
+               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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 91A9A0FE9DF4F4E10009EEC7; projectDirPath = ""; projectRoot = ""; targets = (291E01DCBE746A376DBFA4D1); };
        };
-       rootObject = 15C553274AB25531D0A16FBE;
+       rootObject = AC6F0E9A0809A184B2C2B7DE;
 }
index 39ca56ccb109a27599adb30c2f059d58358ded3b..bce688bec35fa4c4de53e9094a591296e68aac59 100644 (file)
@@ -8,7 +8,7 @@
     <key>CFBundleIconFile</key>\r
     <string>Icon.icns</string>\r
     <key>CFBundleIdentifier</key>\r
-    <string>com.roli.juce.demorunner</string>\r
+    <string>com.juce.demorunner</string>\r
     <key>CFBundleName</key>\r
     <string>DemoRunner</string>\r
     <key>CFBundleDisplayName</key>\r
@@ -18,9 +18,9 @@
     <key>CFBundleSignature</key>\r
     <string>????</string>\r
     <key>CFBundleShortVersionString</key>\r
-    <string>5.3.1</string>\r
+    <string>5.3.2</string>\r
     <key>CFBundleVersion</key>\r
-    <string>5.3.1</string>\r
+    <string>5.3.2</string>\r
     <key>NSHumanReadableCopyright</key>\r
     <string>Copyright (c) 2018 - ROLI Ltd.</string>\r
     <key>NSHighResolutionCapable</key>\r
index 47ffd1f936f097a705667bd1b5709a95fe1fb9d0..ba7197df6b9d2fd9d8edc8e5a223a95fa25c0db4 100644 (file)
@@ -1,7 +1,7 @@
 Microsoft Visual Studio Solution File, Format Version 11.00\r
 # Visual Studio 2013\r
 \r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{E3D4150A-FA75-0747-0E47-EDA1155AAAFF}"\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}"\r
 EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
@@ -9,10 +9,10 @@ Global
                Release|x64 = Release|x64\r
        EndGlobalSection\r
        GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
-               {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.ActiveCfg = Debug|x64\r
-               {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.Build.0 = Debug|x64\r
-               {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.ActiveCfg = Release|x64\r
-               {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.Build.0 = Release|x64\r
+               {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.ActiveCfg = Debug|x64\r
+               {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.Build.0 = Debug|x64\r
+               {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.ActiveCfg = Release|x64\r
+               {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.Build.0 = Release|x64\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
index c545c528929b7b9932a4d1a64a095f150d1cfced..3ec1daea850c1bf246c4e382cf8c405c3e44a8d1 100644 (file)
@@ -14,7 +14,7 @@
     </ProjectConfiguration>\r
   </ItemGroup>\r
   <PropertyGroup Label="Globals">\r
-    <ProjectGuid>{E3D4150A-FA75-0747-0E47-EDA1155AAAFF}</ProjectGuid>\r
+    <ProjectGuid>{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}</ProjectGuid>\r
     <PlatformToolset>v120</PlatformToolset>\r
     <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
@@ -74,7 +74,7 @@
       <Optimization>Disabled</Optimization>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;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)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;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)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
       <PrecompiledHeader/>\r
     <ClCompile>\r
       <Optimization>Full</Optimization>\r
       <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;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)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;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)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
       <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
       <PrecompiledHeader/>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_product_unlocking\juce_product_unlocking.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
index a17949c39260e4e4473dfe06ea783e95a7e43569..b1ec6a7918a1338b645fc516e6c1ae41990683ac 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">\r
       <Filter>JUCE Modules\juce_dsp\containers</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h">\r
+      <Filter>JUCE Modules\juce_dsp\containers</Filter>\r
+    </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h">\r
       <Filter>JUCE Modules\juce_dsp\filter_design</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+      <Filter>JUCE Modules\juce_video\native</Filter>\r
+    </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
index d22ed6117b12b946522bb3c4398a341a897e62d5..0bf34edc073eb98b90d4d11f7f813b57ff5b0d46 100644 (file)
@@ -7,7 +7,7 @@
 #include <windows.h>\r
 \r
 VS_VERSION_INFO VERSIONINFO\r
-FILEVERSION  5,3,1,0\r
+FILEVERSION  5,3,2,0\r
 BEGIN\r
   BLOCK "StringFileInfo"\r
   BEGIN\r
@@ -16,9 +16,9 @@ BEGIN
       VALUE "CompanyName",  "ROLI Ltd.\0"\r
       VALUE "LegalCopyright",  "Copyright (c) 2018 - ROLI Ltd.\0"\r
       VALUE "FileDescription",  "DemoRunner\0"\r
-      VALUE "FileVersion",  "5.3.1\0"\r
+      VALUE "FileVersion",  "5.3.2\0"\r
       VALUE "ProductName",  "DemoRunner\0"\r
-      VALUE "ProductVersion",  "5.3.1\0"\r
+      VALUE "ProductVersion",  "5.3.2\0"\r
     END\r
   END\r
 \r
index fef93e709d989050c3c56a4363d306e5e1816c08..48b3853339fb9c9897feaa93e456b9c26777b679 100644 (file)
@@ -1,7 +1,7 @@
 Microsoft Visual Studio Solution File, Format Version 11.00\r
 # Visual Studio 2015\r
 \r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{E3D4150A-FA75-0747-0E47-EDA1155AAAFF}"\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}"\r
 EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
@@ -9,10 +9,10 @@ Global
                Release|x64 = Release|x64\r
        EndGlobalSection\r
        GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
-               {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.ActiveCfg = Debug|x64\r
-               {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.Build.0 = Debug|x64\r
-               {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.ActiveCfg = Release|x64\r
-               {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.Build.0 = Release|x64\r
+               {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.ActiveCfg = Debug|x64\r
+               {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.Build.0 = Debug|x64\r
+               {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.ActiveCfg = Release|x64\r
+               {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.Build.0 = Release|x64\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
index 71523961fa56ae8b588267de1755cffd57116908..6622326ea9cca243db3995c743367e6edf9107f4 100644 (file)
@@ -14,7 +14,7 @@
     </ProjectConfiguration>\r
   </ItemGroup>\r
   <PropertyGroup Label="Globals">\r
-    <ProjectGuid>{E3D4150A-FA75-0747-0E47-EDA1155AAAFF}</ProjectGuid>\r
+    <ProjectGuid>{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}</ProjectGuid>\r
     <PlatformToolset>v140</PlatformToolset>\r
     <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
@@ -74,7 +74,7 @@
       <Optimization>Disabled</Optimization>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <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.3.1;JUCE_APP_VERSION_HEX=0x50301;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)</PreprocessorDefinitions>\r
+      <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.3.2;JUCE_APP_VERSION_HEX=0x50302;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)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
       <PrecompiledHeader/>\r
     <ClCompile>\r
       <Optimization>Full</Optimization>\r
       <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;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)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;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)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
       <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
       <PrecompiledHeader/>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_product_unlocking\juce_product_unlocking.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
index fe88ae0055b2baade827dad3036e8509d7457b4e..f2d69a69849e0c6213393a9be84beb7b8143a6d0 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">\r
       <Filter>JUCE Modules\juce_dsp\containers</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h">\r
+      <Filter>JUCE Modules\juce_dsp\containers</Filter>\r
+    </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h">\r
       <Filter>JUCE Modules\juce_dsp\filter_design</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+      <Filter>JUCE Modules\juce_video\native</Filter>\r
+    </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
index d22ed6117b12b946522bb3c4398a341a897e62d5..0bf34edc073eb98b90d4d11f7f813b57ff5b0d46 100644 (file)
@@ -7,7 +7,7 @@
 #include <windows.h>\r
 \r
 VS_VERSION_INFO VERSIONINFO\r
-FILEVERSION  5,3,1,0\r
+FILEVERSION  5,3,2,0\r
 BEGIN\r
   BLOCK "StringFileInfo"\r
   BEGIN\r
@@ -16,9 +16,9 @@ BEGIN
       VALUE "CompanyName",  "ROLI Ltd.\0"\r
       VALUE "LegalCopyright",  "Copyright (c) 2018 - ROLI Ltd.\0"\r
       VALUE "FileDescription",  "DemoRunner\0"\r
-      VALUE "FileVersion",  "5.3.1\0"\r
+      VALUE "FileVersion",  "5.3.2\0"\r
       VALUE "ProductName",  "DemoRunner\0"\r
-      VALUE "ProductVersion",  "5.3.1\0"\r
+      VALUE "ProductVersion",  "5.3.2\0"\r
     END\r
   END\r
 \r
index 371c21f38c3d1a1a8e2599f62042de00fd9b13fb..cada37aff5645ad3d7e3549b1468af6fc9e41be9 100644 (file)
@@ -1,7 +1,7 @@
 Microsoft Visual Studio Solution File, Format Version 11.00\r
 # Visual Studio 2017\r
 \r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{E3D4150A-FA75-0747-0E47-EDA1155AAAFF}"\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}"\r
 EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
@@ -9,10 +9,10 @@ Global
                Release|x64 = Release|x64\r
        EndGlobalSection\r
        GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
-               {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.ActiveCfg = Debug|x64\r
-               {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.Build.0 = Debug|x64\r
-               {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.ActiveCfg = Release|x64\r
-               {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.Build.0 = Release|x64\r
+               {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.ActiveCfg = Debug|x64\r
+               {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.Build.0 = Debug|x64\r
+               {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.ActiveCfg = Release|x64\r
+               {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.Build.0 = Release|x64\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
index c340defe8c500d19ec854fbc8549e3c69525e9d0..f6537a8a7a2dff34bad8bb7f39238447845ec3e8 100644 (file)
@@ -14,7 +14,7 @@
     </ProjectConfiguration>\r
   </ItemGroup>\r
   <PropertyGroup Label="Globals">\r
-    <ProjectGuid>{E3D4150A-FA75-0747-0E47-EDA1155AAAFF}</ProjectGuid>\r
+    <ProjectGuid>{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}</ProjectGuid>\r
     <PlatformToolset>v141</PlatformToolset>\r
     <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
@@ -74,7 +74,7 @@
       <Optimization>Disabled</Optimization>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <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.3.1;JUCE_APP_VERSION_HEX=0x50301;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)</PreprocessorDefinitions>\r
+      <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.3.2;JUCE_APP_VERSION_HEX=0x50302;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)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
       <PrecompiledHeader/>\r
     <ClCompile>\r
       <Optimization>Full</Optimization>\r
       <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;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)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;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)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
       <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
       <PrecompiledHeader/>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_product_unlocking\juce_product_unlocking.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
index e7ed5a8e0d04a51f8004f2b4fef017de56df71d2..00170e0947ae3c2746242d20a0babc60df9a1600 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">\r
       <Filter>JUCE Modules\juce_dsp\containers</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h">\r
+      <Filter>JUCE Modules\juce_dsp\containers</Filter>\r
+    </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h">\r
       <Filter>JUCE Modules\juce_dsp\filter_design</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+      <Filter>JUCE Modules\juce_video\native</Filter>\r
+    </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
index d22ed6117b12b946522bb3c4398a341a897e62d5..0bf34edc073eb98b90d4d11f7f813b57ff5b0d46 100644 (file)
@@ -7,7 +7,7 @@
 #include <windows.h>\r
 \r
 VS_VERSION_INFO VERSIONINFO\r
-FILEVERSION  5,3,1,0\r
+FILEVERSION  5,3,2,0\r
 BEGIN\r
   BLOCK "StringFileInfo"\r
   BEGIN\r
@@ -16,9 +16,9 @@ BEGIN
       VALUE "CompanyName",  "ROLI Ltd.\0"\r
       VALUE "LegalCopyright",  "Copyright (c) 2018 - ROLI Ltd.\0"\r
       VALUE "FileDescription",  "DemoRunner\0"\r
-      VALUE "FileVersion",  "5.3.1\0"\r
+      VALUE "FileVersion",  "5.3.2\0"\r
       VALUE "ProductName",  "DemoRunner\0"\r
-      VALUE "ProductVersion",  "5.3.1\0"\r
+      VALUE "ProductVersion",  "5.3.2\0"\r
     END\r
   END\r
 \r
index 0cc6513c1525a3e6c05e37ef1b7760a22a2aa336..9a62e8904086abe0f20394b1dc3baa76f9e0e58c 100644 (file)
        objectVersion = 46;
        objects = {
 
-               5665A011C7D125C8890D3260 = {isa = PBXBuildFile; fileRef = B953F5C249804F38B818AD2F; };
-               C8D093204643DE75CAA41A3F = {isa = PBXBuildFile; fileRef = E622C086CB768052D799CB95; };
-               7286A5BB489F25E6E3CF63D4 = {isa = PBXBuildFile; fileRef = A70E204AA2B7B904F9C08770; };
-               B6AB4CB9F0A0AD540028A3E1 = {isa = PBXBuildFile; fileRef = F10017EB39A3981DF2FFC565; };
-               71F90E5ABB1112D2D92EAB59 = {isa = PBXBuildFile; fileRef = 61BF1C5B6EB2C49337A028E7; };
-               AB53895F1E4193A2C9B51DB6 = {isa = PBXBuildFile; fileRef = 5AB31D4FDB61420CFE50FD52; };
-               9CB6071FE1DD378F7C64C9F5 = {isa = PBXBuildFile; fileRef = 4400AFF27C798108026C3094; };
-               1D98F6C4127BB7F0890645D6 = {isa = PBXBuildFile; fileRef = C0349D711DBA26CB337AFDFC; };
-               0B1AC7FEC205238C5701B086 = {isa = PBXBuildFile; fileRef = E087A95F121B72288CFE0150; };
-               2EF15A7E6ECFD861D719276A = {isa = PBXBuildFile; fileRef = BE800C80B08E6D722CACB487; };
-               9318D1152DE35146100C7594 = {isa = PBXBuildFile; fileRef = 95C3EC76835BB2151FA94A67; };
-               BA3F994E8752E7310789C02A = {isa = PBXBuildFile; fileRef = 0CD10A62A53B1C25DBFC9ECB; };
-               06DA6875AC3E734378E374C5 = {isa = PBXBuildFile; fileRef = 0F072771BD806EFDDADEBF26; };
-               9F59844F463603E7C2467DC4 = {isa = PBXBuildFile; fileRef = 0C3170AEED96E4A60DD8E49F; };
-               C7D4E452620DF858B785BA82 = {isa = PBXBuildFile; fileRef = F4929902D6A38E01A6B084E8; };
-               3D2D1CCFB4B682162034225E = {isa = PBXBuildFile; fileRef = 6142F838E6568F8450BC93DB; };
-               EDAD741A46FD4B3F002C96D3 = {isa = PBXBuildFile; fileRef = 58E1DD950580FC057346CF2F; };
-               B1776D2FEB204FAE5C17E4C7 = {isa = PBXBuildFile; fileRef = A5C76AB7D5C174FB79974A8B; };
-               686146610021944DA9C987B8 = {isa = PBXBuildFile; fileRef = AC925129DC8F53C3C3F6E0BF; };
-               F657E50CA75FE6932E710CB0 = {isa = PBXBuildFile; fileRef = 2945A953347C882A8294DF82; };
-               F9EDB3A8F55A4499441401D6 = {isa = PBXBuildFile; fileRef = AE5650194191C6A04F0B5685; };
-               EACB962CC04BDC0369264A8F = {isa = PBXBuildFile; fileRef = 48A8B50CEB577DF7D3FCEFEC; };
-               557BA8FDD37630DF5EB84EE0 = {isa = PBXBuildFile; fileRef = 5FE974D1CE11D7658D57C580; };
-               5CFCACD6AF608BDC2E1E8BD1 = {isa = PBXBuildFile; fileRef = E40C7EC0CD57D5F92EC9C806; };
-               9263171BCE90616A9F350405 = {isa = PBXBuildFile; fileRef = 56280EAEBEAF619C3E98B5C6; };
-               2EF49BC29DA0951B1C43070F = {isa = PBXBuildFile; fileRef = 27FB5D78BF900B70101B3E48; };
-               8861132DCB0DE3F9EB0DD278 = {isa = PBXBuildFile; fileRef = BD545E9E8BA9D67A673AC8E8; };
-               CCDAEA12C17058099252FD3D = {isa = PBXBuildFile; fileRef = 44B4D9F7DBB239B6E57BC2E7; };
-               28778136A8C09DBDC980CB72 = {isa = PBXBuildFile; fileRef = 2CC2281747C1FE9EB940BD1A; };
-               DA696766645C964870153095 = {isa = PBXBuildFile; fileRef = F996277A397F3F21763BAC03; };
-               8F5FE1B5D44F55667509BC99 = {isa = PBXBuildFile; fileRef = 91195E76A94C136774686D97; };
-               3656169644FED0C525D5D30C = {isa = PBXBuildFile; fileRef = 3290EFAFF391EE790FF33FB9; };
-               2763512B6DFF68C0EEF72496 = {isa = PBXBuildFile; fileRef = 46A8BE3E064F7E01EF1E2D2D; };
-               480F45A17B4E83A26B1ACEF9 = {isa = PBXBuildFile; fileRef = 1442C6A9928B564A86D1597A; };
-               3D8EECDED13F0A46A6FA8D3E = {isa = PBXBuildFile; fileRef = 9A35450231D4C3F4DCF16AB3; };
-               E433C1C591D091AF71AD528E = {isa = PBXBuildFile; fileRef = 55479FCC6DB5293B12918CBA; };
-               A5F8F9904580960794429360 = {isa = PBXBuildFile; fileRef = 9733178D30027A7CC3E12510; };
-               B298295E61E5DD800B814DAF = {isa = PBXBuildFile; fileRef = 7445067DFFF67F28456DA9B0; };
-               A7E206DD280DC58E2A150642 = {isa = PBXBuildFile; fileRef = 1EF8C1691168417E42DF81ED; };
-               26260D259EFF13BD5044CD34 = {isa = PBXBuildFile; fileRef = 120B5B68C50C2992969E9CE1; };
-               591D5799ED6524DE9BD846D7 = {isa = PBXBuildFile; fileRef = 0996038E1E70A6ADD233418D; };
-               D09859BDBC491A9932637715 = {isa = PBXBuildFile; fileRef = 96FE3B2079CA29C6C2F5E2F2; };
-               7EC8A06F9290B16DFB16E346 = {isa = PBXBuildFile; fileRef = A477616D8A134C6E99C2BE9D; };
-               33C96917E46535D30B17B483 = {isa = PBXBuildFile; fileRef = 5F79F2C9508D0D7F5A6BF62D; };
-               8AA7BB967216BDBFF0371267 = {isa = PBXBuildFile; fileRef = 6B2332953FCDD3BD197E149A; };
-               FD5B59B8A0B8258531421E60 = {isa = PBXBuildFile; fileRef = F4AB4BBB26E536232D27BE83; };
-               0996038E1E70A6ADD233418D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_basics.mm"; path = "../../JuceLibraryCode/include_juce_gui_basics.mm"; sourceTree = "SOURCE_ROOT"; };
-               09AFF79B4D5593574507F03E = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_utils"; path = "../../../../modules/juce_audio_utils"; sourceTree = "SOURCE_ROOT"; };
-               0C3170AEED96E4A60DD8E49F = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-               0CD10A62A53B1C25DBFC9ECB = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
-               0D328B4591EBFD9997C61535 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_product_unlocking"; path = "../../../../modules/juce_product_unlocking"; sourceTree = "SOURCE_ROOT"; };
-               0F072771BD806EFDDADEBF26 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-               120B5B68C50C2992969E9CE1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_graphics.mm"; path = "../../JuceLibraryCode/include_juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; };
-               1442C6A9928B564A86D1597A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_box2d.cpp"; path = "../../JuceLibraryCode/include_juce_box2d.cpp"; sourceTree = "SOURCE_ROOT"; };
-               18C1EBA9CB73E8E7389BBDCC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; };
-               191B33D36B749639B0FBE856 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainComponent.h; path = ../../Source/UI/MainComponent.h; sourceTree = "SOURCE_ROOT"; };
-               1EF8C1691168417E42DF81ED = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_events.mm"; path = "../../JuceLibraryCode/include_juce_events.mm"; sourceTree = "SOURCE_ROOT"; };
-               27FB5D78BF900B70101B3E48 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../Source/Main.cpp; sourceTree = "SOURCE_ROOT"; };
-               2945A953347C882A8294DF82 = {isa = PBXFileReference; lastKnownFileType = file.icns; name = Icon.icns; path = Icon.icns; sourceTree = "SOURCE_ROOT"; };
-               2CC2281747C1FE9EB940BD1A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_devices.mm"; path = "../../JuceLibraryCode/include_juce_audio_devices.mm"; sourceTree = "SOURCE_ROOT"; };
-               3290EFAFF391EE790FF33FB9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_utils.mm"; path = "../../JuceLibraryCode/include_juce_audio_utils.mm"; sourceTree = "SOURCE_ROOT"; };
-               3384C796C682AF43B57B42F2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JUCEDemos.h; path = ../../Source/Demos/JUCEDemos.h; sourceTree = "SOURCE_ROOT"; };
-               352AF685E88FF055C4F20E16 = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = DemoRunner.entitlements; path = DemoRunner.entitlements; sourceTree = "SOURCE_ROOT"; };
-               4400AFF27C798108026C3094 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudioKit.framework; path = System/Library/Frameworks/CoreAudioKit.framework; sourceTree = SDKROOT; };
-               44B4D9F7DBB239B6E57BC2E7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_basics.mm"; path = "../../JuceLibraryCode/include_juce_audio_basics.mm"; sourceTree = "SOURCE_ROOT"; };
-               46A8BE3E064F7E01EF1E2D2D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_blocks_basics.cpp"; path = "../../JuceLibraryCode/include_juce_blocks_basics.cpp"; sourceTree = "SOURCE_ROOT"; };
-               47623ED30F98E053C07A9B11 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_dsp"; path = "../../../../modules/juce_dsp"; sourceTree = "SOURCE_ROOT"; };
-               483FAD2B91F1B2A248684D8D = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_graphics"; path = "../../../../modules/juce_graphics"; sourceTree = "SOURCE_ROOT"; };
-               48A8B50CEB577DF7D3FCEFEC = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs2.cpp; path = ../../Source/Demos/DemoPIPs2.cpp; sourceTree = "SOURCE_ROOT"; };
-               497F44004821C9FDC0B1A337 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DemoContentComponent.h; path = ../../Source/UI/DemoContentComponent.h; sourceTree = "SOURCE_ROOT"; };
-               4B2E65945C61CDD81D945CC3 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_analytics"; path = "../../../../modules/juce_analytics"; sourceTree = "SOURCE_ROOT"; };
-               531F8760E51457787457AC3D = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_opengl"; path = "../../../../modules/juce_opengl"; sourceTree = "SOURCE_ROOT"; };
-               53ED8C56ECA0B933135E6ED5 = {isa = PBXFileReference; lastKnownFileType = image.png; name = JUCEAppIcon.png; path = ../../Source/JUCEAppIcon.png; sourceTree = "SOURCE_ROOT"; };
-               55479FCC6DB5293B12918CBA = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_cryptography.mm"; path = "../../JuceLibraryCode/include_juce_cryptography.mm"; sourceTree = "SOURCE_ROOT"; };
-               56280EAEBEAF619C3E98B5C6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = MainComponent.cpp; path = ../../Source/UI/MainComponent.cpp; sourceTree = "SOURCE_ROOT"; };
-               58E1DD950580FC057346CF2F = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-               5AB31D4FDB61420CFE50FD52 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
-               5F79F2C9508D0D7F5A6BF62D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_osc.cpp"; path = "../../JuceLibraryCode/include_juce_osc.cpp"; sourceTree = "SOURCE_ROOT"; };
-               5FE974D1CE11D7658D57C580 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JUCEDemos.cpp; path = ../../Source/Demos/JUCEDemos.cpp; sourceTree = "SOURCE_ROOT"; };
-               6142F838E6568F8450BC93DB = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
-               61BF1C5B6EB2C49337A028E7 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; };
-               62B6BD963ACD31048A939441 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_devices"; path = "../../../../modules/juce_audio_devices"; sourceTree = "SOURCE_ROOT"; };
-               6B2332953FCDD3BD197E149A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_product_unlocking.mm"; path = "../../JuceLibraryCode/include_juce_product_unlocking.mm"; sourceTree = "SOURCE_ROOT"; };
-               7445067DFFF67F28456DA9B0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_dsp.mm"; path = "../../JuceLibraryCode/include_juce_dsp.mm"; sourceTree = "SOURCE_ROOT"; };
-               74E8AB27C5B4246DA0590820 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IntroScreen.h; path = ../../Source/Demos/IntroScreen.h; sourceTree = "SOURCE_ROOT"; };
-               8DA81A2479F1EF4B1064E3A0 = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-App.plist"; path = "Info-App.plist"; sourceTree = "SOURCE_ROOT"; };
-               91195E76A94C136774686D97 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_processors.mm"; path = "../../JuceLibraryCode/include_juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; };
-               95C3EC76835BB2151FA94A67 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; };
-               96FE3B2079CA29C6C2F5E2F2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_extra.mm"; path = "../../JuceLibraryCode/include_juce_gui_extra.mm"; sourceTree = "SOURCE_ROOT"; };
-               9733178D30027A7CC3E12510 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_data_structures.mm"; path = "../../JuceLibraryCode/include_juce_data_structures.mm"; sourceTree = "SOURCE_ROOT"; };
-               9A35450231D4C3F4DCF16AB3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_core.mm"; path = "../../JuceLibraryCode/include_juce_core.mm"; sourceTree = "SOURCE_ROOT"; };
-               9A974BD82436ED647B457D0B = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_data_structures"; path = "../../../../modules/juce_data_structures"; sourceTree = "SOURCE_ROOT"; };
-               9AA6843063F8D624808AA5FF = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_blocks_basics"; path = "../../../../modules/juce_blocks_basics"; sourceTree = "SOURCE_ROOT"; };
-               9D3C18C7CD24710A9D88CACB = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_osc"; path = "../../../../modules/juce_osc"; sourceTree = "SOURCE_ROOT"; };
-               A075E4A80B931C9431786CB4 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_formats"; path = "../../../../modules/juce_audio_formats"; sourceTree = "SOURCE_ROOT"; };
-               A477616D8A134C6E99C2BE9D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_opengl.mm"; path = "../../JuceLibraryCode/include_juce_opengl.mm"; sourceTree = "SOURCE_ROOT"; };
-               A5C76AB7D5C174FB79974A8B = {isa = PBXFileReference; lastKnownFileType = folder; name = Assets; path = ../../../Assets; sourceTree = "<group>"; };
-               A70E204AA2B7B904F9C08770 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-               AC925129DC8F53C3C3F6E0BF = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = DemoRunner/Images.xcassets; sourceTree = "SOURCE_ROOT"; };
-               AE309D5EC9B20A17B819B264 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_processors"; path = "../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; };
-               AE5650194191C6A04F0B5685 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs1.cpp; path = ../../Source/Demos/DemoPIPs1.cpp; sourceTree = "SOURCE_ROOT"; };
-               AE80AC9B628F8B74C6F1F29E = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_events"; path = "../../../../modules/juce_events"; sourceTree = "SOURCE_ROOT"; };
-               B953F5C249804F38B818AD2F = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoRunner.app; sourceTree = "BUILT_PRODUCTS_DIR"; };
-               BD545E9E8BA9D67A673AC8E8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_analytics.cpp"; path = "../../JuceLibraryCode/include_juce_analytics.cpp"; sourceTree = "SOURCE_ROOT"; };
-               BE800C80B08E6D722CACB487 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-               BF3AA167B271DBCB79CE3510 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_basics"; path = "../../../../modules/juce_audio_basics"; sourceTree = "SOURCE_ROOT"; };
-               C0349D711DBA26CB337AFDFC = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-               D869E1D6485900AB3406AF03 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SettingsContent.h; path = ../../Source/UI/SettingsContent.h; sourceTree = "SOURCE_ROOT"; };
-               D93CFD2601C0E84D357B7959 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_core"; path = "../../../../modules/juce_core"; sourceTree = "SOURCE_ROOT"; };
-               E087A95F121B72288CFE0150 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreImage.framework; path = System/Library/Frameworks/CoreImage.framework; sourceTree = SDKROOT; };
-               E40C7EC0CD57D5F92EC9C806 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoContentComponent.cpp; path = ../../Source/UI/DemoContentComponent.cpp; sourceTree = "SOURCE_ROOT"; };
-               E4A1F27BDB0FEAB8FD971583 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_box2d"; path = "../../../../modules/juce_box2d"; sourceTree = "SOURCE_ROOT"; };
-               E5CF2486265244CD996876FE = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; };
-               E622C086CB768052D799CB95 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
-               ECFF9E66EC18BEAEF2B6C686 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_video"; path = "../../../../modules/juce_video"; sourceTree = "SOURCE_ROOT"; };
-               F10017EB39A3981DF2FFC565 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-               F124B2F09BEA556820420758 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_basics"; path = "../../../../modules/juce_gui_basics"; sourceTree = "SOURCE_ROOT"; };
-               F3C0C37FD6A1BBBB6588D182 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_extra"; path = "../../../../modules/juce_gui_extra"; sourceTree = "SOURCE_ROOT"; };
-               F4929902D6A38E01A6B084E8 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
-               F4AB4BBB26E536232D27BE83 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_video.mm"; path = "../../JuceLibraryCode/include_juce_video.mm"; sourceTree = "SOURCE_ROOT"; };
-               F6E40DCC3B84C97202B9CC21 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_cryptography"; path = "../../../../modules/juce_cryptography"; sourceTree = "SOURCE_ROOT"; };
-               F996277A397F3F21763BAC03 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_formats.mm"; path = "../../JuceLibraryCode/include_juce_audio_formats.mm"; sourceTree = "SOURCE_ROOT"; };
-               5F0F17E75142C9F8EC4F9EA8 = {isa = PBXGroup; children = (
-                                       AE5650194191C6A04F0B5685,
-                                       48A8B50CEB577DF7D3FCEFEC,
-                                       74E8AB27C5B4246DA0590820,
-                                       5FE974D1CE11D7658D57C580,
-                                       3384C796C682AF43B57B42F2, ); name = Demos; sourceTree = "<group>"; };
-               C69C98BDBD8901865A10D03D = {isa = PBXGroup; children = (
-                                       E40C7EC0CD57D5F92EC9C806,
-                                       497F44004821C9FDC0B1A337,
-                                       56280EAEBEAF619C3E98B5C6,
-                                       191B33D36B749639B0FBE856,
-                                       D869E1D6485900AB3406AF03, ); name = UI; sourceTree = "<group>"; };
-               29499B4E21D547DC19E2AF25 = {isa = PBXGroup; children = (
-                                       5F0F17E75142C9F8EC4F9EA8,
-                                       C69C98BDBD8901865A10D03D,
-                                       27FB5D78BF900B70101B3E48,
-                                       53ED8C56ECA0B933135E6ED5, ); name = Source; sourceTree = "<group>"; };
-               927472CBD503E38DD7E37090 = {isa = PBXGroup; children = (
-                                       29499B4E21D547DC19E2AF25, ); name = DemoRunner; sourceTree = "<group>"; };
-               178FF737E5519A4D16208DEB = {isa = PBXGroup; children = (
-                                       4B2E65945C61CDD81D945CC3,
-                                       BF3AA167B271DBCB79CE3510,
-                                       62B6BD963ACD31048A939441,
-                                       A075E4A80B931C9431786CB4,
-                                       AE309D5EC9B20A17B819B264,
-                                       09AFF79B4D5593574507F03E,
-                                       9AA6843063F8D624808AA5FF,
-                                       E4A1F27BDB0FEAB8FD971583,
-                                       D93CFD2601C0E84D357B7959,
-                                       F6E40DCC3B84C97202B9CC21,
-                                       9A974BD82436ED647B457D0B,
-                                       47623ED30F98E053C07A9B11,
-                                       AE80AC9B628F8B74C6F1F29E,
-                                       483FAD2B91F1B2A248684D8D,
-                                       F124B2F09BEA556820420758,
-                                       F3C0C37FD6A1BBBB6588D182,
-                                       531F8760E51457787457AC3D,
-                                       9D3C18C7CD24710A9D88CACB,
-                                       0D328B4591EBFD9997C61535,
-                                       ECFF9E66EC18BEAEF2B6C686, ); name = "JUCE Modules"; sourceTree = "<group>"; };
-               16DD35D8533EE0BA94AAFBF8 = {isa = PBXGroup; children = (
-                                       18C1EBA9CB73E8E7389BBDCC,
-                                       BD545E9E8BA9D67A673AC8E8,
-                                       44B4D9F7DBB239B6E57BC2E7,
-                                       2CC2281747C1FE9EB940BD1A,
-                                       F996277A397F3F21763BAC03,
-                                       91195E76A94C136774686D97,
-                                       3290EFAFF391EE790FF33FB9,
-                                       46A8BE3E064F7E01EF1E2D2D,
-                                       1442C6A9928B564A86D1597A,
-                                       9A35450231D4C3F4DCF16AB3,
-                                       55479FCC6DB5293B12918CBA,
-                                       9733178D30027A7CC3E12510,
-                                       7445067DFFF67F28456DA9B0,
-                                       1EF8C1691168417E42DF81ED,
-                                       120B5B68C50C2992969E9CE1,
-                                       0996038E1E70A6ADD233418D,
-                                       96FE3B2079CA29C6C2F5E2F2,
-                                       A477616D8A134C6E99C2BE9D,
-                                       5F79F2C9508D0D7F5A6BF62D,
-                                       6B2332953FCDD3BD197E149A,
-                                       F4AB4BBB26E536232D27BE83,
-                                       E5CF2486265244CD996876FE, ); name = "JUCE Library Code"; sourceTree = "<group>"; };
-               FEE1C6574320FAB66F0238D2 = {isa = PBXGroup; children = (
-                                       A5C76AB7D5C174FB79974A8B,
-                                       8DA81A2479F1EF4B1064E3A0,
-                                       AC925129DC8F53C3C3F6E0BF,
-                                       2945A953347C882A8294DF82, ); name = Resources; sourceTree = "<group>"; };
-               17F11FE561BD8D6EB93B64D4 = {isa = PBXGroup; children = (
-                                       E622C086CB768052D799CB95,
-                                       A70E204AA2B7B904F9C08770,
-                                       F10017EB39A3981DF2FFC565,
-                                       61BF1C5B6EB2C49337A028E7,
-                                       5AB31D4FDB61420CFE50FD52,
-                                       4400AFF27C798108026C3094,
-                                       C0349D711DBA26CB337AFDFC,
-                                       E087A95F121B72288CFE0150,
-                                       BE800C80B08E6D722CACB487,
-                                       95C3EC76835BB2151FA94A67,
-                                       0CD10A62A53B1C25DBFC9ECB,
-                                       0F072771BD806EFDDADEBF26,
-                                       0C3170AEED96E4A60DD8E49F,
-                                       F4929902D6A38E01A6B084E8,
-                                       6142F838E6568F8450BC93DB,
-                                       58E1DD950580FC057346CF2F, ); name = Frameworks; sourceTree = "<group>"; };
-               532CECDAA91A39864E7FFF80 = {isa = PBXGroup; children = (
-                                       B953F5C249804F38B818AD2F, ); name = Products; sourceTree = "<group>"; };
-               9979C8B054ED17C9E04C6BAB = {isa = PBXGroup; children = (
-                                       352AF685E88FF055C4F20E16,
-                                       927472CBD503E38DD7E37090,
-                                       178FF737E5519A4D16208DEB,
-                                       16DD35D8533EE0BA94AAFBF8,
-                                       FEE1C6574320FAB66F0238D2,
-                                       17F11FE561BD8D6EB93B64D4,
-                                       532CECDAA91A39864E7FFF80, ); name = Source; sourceTree = "<group>"; };
-               CEC200AA273D1626F466FC27 = {isa = XCBuildConfiguration; buildSettings = {
+               63A2F309E55DAC206E9B97E3 = {isa = PBXBuildFile; fileRef = CFF2BBEB242CC8B3B904B5F9; };
+               48CF0B02E1D06E5DA51E6270 = {isa = PBXBuildFile; fileRef = A04E4408525F24F7DCBA000E; };
+               163B0CF2DD0990A63DF1D5A6 = {isa = PBXBuildFile; fileRef = 470C3E4553B513FFEF752779; };
+               7B4163348896EB1B86B15160 = {isa = PBXBuildFile; fileRef = DC192EFA899E6CBE6B5CD394; };
+               8C0AEA08A71075A6C765AEC9 = {isa = PBXBuildFile; fileRef = 3B99CF94C44E2EE04635A439; };
+               1351A13E78F38741C6075600 = {isa = PBXBuildFile; fileRef = 4F0A137A4115946A346180E6; };
+               527DA2E6827BAFDDD3E8E80F = {isa = PBXBuildFile; fileRef = B4389672DA4CC8E0A531062D; };
+               34A4931AF1DD424D3A400EEF = {isa = PBXBuildFile; fileRef = 76A157A111866670A4678F04; };
+               7F57DB52C3CEFDC26DDD38FC = {isa = PBXBuildFile; fileRef = B28EFB9D1DF0B6D6499A7DEF; };
+               46071CE2B98B562B7BF27CB1 = {isa = PBXBuildFile; fileRef = 1CFE3935A3B810D5D68A2504; };
+               6A61CBB4E39BFD392D97528F = {isa = PBXBuildFile; fileRef = 61AE09C749B007B70A265D9B; };
+               0B0CE6D5062E5C02A41F24BC = {isa = PBXBuildFile; fileRef = 873F9DD54978E601102353B4; };
+               5E4310B3F6BB639875D3E9B8 = {isa = PBXBuildFile; fileRef = 49ECA8B998B339A083674A22; };
+               AE7FB2AC3885F4BF53A5DDA1 = {isa = PBXBuildFile; fileRef = 7983C452610C1638B7E78F12; };
+               1FB200F4AE3E4E7CDFF629BB = {isa = PBXBuildFile; fileRef = 24D74AF1C95BEF957DC4FA77; };
+               AC783ECD84496E0B77911EEE = {isa = PBXBuildFile; fileRef = 34F1320BC5C23702C08DF9F0; };
+               B1981F62F6A91FD2F579A198 = {isa = PBXBuildFile; fileRef = 23CD1A3F9067C3A0ECE7BB67; };
+               ECA44A41DA8A935178C1A1F4 = {isa = PBXBuildFile; fileRef = F90C8B0233A54F1445343F67; };
+               47ED2C78B05B8A6A00E36C46 = {isa = PBXBuildFile; fileRef = 685A261BE78585293F3EAD36; };
+               8E63755144E29269FD82C897 = {isa = PBXBuildFile; fileRef = 8135645508EEFDBDCDF2ADC6; };
+               75DB074DBAE04408A0A917B7 = {isa = PBXBuildFile; fileRef = E0A3F113BC27B7B4D6F1D693; };
+               E6F58FC3ACAE774DB4D06420 = {isa = PBXBuildFile; fileRef = 3AB62BFF806112585B54DDA3; };
+               36E115D98311F12AA06710E6 = {isa = PBXBuildFile; fileRef = 061AECBF1CC7056F4155812D; };
+               B38728296BB32B7994CE28DF = {isa = PBXBuildFile; fileRef = 934ACDCB3FD9D223A3481D8F; };
+               71DF4F5EB4C8305688416725 = {isa = PBXBuildFile; fileRef = E5BFC17E682AB426D203B3E6; };
+               4FBBB55F4E347757F74F1F41 = {isa = PBXBuildFile; fileRef = 25E5ED33876A2C752378C859; };
+               F619F3887CEC064441BB6EE6 = {isa = PBXBuildFile; fileRef = 260481E972425474BB8155B0; };
+               C2BB2B6DA237FE0CB64C7EDA = {isa = PBXBuildFile; fileRef = 5965349393850F41DF76F350; };
+               F28112945CEBEA4CE8975833 = {isa = PBXBuildFile; fileRef = 03B0F9318FD583525AB195A9; };
+               9EACEA6BE8D0ACC72C12C080 = {isa = PBXBuildFile; fileRef = 03A63C3CA6F24977F19C316D; };
+               26652AB1BB77C8A39434775F = {isa = PBXBuildFile; fileRef = E061A1C75FA5722167FC4997; };
+               2707968B431D83AC7E28E49B = {isa = PBXBuildFile; fileRef = E67AB94002886AF67437D6AE; };
+               712D81867EC698463252FA79 = {isa = PBXBuildFile; fileRef = EDDA01B246C6128CAF7A2914; };
+               49E7BBD46981F0035E4E9021 = {isa = PBXBuildFile; fileRef = 831A01C745C905F5715CD822; };
+               611298FAC1A543BDD10D4C41 = {isa = PBXBuildFile; fileRef = 4DF215D350FFE5E119CBA7E5; };
+               D183F8140174ACCDDCD230A2 = {isa = PBXBuildFile; fileRef = 3BC9753E0CD75A36DC742EE0; };
+               FF87532E62753EDFA3D29CAD = {isa = PBXBuildFile; fileRef = 6C5E26B4D28F8450435B8AE1; };
+               2F76CA28C8C0EFC7453D0EB8 = {isa = PBXBuildFile; fileRef = F5F2EA2238973488632FC322; };
+               6B5560283DEEBD6DD2D6C984 = {isa = PBXBuildFile; fileRef = C1E93FAF6C68A40A664422CD; };
+               1DBDFEDE359CFC84F8E3DE4C = {isa = PBXBuildFile; fileRef = FCD0D758C5767944BEC29730; };
+               CDABEA6258EC70C65C9ACCFE = {isa = PBXBuildFile; fileRef = 3E4ED41C374261CFFD309743; };
+               E2F44A968EC2598DAE33A997 = {isa = PBXBuildFile; fileRef = A1D6D36B96B6B37C31F32829; };
+               5CB78489F16E82144914972D = {isa = PBXBuildFile; fileRef = 979F23EA9E5E76131299E886; };
+               BC6036F22423CA0AFF0385A7 = {isa = PBXBuildFile; fileRef = 94B6C88FE30861A47CD28709; };
+               AEA090DAC5C747C50C7D3FA7 = {isa = PBXBuildFile; fileRef = CE38E6469D98462A2C22C915; };
+               CDEB6BA5341494AF51D07C72 = {isa = PBXBuildFile; fileRef = 0AB68DBAB6B7DAEDDDD5B683; };
+               0140787C0118A95E37DE90B4 = {isa = PBXBuildFile; fileRef = 9144821E003E15E4042B57DB; };
+               03A63C3CA6F24977F19C316D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_devices.mm"; path = "../../JuceLibraryCode/include_juce_audio_devices.mm"; sourceTree = "SOURCE_ROOT"; };
+               03B0F9318FD583525AB195A9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_basics.mm"; path = "../../JuceLibraryCode/include_juce_audio_basics.mm"; sourceTree = "SOURCE_ROOT"; };
+               061AECBF1CC7056F4155812D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs2.cpp; path = ../../Source/Demos/DemoPIPs2.cpp; sourceTree = "SOURCE_ROOT"; };
+               0AB68DBAB6B7DAEDDDD5B683 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_product_unlocking.mm"; path = "../../JuceLibraryCode/include_juce_product_unlocking.mm"; sourceTree = "SOURCE_ROOT"; };
+               0B36C013D9790568B481634C = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_utils"; path = "../../../../modules/juce_audio_utils"; sourceTree = "SOURCE_ROOT"; };
+               0CCFDC1D1C7B8A12BF4822F1 = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = DemoRunner.entitlements; path = DemoRunner.entitlements; sourceTree = "SOURCE_ROOT"; };
+               112FFCB73597157E721BCDF2 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_analytics"; path = "../../../../modules/juce_analytics"; sourceTree = "SOURCE_ROOT"; };
+               14CBD28B4887DAF89E27491C = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_cryptography"; path = "../../../../modules/juce_cryptography"; sourceTree = "SOURCE_ROOT"; };
+               1CFE3935A3B810D5D68A2504 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+               1FCD2145DE3FCFCF4F55A8AD = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DemoContentComponent.h; path = ../../Source/UI/DemoContentComponent.h; sourceTree = "SOURCE_ROOT"; };
+               23CD1A3F9067C3A0ECE7BB67 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+               24D74AF1C95BEF957DC4FA77 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+               25E5ED33876A2C752378C859 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = MainComponent.cpp; path = ../../Source/UI/MainComponent.cpp; sourceTree = "SOURCE_ROOT"; };
+               260481E972425474BB8155B0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../Source/Main.cpp; sourceTree = "SOURCE_ROOT"; };
+               346450C70C964FD9640B6086 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_processors"; path = "../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; };
+               34F1320BC5C23702C08DF9F0 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
+               3AB62BFF806112585B54DDA3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs1.cpp; path = ../../Source/Demos/DemoPIPs1.cpp; sourceTree = "SOURCE_ROOT"; };
+               3B99CF94C44E2EE04635A439 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; };
+               3BC9753E0CD75A36DC742EE0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_core.mm"; path = "../../JuceLibraryCode/include_juce_core.mm"; sourceTree = "SOURCE_ROOT"; };
+               3E4ED41C374261CFFD309743 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_graphics.mm"; path = "../../JuceLibraryCode/include_juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; };
+               470C3E4553B513FFEF752779 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+               491641F7632BCC81BBA0ED85 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_formats"; path = "../../../../modules/juce_audio_formats"; sourceTree = "SOURCE_ROOT"; };
+               49ECA8B998B339A083674A22 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+               4DF215D350FFE5E119CBA7E5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_box2d.cpp"; path = "../../JuceLibraryCode/include_juce_box2d.cpp"; sourceTree = "SOURCE_ROOT"; };
+               4E9AD0EAF3CA57B548622D9A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; };
+               4EC2782DE1779A130835B64D = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-App.plist"; path = "Info-App.plist"; sourceTree = "SOURCE_ROOT"; };
+               4F0A137A4115946A346180E6 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
+               4FE6029FF76BCE9698595DC5 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_product_unlocking"; path = "../../../../modules/juce_product_unlocking"; sourceTree = "SOURCE_ROOT"; };
+               5965349393850F41DF76F350 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_analytics.cpp"; path = "../../JuceLibraryCode/include_juce_analytics.cpp"; sourceTree = "SOURCE_ROOT"; };
+               5A9F2000C66D24E8B01BE60B = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_basics"; path = "../../../../modules/juce_gui_basics"; sourceTree = "SOURCE_ROOT"; };
+               60F2869DC345EAF2314D6C09 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_devices"; path = "../../../../modules/juce_audio_devices"; sourceTree = "SOURCE_ROOT"; };
+               61AE09C749B007B70A265D9B = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; };
+               651ECE3C7BA845DDCFEE48F3 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_osc"; path = "../../../../modules/juce_osc"; sourceTree = "SOURCE_ROOT"; };
+               6847A9B2C5E3C2ED56D8D4E7 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_basics"; path = "../../../../modules/juce_audio_basics"; sourceTree = "SOURCE_ROOT"; };
+               685A261BE78585293F3EAD36 = {isa = PBXFileReference; lastKnownFileType = folder; name = Assets; path = ../../../Assets; sourceTree = "<group>"; };
+               6C198AF93E1F6E682189E2F6 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_opengl"; path = "../../../../modules/juce_opengl"; sourceTree = "SOURCE_ROOT"; };
+               6C2C1AC86623F457427965EF = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_box2d"; path = "../../../../modules/juce_box2d"; sourceTree = "SOURCE_ROOT"; };
+               6C5E26B4D28F8450435B8AE1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_cryptography.mm"; path = "../../JuceLibraryCode/include_juce_cryptography.mm"; sourceTree = "SOURCE_ROOT"; };
+               72129757D2A553B90A7157C6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; };
+               76A157A111866670A4678F04 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+               7983C452610C1638B7E78F12 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
+               7A5AAE9EE573FC6105CC4AAC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SettingsContent.h; path = ../../Source/UI/SettingsContent.h; sourceTree = "SOURCE_ROOT"; };
+               8135645508EEFDBDCDF2ADC6 = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = DemoRunner/Images.xcassets; sourceTree = "SOURCE_ROOT"; };
+               831A01C745C905F5715CD822 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_blocks_basics.cpp"; path = "../../JuceLibraryCode/include_juce_blocks_basics.cpp"; sourceTree = "SOURCE_ROOT"; };
+               873F9DD54978E601102353B4 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
+               8CE533D611CD0984AD028D73 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_graphics"; path = "../../../../modules/juce_graphics"; sourceTree = "SOURCE_ROOT"; };
+               903CD4126C779884797EF915 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_core"; path = "../../../../modules/juce_core"; sourceTree = "SOURCE_ROOT"; };
+               9144821E003E15E4042B57DB = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_video.mm"; path = "../../JuceLibraryCode/include_juce_video.mm"; sourceTree = "SOURCE_ROOT"; };
+               934ACDCB3FD9D223A3481D8F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JUCEDemos.cpp; path = ../../Source/Demos/JUCEDemos.cpp; sourceTree = "SOURCE_ROOT"; };
+               94B6C88FE30861A47CD28709 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_opengl.mm"; path = "../../JuceLibraryCode/include_juce_opengl.mm"; sourceTree = "SOURCE_ROOT"; };
+               979F23EA9E5E76131299E886 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_extra.mm"; path = "../../JuceLibraryCode/include_juce_gui_extra.mm"; sourceTree = "SOURCE_ROOT"; };
+               A04E4408525F24F7DCBA000E = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
+               A1D6D36B96B6B37C31F32829 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_basics.mm"; path = "../../JuceLibraryCode/include_juce_gui_basics.mm"; sourceTree = "SOURCE_ROOT"; };
+               A5256778E2EBD206B337B555 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_video"; path = "../../../../modules/juce_video"; sourceTree = "SOURCE_ROOT"; };
+               A6F555BE0DDF01C285BD8BF5 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_dsp"; path = "../../../../modules/juce_dsp"; sourceTree = "SOURCE_ROOT"; };
+               A9315F8368A5771EC39631CB = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_extra"; path = "../../../../modules/juce_gui_extra"; sourceTree = "SOURCE_ROOT"; };
+               B28EFB9D1DF0B6D6499A7DEF = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreImage.framework; path = System/Library/Frameworks/CoreImage.framework; sourceTree = SDKROOT; };
+               B2BC383CE102EECCF49C7AF7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IntroScreen.h; 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; name = "include_juce_dsp.mm"; path = "../../JuceLibraryCode/include_juce_dsp.mm"; sourceTree = "SOURCE_ROOT"; };
+               CE38E6469D98462A2C22C915 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_osc.cpp"; path = "../../JuceLibraryCode/include_juce_osc.cpp"; sourceTree = "SOURCE_ROOT"; };
+               CFF2BBEB242CC8B3B904B5F9 = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoRunner.app; sourceTree = "BUILT_PRODUCTS_DIR"; };
+               D018D636A4DC9BEA11720129 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_blocks_basics"; path = "../../../../modules/juce_blocks_basics"; sourceTree = "SOURCE_ROOT"; };
+               DC192EFA899E6CBE6B5CD394 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+               E061A1C75FA5722167FC4997 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_formats.mm"; path = "../../JuceLibraryCode/include_juce_audio_formats.mm"; sourceTree = "SOURCE_ROOT"; };
+               E0A3F113BC27B7B4D6F1D693 = {isa = PBXFileReference; lastKnownFileType = file.icns; name = Icon.icns; path = Icon.icns; sourceTree = "SOURCE_ROOT"; };
+               E5BFC17E682AB426D203B3E6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoContentComponent.cpp; path = ../../Source/UI/DemoContentComponent.cpp; sourceTree = "SOURCE_ROOT"; };
+               E67AB94002886AF67437D6AE = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_processors.mm"; path = "../../JuceLibraryCode/include_juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; };
+               EB68BD1224CD9748BFA332C0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainComponent.h; path = ../../Source/UI/MainComponent.h; sourceTree = "SOURCE_ROOT"; };
+               ECE79F1433E92BB6213C86F5 = {isa = PBXFileReference; lastKnownFileType = image.png; name = JUCEAppIcon.png; path = ../../Source/JUCEAppIcon.png; sourceTree = "SOURCE_ROOT"; };
+               EDDA01B246C6128CAF7A2914 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_utils.mm"; path = "../../JuceLibraryCode/include_juce_audio_utils.mm"; sourceTree = "SOURCE_ROOT"; };
+               EE6BDC78B539D27E65E92265 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JUCEDemos.h; path = ../../Source/Demos/JUCEDemos.h; sourceTree = "SOURCE_ROOT"; };
+               F5F2EA2238973488632FC322 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_data_structures.mm"; path = "../../JuceLibraryCode/include_juce_data_structures.mm"; sourceTree = "SOURCE_ROOT"; };
+               F90C8B0233A54F1445343F67 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+               FB1FC613CE260140F1CFD21B = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_events"; path = "../../../../modules/juce_events"; sourceTree = "SOURCE_ROOT"; };
+               FCD0D758C5767944BEC29730 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_events.mm"; path = "../../JuceLibraryCode/include_juce_events.mm"; sourceTree = "SOURCE_ROOT"; };
+               FDC3CA8D1403C169659F7D8C = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_data_structures"; path = "../../../../modules/juce_data_structures"; sourceTree = "SOURCE_ROOT"; };
+               CD575607FAA297480EE95F13 = {isa = PBXGroup; children = (
+                                       3AB62BFF806112585B54DDA3,
+                                       061AECBF1CC7056F4155812D,
+                                       B2BC383CE102EECCF49C7AF7,
+                                       934ACDCB3FD9D223A3481D8F,
+                                       EE6BDC78B539D27E65E92265, ); name = Demos; sourceTree = "<group>"; };
+               BB12537403CC24C02622582C = {isa = PBXGroup; children = (
+                                       E5BFC17E682AB426D203B3E6,
+                                       1FCD2145DE3FCFCF4F55A8AD,
+                                       25E5ED33876A2C752378C859,
+                                       EB68BD1224CD9748BFA332C0,
+                                       7A5AAE9EE573FC6105CC4AAC, ); name = UI; sourceTree = "<group>"; };
+               6F933968486D9AD9FE112622 = {isa = PBXGroup; children = (
+                                       CD575607FAA297480EE95F13,
+                                       BB12537403CC24C02622582C,
+                                       260481E972425474BB8155B0,
+                                       ECE79F1433E92BB6213C86F5, ); name = Source; sourceTree = "<group>"; };
+               9683F931FA1B8B85FA8C4BD8 = {isa = PBXGroup; children = (
+                                       6F933968486D9AD9FE112622, ); name = DemoRunner; sourceTree = "<group>"; };
+               5A0B2CEF393A25C6D4B1B76C = {isa = PBXGroup; children = (
+                                       112FFCB73597157E721BCDF2,
+                                       6847A9B2C5E3C2ED56D8D4E7,
+                                       60F2869DC345EAF2314D6C09,
+                                       491641F7632BCC81BBA0ED85,
+                                       346450C70C964FD9640B6086,
+                                       0B36C013D9790568B481634C,
+                                       D018D636A4DC9BEA11720129,
+                                       6C2C1AC86623F457427965EF,
+                                       903CD4126C779884797EF915,
+                                       14CBD28B4887DAF89E27491C,
+                                       FDC3CA8D1403C169659F7D8C,
+                                       A6F555BE0DDF01C285BD8BF5,
+                                       FB1FC613CE260140F1CFD21B,
+                                       8CE533D611CD0984AD028D73,
+                                       5A9F2000C66D24E8B01BE60B,
+                                       A9315F8368A5771EC39631CB,
+                                       6C198AF93E1F6E682189E2F6,
+                                       651ECE3C7BA845DDCFEE48F3,
+                                       4FE6029FF76BCE9698595DC5,
+                                       A5256778E2EBD206B337B555, ); name = "JUCE Modules"; sourceTree = "<group>"; };
+               61F3057D838D7DABB0FA3D34 = {isa = PBXGroup; children = (
+                                       72129757D2A553B90A7157C6,
+                                       5965349393850F41DF76F350,
+                                       03B0F9318FD583525AB195A9,
+                                       03A63C3CA6F24977F19C316D,
+                                       E061A1C75FA5722167FC4997,
+                                       E67AB94002886AF67437D6AE,
+                                       EDDA01B246C6128CAF7A2914,
+                                       831A01C745C905F5715CD822,
+                                       4DF215D350FFE5E119CBA7E5,
+                                       3BC9753E0CD75A36DC742EE0,
+                                       6C5E26B4D28F8450435B8AE1,
+                                       F5F2EA2238973488632FC322,
+                                       C1E93FAF6C68A40A664422CD,
+                                       FCD0D758C5767944BEC29730,
+                                       3E4ED41C374261CFFD309743,
+                                       A1D6D36B96B6B37C31F32829,
+                                       979F23EA9E5E76131299E886,
+                                       94B6C88FE30861A47CD28709,
+                                       CE38E6469D98462A2C22C915,
+                                       0AB68DBAB6B7DAEDDDD5B683,
+                                       9144821E003E15E4042B57DB,
+                                       4E9AD0EAF3CA57B548622D9A, ); name = "JUCE Library Code"; sourceTree = "<group>"; };
+               D87DCD5DA4EC8D78DFF37FCC = {isa = PBXGroup; children = (
+                                       685A261BE78585293F3EAD36,
+                                       4EC2782DE1779A130835B64D,
+                                       8135645508EEFDBDCDF2ADC6,
+                                       E0A3F113BC27B7B4D6F1D693, ); name = Resources; sourceTree = "<group>"; };
+               4452EAA652B65A9AE648288C = {isa = PBXGroup; children = (
+                                       A04E4408525F24F7DCBA000E,
+                                       470C3E4553B513FFEF752779,
+                                       DC192EFA899E6CBE6B5CD394,
+                                       3B99CF94C44E2EE04635A439,
+                                       4F0A137A4115946A346180E6,
+                                       B4389672DA4CC8E0A531062D,
+                                       76A157A111866670A4678F04,
+                                       B28EFB9D1DF0B6D6499A7DEF,
+                                       1CFE3935A3B810D5D68A2504,
+                                       61AE09C749B007B70A265D9B,
+                                       873F9DD54978E601102353B4,
+                                       49ECA8B998B339A083674A22,
+                                       7983C452610C1638B7E78F12,
+                                       24D74AF1C95BEF957DC4FA77,
+                                       34F1320BC5C23702C08DF9F0,
+                                       23CD1A3F9067C3A0ECE7BB67,
+                                       F90C8B0233A54F1445343F67, ); name = Frameworks; sourceTree = "<group>"; };
+               BFDAF16175D03695EEB466BC = {isa = PBXGroup; children = (
+                                       CFF2BBEB242CC8B3B904B5F9, ); name = Products; sourceTree = "<group>"; };
+               91A9A0FE9DF4F4E10009EEC7 = {isa = PBXGroup; children = (
+                                       0CCFDC1D1C7B8A12BF4822F1,
+                                       9683F931FA1B8B85FA8C4BD8,
+                                       5A0B2CEF393A25C6D4B1B76C,
+                                       61F3057D838D7DABB0FA3D34,
+                                       D87DCD5DA4EC8D78DFF37FCC,
+                                       4452EAA652B65A9AE648288C,
+                                       BFDAF16175D03695EEB466BC, ); name = Source; sourceTree = "<group>"; };
+               B18D059E5616FA729F764229 = {isa = XCBuildConfiguration; buildSettings = {
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
                                ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                CODE_SIGN_ENTITLEMENTS = "DemoRunner.entitlements";
                                COMBINE_HIDPI_IMAGES = YES;
                                        "JUCE_DEMO_RUNNER=1",
                                        "JUCE_UNIT_TESTS=1",
                                        "JUCER_XCODE_IPHONE_5BC26AE3=1",
-                                       "JUCE_APP_VERSION=5.3.1",
-                                       "JUCE_APP_VERSION_HEX=0x50301",
+                                       "JUCE_APP_VERSION=5.3.2",
+                                       "JUCE_APP_VERSION_HEX=0x50302",
                                        "JucePlugin_Build_VST=0",
                                        "JucePlugin_Build_VST3=0",
                                        "JucePlugin_Build_AU=0",
                                INFOPLIST_FILE = Info-App.plist;
                                INFOPLIST_PREPROCESS = NO;
                                INSTALL_PATH = "$(HOME)/Applications";
-                               PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.demorunner;
+                               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";
+                               PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner;
                                USE_HEADERMAP = NO; }; name = Debug; };
-               878F062DF0F2D968EC322CF4 = {isa = XCBuildConfiguration; buildSettings = {
+               69330F27DD2C71609336C7D2 = {isa = XCBuildConfiguration; buildSettings = {
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
                                ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                CODE_SIGN_ENTITLEMENTS = "DemoRunner.entitlements";
                                COMBINE_HIDPI_IMAGES = YES;
                                        "JUCE_DEMO_RUNNER=1",
                                        "JUCE_UNIT_TESTS=1",
                                        "JUCER_XCODE_IPHONE_5BC26AE3=1",
-                                       "JUCE_APP_VERSION=5.3.1",
-                                       "JUCE_APP_VERSION_HEX=0x50301",
+                                       "JUCE_APP_VERSION=5.3.2",
+                                       "JUCE_APP_VERSION_HEX=0x50302",
                                        "JucePlugin_Build_VST=0",
                                        "JucePlugin_Build_VST3=0",
                                        "JucePlugin_Build_AU=0",
                                INFOPLIST_PREPROCESS = NO;
                                INSTALL_PATH = "$(HOME)/Applications";
                                LLVM_LTO = YES;
-                               PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.demorunner;
+                               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";
+                               PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner;
                                USE_HEADERMAP = NO; }; name = Release; };
-               49CDF00877DBD03D2C6D7313 = {isa = XCBuildConfiguration; buildSettings = {
+               C01EC82F42B640CA1E54AD53 = {isa = XCBuildConfiguration; buildSettings = {
                                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
                                ALWAYS_SEARCH_USER_PATHS = NO;
                                CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
                                TARGETED_DEVICE_FAMILY = "1,2";
                                WARNING_CFLAGS = -Wreorder;
                                ZERO_LINK = NO; }; name = Debug; };
-               4CADE461B4B845777C2F3084 = {isa = XCBuildConfiguration; buildSettings = {
+               07EA85D22270E8EA13CA0BBE = {isa = XCBuildConfiguration; buildSettings = {
                                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
                                ALWAYS_SEARCH_USER_PATHS = NO;
                                CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
                                TARGETED_DEVICE_FAMILY = "1,2";
                                WARNING_CFLAGS = -Wreorder;
                                ZERO_LINK = NO; }; name = Release; };
-               82C712E3A2B72D3FE08871AB = {isa = PBXTargetDependency; target = AF4A5EF10D3A095A9074F9CF; };
-               F63BE64D6F90B83AFFFBC14F = {isa = XCConfigurationList; buildConfigurations = (
-                                       49CDF00877DBD03D2C6D7313,
-                                       4CADE461B4B845777C2F3084, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
-               77311CC6EFE85E7117AD3242 = {isa = XCConfigurationList; buildConfigurations = (
-                                       CEC200AA273D1626F466FC27,
-                                       878F062DF0F2D968EC322CF4, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
-               2077585B61D41BDA5967E25C = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = (
-                                       B1776D2FEB204FAE5C17E4C7,
-                                       686146610021944DA9C987B8,
-                                       F657E50CA75FE6932E710CB0, ); runOnlyForDeploymentPostprocessing = 0; };
-               7C6E2E57520A67ACFE86097B = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = (
-                                       F9EDB3A8F55A4499441401D6,
-                                       EACB962CC04BDC0369264A8F,
-                                       557BA8FDD37630DF5EB84EE0,
-                                       5CFCACD6AF608BDC2E1E8BD1,
-                                       9263171BCE90616A9F350405,
-                                       2EF49BC29DA0951B1C43070F,
-                                       8861132DCB0DE3F9EB0DD278,
-                                       CCDAEA12C17058099252FD3D,
-                                       28778136A8C09DBDC980CB72,
-                                       DA696766645C964870153095,
-                                       8F5FE1B5D44F55667509BC99,
-                                       3656169644FED0C525D5D30C,
-                                       2763512B6DFF68C0EEF72496,
-                                       480F45A17B4E83A26B1ACEF9,
-                                       3D8EECDED13F0A46A6FA8D3E,
-                                       E433C1C591D091AF71AD528E,
-                                       A5F8F9904580960794429360,
-                                       B298295E61E5DD800B814DAF,
-                                       A7E206DD280DC58E2A150642,
-                                       26260D259EFF13BD5044CD34,
-                                       591D5799ED6524DE9BD846D7,
-                                       D09859BDBC491A9932637715,
-                                       7EC8A06F9290B16DFB16E346,
-                                       33C96917E46535D30B17B483,
-                                       8AA7BB967216BDBFF0371267,
-                                       FD5B59B8A0B8258531421E60, ); runOnlyForDeploymentPostprocessing = 0; };
-               FB8E53AB54C36DCB3C3FC501 = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = (
-                                       C8D093204643DE75CAA41A3F,
-                                       7286A5BB489F25E6E3CF63D4,
-                                       B6AB4CB9F0A0AD540028A3E1,
-                                       71F90E5ABB1112D2D92EAB59,
-                                       AB53895F1E4193A2C9B51DB6,
-                                       9CB6071FE1DD378F7C64C9F5,
-                                       1D98F6C4127BB7F0890645D6,
-                                       0B1AC7FEC205238C5701B086,
-                                       2EF15A7E6ECFD861D719276A,
-                                       9318D1152DE35146100C7594,
-                                       BA3F994E8752E7310789C02A,
-                                       06DA6875AC3E734378E374C5,
-                                       9F59844F463603E7C2467DC4,
-                                       C7D4E452620DF858B785BA82,
-                                       3D2D1CCFB4B682162034225E,
-                                       EDAD741A46FD4B3F002C96D3, ); runOnlyForDeploymentPostprocessing = 0; };
-               AF4A5EF10D3A095A9074F9CF = {isa = PBXNativeTarget; buildConfigurationList = 77311CC6EFE85E7117AD3242; buildPhases = (
-                                       2077585B61D41BDA5967E25C,
-                                       7C6E2E57520A67ACFE86097B,
-                                       FB8E53AB54C36DCB3C3FC501, ); buildRules = ( ); dependencies = (  ); name = "DemoRunner - App"; productName = DemoRunner; productReference = B953F5C249804F38B818AD2F; productType = "com.apple.product-type.application"; };
-               15C553274AB25531D0A16FBE = {isa = PBXProject; buildConfigurationList = F63BE64D6F90B83AFFFBC14F; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { AF4A5EF10D3A095A9074F9CF = { 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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 9979C8B054ED17C9E04C6BAB; projectDirPath = ""; projectRoot = ""; targets = (AF4A5EF10D3A095A9074F9CF); };
+               D87BAF6D1A7451B7A733B5F1 = {isa = PBXTargetDependency; target = 291E01DCBE746A376DBFA4D1; };
+               80E8AD1971F52B06F4D28891 = {isa = XCConfigurationList; buildConfigurations = (
+                                       C01EC82F42B640CA1E54AD53,
+                                       07EA85D22270E8EA13CA0BBE, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
+               413FBEAEC84DFEC41133C78B = {isa = XCConfigurationList; buildConfigurations = (
+                                       B18D059E5616FA729F764229,
+                                       69330F27DD2C71609336C7D2, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
+               57134FDD813875865F5B2057 = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = (
+                                       47ED2C78B05B8A6A00E36C46,
+                                       8E63755144E29269FD82C897,
+                                       75DB074DBAE04408A0A917B7, ); runOnlyForDeploymentPostprocessing = 0; };
+               ED916866997CA4F40C7C1016 = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = (
+                                       E6F58FC3ACAE774DB4D06420,
+                                       36E115D98311F12AA06710E6,
+                                       B38728296BB32B7994CE28DF,
+                                       71DF4F5EB4C8305688416725,
+                                       4FBBB55F4E347757F74F1F41,
+                                       F619F3887CEC064441BB6EE6,
+                                       C2BB2B6DA237FE0CB64C7EDA,
+                                       F28112945CEBEA4CE8975833,
+                                       9EACEA6BE8D0ACC72C12C080,
+                                       26652AB1BB77C8A39434775F,
+                                       2707968B431D83AC7E28E49B,
+                                       712D81867EC698463252FA79,
+                                       49E7BBD46981F0035E4E9021,
+                                       611298FAC1A543BDD10D4C41,
+                                       D183F8140174ACCDDCD230A2,
+                                       FF87532E62753EDFA3D29CAD,
+                                       2F76CA28C8C0EFC7453D0EB8,
+                                       6B5560283DEEBD6DD2D6C984,
+                                       1DBDFEDE359CFC84F8E3DE4C,
+                                       CDABEA6258EC70C65C9ACCFE,
+                                       E2F44A968EC2598DAE33A997,
+                                       5CB78489F16E82144914972D,
+                                       BC6036F22423CA0AFF0385A7,
+                                       AEA090DAC5C747C50C7D3FA7,
+                                       CDEB6BA5341494AF51D07C72,
+                                       0140787C0118A95E37DE90B4, ); runOnlyForDeploymentPostprocessing = 0; };
+               4B1F6E32C9FC8D779B21C1AF = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = (
+                                       48CF0B02E1D06E5DA51E6270,
+                                       163B0CF2DD0990A63DF1D5A6,
+                                       7B4163348896EB1B86B15160,
+                                       8C0AEA08A71075A6C765AEC9,
+                                       1351A13E78F38741C6075600,
+                                       527DA2E6827BAFDDD3E8E80F,
+                                       34A4931AF1DD424D3A400EEF,
+                                       7F57DB52C3CEFDC26DDD38FC,
+                                       46071CE2B98B562B7BF27CB1,
+                                       6A61CBB4E39BFD392D97528F,
+                                       0B0CE6D5062E5C02A41F24BC,
+                                       5E4310B3F6BB639875D3E9B8,
+                                       AE7FB2AC3885F4BF53A5DDA1,
+                                       1FB200F4AE3E4E7CDFF629BB,
+                                       AC783ECD84496E0B77911EEE,
+                                       B1981F62F6A91FD2F579A198,
+                                       ECA44A41DA8A935178C1A1F4, ); runOnlyForDeploymentPostprocessing = 0; };
+               291E01DCBE746A376DBFA4D1 = {isa = PBXNativeTarget; buildConfigurationList = 413FBEAEC84DFEC41133C78B; buildPhases = (
+                                       57134FDD813875865F5B2057,
+                                       ED916866997CA4F40C7C1016,
+                                       4B1F6E32C9FC8D779B21C1AF, ); buildRules = ( ); dependencies = (  ); name = "DemoRunner - App"; productName = DemoRunner; productReference = CFF2BBEB242CC8B3B904B5F9; productType = "com.apple.product-type.application"; };
+               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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 91A9A0FE9DF4F4E10009EEC7; projectDirPath = ""; projectRoot = ""; targets = (291E01DCBE746A376DBFA4D1); };
        };
-       rootObject = 15C553274AB25531D0A16FBE;
+       rootObject = AC6F0E9A0809A184B2C2B7DE;
 }
index a864c56f7547651f9e6b089d9b94123f12119a82..72a50cf55781c0cabeaef5053cb37b57c03e852a 100644 (file)
@@ -7,12 +7,14 @@
     <true/>\r
     <key>NSMicrophoneUsageDescription</key>\r
     <string>This is an audio app which requires audio input. If you do not have a USB audio interface connected it will use the microphone.</string>\r
+    <key>NSCameraUsageDescription</key>\r
+    <string>This app requires camera usage to function properly.</string>\r
     <key>UIViewControllerBasedStatusBarAppearance</key>\r
     <false/>\r
     <key>CFBundleExecutable</key>\r
     <string>${EXECUTABLE_NAME}</string>\r
     <key>CFBundleIdentifier</key>\r
-    <string>com.roli.juce.demorunner</string>\r
+    <string>com.juce.demorunner</string>\r
     <key>CFBundleName</key>\r
     <string>DemoRunner</string>\r
     <key>CFBundleDisplayName</key>\r
@@ -22,9 +24,9 @@
     <key>CFBundleSignature</key>\r
     <string>????</string>\r
     <key>CFBundleShortVersionString</key>\r
-    <string>5.3.1</string>\r
+    <string>5.3.2</string>\r
     <key>CFBundleVersion</key>\r
-    <string>5.3.1</string>\r
+    <string>5.3.2</string>\r
     <key>NSHumanReadableCopyright</key>\r
     <string>Copyright (c) 2018 - ROLI Ltd.</string>\r
     <key>NSHighResolutionCapable</key>\r
@@ -39,6 +41,7 @@
     <true/>\r
     <key>UISupportedInterfaceOrientations</key>\r
     <array>\r
+      <string>UIInterfaceOrientationPortrait</string>\r
       <string>UIInterfaceOrientationLandscapeLeft</string>\r
       <string>UIInterfaceOrientationLandscapeRight</string>\r
     </array>\r
index 5cfe6777ecb7a5ffaf86174f39d1e475e34d3cf9..f4729cd8ce2f7c23a9be98088b70ef434bcaadea 100644 (file)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 \r
 <JUCERPROJECT name="DemoRunner" projectType="guiapp" jucerVersion="5.3.1" defines="JUCE_DEMO_RUNNER=1&#10;JUCE_UNIT_TESTS=1"\r
-              bundleIdentifier="com.roli.juce.demorunner" version="5.3.1" companyName="ROLI Ltd."\r
+              bundleIdentifier="com.juce.demorunner" version="5.3.2" companyName="ROLI Ltd."\r
               companyCopyright="Copyright (c) 2018 - ROLI Ltd." companyWebsite="https://www.juce.com/"\r
-              companyEmail="info@juce.com">\r
+              companyEmail="info@juce.com" id="yj7xMM" reportAppUsage="1">\r
   <MAINGROUP id="G8kbr7" name="DemoRunner">\r
     <GROUP id="{20E3F84A-29E9-D5FF-4559-1A9E4A70CD60}" name="Source">\r
       <GROUP id="{272A692A-6AFE-68BD-C8E8-63B3D62245B1}" name="Demos">\r
@@ -30,7 +30,8 @@
   </MAINGROUP>\r
   <EXPORTFORMATS>\r
     <XCODE_MAC targetFolder="Builds/MacOSX" smallIcon="YyqWd2" bigIcon="YyqWd2"\r
-               extraCompilerFlags="-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">\r
+               extraCompilerFlags="-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"\r
+               customXcodeResourceFolders="../Audio &#10;../BLOCKS &#10;../DSP &#10;../GUI &#10;../Utilities">\r
       <CONFIGURATIONS>\r
         <CONFIGURATION isDebug="1" name="Debug"/>\r
         <CONFIGURATION isDebug="0" name="Release"/>\r
       </MODULEPATHS>\r
     </LINUX_MAKE>\r
     <ANDROIDSTUDIO targetFolder="Builds/Android" androidSDKPath="" androidNDKPath=""\r
-                   androidMinimumSDK="23" androidScreenOrientation="landscape" microphonePermissionNeeded="1"\r
-                   androidBluetoothNeeded="1" androidExternalReadNeeded="1" androidExternalWriteNeeded="1"\r
+                   androidMinimumSDK="23" microphonePermissionNeeded="1" androidBluetoothNeeded="1"\r
+                   androidExternalReadNeeded="1" androidExternalWriteNeeded="1"\r
                    androidEnableContentSharing="1" androidExtraAssetsFolder="../Assets"\r
-                   smallIcon="YyqWd2" bigIcon="YyqWd2">\r
+                   smallIcon="YyqWd2" bigIcon="YyqWd2" cameraPermissionNeeded="1">\r
       <CONFIGURATIONS>\r
         <CONFIGURATION isDebug="1" name="Debug" androidArchitectures="armeabi x86"/>\r
         <CONFIGURATION isDebug="0" name="Release"/>\r
         <MODULEPATH id="juce_analytics" path="../../modules"/>\r
       </MODULEPATHS>\r
     </ANDROIDSTUDIO>\r
-    <XCODE_IPHONE targetFolder="Builds/iOS" iosScreenOrientation="landscape" iPadScreenOrientation="landscape"\r
-                  UISupportsDocumentBrowser="1" microphonePermissionNeeded="1"\r
-                  iCloudPermissions="1" UIFileSharingEnabled="1" customXcodeResourceFolders="../Assets"\r
-                  smallIcon="YyqWd2" bigIcon="YyqWd2">\r
+    <XCODE_IPHONE targetFolder="Builds/iOS" UISupportsDocumentBrowser="1" microphonePermissionNeeded="1"\r
+                  cameraPermissionNeeded="1" iCloudPermissions="1" UIFileSharingEnabled="1"\r
+                  customXcodeResourceFolders="../Assets" smallIcon="YyqWd2" bigIcon="YyqWd2"\r
+                  extraCompilerFlags="-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">\r
       <CONFIGURATIONS>\r
         <CONFIGURATION isDebug="1" name="Debug"/>\r
         <CONFIGURATION isDebug="0" name="Release"/>\r
     <MODULE id="juce_video" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>\r
   </MODULES>\r
   <JUCEOPTIONS JUCE_USE_CAMERA="1" JUCE_USE_MP3AUDIOFORMAT="1"/>\r
+  <LIVE_SETTINGS>\r
+    <OSX/>\r
+  </LIVE_SETTINGS>\r
 </JUCERPROJECT>\r
index 42a1698d04083f9279406c1cd48c630f3bf32ba0..de08905c2f334d4fc9d47bff59262595c1a6ef99 100644 (file)
@@ -40,7 +40,7 @@
 #endif\r
 \r
 #ifndef JUCE_REPORT_APP_USAGE\r
- #define JUCE_REPORT_APP_USAGE 0\r
+ #define JUCE_REPORT_APP_USAGE 1\r
 #endif\r
 \r
 // END SECTION A\r
  //#define JUCE_PLUGINHOST_AU 0\r
 #endif\r
 \r
+#ifndef    JUCE_PLUGINHOST_LADSPA\r
+ //#define JUCE_PLUGINHOST_LADSPA 0\r
+#endif\r
+\r
 //==============================================================================\r
 // juce_audio_utils flags:\r
 \r
index 55e3638b97e6280830b098432e36a011860a3ba8..e3f1c698feec644a795867f429d872ff3bc68a52 100644 (file)
@@ -46,7 +46,7 @@
 namespace ProjectInfo\r
 {\r
     const char* const  projectName    = "DemoRunner";\r
-    const char* const  versionString  = "5.3.1";\r
-    const int          versionNumber  = 0x50301;\r
+    const char* const  versionString  = "5.3.2";\r
+    const int          versionNumber  = 0x50302;\r
 }\r
 #endif\r
index c79f07bfca6203cd81541863ffe7d9a453510c15..dc4577d411cfb4041a87c8cfb639408136b54242 100644 (file)
@@ -42,7 +42,7 @@
 #include "../../../Audio/MPEDemo.h"\r
 #include "../../../Audio/PluckedStringsDemo.h"\r
 \r
-#if (defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)) && (defined (JUCE_HAS_CONSTEXPR))\r
+#if JUCE_HAS_CONSTEXPR\r
  #include "../../../Audio/SimpleFFTDemo.h"\r
  #include "../../../BLOCKS/BlocksDrawingDemo.h"\r
  #include "../../../BLOCKS/BlocksMonitorDemo.h"\r
@@ -71,9 +71,7 @@
 #include "../../../Utilities/LiveConstantDemo.h"\r
 #include "../../../Utilities/MultithreadingDemo.h"\r
 #include "../../../Utilities/NetworkingDemo.h"\r
-#if defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)\r
- #include "../../../Utilities/OSCDemo.h"\r
-#endif\r
+#include "../../../Utilities/OSCDemo.h"\r
 #include "../../../Utilities/SystemInfoDemo.h"\r
 #include "../../../Utilities/TimersAndEventsDemo.h"\r
 #include "../../../Utilities/UnitTestsDemo.h"\r
@@ -92,7 +90,7 @@ void registerDemos_One() noexcept
     REGISTER_DEMO (MPEDemo,                   Audio,     false)\r
     REGISTER_DEMO (PluckedStringsDemo,        Audio,     false)\r
 \r
-   #if (defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)) && (defined (JUCE_HAS_CONSTEXPR))\r
+   #if JUCE_HAS_CONSTEXPR\r
     REGISTER_DEMO (SimpleFFTDemo,             Audio,     false)\r
     REGISTER_DEMO (BlocksDrawingDemo,         BLOCKS,    false)\r
     REGISTER_DEMO (BlocksMonitorDemo,         BLOCKS,    false)\r
@@ -120,9 +118,7 @@ void registerDemos_One() noexcept
     REGISTER_DEMO (LiveConstantDemo,          Utilities, false)\r
     REGISTER_DEMO (MultithreadingDemo,        Utilities, false)\r
     REGISTER_DEMO (NetworkingDemo,            Utilities, false)\r
-   #if defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)\r
     REGISTER_DEMO (OSCDemo,                   Utilities, false)\r
-   #endif\r
     REGISTER_DEMO (SystemInfoDemo,            Utilities, false)\r
     REGISTER_DEMO (TimersAndEventsDemo,       Utilities, false)\r
     REGISTER_DEMO_WITH_FILENAME (UnitTestClasses::UnitTestsDemo, Utilities, UnitTestsDemo, false)\r
index 243724b6930801cde9573e072430a63d16056eef..98ed93834ea24f5ae57aef783567989aa9f043ae 100644 (file)
@@ -34,7 +34,7 @@
 #include "../../../GUI/AnimationAppDemo.h"\r
 #include "../../../GUI/AnimationDemo.h"\r
 #include "../../../GUI/BouncingBallWavetableDemo.h"\r
-#if JUCE_MAC || JUCE_WINDOWS\r
+#if JUCE_USE_CAMERA && ! JUCE_LINUX\r
  #include "../../../GUI/CameraDemo.h"\r
 #endif\r
 #if ! JUCE_ANDROID\r
 #include "../../../GUI/ComponentDemo.h"\r
 #include "../../../GUI/ComponentTransformsDemo.h"\r
 #include "../../../GUI/DialogsDemo.h"\r
-#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
- #include "../../../GUI/FlexBoxDemo.h"\r
-#endif\r
+#include "../../../GUI/FlexBoxDemo.h"\r
 #include "../../../GUI/FontsDemo.h"\r
 #include "../../../GUI/GraphicsDemo.h"\r
-#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS && JUCE_HAS_CONSTEXPR\r
+#if JUCE_HAS_CONSTEXPR\r
  #include "../../../GUI/GridDemo.h"\r
 #endif\r
 #include "../../../GUI/ImagesDemo.h"\r
@@ -75,7 +73,7 @@ void registerDemos_Two() noexcept
     REGISTER_DEMO (AnimationAppDemo,          GUI,       false)\r
     REGISTER_DEMO (AnimationDemo,             GUI,       false)\r
     REGISTER_DEMO (BouncingBallWavetableDemo, GUI,       false)\r
-   #if JUCE_MAC || JUCE_WINDOWS\r
+   #if JUCE_USE_CAMERA && ! JUCE_LINUX\r
     REGISTER_DEMO (CameraDemo,                GUI,       true)\r
    #endif\r
    #if ! JUCE_ANDROID\r
@@ -84,12 +82,10 @@ void registerDemos_Two() noexcept
     REGISTER_DEMO (ComponentDemo,             GUI,       false)\r
     REGISTER_DEMO (ComponentTransformsDemo,   GUI,       false)\r
     REGISTER_DEMO (DialogsDemo,               GUI,       false)\r
-   #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
     REGISTER_DEMO (FlexBoxDemo,               GUI,       false)\r
-   #endif\r
     REGISTER_DEMO (FontsDemo,                 GUI,       false)\r
     REGISTER_DEMO (GraphicsDemo,              GUI,       false)\r
-   #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS && JUCE_HAS_CONSTEXPR\r
+   #if JUCE_HAS_CONSTEXPR\r
     REGISTER_DEMO (GridDemo,                  GUI,       false)\r
    #endif\r
     REGISTER_DEMO (ImagesDemo,                GUI,       false)\r
index b8e8c9dfcba71aeb95ca777e789334bb40ded578..08a01f47bbd90f3cd27168cc00a30e08ed4d71e7 100644 (file)
@@ -51,7 +51,12 @@ JUCEDemos::DemoCategory& JUCEDemos::getCategory (const String& name)
 \r
 void JUCEDemos::registerDemo (std::function<Component*()> constructorCallback, const String& filePath, const String& category, bool isHeavyweight)\r
 {\r
-    auto f = findExamplesDirectoryFromExecutable (File::getSpecialLocation (File::SpecialLocationType::currentApplicationFile));\r
+   #if JUCE_MAC\r
+    auto f = File::getSpecialLocation (File::currentExecutableFile)\r
+                  .getParentDirectory().getParentDirectory().getChildFile ("Resources").getChildFile (filePath);\r
+   #else\r
+    auto f = findExamplesDirectoryFromExecutable (File::getSpecialLocation (File::currentApplicationFile));\r
+   #endif\r
 \r
     #if ! (JUCE_ANDROID || JUCE_IOS)\r
     if (f == File())\r
@@ -80,7 +85,7 @@ File JUCEDemos::findExamplesDirectoryFromExecutable (File exec)
 }\r
 \r
 //==============================================================================\r
-ScopedPointer<AudioDeviceManager> sharedAudioDeviceManager;\r
+std::unique_ptr<AudioDeviceManager> sharedAudioDeviceManager;\r
 \r
 static String getCurrentDefaultAudioDeviceName (AudioDeviceManager& deviceManager, bool isInput)\r
 {\r
@@ -100,7 +105,7 @@ static String getCurrentDefaultAudioDeviceName (AudioDeviceManager& deviceManage
 AudioDeviceManager& getSharedAudioDeviceManager (int numInputChannels, int numOutputChannels)\r
 {\r
     if (sharedAudioDeviceManager == nullptr)\r
-        sharedAudioDeviceManager = new AudioDeviceManager();\r
+        sharedAudioDeviceManager.reset (new AudioDeviceManager());\r
 \r
     auto* currentDevice = sharedAudioDeviceManager->getCurrentAudioDevice();\r
 \r
index 2edae97580ed9dccc46d59fe4c7e367bbd30c0e9..53db349e2fb946eb69fadc4052acfc1aec9f95bb 100644 (file)
@@ -36,7 +36,6 @@
 #define REGISTER_DEMO(DemoName, category, heavyweight) JUCEDemos::registerDemo ([] { return new DemoName(); }, CREATE_FILEPATH(DemoName, category), JUCE_STRINGIFY (category), heavyweight);\r
 #define REGISTER_DEMO_WITH_FILENAME(DemoName, category, fileName, heavyweight) JUCEDemos::registerDemo ([] { return new DemoName(); }, CREATE_FILEPATH(fileName, category), JUCE_STRINGIFY (category), heavyweight);\r
 \r
-\r
 //==============================================================================\r
 struct JUCEDemos\r
 {\r
@@ -72,6 +71,6 @@ CodeEditorComponent::ColourScheme getDarkColourScheme();
 CodeEditorComponent::ColourScheme getLightColourScheme();\r
 \r
 //==============================================================================\r
-extern ScopedPointer<AudioDeviceManager> sharedAudioDeviceManager;\r
+extern std::unique_ptr<AudioDeviceManager> sharedAudioDeviceManager;\r
 \r
 AudioDeviceManager& getSharedAudioDeviceManager (int numInputChannels = -1, int numOutputChannels = -1);\r
index d2d722e9362cfcf0305ba1d7668492fb816ffe5f..ad770d7e00464956cb7884a288bb5f60adb83f50 100644 (file)
@@ -93,9 +93,11 @@ public:
         // (This function call is for one of the demos, which involves launching a child process)\r
         if (invokeChildProcessDemo (commandLine))\r
             return;\r
+      #else\r
+        ignoreUnused (commandLine);\r
       #endif\r
 \r
-        mainWindow = new MainAppWindow (getApplicationName());\r
+        mainWindow.reset (new MainAppWindow (getApplicationName()));\r
     }\r
 \r
     void backButtonPressed() override    { mainWindow->getMainComponent().getSidePanel().showOrHide (false); }\r
@@ -120,6 +122,7 @@ private:
 \r
            #if JUCE_IOS || JUCE_ANDROID\r
             setFullScreen (true);\r
+            Desktop::getInstance().setOrientationsEnabled (Desktop::rotatedClockwise | Desktop::rotatedAntiClockwise);\r
            #else\r
             setBounds ((int) (0.1f * getParentWidth()),\r
                        (int) (0.1f * getParentHeight()),\r
@@ -131,7 +134,7 @@ private:
             setVisible (true);\r
 \r
            #if JUCE_WINDOWS || JUCE_LINUX || JUCE_MAC\r
-            taskbarIcon = new DemoTaskbarComponent();\r
+            taskbarIcon.reset (new DemoTaskbarComponent());\r
            #endif\r
         }\r
 \r
@@ -141,12 +144,12 @@ private:
         MainComponent& getMainComponent()    { return *dynamic_cast<MainComponent*> (getContentComponent()); }\r
 \r
     private:\r
-        ScopedPointer<Component> taskbarIcon;\r
+        std::unique_ptr<Component> taskbarIcon;\r
 \r
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainAppWindow)\r
     };\r
 \r
-    ScopedPointer<MainAppWindow> mainWindow;\r
+    std::unique_ptr<MainAppWindow> mainWindow;\r
 };\r
 \r
 //==============================================================================\r
index 68d93d43683fe7253b1005edcd88865c86c24089..19e61be7974816cc07419e3adf61c4b5ac418f2b 100644 (file)
@@ -45,7 +45,7 @@ struct DemoContent    : public Component
 \r
         if (comp != nullptr)\r
         {\r
-            addAndMakeVisible (comp);\r
+            addAndMakeVisible (comp.get());\r
             resized();\r
         }\r
     }\r
@@ -54,7 +54,7 @@ struct DemoContent    : public Component
     void showHomeScreen()                       { setComponent (createIntroDemo()); }\r
 \r
 private:\r
-    ScopedPointer<Component> comp;\r
+    std::unique_ptr<Component> comp;\r
 };\r
 \r
 //==============================================================================\r
@@ -105,10 +105,12 @@ DemoContentComponent::DemoContentComponent (Component& mainComponent, std::funct
     : TabbedComponent (TabbedButtonBar::Orientation::TabsAtTop),\r
       demoChangedCallback (callback)\r
 {\r
-    addTab ("Demo",     Colours::transparentBlack, demoContent = new DemoContent(), false);\r
+    demoContent.reset (new DemoContent());\r
+    addTab ("Demo",     Colours::transparentBlack, demoContent.get(), false);\r
 \r
    #if ! (JUCE_ANDROID || JUCE_IOS)\r
-    addTab ("Code",     Colours::transparentBlack, codeContent = new CodeContent(), false);\r
+    codeContent.reset (new CodeContent());\r
+    addTab ("Code",     Colours::transparentBlack, codeContent.get(), false);\r
    #endif\r
 \r
     addTab ("Settings", Colours::transparentBlack, new SettingsContent (dynamic_cast<MainComponent&> (mainComponent)), true);\r
index 9a2f8d22d3671fb65f0f43363b68549eadf7851e..680996c1d8c5f27de2fe0e77b8750791c0a68dcd 100644 (file)
@@ -53,10 +53,10 @@ public:
 private:\r
     std::function<void(bool)> demoChangedCallback;\r
 \r
-    ScopedPointer<DemoContent> demoContent;\r
+    std::unique_ptr<DemoContent> demoContent;\r
 \r
    #if ! (JUCE_ANDROID || JUCE_IOS)\r
-    ScopedPointer<CodeContent> codeContent;\r
+    std::unique_ptr<CodeContent> codeContent;\r
    #endif\r
 \r
     String currentDemoCategory;\r
index d36aa047fe98fc2411532a4706717f7e1303cc2d..a87daa9c13c213db3fc1a51075f6386a01ec6231 100644 (file)
@@ -243,7 +243,7 @@ private:
 //==============================================================================\r
 MainComponent::MainComponent()\r
 {\r
-    contentComponent = new DemoContentComponent (*this, [this] (bool isHeavyweight)\r
+    contentComponent.reset (new DemoContentComponent (*this, [this] (bool isHeavyweight)\r
     {\r
        #if (JUCE_ANDROID || JUCE_IOS)\r
         demosPanel.showOrHide (false);\r
@@ -260,12 +260,12 @@ MainComponent::MainComponent()
 \r
         isShowingHeavyweightDemo = isHeavyweight;\r
         resized();\r
-    });\r
+    }));\r
 \r
     demosPanel.setContent (new DemoList (*contentComponent));\r
     demosPanel.setTitleBarComponent (new SidePanelHeader (*this), true);\r
 \r
-    addAndMakeVisible (contentComponent);\r
+    addAndMakeVisible (contentComponent.get());\r
     addAndMakeVisible (showDemosButton);\r
     addAndMakeVisible (demosPanel);\r
 \r
index 6a9d1576ab9a6456d7a9328f520b4f7937eb7e88..30a89805210d80cb1cc9eb507d75185a48cb98e7 100644 (file)
@@ -58,7 +58,7 @@ private:
     void updateRenderingEngine (int index);\r
 \r
     //==============================================================================\r
-    ScopedPointer<DemoContentComponent> contentComponent;\r
+    std::unique_ptr<DemoContentComponent> contentComponent;\r
     SidePanel demosPanel  { "Demos", 250, true };\r
 \r
     OpenGLContext openGLContext;\r
index 5f8794de6a0517e22a323fc1379f5b143041b056..fb9c18fb13850919d5b9b028f1d2647a413c186d 100644 (file)
@@ -98,8 +98,9 @@ private:
             rendererLabel.setJustificationType (Justification::centredRight);\r
             rendererLabel.attachToComponent (&rendererSelector, true);\r
 \r
-            addAndMakeVisible (audioSettings = new AudioDeviceSelectorComponent (getSharedAudioDeviceManager(),\r
-                                                                                 0, 256, 0, 256, true, true, true, false));\r
+            audioSettings.reset (new AudioDeviceSelectorComponent (getSharedAudioDeviceManager(),\r
+                                                                   0, 256, 0, 256, true, true, true, false));\r
+            addAndMakeVisible (audioSettings.get());\r
             audioSettings->setItemHeight (itemHeight);\r
 \r
             setOpaque (true);\r
@@ -155,7 +156,7 @@ private:
         StringArray lookAndFeelNames;\r
         OwnedArray<LookAndFeel> lookAndFeels;\r
 \r
-        ScopedPointer<AudioDeviceSelectorComponent> audioSettings;\r
+        std::unique_ptr<AudioDeviceSelectorComponent> audioSettings;\r
 \r
         //==============================================================================\r
         void refreshRenderingEngineSelector()\r
index 301a619e1195d3ed63e8db8c021c88b384594bf0..6c1ef6096496aebc91a9febf7d70b70e10633927 100644 (file)
@@ -31,7 +31,7 @@
 \r
  dependencies:     juce_core, juce_cryptography, juce_data_structures, juce_events,\r
                    juce_graphics, juce_gui_basics, juce_gui_extra, juce_video\r
- exporters:        xcode_mac, vs2017, linux_make\r
+ exporters:        xcode_mac, vs2017, androidstudio, xcode_iphone\r
 \r
  moduleFlags:      JUCE_USE_CAMERA=1\r
 \r
 #include "../Assets/DemoUtilities.h"\r
 \r
 //==============================================================================\r
-class CameraDemo  : public Component,\r
-                    private CameraDevice::Listener,\r
-                    private AsyncUpdater\r
+class CameraDemo  : public Component\r
 {\r
 public:\r
     CameraDemo()\r
     {\r
         setOpaque (true);\r
 \r
+       #if JUCE_ANDROID\r
+        // Android requires exclusive access to the audio device when recording videos.\r
+        audioDeviceManager.closeAudioDevice();\r
+       #endif\r
+\r
         addAndMakeVisible (cameraSelectorComboBox);\r
         updateCameraList();\r
         cameraSelectorComboBox.setSelectedId (1);\r
@@ -76,6 +79,21 @@ public:
         cameraSelectorComboBox.setSelectedId (2);\r
 \r
         setSize (500, 500);\r
+\r
+       #if JUCE_IOS || JUCE_ANDROID\r
+        setPortraitOrientationEnabled (true);\r
+       #endif\r
+    }\r
+\r
+    ~CameraDemo()\r
+    {\r
+       #if JUCE_IOS || JUCE_ANDROID\r
+        setPortraitOrientationEnabled (false);\r
+       #endif\r
+\r
+       #if JUCE_ANDROID\r
+        audioDeviceManager.restartLastAudioDevice();\r
+       #endif\r
     }\r
 \r
     //==============================================================================\r
@@ -101,26 +119,66 @@ public:
         recordMovieButton.setBounds (top.removeFromLeft (recordMovieButton.getWidth()));\r
 \r
         r.removeFromTop (4);\r
-        auto previewArea = r.removeFromTop (r.getHeight() / 2);\r
+        auto previewArea = shouldUseLandscapeLayout() ? r.removeFromLeft (r.getWidth() / 2)\r
+                                                      : r.removeFromTop (r.getHeight() / 2);\r
 \r
         if (cameraPreviewComp.get() != nullptr)\r
             cameraPreviewComp->setBounds (previewArea);\r
 \r
-        r.removeFromTop (4);\r
+        if (shouldUseLandscapeLayout())\r
+            r.removeFromLeft (4);\r
+        else\r
+            r.removeFromTop (4);\r
+\r
         lastSnapshot.setBounds (r);\r
     }\r
 \r
 \r
 private:\r
     //==============================================================================\r
-    ScopedPointer<CameraDevice> cameraDevice;\r
-    ScopedPointer<Component> cameraPreviewComp;\r
+    // if this PIP is running inside the demo runner, we'll use the shared device manager instead\r
+   #ifndef JUCE_DEMO_RUNNER\r
+    AudioDeviceManager audioDeviceManager;\r
+   #else\r
+    AudioDeviceManager& audioDeviceManager { getSharedAudioDeviceManager (0, 2) };\r
+   #endif\r
+\r
+    std::unique_ptr<CameraDevice> cameraDevice;\r
+    std::unique_ptr<Component> cameraPreviewComp;\r
     ImageComponent lastSnapshot;\r
 \r
     ComboBox cameraSelectorComboBox  { "Camera" };\r
     TextButton snapshotButton        { "Take a snapshot" };\r
+   #if ! JUCE_ANDROID && ! JUCE_IOS\r
     TextButton recordMovieButton     { "Record a movie (to your desktop)..." };\r
+   #else\r
+    TextButton recordMovieButton     { "Record a movie" };\r
+   #endif\r
     bool recordingMovie = false;\r
+    File recordingFile;\r
+    bool contentSharingPending = false;\r
+\r
+    void setPortraitOrientationEnabled (bool shouldBeEnabled)\r
+    {\r
+        auto allowedOrientations = Desktop::getInstance().getOrientationsEnabled();\r
+\r
+        if (shouldBeEnabled)\r
+            allowedOrientations |= Desktop::upright;\r
+        else\r
+            allowedOrientations &= ~Desktop::upright;\r
+\r
+        Desktop::getInstance().setOrientationsEnabled (allowedOrientations);\r
+    }\r
+\r
+    bool shouldUseLandscapeLayout() const noexcept\r
+    {\r
+       #if JUCE_ANDROID || JUCE_IOS\r
+        auto orientation = Desktop::getInstance().getCurrentOrientation();\r
+        return orientation == Desktop::rotatedClockwise || orientation == Desktop::rotatedAntiClockwise;\r
+       #else\r
+        return false;\r
+       #endif\r
+    }\r
 \r
     void updateCameraList()\r
     {\r
@@ -137,25 +195,68 @@ private:
     void cameraChanged()\r
     {\r
         // This is called when the user chooses a camera from the drop-down list.\r
-        cameraDevice     .reset();\r
+       #if JUCE_IOS\r
+        // On iOS, when switching camera, open the new camera first, so that it can\r
+        // share the underlying camera session with the old camera. Otherwise, the\r
+        // session would have to be closed first, which can take several seconds.\r
+        if (cameraSelectorComboBox.getSelectedId() == 1)\r
+            cameraDevice.reset();\r
+       #else\r
+        cameraDevice.reset();\r
+       #endif\r
         cameraPreviewComp.reset();\r
         recordingMovie = false;\r
 \r
         if (cameraSelectorComboBox.getSelectedId() > 1)\r
         {\r
-            // Try to open the user's choice of camera..\r
-            cameraDevice.reset (CameraDevice::openDevice (cameraSelectorComboBox.getSelectedId() - 2));\r
+           #if JUCE_ANDROID || JUCE_IOS\r
+            openCameraAsync();\r
+           #else\r
+            cameraDeviceOpenResult (CameraDevice::openDevice (cameraSelectorComboBox.getSelectedId() - 2), {});\r
+           #endif\r
+        }\r
+        else\r
+        {\r
+            snapshotButton   .setEnabled (cameraDevice != nullptr && ! contentSharingPending);\r
+            recordMovieButton.setEnabled (cameraDevice != nullptr && ! contentSharingPending);\r
+            resized();\r
+        }\r
+    }\r
 \r
-            // and if it worked, create a preview component for it..\r
-            if (cameraDevice.get() != nullptr)\r
-            {\r
-                cameraPreviewComp.reset (cameraDevice->createViewerComponent());\r
-                addAndMakeVisible (cameraPreviewComp.get());\r
-            }\r
+    void openCameraAsync()\r
+    {\r
+        SafePointer<CameraDemo> safeThis (this);\r
+\r
+        CameraDevice::openDeviceAsync (cameraSelectorComboBox.getSelectedId() - 2,\r
+                                       [safeThis] (CameraDevice* device, const String& error) mutable\r
+                                       {\r
+                                           if (safeThis)\r
+                                               safeThis->cameraDeviceOpenResult (device, error);\r
+                                       });\r
+    }\r
+\r
+    void cameraDeviceOpenResult (CameraDevice* device, const String& error)\r
+    {\r
+        // If camera opening worked, create a preview component for it..\r
+        cameraDevice.reset (device);\r
+\r
+        if (cameraDevice.get() != nullptr)\r
+        {\r
+           #if JUCE_ANDROID\r
+            SafePointer<CameraDemo> safeThis (this);\r
+            cameraDevice->onErrorOccurred = [safeThis] (const String& error) mutable { if (safeThis) safeThis->errorOccurred (error); };\r
+           #endif\r
+            cameraPreviewComp.reset (cameraDevice->createViewerComponent());\r
+            addAndMakeVisible (cameraPreviewComp.get());\r
+        }\r
+        else\r
+        {\r
+            AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, "Camera open failed",\r
+                                              "Camera open failed, reason: " + error);\r
         }\r
 \r
-        snapshotButton   .setEnabled (cameraDevice.get() != nullptr);\r
-        recordMovieButton.setEnabled (cameraDevice.get() != nullptr);\r
+        snapshotButton   .setEnabled (cameraDevice.get() != nullptr && ! contentSharingPending);\r
+        recordMovieButton.setEnabled (cameraDevice.get() != nullptr && ! contentSharingPending);\r
         resized();\r
     }\r
 \r
@@ -169,10 +270,20 @@ private:
                 // Start recording to a file on the user's desktop..\r
                 recordingMovie = true;\r
 \r
-                auto file = File::getSpecialLocation (File::userDesktopDirectory)\r
-                                 .getNonexistentChildFile ("JuceCameraDemo", CameraDevice::getFileExtension());\r
+               #if JUCE_ANDROID || JUCE_IOS\r
+                recordingFile = File::getSpecialLocation (File::tempDirectory)\r
+               #else\r
+                recordingFile = File::getSpecialLocation (File::userDesktopDirectory)\r
+               #endif\r
+                                 .getNonexistentChildFile ("JuceCameraVideoDemo", CameraDevice::getFileExtension());\r
+\r
+               #if JUCE_ANDROID\r
+                // Android does not support taking pictures while recording video.\r
+                snapshotButton.setEnabled (false);\r
+               #endif\r
 \r
-                cameraDevice->startRecordingToFile (file);\r
+                cameraSelectorComboBox.setEnabled (false);\r
+                cameraDevice->startRecordingToFile (recordingFile);\r
                 recordMovieButton.setButtonText ("Stop Recording");\r
             }\r
             else\r
@@ -180,40 +291,99 @@ private:
                 // Already recording, so stop...\r
                 recordingMovie = false;\r
                 cameraDevice->stopRecording();\r
+               #if ! JUCE_ANDROID && ! JUCE_IOS\r
                 recordMovieButton.setButtonText ("Start recording (to a file on your desktop)");\r
+               #else\r
+                recordMovieButton.setButtonText ("Record a movie");\r
+               #endif\r
+                cameraSelectorComboBox.setEnabled (true);\r
+\r
+               #if JUCE_ANDROID\r
+                snapshotButton.setEnabled (true);\r
+               #endif\r
+\r
+               #if JUCE_ANDROID || JUCE_IOS\r
+                URL url (recordingFile);\r
+\r
+                snapshotButton   .setEnabled (false);\r
+                recordMovieButton.setEnabled (false);\r
+                contentSharingPending = true;\r
+\r
+                SafePointer<CameraDemo> safeThis (this);\r
+\r
+                juce::ContentSharer::getInstance()->shareFiles ({url},\r
+                                                                [safeThis] (bool success, const String&) mutable\r
+                                                                {\r
+                                                                    if (safeThis)\r
+                                                                        safeThis->sharingFinished (success, false);\r
+                                                                });\r
+               #endif\r
             }\r
         }\r
     }\r
 \r
     void takeSnapshot()\r
     {\r
-        // When the user clicks the snapshot button, we'll attach ourselves to\r
-        // the camera as a listener, and wait for an image to arrive...\r
-        cameraDevice->addListener (this);\r
+        SafePointer<CameraDemo> safeThis (this);\r
+        cameraDevice->takeStillPicture ([safeThis] (const Image& image) mutable { safeThis->imageReceived (image); });\r
     }\r
 \r
     // This is called by the camera device when a new image arrives\r
-    void imageReceived (const Image& image) override\r
+    void imageReceived (const Image& image)\r
     {\r
-        // In this app we just want to take one image, so as soon as this happens,\r
-        // we'll unregister ourselves as a listener.\r
-        if (cameraDevice.get() != nullptr)\r
-            cameraDevice->removeListener (this);\r
-\r
-        // This callback won't be on the message thread, so to get the image back to\r
-        // the message thread, we'll stash a pointer to it (which is reference-counted in\r
-        // a thead-safe way), and trigger an async callback which will then display the\r
-        // new image..\r
-        incomingImage = image;\r
-        triggerAsyncUpdate();\r
+        if (! image.isValid())\r
+            return;\r
+\r
+        lastSnapshot.setImage (image);\r
+\r
+       #if JUCE_ANDROID || JUCE_IOS\r
+        auto imageFile = File::getSpecialLocation (File::tempDirectory).getNonexistentChildFile ("JuceCameraPhotoDemo", ".jpg");\r
+\r
+        if (auto stream = std::unique_ptr<OutputStream> (imageFile.createOutputStream()))\r
+        {\r
+            if (JPEGImageFormat().writeImageToStream (image, *stream))\r
+            {\r
+                URL url (imageFile);\r
+\r
+                snapshotButton   .setEnabled (false);\r
+                recordMovieButton.setEnabled (false);\r
+                contentSharingPending = true;\r
+\r
+                SafePointer<CameraDemo> safeThis (this);\r
+\r
+                juce::ContentSharer::getInstance()->shareFiles ({url},\r
+                                                                [safeThis] (bool success, const String&) mutable\r
+                                                                {\r
+                                                                    if (safeThis)\r
+                                                                        safeThis->sharingFinished (success, true);\r
+                                                                });\r
+            }\r
+        }\r
+       #endif\r
     }\r
 \r
-    Image incomingImage;\r
+    void errorOccurred (const String& error)\r
+    {\r
+        AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon,\r
+                                          "Camera Device Error",\r
+                                          "An error has occurred: " + error + " Camera will be closed.");\r
+\r
+        cameraDevice.reset();\r
+\r
+        cameraSelectorComboBox.setSelectedId (1);\r
+        snapshotButton   .setEnabled (false);\r
+        recordMovieButton.setEnabled (false);\r
+    }\r
 \r
-    void handleAsyncUpdate() override\r
+    void sharingFinished (bool success, bool isCapture)\r
     {\r
-        if (incomingImage.isValid())\r
-            lastSnapshot.setImage (incomingImage);\r
+        AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon,\r
+                                          isCapture ? "Image sharing result" : "Video sharing result",\r
+                                          success ? "Success!" : "Failed!");\r
+\r
+        contentSharingPending = false;\r
+        snapshotButton   .setEnabled (true);\r
+        recordMovieButton.setEnabled (true);\r
     }\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CameraDemo)\r
index 2ff9cf3483c1017a6a54ea0e370243588a00e586..239938606cc97b0fd934e5487402c3842ad18dd0 100644 (file)
@@ -104,7 +104,7 @@ private:
     CPlusPlusCodeTokeniser cppTokeniser;\r
 \r
     // the editor component\r
-    ScopedPointer<CodeEditorComponent> editor;\r
+    std::unique_ptr<CodeEditorComponent> editor;\r
 \r
     FilenameComponent fileChooser { "File", {}, true, false, false, "*.cpp;*.h;*.hpp;*.c;*.mm;*.m", {},\r
                                     "Choose a C++ file to open it in the editor" };\r
index c3a5e51eceeba7cef152d0d5aa508b6be2610370..f038de79ea3e80edc8587af5658c6778707cb9b7 100644 (file)
@@ -53,7 +53,7 @@ class ComponentTransformsDemo  : public Component
 public:\r
     ComponentTransformsDemo()\r
     {\r
-        content.reset (new WidgetsDemo());\r
+        content.reset (new WidgetsDemo (true));\r
         addAndMakeVisible (content.get());\r
         content->setSize (750, 500);\r
 \r
@@ -94,7 +94,7 @@ public:
     }\r
 \r
 private:\r
-    ScopedPointer<Component> content;\r
+    std::unique_ptr<Component> content;\r
 \r
     struct CornerDragger  : public Component\r
     {\r
index 4c56ccdf5baae74b02e4f0a61fcb034da8e9a216..1c27591f2726545255391e3a61b08a18f0ef0e8b 100644 (file)
@@ -321,8 +321,8 @@ private:
                     fileToSave = fileToSave.getChildFile ("JUCE.png");\r
                     fileToSave.deleteFile();\r
 \r
-                    ScopedPointer<OutputStream> outStream (fileToSave.createOutputStream());\r
-                    ScopedPointer<InputStream> inStream (createAssetInputStream ("juce_icon.png"));\r
+                    std::unique_ptr<OutputStream> outStream (fileToSave.createOutputStream());\r
+                    std::unique_ptr<InputStream> inStream (createAssetInputStream ("juce_icon.png"));\r
                     outStream->writeFromInputStream (*inStream, -1);\r
                 }\r
 \r
@@ -343,8 +343,8 @@ private:
                                    #if JUCE_ANDROID || JUCE_IOS\r
                                      if (! result.isEmpty())\r
                                      {\r
-                                         ScopedPointer<InputStream>  wi (fileToSave.createInputStream());\r
-                                         ScopedPointer<OutputStream> wo (result.createOutputStream());\r
+                                         std::unique_ptr<InputStream>  wi (fileToSave.createInputStream());\r
+                                         std::unique_ptr<OutputStream> wo (result.createOutputStream());\r
 \r
                                          if (wi.get() != nullptr && wo.get() != nullptr)\r
                                          {\r
@@ -442,7 +442,7 @@ private:
     }\r
 \r
     ImagePreviewComponent imagePreview;\r
-    ScopedPointer<FileChooser> fc;\r
+    std::unique_ptr<FileChooser> fc;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DialogsDemo)\r
 };\r
index 647df1dda0baa896f30372a359efc89c7e197faa..ab90926716998ac2850728ac67c4c360bdb52420 100644 (file)
@@ -223,7 +223,7 @@ private:
     ComboBox styleBox;\r
 \r
     StretchableLayoutManager verticalLayout;\r
-    ScopedPointer<StretchableLayoutResizerBar> verticalDividerBar;\r
+    std::unique_ptr<StretchableLayoutResizerBar> verticalDividerBar;\r
 \r
     //==============================================================================\r
     void refreshPreviewBoxFont()\r
index b47247676a2c21bf2a130528f6c5c8391be7f861..a5403242a6b7947851dc09e9946391ca2f2f9d21 100644 (file)
@@ -490,7 +490,7 @@ public:
         ZipFile icons (createAssetInputStream ("icons.zip"), true);\r
 \r
         // Load a random SVG file from our embedded icons.zip file.\r
-        const ScopedPointer<InputStream> svgFileStream (icons.createStreamForEntry (Random::getSystemRandom().nextInt (icons.getNumEntries())));\r
+        const std::unique_ptr<InputStream> svgFileStream (icons.createStreamForEntry (Random::getSystemRandom().nextInt (icons.getNumEntries())));\r
 \r
         if (svgFileStream.get() != nullptr)\r
         {\r
@@ -505,7 +505,7 @@ public:
     }\r
 \r
     Time lastSVGLoadTime;\r
-    ScopedPointer<DrawableComposite> svgDrawable;\r
+    std::unique_ptr<DrawableComposite> svgDrawable;\r
 };\r
 \r
 //==============================================================================\r
index 7f1049b95d750eda8309d527708081ac3f639593..35dd02f4280cfe573b6da1e3cdc31fe293f7b64f 100644 (file)
@@ -91,12 +91,10 @@ public:
     Result saveDocument (const File& file) override\r
     {\r
         // attempt to save the contents into the given file\r
-        FileOutputStream os (file);\r
+        if (file.replaceWithText (editor.getText()))\r
+            return Result::ok();\r
 \r
-        if (os.openedOk())\r
-            os.writeText (editor.getText(), false, false);\r
-\r
-        return Result::ok();\r
+        return Result::fail ("Can't write to file");\r
     }\r
 \r
     File getLastDocumentOpened() override\r
@@ -113,7 +111,9 @@ public:
    #if JUCE_MODAL_LOOPS_PERMITTED\r
     File getSuggestedSaveAsFile (const File&) override\r
     {\r
-        return File::getSpecialLocation (File::userDesktopDirectory).getChildFile (getName()).withFileExtension ("jnote");\r
+        return File::getSpecialLocation (File::userDesktopDirectory)\r
+                    .getChildFile (getName())\r
+                    .withFileExtension ("jnote");\r
     }\r
    #endif\r
 \r
index 279e97f23eac065dadeeeb2b2c73db31c16ea65e..35bc07429d9f67bfb0ee57b8cc9cba73cfd5b520 100644 (file)
@@ -314,7 +314,7 @@ public:
 private:\r
     ApplicationCommandManager commandManager;\r
 \r
-    ScopedPointer<MenuBarComponent> menuBar;\r
+    std::unique_ptr<MenuBarComponent> menuBar;\r
     MenuBarPosition menuBarPosition = MenuBarPosition::window;\r
 \r
     SidePanel sidePanel { "Menu", 300, false };\r
index d2b458a46d9bb3e7dddf36ec0e9babbc93c1494e..10cc2a89982b1dc5c7e101e832553e008d310788 100644 (file)
@@ -181,7 +181,7 @@ public:
             "    gl_FragColor = colour;\n"\r
             "}\n";\r
 \r
-        ScopedPointer<OpenGLShaderProgram> newShader (new OpenGLShaderProgram (openGLContext));\r
+        std::unique_ptr<OpenGLShaderProgram> newShader (new OpenGLShaderProgram (openGLContext));\r
         String statusText;\r
 \r
         if (newShader->addVertexShader (OpenGLHelpers::translateVertexShaderToV3 (vertexShader))\r
@@ -265,7 +265,7 @@ private:
             if (textureCoordIn.get() != nullptr) glContext.extensions.glDisableVertexAttribArray (textureCoordIn->attributeID);\r
         }\r
 \r
-        ScopedPointer<OpenGLShaderProgram::Attribute> position, normal, sourceColour, textureCoordIn;\r
+        std::unique_ptr<OpenGLShaderProgram::Attribute> position, normal, sourceColour, textureCoordIn;\r
 \r
     private:\r
         static OpenGLShaderProgram::Attribute* createAttribute (OpenGLContext& openGLContext,\r
@@ -289,7 +289,7 @@ private:
             viewMatrix      .reset (createUniform (openGLContext, shaderProgram, "viewMatrix"));\r
         }\r
 \r
-        ScopedPointer<OpenGLShaderProgram::Uniform> projectionMatrix, viewMatrix;\r
+        std::unique_ptr<OpenGLShaderProgram::Uniform> projectionMatrix, viewMatrix;\r
 \r
     private:\r
         static OpenGLShaderProgram::Uniform* createUniform (OpenGLContext& openGLContext,\r
@@ -397,10 +397,10 @@ private:
     const char* vertexShader;\r
     const char* fragmentShader;\r
 \r
-    ScopedPointer<OpenGLShaderProgram> shader;\r
-    ScopedPointer<Shape> shape;\r
-    ScopedPointer<Attributes> attributes;\r
-    ScopedPointer<Uniforms> uniforms;\r
+    std::unique_ptr<OpenGLShaderProgram> shader;\r
+    std::unique_ptr<Shape> shape;\r
+    std::unique_ptr<Attributes> attributes;\r
+    std::unique_ptr<Uniforms> uniforms;\r
 \r
     String newVertexShader, newFragmentShader;\r
 \r
index 64c2449318483edb3b23e215813ff9884ebd33e9..9c6a87dac500fa299da097e9a2d0ce1c09f36972 100644 (file)
@@ -110,7 +110,7 @@ struct OpenGLDemoClasses
             if (textureCoordIn.get() != nullptr)  openGLContext.extensions.glDisableVertexAttribArray (textureCoordIn->attributeID);\r
         }\r
 \r
-        ScopedPointer<OpenGLShaderProgram::Attribute> position, normal, sourceColour, textureCoordIn;\r
+        std::unique_ptr<OpenGLShaderProgram::Attribute> position, normal, sourceColour, textureCoordIn;\r
 \r
     private:\r
         static OpenGLShaderProgram::Attribute* createAttribute (OpenGLContext& openGLContext,\r
@@ -137,7 +137,7 @@ struct OpenGLDemoClasses
             bouncingNumber  .reset (createUniform (openGLContext, shader, "bouncingNumber"));\r
         }\r
 \r
-        ScopedPointer<OpenGLShaderProgram::Uniform> projectionMatrix, viewMatrix, texture, lightPosition, bouncingNumber;\r
+        std::unique_ptr<OpenGLShaderProgram::Uniform> projectionMatrix, viewMatrix, texture, lightPosition, bouncingNumber;\r
 \r
     private:\r
         static OpenGLShaderProgram::Uniform* createUniform (OpenGLContext& openGLContext,\r
@@ -775,7 +775,7 @@ struct OpenGLDemoClasses
         void drawBackground2DStuff (float desktopScale)\r
         {\r
             // Create an OpenGLGraphicsContext that will draw into this GL window..\r
-            ScopedPointer<LowLevelGraphicsContext> glRenderer (createOpenGLGraphicsContext (openGLContext,\r
+            std::unique_ptr<LowLevelGraphicsContext> glRenderer (createOpenGLGraphicsContext (openGLContext,\r
                                                                                               roundToInt (desktopScale * getWidth()),\r
                                                                                               roundToInt (desktopScale * getHeight())));\r
 \r
@@ -810,14 +810,14 @@ struct OpenGLDemoClasses
 \r
         OpenGLContext openGLContext;\r
 \r
-        ScopedPointer<DemoControlsOverlay> controlsOverlay;\r
+        std::unique_ptr<DemoControlsOverlay> controlsOverlay;\r
 \r
         float rotation = 0.0f;\r
 \r
-        ScopedPointer<OpenGLShaderProgram> shader;\r
-        ScopedPointer<Shape> shape;\r
-        ScopedPointer<Attributes> attributes;\r
-        ScopedPointer<Uniforms> uniforms;\r
+        std::unique_ptr<OpenGLShaderProgram> shader;\r
+        std::unique_ptr<Shape> shape;\r
+        std::unique_ptr<Attributes> attributes;\r
+        std::unique_ptr<Uniforms> uniforms;\r
 \r
         OpenGLTexture texture;\r
         DemoTexture* textureToUse = nullptr;\r
@@ -837,7 +837,7 @@ struct OpenGLDemoClasses
         {\r
             if (newVertexShader.isNotEmpty() || newFragmentShader.isNotEmpty())\r
             {\r
-                ScopedPointer<OpenGLShaderProgram> newShader (new OpenGLShaderProgram (openGLContext));\r
+                std::unique_ptr<OpenGLShaderProgram> newShader (new OpenGLShaderProgram (openGLContext));\r
 \r
                 if (newShader->addVertexShader (OpenGLHelpers::translateVertexShaderToV3 (newVertexShader))\r
                       && newShader->addFragmentShader (OpenGLHelpers::translateFragmentShaderToV3 (newFragmentShader))\r
index e9d4ad573aaf30406bb15b0a4b9e72f680fc598c..6452ecb6508d8d674c4bc0a3f9662dce60a3e6da 100644 (file)
@@ -143,7 +143,7 @@ public:
         startTimer (1);\r
     }\r
 \r
-    ScopedPointer<OpenGLGraphicsContextCustomShader> shader;\r
+    std::unique_ptr<OpenGLGraphicsContextCustomShader> shader;\r
 \r
     Label statusLabel, presetLabel  { {}, "Shader Preset:" };\r
     ComboBox presetBox;\r
index f0ab4fe09e349a945727ff51f8d659c2f7fcedb7..41a1ca1eb08e38c3b3d65851a4fbd66902a8d69e 100644 (file)
@@ -131,7 +131,7 @@ public:
     }\r
 \r
 private:\r
-    ScopedPointer<DemoBrowserComponent> webView;\r
+    std::unique_ptr<DemoBrowserComponent> webView;\r
 \r
     TextEditor addressTextBox;\r
 \r
index bc978b3bff54e94a4bfaea0182fc251deb4f0398..70461e8ad8acabb47d1c43175ab90602614e1630 100644 (file)
 \r
 //==============================================================================\r
 static void showBubbleMessage (Component& targetComponent, const String& textToShow,\r
-                               ScopedPointer<BubbleMessageComponent>& bmc)\r
-{\r
-    bmc.reset (new BubbleMessageComponent());\r
-\r
-    if (Desktop::canUseSemiTransparentWindows())\r
-    {\r
-        bmc->setAlwaysOnTop (true);\r
-        bmc->addToDesktop (0);\r
-    }\r
-    else\r
-    {\r
-        targetComponent.getTopLevelComponent()->addChildComponent (bmc.get());\r
-    }\r
-\r
-    AttributedString text (textToShow);\r
-    text.setJustification (Justification::centred);\r
-    text.setColour (targetComponent.findColour (TextButton::textColourOffId));\r
-\r
-    bmc->showAt (&targetComponent, text, 2000, true, false);\r
-}\r
+                               std::unique_ptr<BubbleMessageComponent>& bmc,\r
+                               bool isRunningComponentTransformDemo);\r
 \r
 //==============================================================================\r
 /** To demonstrate how sliders can have custom snapping applied to their values,\r
@@ -272,7 +254,7 @@ private:
 //==============================================================================\r
 struct ButtonsPage   : public Component\r
 {\r
-    ButtonsPage()\r
+    ButtonsPage (bool isRunningComponentTransformDemo)\r
     {\r
         {\r
             auto* group = addToList (new GroupComponent ("group", "Radio buttons"));\r
@@ -374,14 +356,15 @@ struct ButtonsPage   : public Component
         down.setImage (getImageFromAssets ("juce_icon.png"));\r
         down.setOverlayColour (Colours::black.withAlpha (0.3f));\r
 \r
-        auto popupMessageCallback = [this]\r
+        auto popupMessageCallback = [this, isRunningComponentTransformDemo]\r
         {\r
             if (auto* focused = Component::getCurrentlyFocusedComponent())\r
                 showBubbleMessage (*focused,\r
                                    "This is a demo of the BubbleMessageComponent, which lets you pop up a message pointing "\r
                                    "at a component or somewhere on the screen.\n\n"\r
                                    "The message bubbles will disappear after a timeout period, or when the mouse is clicked.",\r
-                                   this->bubbleMessage);\r
+                                   this->bubbleMessage,\r
+                                   isRunningComponentTransformDemo);\r
         };\r
 \r
         {\r
@@ -450,7 +433,7 @@ struct ButtonsPage   : public Component
 \r
 private:\r
     OwnedArray<Component> components;\r
-    ScopedPointer<BubbleMessageComponent> bubbleMessage;\r
+    std::unique_ptr<BubbleMessageComponent> bubbleMessage;\r
 \r
     // This little function avoids a bit of code-duplication by adding a component to\r
     // our list as well as calling addAndMakeVisible on it..\r
@@ -675,7 +658,7 @@ private:
 \r
                 for (int i = 0; i < icons.getNumEntries(); ++i)\r
                 {\r
-                    ScopedPointer<InputStream> svgFileStream (icons.createStreamForEntry (i));\r
+                    std::unique_ptr<InputStream> svgFileStream (icons.createStreamForEntry (i));\r
 \r
                     if (svgFileStream.get() != nullptr)\r
                     {\r
@@ -920,7 +903,7 @@ private:
     TableListBox table;     // the table component itself\r
     Font font  { 14.0f };\r
 \r
-    ScopedPointer<XmlElement> demoData;  // This is the XML document loaded from the embedded file "demo table data.xml"\r
+    std::unique_ptr<XmlElement> demoData;  // This is the XML document loaded from the embedded file "demo table data.xml"\r
     XmlElement* columnList = nullptr;     // A pointer to the sub-node of demoData that contains the list of columns\r
     XmlElement* dataList   = nullptr;     // A pointer to the sub-node of demoData that contains the list of data rows\r
     int numRows;                          // The number of rows of data we've got\r
@@ -1277,19 +1260,20 @@ private:
 //==============================================================================\r
 struct DemoTabbedComponent  : public TabbedComponent\r
 {\r
-    DemoTabbedComponent()\r
+    DemoTabbedComponent (bool isRunningComponenTransformsDemo)\r
         : TabbedComponent (TabbedButtonBar::TabsAtTop)\r
     {\r
         auto colour = findColour (ResizableWindow::backgroundColourId);\r
 \r
-        addTab ("Buttons",     colour, new ButtonsPage(),        true);\r
-        addTab ("Sliders",     colour, new SlidersPage(),        true);\r
-        addTab ("Toolbars",    colour, new ToolbarDemoComp(),    true);\r
-        addTab ("Misc",        colour, new MiscPage(),           true);\r
-        addTab ("Tables",      colour, new TableDemoComponent(), true);\r
-        addTab ("Drag & Drop", colour, new DragAndDropDemo(),    true);\r
+        addTab ("Buttons",     colour, new ButtonsPage (isRunningComponenTransformsDemo), true);\r
+        addTab ("Sliders",     colour, new SlidersPage(),                                 true);\r
+        addTab ("Toolbars",    colour, new ToolbarDemoComp(),                             true);\r
+        addTab ("Misc",        colour, new MiscPage(),                                    true);\r
+        addTab ("Tables",      colour, new TableDemoComponent(),                          true);\r
+        addTab ("Drag & Drop", colour, new DragAndDropDemo(),                             true);\r
 \r
-        getTabbedButtonBar().getTabButton (5)->setExtraComponent (new CustomTabButton(), TabBarButton::afterText);\r
+        getTabbedButtonBar().getTabButton (5)->setExtraComponent (new CustomTabButton (isRunningComponenTransformsDemo),\r
+                                                                  TabBarButton::afterText);\r
     }\r
 \r
     // This is a small star button that is put inside one of the tabs. You can\r
@@ -1297,7 +1281,8 @@ struct DemoTabbedComponent  : public TabbedComponent
     class CustomTabButton  : public Component\r
     {\r
     public:\r
-        CustomTabButton()\r
+        CustomTabButton (bool isRunningComponenTransformsDemo)\r
+            : runningComponenTransformsDemo (isRunningComponenTransformsDemo)\r
         {\r
             setSize (20, 20);\r
         }\r
@@ -1318,10 +1303,12 @@ struct DemoTabbedComponent  : public TabbedComponent
                                "\n"\r
                                "You can use these to implement things like close-buttons "\r
                                "or status displays for your tabs.",\r
-                               bubbleMessage);\r
+                               bubbleMessage,\r
+                               runningComponenTransformsDemo);\r
         }\r
     private:\r
-        ScopedPointer<BubbleMessageComponent> bubbleMessage;\r
+        bool runningComponenTransformsDemo;\r
+        std::unique_ptr<BubbleMessageComponent> bubbleMessage;\r
     };\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DemoTabbedComponent)\r
@@ -1330,7 +1317,8 @@ struct DemoTabbedComponent  : public TabbedComponent
 //==============================================================================\r
 struct WidgetsDemo   : public Component\r
 {\r
-    WidgetsDemo()\r
+    WidgetsDemo (bool isRunningComponenTransformsDemo = false)\r
+        : tabs (isRunningComponenTransformsDemo)\r
     {\r
         setOpaque (true);\r
         addAndMakeVisible (tabs);\r
@@ -1352,3 +1340,31 @@ struct WidgetsDemo   : public Component
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WidgetsDemo)\r
 };\r
+\r
+//==============================================================================\r
+void showBubbleMessage (Component& targetComponent, const String& textToShow,\r
+                        std::unique_ptr<BubbleMessageComponent>& bmc,\r
+                        bool isRunningComponentTransformDemo)\r
+{\r
+    bmc.reset (new BubbleMessageComponent());\r
+\r
+    if (isRunningComponentTransformDemo)\r
+    {\r
+        targetComponent.findParentComponentOfClass<WidgetsDemo>()->addChildComponent (bmc.get());\r
+    }\r
+    else if (Desktop::canUseSemiTransparentWindows())\r
+    {\r
+        bmc->setAlwaysOnTop (true);\r
+        bmc->addToDesktop (0);\r
+    }\r
+    else\r
+    {\r
+        targetComponent.getTopLevelComponent()->addChildComponent (bmc.get());\r
+    }\r
+\r
+    AttributedString text (textToShow);\r
+    text.setJustification (Justification::centred);\r
+    text.setColour (targetComponent.findColour (TextButton::textColourOffId));\r
+\r
+    bmc->showAt (&targetComponent, text, 2000, true, false);\r
+}\r
index 7a41bfcb5a1681ee0900ca0c85b80b77ff7f6f6b..822c2d4795c5f591e52b4bd86b5cd16c588b66fa 100644 (file)
@@ -195,7 +195,7 @@ public:
 \r
         if (auto* assetStream = createAssetInputStream ("proaudio.path"))\r
         {\r
-            ScopedPointer<InputStream> fileStream (assetStream);\r
+            std::unique_ptr<InputStream> fileStream (assetStream);\r
 \r
             Path proAudioPath;\r
             proAudioPath.loadPathFromStream (*fileStream);\r
@@ -415,7 +415,7 @@ private:
 \r
     void loadNewSample (InputStream* soundBuffer, const char* format)\r
     {\r
-        ScopedPointer<AudioFormatReader> formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true));\r
+        std::unique_ptr<AudioFormatReader> formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true));\r
 \r
         BigInteger midiNotes;\r
         midiNotes.setRange (0, 126, true);\r
@@ -431,7 +431,7 @@ private:
         auto* stream = new MemoryOutputStream (mb, true);\r
 \r
         {\r
-            ScopedPointer<AudioFormatWriter> writer (formatManager.findFormatForFileExtension ("wav")->createWriterFor (stream, lastSampleRate, 1, 16,\r
+            std::unique_ptr<AudioFormatWriter> writer (formatManager.findFormatForFileExtension ("wav")->createWriterFor (stream, lastSampleRate, 1, 16,\r
                                                                                                                           StringPairArray(), 0));\r
             writer->writeFromAudioSampleBuffer (currentRecording, 0, currentRecording.getNumSamples());\r
             writer->flush();\r
index 861d3f75fc8c52178028181c523f5d8291616724..6d01d6ba4ed87b0aa87f2445e8c7d545ac816758 100644 (file)
@@ -307,7 +307,7 @@ public:
         // whose contents will have been created by the getStateInformation() call.\r
 \r
         // This getXmlFromBinary() helper function retrieves our XML from the binary blob..\r
-        ScopedPointer<XmlElement> xmlState (getXmlFromBinary (data, sizeInBytes));\r
+        std::unique_ptr<XmlElement> xmlState (getXmlFromBinary (data, sizeInBytes));\r
 \r
         if (xmlState.get() != nullptr)\r
         {\r
@@ -499,7 +499,7 @@ private:
               gainLabel  { {}, "Throughput level:" },\r
               delayLabel { {}, "Delay:" };\r
 \r
-        ScopedPointer<ParameterSlider> gainSlider, delaySlider;\r
+        std::unique_ptr<ParameterSlider> gainSlider, delaySlider;\r
         Colour backgroundColour;\r
 \r
         //==============================================================================\r
index af8c215a6a9a5e664ff4c99363720854da7e7130..ff2cd7ce91c0b1cd03efbfbe9a5e1ced5787d522 100644 (file)
@@ -272,7 +272,8 @@ public:
             auto maxSize = static_cast<size_t> (roundToInt (getSampleRate() * (8192.0 / 44100.0)));\r
             auto assetName = (type == 0 ? "Impulse1.wav" : "Impulse2.wav");\r
 \r
-            ScopedPointer<InputStream> assetInputStream (createAssetInputStream (assetName));\r
+            std::unique_ptr<InputStream> assetInputStream (createAssetInputStream (assetName));\r
+\r
             if (assetInputStream != nullptr)\r
             {\r
                 currentCabinetData.reset();\r
@@ -478,7 +479,7 @@ private:
         //==============================================================================\r
         DspModulePluginDemoAudioProcessor& processor;\r
 \r
-        ScopedPointer<ParameterSlider> inputVolumeSlider, outputVolumeSlider,\r
+        std::unique_ptr<ParameterSlider> inputVolumeSlider, outputVolumeSlider,\r
                                          lowPassFilterFreqSlider, highPassFilterFreqSlider;\r
         ComboBox stereoBox, slopeBox, waveshaperBox, cabinetTypeBox;\r
         ToggleButton cabinetSimButton, oversamplingButton;\r
@@ -555,7 +556,7 @@ private:
 \r
     dsp::Gain<float> inputVolume, outputVolume;\r
 \r
-    ScopedPointer<dsp::Oversampling<float>> oversampling;\r
+    std::unique_ptr<dsp::Oversampling<float>> oversampling;\r
     bool audioCurrentlyOversampled = false;\r
 \r
     Atomic<int> cabinetType;\r
index 30588d4cc0d2ad515efd81f5603cb32a8f2af444..429bff107c548015e59379ead28fc98f818bca99 100644 (file)
@@ -236,13 +236,13 @@ public:
     //==============================================================================\r
     void getStateInformation (MemoryBlock& destData) override\r
     {\r
-        auto xml = ScopedPointer<XmlElement> (parameters.state.createXml());\r
+        auto xml = std::unique_ptr<XmlElement> (parameters.state.createXml());\r
         copyXmlToBinary (*xml, destData);\r
     }\r
 \r
     void setStateInformation (const void* data, int sizeInBytes) override\r
     {\r
-        auto xmlState = ScopedPointer<XmlElement> (getXmlFromBinary (data, sizeInBytes));\r
+        auto xmlState = std::unique_ptr<XmlElement> (getXmlFromBinary (data, sizeInBytes));\r
 \r
         if (xmlState.get() != nullptr)\r
             if (xmlState->hasTagName (parameters.state.getType()))\r
index 5db3df5695b12df7fd299d77d9d592f7db5f74bf..db8a8a39af48be1f7c681c7ba06a0c67acf8b108 100644 (file)
@@ -157,7 +157,7 @@ private:
 \r
     void loadNewSample (InputStream* soundBuffer, const char* format)\r
     {\r
-        ScopedPointer<AudioFormatReader> formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true));\r
+        std::unique_ptr<AudioFormatReader> formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true));\r
 \r
         BigInteger midiNotes;\r
         midiNotes.setRange (0, 126, true);\r
index 06c37973b3e49feef1cbccf3722477728339ecc6..4d677d8764f7124b4da6668a7d6e45887b1c8d7b 100644 (file)
@@ -2006,8 +2006,7 @@ private:
           loopKindLabel            { {}, "Looping Mode" };\r
 \r
 \r
-    FileChooser fileChooser { "Select a file to load...",\r
-                              File::nonexistent,\r
+    FileChooser fileChooser { "Select a file to load...", File(),\r
                               dataModel.getAudioFormatManager().getWildcardForAllFormats() };\r
 \r
     UndoManager* undoManager;\r
@@ -2065,7 +2064,7 @@ public:
     {\r
         if (auto* asset = createAssetInputStream ("cello.wav"))\r
         {\r
-            ScopedPointer<InputStream> inputStream (asset);\r
+            std::unique_ptr<InputStream> inputStream (asset);\r
             inputStream->readIntoMemoryBlock (mb);\r
 \r
             readerFactory.reset (new MemoryAudioFormatReaderFactory (mb.getData(), mb.getSize()));\r
index 349977df4174786689af2366d1da67f984bca9e5..88837810809aae0753e4bbe1f1cbaa2ad9eddc98 100644 (file)
@@ -211,7 +211,7 @@ private:
         // method is called on app shutdown so it needs to complete quickly!\r
 \r
         XmlDocument previouslySavedEvents (savedEventsFile);\r
-        ScopedPointer<XmlElement> xml (previouslySavedEvents.getDocumentElement());\r
+        std::unique_ptr<XmlElement> xml (previouslySavedEvents.getDocumentElement());\r
 \r
         if (xml.get() == nullptr || xml->getTagName() != "events")\r
             xml.reset (new XmlElement ("events"));\r
@@ -247,7 +247,7 @@ private:
     void restoreUnloggedEvents (std::deque<AnalyticsEvent>& restoredEventQueue) override\r
     {\r
         XmlDocument savedEvents (savedEventsFile);\r
-        ScopedPointer<XmlElement> xml (savedEvents.getDocumentElement());\r
+        std::unique_ptr<XmlElement> xml (savedEvents.getDocumentElement());\r
 \r
         if (xml.get() == nullptr || xml->getTagName() != "events")\r
             return;\r
@@ -292,7 +292,7 @@ private:
 \r
     CriticalSection webStreamCreation;\r
     bool shouldExit = false;\r
-    ScopedPointer<WebInputStream> webStream;\r
+    std::unique_ptr<WebInputStream> webStream;\r
 \r
     String apiKey;\r
 \r
@@ -365,7 +365,7 @@ private:
     }\r
 \r
     TextButton eventButton { "Press me!" }, crashButton { "Simulate crash!" };\r
-    ScopedPointer<ButtonTracker> logEventButtonPress;\r
+    std::unique_ptr<ButtonTracker> logEventButtonPress;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AnalyticsCollectionDemo)\r
 };\r
index 362f98c89a3a13bb248ce3c93c7350426f927718..362543d23267c74d9a509f4bf81ee5c27708caf7 100644 (file)
@@ -83,7 +83,7 @@ struct Test
     virtual void Keyboard (unsigned char /*key*/)   {}\r
     virtual void KeyboardUp (unsigned char /*key*/) {}\r
 \r
-    ScopedPointer<b2World> m_world  { new b2World (b2Vec2 (0.0f, -10.0f)) };\r
+    std::unique_ptr<b2World> m_world  { new b2World (b2Vec2 (0.0f, -10.0f)) };\r
 };\r
 \r
 #include "../Assets/Box2DTests/AddPair.h"\r
@@ -149,7 +149,7 @@ struct Box2DRenderComponent  : public Component
         }\r
     }\r
 \r
-    ScopedPointer<Test> currentTest;\r
+    std::unique_ptr<Test> currentTest;\r
 };\r
 \r
 //==============================================================================\r
index 704abaf493bbbfc2e58d5a7c60dbca523eb782ee..50cc37966b82b64f49565be55a7de0c2537d2f32 100644 (file)
@@ -67,7 +67,7 @@ static MemoryBlock valueTreeToMemoryBlock (const ValueTree& v)
 \r
 static String valueTreeToString (const ValueTree& v)\r
 {\r
-    ScopedPointer<XmlElement> xml (v.createXml());\r
+    std::unique_ptr<XmlElement> xml (v.createXml());\r
 \r
     if (xml.get() != nullptr)\r
         return xml->createDocument ({}, true, false);\r
@@ -201,7 +201,7 @@ public:
     };\r
 \r
     //==============================================================================\r
-    ScopedPointer<DemoMasterProcess> masterProcess;\r
+    std::unique_ptr<DemoMasterProcess> masterProcess;\r
 \r
 private:\r
     TextButton launchButton  { "Launch Child Process" };\r
@@ -284,7 +284,7 @@ public:
 */\r
 bool invokeChildProcessDemo (const String& commandLine)\r
 {\r
-    ScopedPointer<DemoSlaveProcess> slave (new DemoSlaveProcess());\r
+    std::unique_ptr<DemoSlaveProcess> slave (new DemoSlaveProcess());\r
 \r
     if (slave->initialiseFromCommandLine (commandLine, demoCommandLineUID))\r
     {\r
@@ -316,7 +316,7 @@ bool invokeChildProcessDemo (const String& commandLine)
          if (invokeChildProcessDemo (commandLine))\r
              return;\r
 \r
-         mainWindow = new MainWindow ("ChildProcessDemo", new ChildProcessDemo());\r
+         mainWindow.reset (new MainWindow ("ChildProcessDemo", new ChildProcessDemo()));\r
      }\r
 \r
      void shutdown() override                                { mainWindow = nullptr; }\r
@@ -346,7 +346,8 @@ bool invokeChildProcessDemo (const String& commandLine)
      private:\r
          JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)\r
      };\r
-     ScopedPointer<MainWindow> mainWindow;\r
+\r
+     std::unique_ptr<MainWindow> mainWindow;\r
  };\r
 \r
  //==============================================================================\r
index d70c78afe3d8c1f198906c9aea0312f0d9f7ea35..68f2783c12751314e2a0fe736d2e0725da644192 100644 (file)
@@ -382,8 +382,7 @@ public:
 \r
                 if (auto* assetStream = createAssetInputStream (String ("Purchases/" + String (imageResourceName)).toRawUTF8()))\r
                 {\r
-                    ScopedPointer<InputStream> fileStream (assetStream);\r
-\r
+                    std::unique_ptr<InputStream> fileStream (assetStream);\r
                     avatar = PNGImageFormat().decodeImage (*fileStream);\r
                 }\r
             }\r
@@ -557,7 +556,7 @@ private:
 \r
             if (auto* assetStream = createAssetInputStream (assetName.toRawUTF8()))\r
             {\r
-                ScopedPointer<InputStream> fileStream (assetStream);\r
+                std::unique_ptr<InputStream> fileStream (assetStream);\r
 \r
                 currentPhraseData.reset();\r
                 fileStream->readIntoMemoryBlock (currentPhraseData);\r
@@ -572,7 +571,7 @@ private:
 \r
     Label phraseLabel                          { "phraseLabel", NEEDS_TRANS ("Phrases:") };\r
     ListBox phraseListBox                      { "phraseListBox" };\r
-    ScopedPointer<ListBoxModel> phraseModel    { new PhraseModel() };\r
+    std::unique_ptr<ListBoxModel> phraseModel  { new PhraseModel() };\r
     TextButton playStopButton                  { "Play" };\r
 \r
     SoundPlayer player;\r
@@ -581,7 +580,7 @@ private:
 \r
     Label voiceLabel                           { "voiceLabel", NEEDS_TRANS ("Voices:") };\r
     ListBox voiceListBox                       { "voiceListBox" };\r
-    ScopedPointer<VoiceModel> voiceModel       { new VoiceModel (purchases) };\r
+    std::unique_ptr<VoiceModel> voiceModel     { new VoiceModel (purchases) };\r
 \r
     MemoryBlock currentPhraseData;\r
 \r
index 6a5749a558773afda6126b0198a22c3cac7fff86..47a1f6f1f975c9dc56f331a65553895f512e5115 100644 (file)
@@ -154,7 +154,7 @@ public:
 \r
 private:\r
     CodeDocument codeDocument;\r
-    ScopedPointer<CodeEditorComponent> editor;\r
+    std::unique_ptr<CodeEditorComponent> editor;\r
     TextEditor outputDisplay;\r
 \r
     void codeDocumentTextInserted (const String&, int) override    { startTimer (300); }\r
index bbfb348ca584483b833d87e0df7bec8f7f3bca48..8cd1fca1fdbaf84b4bb204cb1aeedef25aa243d4 100644 (file)
@@ -101,7 +101,7 @@ public:
         StringPairArray responseHeaders;\r
         int statusCode = 0;\r
 \r
-        ScopedPointer<InputStream> stream (url.createInputStream (false, nullptr, nullptr, {},\r
+        std::unique_ptr<InputStream> stream (url.createInputStream (false, nullptr, nullptr, {},\r
                                                                     10000, // timeout in millisecs\r
                                                                     &responseHeaders, &statusCode));\r
         if (stream.get() != nullptr)\r
index e8e22601c64a064822e3e198614ba0656eb895e2..066d0c40c9f49ce08416f972fe824b138d0ca6f9 100644 (file)
@@ -220,7 +220,7 @@ struct UnitTestClasses
         }\r
 \r
     private:\r
-        ScopedPointer<TestRunnerThread> currentTestThread;\r
+        std::unique_ptr<TestRunnerThread> currentTestThread;\r
 \r
         TextButton startTestButton { "Run Unit Tests..." };\r
         ComboBox categoriesBox;\r
index 4bef4120c920be783cd67ec7b69041fd560f34d8..7143bbaa3caf5228776e9f2c2b2cf417552e6907 100644 (file)
@@ -109,7 +109,7 @@ public:
     {\r
         if (items.size() > 0)\r
         {\r
-            ScopedPointer<XmlElement> oldOpenness (treeView.getOpennessState (false));\r
+            std::unique_ptr<XmlElement> oldOpenness (treeView.getOpennessState (false));\r
 \r
             for (auto* v : items)\r
             {\r
@@ -291,7 +291,7 @@ private:
     TextButton undoButton  { "Undo" },\r
                redoButton  { "Redo" };\r
 \r
-    ScopedPointer<ValueTreeItem> rootItem;\r
+    std::unique_ptr<ValueTreeItem> rootItem;\r
     UndoManager undoManager;\r
 \r
     void timerCallback() override\r
index 0fc695f0b47d528e8e6bab7c9b1554dfa5a81085..f22235f976d28c9d8402c0f26222d98c481776a4 100644 (file)
@@ -303,13 +303,13 @@ private:
     CodeEditorComponent codeDocumentComponent  { codeDocument, nullptr };\r
     TreeView resultsTree;\r
 \r
-    ScopedPointer<TreeViewItem> rootItem;\r
-    ScopedPointer<XmlElement> parsedXml;\r
+    std::unique_ptr<TreeViewItem> rootItem;\r
+    std::unique_ptr<XmlElement> parsedXml;\r
     TextEditor errorMessage;\r
 \r
     void rebuildTree()\r
     {\r
-        ScopedPointer<XmlElement> openness;\r
+        std::unique_ptr<XmlElement> openness;\r
 \r
         if (rootItem.get() != nullptr)\r
             openness.reset (rootItem->getOpennessState());\r
index f050db30549ade7be72b3a1b4e58d12f8d48125d..862fe1f2cd0b2aaee58a79c1da6aa5af880136ed 100644 (file)
         <MODULEPATH id="juce_audio_utils" path="../../modules"/>\r
       </MODULEPATHS>\r
     </XCODE_IPHONE>\r
-    <VS2015 targetFolder="Builds/VisualStudio2015" extraCompilerFlags="">\r
+    <VS2017 targetFolder="Builds/VisualStudio2017">\r
       <CONFIGURATIONS>\r
-        <CONFIGURATION name="Debug" isDebug="1" targetName="AudioPerformanceTest"/>\r
-        <CONFIGURATION name="Release" isDebug="0" targetName="AudioPerformanceTest"/>\r
+        <CONFIGURATION isDebug="1" name="Debug"/>\r
+        <CONFIGURATION isDebug="0" name="Release"/>\r
       </CONFIGURATIONS>\r
       <MODULEPATHS>\r
-        <MODULEPATH id="juce_core" path="../../modules"/>\r
-        <MODULEPATH id="juce_events" path="../../modules"/>\r
+        <MODULEPATH id="juce_gui_extra" path="../../modules"/>\r
+        <MODULEPATH id="juce_gui_basics" path="../../modules"/>\r
         <MODULEPATH id="juce_graphics" path="../../modules"/>\r
+        <MODULEPATH id="juce_events" path="../../modules"/>\r
         <MODULEPATH id="juce_data_structures" path="../../modules"/>\r
-        <MODULEPATH id="juce_gui_basics" path="../../modules"/>\r
-        <MODULEPATH id="juce_gui_extra" path="../../modules"/>\r
-        <MODULEPATH id="juce_audio_basics" path="../../modules"/>\r
-        <MODULEPATH id="juce_audio_devices" path="../../modules"/>\r
-        <MODULEPATH id="juce_audio_formats" path="../../modules"/>\r
-        <MODULEPATH id="juce_audio_processors" path="../../modules"/>\r
+        <MODULEPATH id="juce_core" path="../../modules"/>\r
         <MODULEPATH id="juce_audio_utils" path="../../modules"/>\r
+        <MODULEPATH id="juce_audio_processors" path="../../modules"/>\r
+        <MODULEPATH id="juce_audio_formats" path="../../modules"/>\r
+        <MODULEPATH id="juce_audio_devices" path="../../modules"/>\r
+        <MODULEPATH id="juce_audio_basics" path="../../modules"/>\r
       </MODULEPATHS>\r
-    </VS2015>\r
+    </VS2017>\r
     <LINUX_MAKE targetFolder="Builds/LinuxMakefile" extraCompilerFlags="">\r
       <CONFIGURATIONS>\r
         <CONFIGURATION name="Debug" libraryPath="/usr/X11R6/lib/" isDebug="1" targetName="AudioPerformanceTest"/>\r
     <MODULE id="juce_gui_extra" showAllCode="1" useLocalCopy="0"/>\r
   </MODULES>\r
   <JUCEOPTIONS/>\r
+  <LIVE_SETTINGS>\r
+    <OSX/>\r
+  </LIVE_SETTINGS>\r
 </JUCERPROJECT>\r
index 1acb8f22b012e996575b1a14da2c24303f679c41..f688f097d17bb8ccd96dea5702ecae36f0249503 100644 (file)
@@ -399,6 +399,7 @@ add_library( ${BINARY_NAME}
     "../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h"\r
     "../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h"\r
     "../../../../../modules/juce_core/containers/juce_SortedSet.h"\r
+    "../../../../../modules/juce_core/containers/juce_SparseSet.cpp"\r
     "../../../../../modules/juce_core/containers/juce_SparseSet.h"\r
     "../../../../../modules/juce_core/containers/juce_Variant.cpp"\r
     "../../../../../modules/juce_core/containers/juce_Variant.h"\r
@@ -1566,6 +1567,7 @@ set_source_files_properties("../../../../../modules/juce_core/containers/juce_Pr
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_SortedSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
+set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
index 28e29b6460949599aa820b267bc0c030af62bfd6..2ca9c6d9291219b93591b3021f5025122dd63461 100644 (file)
@@ -30,6 +30,7 @@ import android.content.Intent;
 import android.content.res.Configuration;\r
 import android.content.pm.PackageInfo;\r
 import android.content.pm.PackageManager;\r
+import android.hardware.camera2.*;\r
 import android.net.http.SslError;\r
 import android.net.Uri;\r
 import android.os.Bundle;\r
@@ -119,6 +120,7 @@ public class AudioPerformanceTest   extends Activity
     private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2;\r
     private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3;\r
     private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4;\r
+    private static final int JUCE_PERMISSIONS_CAMERA = 5;\r
 \r
     private static String getAndroidPermissionName (int permissionID)\r
     {\r
@@ -129,6 +131,7 @@ public class AudioPerformanceTest   extends Activity
                                                           // use string value as this is not defined in SDKs < 16\r
             case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE:  return "android.permission.READ_EXTERNAL_STORAGE";\r
             case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE;\r
+            case JUCE_PERMISSIONS_CAMERA:                 return Manifest.permission.CAMERA;\r
         }\r
 \r
         // unknown permission ID!\r
@@ -1205,6 +1208,7 @@ public class AudioPerformanceTest   extends Activity
         setVolumeControlStream (AudioManager.STREAM_MUSIC);\r
 \r
         permissionCallbackPtrMap = new HashMap<Integer, Long>();\r
+        appPausedResumedListeners = new HashMap<Long, AppPausedResumedListener>();\r
     }\r
 \r
     @Override\r
@@ -1221,6 +1225,11 @@ public class AudioPerformanceTest   extends Activity
     {\r
         suspendApp();\r
 \r
+        Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+        for (Long k : keys)\r
+            appPausedResumedListeners.get (k).appPaused();\r
+\r
         try\r
         {\r
             Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down\r
@@ -1236,12 +1245,10 @@ public class AudioPerformanceTest   extends Activity
         super.onResume();\r
         resumeApp();\r
 \r
-        // Ensure that navigation/status bar visibility is correctly restored.\r
-        for (int i = 0; i < viewHolder.getChildCount(); ++i)\r
-        {\r
-            if (viewHolder.getChildAt (i) instanceof ComponentPeerView)\r
-                ((ComponentPeerView) viewHolder.getChildAt (i)).appResumed();\r
-        }\r
+        Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+        for (Long k : keys)\r
+            appPausedResumedListeners.get (k).appResumed();\r
     }\r
 \r
     @Override\r
@@ -1368,11 +1375,14 @@ public class AudioPerformanceTest   extends Activity
     {\r
         ComponentPeerView v = new ComponentPeerView (this, opaque, host);\r
         viewHolder.addView (v);\r
+        addAppPausedResumedListener (v, host);\r
         return v;\r
     }\r
 \r
     public final void deleteView (ComponentPeerView view)\r
     {\r
+        removeAppPausedResumedListener (view, view.host);\r
+\r
         view.host = 0;\r
 \r
         ViewGroup group = (ViewGroup) (view.getParent());\r
@@ -1590,9 +1600,28 @@ public class AudioPerformanceTest   extends Activity
 \r
     public native void alertDismissed (long callback, int id);\r
 \r
+    //==============================================================================\r
+    public interface AppPausedResumedListener\r
+    {\r
+        void appPaused();\r
+        void appResumed();\r
+    }\r
+\r
+    private Map<Long, AppPausedResumedListener> appPausedResumedListeners;\r
+\r
+    public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+    {\r
+        appPausedResumedListeners.put (new Long (listenerHost), l);\r
+    }\r
+\r
+    public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+    {\r
+        appPausedResumedListeners.remove (new Long (listenerHost));\r
+    }\r
+\r
     //==============================================================================\r
     public final class ComponentPeerView extends ViewGroup\r
-                                         implements View.OnFocusChangeListener\r
+                                         implements View.OnFocusChangeListener, AppPausedResumedListener\r
     {\r
         public ComponentPeerView (Context context, boolean opaque_, long host)\r
         {\r
@@ -1940,13 +1969,25 @@ public class AudioPerformanceTest   extends Activity
         }\r
 \r
         //==============================================================================\r
+        private native void handleAppPaused (long host);\r
         private native void handleAppResumed (long host);\r
 \r
+        @Override\r
+        public void appPaused()\r
+        {\r
+            if (host == 0)\r
+                return;\r
+\r
+            handleAppPaused (host);\r
+        }\r
+\r
+        @Override\r
         public void appResumed()\r
         {\r
             if (host == 0)\r
                 return;\r
 \r
+            // Ensure that navigation/status bar visibility is correctly restored.\r
             handleAppResumed (host);\r
         }\r
     }\r
@@ -2616,6 +2657,175 @@ public class AudioPerformanceTest   extends Activity
         private final Object hostLock = new Object();\r
     }\r
 \r
+\r
+    //==============================================================================\r
+    public class CameraDeviceStateCallback  extends CameraDevice.StateCallback\r
+    {\r
+        private native void cameraDeviceStateClosed       (long host, CameraDevice camera);\r
+        private native void cameraDeviceStateDisconnected (long host, CameraDevice camera);\r
+        private native void cameraDeviceStateError        (long host, CameraDevice camera, int error);\r
+        private native void cameraDeviceStateOpened       (long host, CameraDevice camera);\r
+\r
+        CameraDeviceStateCallback (long hostToUse)\r
+        {\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onClosed (CameraDevice camera)\r
+        {\r
+            cameraDeviceStateClosed (host, camera);\r
+        }\r
+\r
+        @Override\r
+        public void onDisconnected (CameraDevice camera)\r
+        {\r
+            cameraDeviceStateDisconnected (host, camera);\r
+        }\r
+\r
+        @Override\r
+        public void onError (CameraDevice camera, int error)\r
+        {\r
+            cameraDeviceStateError (host, camera, error);\r
+        }\r
+\r
+        @Override\r
+        public void onOpened (CameraDevice camera)\r
+        {\r
+            cameraDeviceStateOpened (host, camera);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+    //==============================================================================\r
+    public class CameraCaptureSessionStateCallback  extends CameraCaptureSession.StateCallback\r
+    {\r
+        private native void cameraCaptureSessionActive          (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionClosed          (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionConfigured      (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionReady           (long host, CameraCaptureSession session);\r
+\r
+        CameraCaptureSessionStateCallback (long hostToUse)\r
+        {\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onActive (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionActive (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onClosed (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionClosed (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onConfigureFailed (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionConfigureFailed (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onConfigured (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionConfigured (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onReady (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionReady (host, session);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+    //==============================================================================\r
+    public class CameraCaptureSessionCaptureCallback    extends CameraCaptureSession.CaptureCallback\r
+    {\r
+        private native void cameraCaptureSessionCaptureCompleted  (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, TotalCaptureResult result);\r
+        private native void cameraCaptureSessionCaptureFailed     (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureFailure failure);\r
+        private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureResult partialResult);\r
+        private native void cameraCaptureSessionCaptureStarted    (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, long timestamp, long frameNumber);\r
+        private native void cameraCaptureSessionCaptureSequenceAborted   (long host, boolean isPreview, CameraCaptureSession session, int sequenceId);\r
+        private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber);\r
+\r
+        CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview)\r
+        {\r
+            host = hostToUse;\r
+            preview = shouldBePreview;\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request,\r
+                                        TotalCaptureResult result)\r
+        {\r
+            cameraCaptureSessionCaptureCompleted (host, preview, session, request, result);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure)\r
+        {\r
+            cameraCaptureSessionCaptureFailed (host, preview, session, request, failure);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request,\r
+                                         CaptureResult partialResult)\r
+        {\r
+            cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId)\r
+        {\r
+            cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber)\r
+        {\r
+            cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp,\r
+                                      long frameNumber)\r
+        {\r
+            cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber);\r
+        }\r
+\r
+        private long host;\r
+        private boolean preview;\r
+    }\r
+\r
+    //==============================================================================\r
+    public class JuceOrientationEventListener    extends OrientationEventListener\r
+    {\r
+        private native void deviceOrientationChanged (long host, int orientation);\r
+\r
+        public JuceOrientationEventListener (long hostToUse, Context context, int rate)\r
+        {\r
+            super (context, rate);\r
+\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onOrientationChanged (int orientation)\r
+        {\r
+            deviceOrientationChanged (host, orientation);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+\r
     //==============================================================================\r
     public static final String getLocaleValue (boolean isRegion)\r
     {\r
index ac92da83a9a3dd5a5ad0a7f8df3b64cbe788f588..7f38502a14561d14d3594de3a7528258189c8fff 100644 (file)
                                        1DFEAF972822E305E013CC06, ); name = Source; sourceTree = "<group>"; };
                19B7C16D592FB25D09022191 = {isa = XCBuildConfiguration; buildSettings = {
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                USE_HEADERMAP = NO; }; name = Debug; };
                B7A6988E30C0A68B01EDC53B = {isa = XCBuildConfiguration; buildSettings = {
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                        C86DD529EC94922C2AB61742,
                                        6C2BE2DE2ECC96615ED827AB,
                                        409D569C572B6EF7F4F1702D, ); buildRules = ( ); dependencies = (  ); name = "AudioPerformanceTest - App"; productName = AudioPerformanceTest; productReference = 614F2084407B35D62101F69F; productType = "com.apple.product-type.application"; };
-               9CE2A44801B5B4BE7A9667DA = {isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; attributes = { LastUpgradeCheck = 0830; 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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3BA1BA0CAFE969E99950C06B; projectDirPath = ""; projectRoot = ""; targets = (E9FD2656EC625C9C8DE30219); };
+               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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3BA1BA0CAFE969E99950C06B; projectDirPath = ""; projectRoot = ""; targets = (E9FD2656EC625C9C8DE30219); };
        };
        rootObject = 9CE2A44801B5B4BE7A9667DA;
 }
diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest.sln b/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest.sln
new file mode 100644 (file)
index 0000000..ee79a7a
--- /dev/null
@@ -0,0 +1,20 @@
+Microsoft Visual Studio Solution File, Format Version 11.00\r
+# Visual Studio 2017\r
+\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioPerformanceTest - App", "AudioPerformanceTest_App.vcxproj", "{78607AE9-F43B-3DDB-0FE1-D745771AF527}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|x64 = Debug|x64\r
+               Release|x64 = Release|x64\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Debug|x64.ActiveCfg = Debug|x64\r
+               {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Debug|x64.Build.0 = Debug|x64\r
+               {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Release|x64.ActiveCfg = Release|x64\r
+               {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Release|x64.Build.0 = Release|x64\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj b/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj
new file mode 100644 (file)
index 0000000..a7c1f19
--- /dev/null
@@ -0,0 +1,2348 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<Project DefaultTargets="Build"\r
+         ToolsVersion="15.0"\r
+         xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|x64">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|x64">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{78607AE9-F43B-3DDB-0FE1-D745771AF527}</ProjectGuid>\r
+    <PlatformToolset>v141</PlatformToolset>\r
+    <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"\r
+                 Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+    <UseOfMfc>false</UseOfMfc>\r
+    <WholeProgramOptimization>false</WholeProgramOptimization>\r
+    <PlatformToolset>v141</PlatformToolset>\r
+    <PlatformToolset>v141</PlatformToolset>\r
+    <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"\r
+                 Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+    <UseOfMfc>false</UseOfMfc>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <PlatformToolset>v141</PlatformToolset>\r
+    <PlatformToolset>v141</PlatformToolset>\r
+    <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>\r
+  <ImportGroup Label="ExtensionSettings"/>\r
+  <ImportGroup Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"\r
+            Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"\r
+            Label="LocalAppDataPlatform"/>\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros">\r
+    <PlatformToolset>v141</PlatformToolset>\r
+    <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+    <TargetExt>.exe</TargetExt>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\App\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\App\</IntDir>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AudioPerformanceTest</TargetName>\r
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\App\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\App\</IntDir>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AudioPerformanceTest</TargetName>\r
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>\r
+    <PlatformToolset>v141</PlatformToolset>\r
+    <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <Midl>\r
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <MkTypLibCompatible>true</MkTypLibCompatible>\r
+      <SuppressStartupBanner>true</SuppressStartupBanner>\r
+      <TargetEnvironment>Win32</TargetEnvironment>\r
+      <HeaderFileName/>\r
+    </Midl>\r
+    <ClCompile>\r
+      <Optimization>Disabled</Optimization>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+      <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+      <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
+      <PrecompiledHeader/>\r
+      <AssemblerListingLocation>$(IntDir)\</AssemblerListingLocation>\r
+      <ObjectFileName>$(IntDir)\</ObjectFileName>\r
+      <ProgramDataBaseFileName>$(IntDir)\</ProgramDataBaseFileName>\r
+      <WarningLevel>Level4</WarningLevel>\r
+      <SuppressStartupBanner>true</SuppressStartupBanner>\r
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
+      <LanguageStandard>stdcpp14</LanguageStandard>\r
+    </ClCompile>\r
+    <ResourceCompile>\r
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+    </ResourceCompile>\r
+    <Link>\r
+      <OutputFile>$(OutDir)\AudioPerformanceTest.exe</OutputFile>\r
+      <SuppressStartupBanner>true</SuppressStartupBanner>\r
+      <IgnoreSpecificDefaultLibraries>libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <ProgramDatabaseFile>$(IntDir)\AudioPerformanceTest.pdb</ProgramDatabaseFile>\r
+      <SubSystem>Windows</SubSystem>\r
+      <LargeAddressAware>true</LargeAddressAware>\r
+    </Link>\r
+    <Bscmake>\r
+      <SuppressStartupBanner>true</SuppressStartupBanner>\r
+      <OutputFile>$(IntDir)\AudioPerformanceTest.bsc</OutputFile>\r
+    </Bscmake>\r
+    <Lib/>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <Midl>\r
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <MkTypLibCompatible>true</MkTypLibCompatible>\r
+      <SuppressStartupBanner>true</SuppressStartupBanner>\r
+      <TargetEnvironment>Win32</TargetEnvironment>\r
+      <HeaderFileName/>\r
+    </Midl>\r
+    <ClCompile>\r
+      <Optimization>Full</Optimization>\r
+      <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+      <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
+      <PrecompiledHeader/>\r
+      <AssemblerListingLocation>$(IntDir)\</AssemblerListingLocation>\r
+      <ObjectFileName>$(IntDir)\</ObjectFileName>\r
+      <ProgramDataBaseFileName>$(IntDir)\</ProgramDataBaseFileName>\r
+      <WarningLevel>Level4</WarningLevel>\r
+      <SuppressStartupBanner>true</SuppressStartupBanner>\r
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
+      <LanguageStandard>stdcpp14</LanguageStandard>\r
+    </ClCompile>\r
+    <ResourceCompile>\r
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+    </ResourceCompile>\r
+    <Link>\r
+      <OutputFile>$(OutDir)\AudioPerformanceTest.exe</OutputFile>\r
+      <SuppressStartupBanner>true</SuppressStartupBanner>\r
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r
+      <GenerateDebugInformation>false</GenerateDebugInformation>\r
+      <ProgramDatabaseFile>$(IntDir)\AudioPerformanceTest.pdb</ProgramDatabaseFile>\r
+      <SubSystem>Windows</SubSystem>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <LargeAddressAware>true</LargeAddressAware>\r
+    </Link>\r
+    <Bscmake>\r
+      <SuppressStartupBanner>true</SuppressStartupBanner>\r
+      <OutputFile>$(IntDir)\AudioPerformanceTest.bsc</OutputFile>\r
+    </Bscmake>\r
+    <Lib/>\r
+  </ItemDefinitionGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="..\..\Source\Main.cpp"/>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioChannelSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioDataConverters.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_FloatVectorOperations.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\effects\juce_CatmullRomInterpolator.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\effects\juce_IIRFilter.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\effects\juce_LagrangeInterpolator.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiBuffer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiFile.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiKeyboardState.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessage.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessageSequence.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiRPN.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEInstrument.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEMessages.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPENote.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiser.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserBase.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_BufferingAudioSource.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ChannelRemappingAudioSource.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_IIRFilterAudioSource.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MemoryAudioSource.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MixerAudioSource.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ResamplingAudioSource.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ReverbAudioSource.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ToneGeneratorAudioSource.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\synthesisers\juce_Synthesiser.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\juce_audio_basics.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioDeviceManager.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODevice.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODeviceType.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiMessageCollector.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiOutput.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_Audio.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_Midi.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_Oboe.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_OpenSL.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_ios_Audio.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_ALSA.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_Bela.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_JackAudio.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_Midi.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_mac_CoreAudio.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_mac_CoreMidi.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_ASIO.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_DirectSound.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_Midi.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_WASAPI.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioSourcePlayer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioTransportSource.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\juce_audio_devices.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\bitmath.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\bitreader.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\bitwriter.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\cpu.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\crc.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\fixed.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\float.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\format.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\lpc_flac.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\md5.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\memory.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\stream_decoder.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\stream_encoder.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\stream_encoder_framing.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\window_flac.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\analysis.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\bitrate.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\block.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\codebook.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\envelope.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\floor0.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\floor1.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\info.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lookup.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lpc.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lsp.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\mapping0.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\mdct.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\psy.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\registry.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\res0.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\sharedbook.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\smallft.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\synthesis.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\vorbisenc.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\vorbisfile.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\window.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\bitwise.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\framing.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_AiffAudioFormat.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_CoreAudioFormat.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_FlacAudioFormat.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_LAMEEncoderAudioFormat.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_MP3AudioFormat.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_OggVorbisAudioFormat.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WavAudioFormat.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatManager.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReader.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReaderSource.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatWriter.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioSubsectionReader.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_BufferingAudioFormatReader.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\sampler\juce_Sampler.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\juce_audio_formats.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormat.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LADSPAPluginFormat.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LegacyAudioParameter.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTPluginFormat.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioPluginInstance.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessor.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorEditor.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorGraph.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_PluginDescription.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_KnownPluginList.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginDirectoryScanner.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorParameters.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorValueTreeState.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDReader.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioAppComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioDeviceSelectorComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnail.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnailCache.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioVisualiserComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_android_BluetoothMidiDevicePairingDialogue.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_linux_AudioCDReader.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_linux_BluetoothMidiDevicePairingDialogue.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_win_BluetoothMidiDevicePairingDialogue.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_win32_AudioCDBurner.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_win32_AudioCDReader.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\players\juce_AudioProcessorPlayer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\players\juce_SoundPlayer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\juce_audio_utils.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_AbstractFifo.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_DynamicObject.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_HashMap_test.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_File.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileFilter.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileInputStream.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\javascript\juce_JSON.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\logging\juce_FileLogger.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\logging\juce_Logger.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_BigInteger.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Expression.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_Result.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_RuntimePermissions.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_StdFunctionCompat.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_Uuid.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Files.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Misc.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Network.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_RuntimePermissions.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_SystemStats.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Threads.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_curl_Network.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_CommonFile.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_Files.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_Network.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_SystemStats.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_Threads.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_posix_NamedPipe.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Files.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Network.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Registry.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_SystemStats.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Threads.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_IPAddress.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_MACAddress.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_NamedPipe.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_Socket.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_URL.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_WebInputStream.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_BufferedInputStream.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_FileInputSource.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_InputStream.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_MemoryInputStream.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_MemoryOutputStream.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_OutputStream.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_SubregionStream.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_URLInputSource.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\system\juce_SystemStats.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_Base64.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_CharacterFunctions.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_Identifier.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_LocalisedStrings.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_String.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_StringArray.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_StringPairArray.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_StringPool.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_TextDiff.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_ChildProcess.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_HighResolutionTimer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_ReadWriteLock.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_Thread.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_ThreadPool.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_TimeSliceThread.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\time\juce_PerformanceCounter.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\time\juce_RelativeTime.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\time\juce_Time.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\unit_tests\juce_UnitTest.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\xml\juce_XmlDocument.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\xml\juce_XmlElement.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\adler32.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\compress.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\crc32.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\deflate.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\infback.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\inffast.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\inflate.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\inftrees.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\trees.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\uncompr.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\zutil.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\juce_GZIPCompressorOutputStream.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\juce_GZIPDecompressorInputStream.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\juce_ZipFile.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\juce_core.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_ApplicationProperties.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_PropertiesFile.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\undomanager\juce_UndoManager.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_CachedValue.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_Value.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\broadcasters\juce_ActionBroadcaster.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\broadcasters\juce_AsyncUpdater.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\broadcasters\juce_ChangeBroadcaster.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\interprocess\juce_ConnectedChildProcess.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnection.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnectionServer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_ApplicationBase.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_DeletedAtShutdown.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_MessageListener.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_MessageManager.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_android_Messaging.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_linux_Messaging.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_win32_Messaging.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_win32_WinRTWrapper.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\timers\juce_MultiTimer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\timers\juce_Timer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\juce_events.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_Colour.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_ColourGradient.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_Colours.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_FillType.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\contexts\juce_GraphicsContext.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsPostScriptRenderer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsSoftwareRenderer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\effects\juce_DropShadowEffect.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\effects\juce_GlowEffect.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_AttributedString.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_CustomTypeface.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_Font.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_GlyphArrangement.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_TextLayout.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_Typeface.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_AffineTransform.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_EdgeTable.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_Path.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathIterator.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcapimin.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcapistd.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jccoefct.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jccolor.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcdctmgr.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jchuff.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcinit.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcmainct.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcmarker.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcmaster.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcomapi.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcparam.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcphuff.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcprepct.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcsample.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jctrans.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdapimin.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdapistd.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdatasrc.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdcoefct.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdcolor.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jddctmgr.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdhuff.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdinput.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmainct.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmarker.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmaster.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmerge.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdphuff.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdpostct.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdsample.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdtrans.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jerror.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jfdctflt.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jfdctfst.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jfdctint.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctflt.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctfst.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctint.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctred.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmemmgr.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmemnobs.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jquant1.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jquant2.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jutils.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\transupp.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\png.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngerror.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngget.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngmem.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngpread.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngread.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngrio.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngrtran.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngrutil.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngset.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngtrans.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwio.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwrite.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwtran.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwutil.c">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\juce_GIFLoader.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\juce_JPEGLoader.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\juce_PNGLoader.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_Image.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_ImageCache.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_ImageConvolutionKernel.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_ImageFileFormat.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_android_Fonts.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_android_GraphicsContext.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_android_IconHelpers.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_freetype_Fonts.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_linux_Fonts.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_linux_IconHelpers.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_mac_IconHelpers.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_Direct2DGraphicsContext.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_DirectWriteTypeface.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_DirectWriteTypeLayout.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_Fonts.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_IconHelpers.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\placement\juce_RectanglePlacement.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\juce_graphics.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\application\juce_Application.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ArrowButton.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_Button.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_DrawableButton.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_HyperlinkButton.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ImageButton.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ShapeButton.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_TextButton.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToggleButton.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToolbarButton.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandInfo.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandManager.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandTarget.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_KeyPressMappingSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_Component.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_ComponentListener.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_Desktop.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_ModalComponentManager.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_Drawable.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableComposite.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableImage.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawablePath.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableRectangle.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableShape.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableText.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_SVGParser.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ContentSharer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsDisplayComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsList.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileBrowserComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooser.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooserDialogBox.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileListComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FilenameComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileSearchPathListComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileTreeComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ImagePreviewComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_CaretComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyboardFocusTraverser.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyListener.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyPress.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_ModifierKeys.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentAnimator.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBoundsConstrainer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBuilder.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentMovementWatcher.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ConcertinaPanel.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_FlexBox.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Grid.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GridItem.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GridUnitTests.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GroupComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_MultiDocumentPanel.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableBorderComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableCornerComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableEdgeComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ScrollBar.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_SidePanel.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutManager.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutResizerBar.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableObjectResizer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedButtonBar.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Viewport.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V1.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V2.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V3.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V4.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_BurgerMenuComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarModel.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_PopupMenu.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_BubbleComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_ComponentDragger.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_DragAndDropContainer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseCursor.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseEvent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInactivityDetector.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInputSource.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_ContentSharer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_FileChooser.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_Windowing.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_common_MimeTypes.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_ios_ContentSharer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_FileChooser.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11_Clipboard.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11_Windowing.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_DragAndDrop.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_FileChooser.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_Windowing.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_MarkerList.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinate.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinatePositioner.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeParallelogram.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePoint.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePointPath.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeRectangle.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_BooleanPropertyComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ButtonPropertyComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ChoicePropertyComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_MultiChoicePropertyComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyPanel.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_SliderPropertyComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_TextPropertyComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ComboBox.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ImageComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Label.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ListBox.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ProgressBar.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Slider.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableHeaderComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableListBox.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TextEditor.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Toolbar.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemPalette.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TreeView.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_AlertWindow.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_CallOutBox.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ComponentPeer.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DialogWindow.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DocumentWindow.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ResizableWindow.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ThreadWithProgressWindow.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TooltipWindow.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TopLevelWindow.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\juce_gui_basics.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeDocument.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeEditorComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CPlusPlusCodeTokeniser.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_LuaCodeTokeniser.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_XMLCodeTokeniser.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\documents\juce_FileBasedDocument.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_AnimatedAppComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_BubbleMessageComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_ColourSelector.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_KeyMappingEditorComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_LiveConstantEditor.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PreferencesPanel.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PushNotifications.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_RecentlyOpenedFilesList.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SplashScreen.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SystemTrayIconComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_android_PushNotifications.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_android_WebBrowserComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_AndroidViewComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_ios_PushNotifications.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_linux_X11_SystemTrayIcon.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_linux_X11_WebBrowserComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_linux_XEmbedComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_PushNotifications.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_SystemTrayIcon.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_win32_ActiveXComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_win32_SystemTrayIcon.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_win32_WebBrowserComponent.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\juce_gui_extra.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_basics.cpp"/>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_devices.cpp"/>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_formats.cpp"/>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors.cpp"/>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_utils.cpp"/>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_core.cpp"/>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_data_structures.cpp"/>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_events.cpp"/>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_graphics.cpp"/>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_gui_basics.cpp"/>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_gui_extra.cpp"/>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\..\Source\MainComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\audio_play_head\juce_AudioPlayHead.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioChannelSet.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioDataConverters.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioSampleBuffer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_FloatVectorOperations.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_CatmullRomInterpolator.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_Decibels.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_IIRFilter.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_LagrangeInterpolator.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_LinearSmoothedValue.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_Reverb.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiBuffer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiFile.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiKeyboardState.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessage.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessageSequence.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiRPN.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEInstrument.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEMessages.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPENote.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiser.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserBase.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\native\juce_mac_CoreAudioLayouts.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_AudioSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_BufferingAudioSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ChannelRemappingAudioSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_IIRFilterAudioSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MemoryAudioSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MixerAudioSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_PositionableAudioSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ResamplingAudioSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ReverbAudioSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ToneGeneratorAudioSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\synthesisers\juce_Synthesiser.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\juce_audio_basics.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioDeviceManager.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODevice.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODeviceType.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_SystemAudioVolume.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiInput.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiMessageCollector.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiOutput.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\native\juce_ios_Audio.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\native\juce_MidiDataConcatenator.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioSourcePlayer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioTransportSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\juce_audio_devices.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\all.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\bitmath.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\bitreader.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\bitwriter.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\cpu.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\crc.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\fixed.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\float.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\format.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\lpc.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\md5.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\memory.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\metadata.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\stream_encoder.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\stream_encoder_framing.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\window.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\protected\all.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\protected\stream_decoder.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\protected\stream_encoder.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\all.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\alloc.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\assert.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\callback.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\compat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\endswap.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\export.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\format.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\metadata.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\ordinals.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\stream_decoder.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\stream_encoder.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\win_utf8_io.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled\res_books_51.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled\res_books_stereo.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\floor\floor_books.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\uncoupled\res_books_uncoupled.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\floor_all.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_8.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_11.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_16.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_44.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_8.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_16.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_44.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_44p51.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_44u.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_8.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_11.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_16.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_22.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_32.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_44.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_44p51.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_44u.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_X.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\backends.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\bitrate.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\codebook.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\codec_internal.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\envelope.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\highlevel.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lookup.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lookup_data.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lpc.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lsp.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\masking.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\mdct.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\misc.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\os.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\psy.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\registry.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\scales.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\smallft.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\window.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\codec.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\config_types.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\ogg.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\os_types.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\vorbisenc.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\vorbisfile.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_AiffAudioFormat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_CoreAudioFormat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_FlacAudioFormat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_LAMEEncoderAudioFormat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_MP3AudioFormat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_OggVorbisAudioFormat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WavAudioFormat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatManager.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReader.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReaderSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatWriter.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioSubsectionReader.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_BufferingAudioFormatReader.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_MemoryMappedAudioFormatReader.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\sampler\juce_Sampler.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\juce_audio_formats.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_AudioUnitPluginFormat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LADSPAPluginFormat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3Common.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3Headers.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTCommon.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTInterface.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTMidiEventList.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTPluginFormat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioPluginInstance.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessor.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorEditor.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorGraph.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorListener.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorParameter.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_PluginDescription.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_KnownPluginList.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginDirectoryScanner.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterBool.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterChoice.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterFloat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterInt.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorParameterWithID.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorValueTreeState.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDBurner.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDReader.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioAppComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioDeviceSelectorComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnail.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnailBase.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnailCache.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioVisualiserComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_BluetoothMidiDevicePairingDialogue.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\players\juce_AudioProcessorPlayer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\players\juce_SoundPlayer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\juce_audio_utils.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_AbstractFifo.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Array.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ArrayAllocationBase.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_DynamicObject.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ElementComparator.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_HashMap.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_LinkedListPointer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ListenerList.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_OwnedArray.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ReferenceCountedArray.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ScopedValueSetter.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SortedSet.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Variant.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_File.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileFilter.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileInputStream.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_JSON.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\logging\juce_FileLogger.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\logging\juce_Logger.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_BigInteger.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Expression.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_MathsFunctions.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_NormalisableRange.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_HeapBlock.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_LeakedObjectDetector.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Memory.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_OptionalScopedPointer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ReferenceCountedObject.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ScopedPointer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_SharedResourcePointer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Singleton.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_WeakReference.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_Result.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_RuntimePermissions.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_StdFunctionCompat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_Uuid.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_WindowsRegistry.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_android_JNIHelpers.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_BasicNativeHeaders.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_win32_ComSmartPtr.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_IPAddress.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_MACAddress.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_NamedPipe.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_Socket.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_URL.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_WebInputStream.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_BufferedInputStream.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_FileInputSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_InputSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_InputStream.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_MemoryInputStream.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_MemoryOutputStream.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_OutputStream.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_SubregionStream.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_URLInputSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_CompilerSupport.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_PlatformDefs.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_StandardHeader.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_SystemStats.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_TargetPlatform.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_Base64.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharacterFunctions.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_ASCII.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_UTF8.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_UTF16.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_UTF32.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_Identifier.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_LocalisedStrings.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_NewLine.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_String.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringArray.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringPairArray.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringPool.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringRef.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_TextDiff.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ChildProcess.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_CriticalSection.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_DynamicLibrary.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_HighResolutionTimer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_InterProcessLock.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_Process.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ReadWriteLock.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ScopedLock.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ScopedReadLock.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ScopedWriteLock.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_SpinLock.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_Thread.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ThreadLocalValue.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ThreadPool.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_TimeSliceThread.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_WaitableEvent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\time\juce_PerformanceCounter.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\time\juce_RelativeTime.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\time\juce_Time.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\unit_tests\juce_UnitTest.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\xml\juce_XmlDocument.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\xml\juce_XmlElement.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\crc32.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\deflate.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inffast.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inffixed.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inflate.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inftrees.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\trees.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zconf.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zconf.in.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zlib.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zutil.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\juce_GZIPCompressorOutputStream.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\juce_GZIPDecompressorInputStream.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\juce_ZipFile.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\juce_core.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_ApplicationProperties.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_PropertiesFile.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\undomanager\juce_UndoableAction.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\undomanager\juce_UndoManager.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_CachedValue.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_Value.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ActionBroadcaster.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ActionListener.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_AsyncUpdater.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ChangeBroadcaster.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ChangeListener.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\interprocess\juce_ConnectedChildProcess.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnection.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnectionServer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_ApplicationBase.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_CallbackMessage.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_DeletedAtShutdown.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_Initialisation.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_Message.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_MessageListener.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_MessageManager.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_MountedVolumeListChangeDetector.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_NotificationType.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_linux_EventLoop.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_osx_MessageQueue.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_win32_HiddenMessageWindow.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_win32_WinRTWrapper.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\timers\juce_MultiTimer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\timers\juce_Timer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\juce_events.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_Colour.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_ColourGradient.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_Colours.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_FillType.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_PixelFormats.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_GraphicsContext.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsContext.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsPostScriptRenderer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsSoftwareRenderer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\effects\juce_DropShadowEffect.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\effects\juce_GlowEffect.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\effects\juce_ImageEffectFilter.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_AttributedString.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_CustomTypeface.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_Font.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_GlyphArrangement.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_TextLayout.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_Typeface.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_AffineTransform.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_BorderSize.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_EdgeTable.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Line.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Parallelogram.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Path.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathIterator.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Point.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\cderror.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jchuff.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jconfig.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdct.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdhuff.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jerror.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jinclude.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmemsys.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmorecfg.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jpegint.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jpeglib.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jversion.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\transupp.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\png.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngconf.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pnginfo.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngpriv.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngstruct.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_Image.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageCache.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageConvolutionKernel.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageFileFormat.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsContext.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsHelpers.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_RenderingHelpers.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_win32_Direct2DGraphicsContext.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\placement\juce_Justification.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\placement\juce_RectanglePlacement.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\juce_graphics.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\application\juce_Application.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ArrowButton.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_Button.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_DrawableButton.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_HyperlinkButton.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ImageButton.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ShapeButton.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_TextButton.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToggleButton.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToolbarButton.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandID.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandInfo.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandManager.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandTarget.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_KeyPressMappingSet.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_CachedComponentImage.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_Component.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_ComponentListener.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_Desktop.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_ModalComponentManager.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_Drawable.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableComposite.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableImage.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawablePath.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableRectangle.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableShape.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableText.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ContentSharer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsDisplayComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsList.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileBrowserComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileBrowserListener.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooser.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooserDialogBox.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileListComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FilenameComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FilePreviewComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileSearchPathListComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileTreeComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ImagePreviewComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_CaretComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyboardFocusTraverser.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyListener.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyPress.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_ModifierKeys.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_SystemClipboard.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_TextEditorKeyMapper.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_TextInputTarget.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_AnimatedPosition.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_AnimatedPositionBehaviours.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentAnimator.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBoundsConstrainer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBuilder.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentMovementWatcher.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ConcertinaPanel.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_FlexBox.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_FlexItem.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Grid.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GridItem.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GroupComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_MultiDocumentPanel.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableBorderComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableCornerComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableEdgeComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ScrollBar.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_SidePanel.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutManager.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutResizerBar.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableObjectResizer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedButtonBar.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Viewport.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V1.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V2.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V3.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V4.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_BurgerMenuComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarModel.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_PopupMenu.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_BubbleComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_ComponentDragger.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_DragAndDropContainer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_DragAndDropTarget.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_FileDragAndDropTarget.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_LassoComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseCursor.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseEvent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInactivityDetector.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInputSource.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_SelectedItemSet.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_TextDragAndDropTarget.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_TooltipClient.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_MultiTouchMapper.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_MarkerList.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinate.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinatePositioner.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeParallelogram.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePoint.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePointPath.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeRectangle.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_BooleanPropertyComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ButtonPropertyComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ChoicePropertyComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_MultiChoicePropertyComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyPanel.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_SliderPropertyComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_TextPropertyComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ComboBox.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ImageComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Label.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ListBox.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ProgressBar.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Slider.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableHeaderComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableListBox.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TextEditor.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Toolbar.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemFactory.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemPalette.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TreeView.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_AlertWindow.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_CallOutBox.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ComponentPeer.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DialogWindow.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DocumentWindow.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_NativeMessageBox.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ResizableWindow.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ThreadWithProgressWindow.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TooltipWindow.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TopLevelWindow.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\juce_gui_basics.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeDocument.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeEditorComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeTokeniser.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CPlusPlusCodeTokeniser.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CPlusPlusCodeTokeniserFunctions.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_LuaCodeTokeniser.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_XMLCodeTokeniser.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\documents\juce_FileBasedDocument.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_ActiveXControlComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_AndroidViewComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_NSViewComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_UIViewComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_XEmbedComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_AnimatedAppComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_AppleRemote.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_BubbleMessageComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_ColourSelector.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_KeyMappingEditorComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_LiveConstantEditor.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PreferencesPanel.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PushNotifications.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_RecentlyOpenedFilesList.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SplashScreen.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SystemTrayIconComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_WebBrowserComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_CarbonViewWrapperComponent.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\juce_gui_extra.h"/>\r
+    <ClInclude Include="..\..\JuceLibraryCode\AppConfig.h"/>\r
+    <ClInclude Include="..\..\JuceLibraryCode\JuceHeader.h"/>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\Flac Licence.txt"/>\r
+    <None Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\Ogg Vorbis Licence.txt"/>\r
+    <None Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\changes to libjpeg for JUCE.txt"/>\r
+    <None Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\libpng_readme.txt"/>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ResourceCompile Include=".\resources.rc"/>\r
+  </ItemGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>\r
+  <ImportGroup Label="ExtensionTargets"/>\r
+</Project>\r
diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj.filters b/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj.filters
new file mode 100644 (file)
index 0000000..f593065
--- /dev/null
@@ -0,0 +1,3848 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <Filter Include="AudioPerformanceTest\Source">\r
+      <UniqueIdentifier>{D163E404-6FE0-D71C-79C0-B2C2204C6939}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="AudioPerformanceTest">\r
+      <UniqueIdentifier>{EA26FD9B-DE67-F842-284B-F11CFEA08C63}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_basics\audio_play_head">\r
+      <UniqueIdentifier>{EB58F05A-A968-CEBE-40C4-107CDD8F240F}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_basics\buffers">\r
+      <UniqueIdentifier>{5FCF559E-451A-CB1E-B177-A5DC5A0005BB}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_basics\effects">\r
+      <UniqueIdentifier>{31054003-EA72-6A9D-D650-56451D9820E6}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_basics\midi">\r
+      <UniqueIdentifier>{D78296AF-218E-B17E-7F8B-9D148601188D}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_basics\mpe">\r
+      <UniqueIdentifier>{B96EBA26-E668-FFAF-FC53-1EC1337DAF5A}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_basics\native">\r
+      <UniqueIdentifier>{D8532E5E-469E-5042-EFC8-238241704735}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_basics\sources">\r
+      <UniqueIdentifier>{777B5D1D-9AF0-B22B-8894-034603EE97F5}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_basics\synthesisers">\r
+      <UniqueIdentifier>{8292766D-2459-2E7E-7615-17216318BA93}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_basics">\r
+      <UniqueIdentifier>{10472B2C-9888-D269-F351-0D0AC3BCD16C}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_devices\audio_io">\r
+      <UniqueIdentifier>{BF23FC10-1D57-2A9B-706F-6DD8A7B593D4}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_devices\midi_io">\r
+      <UniqueIdentifier>{092EFC17-7C95-7E04-0ACA-0D61A462EE81}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_devices\native">\r
+      <UniqueIdentifier>{0AFC1CE8-F6E6-9817-8C21-8432B2A375DA}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_devices\sources">\r
+      <UniqueIdentifier>{0D1AF264-3AC1-78A2-B2A4-AE6171F9194A}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_devices">\r
+      <UniqueIdentifier>{9A5DB854-CFFB-5F88-C566-0E10F994DDB3}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private">\r
+      <UniqueIdentifier>{38A5DDC7-416E-548F-39DA-887875FE6B20}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected">\r
+      <UniqueIdentifier>{980FE2DB-05D3-5FDA-79DA-067A56F5D19D}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include">\r
+      <UniqueIdentifier>{F336DC25-747A-0663-93D6-E3EB9AA0CBF8}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\codecs\flac\libFLAC">\r
+      <UniqueIdentifier>{7D78546A-80FC-4DCA-00B9-F191F0AB2179}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\codecs\flac">\r
+      <UniqueIdentifier>{9EB3EC7F-2AB7-DDAA-3C05-DF382B728D3F}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled">\r
+      <UniqueIdentifier>{02D37B85-7DE2-C8E7-A274-A5A0FBE99D69}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\floor">\r
+      <UniqueIdentifier>{DAF3BAAF-5207-4C34-61B9-A97DDC930D50}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\uncoupled">\r
+      <UniqueIdentifier>{C7885588-8436-4C21-DC1E-58879BF53BDC}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books">\r
+      <UniqueIdentifier>{E4ECEA39-0EFF-2443-91B3-1E5DA7AD5AE4}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes">\r
+      <UniqueIdentifier>{210B8D25-68E0-32C3-1449-6A40F109C5E9}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib">\r
+      <UniqueIdentifier>{378AD911-E8E4-D230-E76B-34542849509D}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2">\r
+      <UniqueIdentifier>{F6CED5B6-0A8C-56D2-C1AC-DED6BE774A13}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis">\r
+      <UniqueIdentifier>{E684D858-09E8-0251-8E86-5657129641E1}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\codecs">\r
+      <UniqueIdentifier>{1EF1BF17-F941-243A-04D1-EE617D140CBA}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\format">\r
+      <UniqueIdentifier>{344DB016-679C-FBD0-3EC6-4570C47522DE}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats\sampler">\r
+      <UniqueIdentifier>{3D9758A0-9359-1710-87C1-05D475C08B17}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_formats">\r
+      <UniqueIdentifier>{E824435F-FC7B-10BE-5D1A-5DACC51A8836}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_processors\format">\r
+      <UniqueIdentifier>{86737735-F6BA-F64A-5EC7-5C9F36755F79}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_processors\format_types">\r
+      <UniqueIdentifier>{6B7BE34D-1BC1-C7B9-111F-C55CA8250943}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_processors\processors">\r
+      <UniqueIdentifier>{9B6B6D54-D378-80C2-8CC9-D1D8FB44C2A8}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_processors\scanning">\r
+      <UniqueIdentifier>{D0584AC3-6837-14F6-90BF-5EA604D1F074}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_processors\utilities">\r
+      <UniqueIdentifier>{794B64EC-B809-32E3-AD00-4EE6A74802CA}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_processors">\r
+      <UniqueIdentifier>{67BE498C-9E1F-C73A-B99A-387C034CE680}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_utils\audio_cd">\r
+      <UniqueIdentifier>{1A9C8538-959B-25E3-473D-B462C9A9D458}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_utils\gui">\r
+      <UniqueIdentifier>{AA9F594C-DFAF-C0A7-0CCD-9F90E54D3A01}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_utils\native">\r
+      <UniqueIdentifier>{230BF784-34F4-3BE8-46D4-54E6B67E5E9E}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_utils\players">\r
+      <UniqueIdentifier>{39F680F3-5161-4D1C-EAD0-3911ED808874}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_audio_utils">\r
+      <UniqueIdentifier>{3197198B-A978-E330-C7FB-07E5CE8236C7}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\containers">\r
+      <UniqueIdentifier>{42F7BE9D-3C8A-AE26-289B-8F355C068036}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\files">\r
+      <UniqueIdentifier>{7868764A-6572-381A-906C-9C26792A4C29}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\javascript">\r
+      <UniqueIdentifier>{03678508-A517-48BB-FB4A-485628C34E08}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\logging">\r
+      <UniqueIdentifier>{07D27C1D-3227-F527-356C-17DA11551A99}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\maths">\r
+      <UniqueIdentifier>{6146D580-99D2-A6C8-5908-30DC355BB6BA}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\memory">\r
+      <UniqueIdentifier>{C67003E8-BEA8-2188-F4B3-A122F4B4FA3F}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\misc">\r
+      <UniqueIdentifier>{09B91E68-1FF4-C7ED-9055-D4D96E66A0BA}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\native">\r
+      <UniqueIdentifier>{4F24EEED-AA33-AC6C-9A39-72E71CF83EF0}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\network">\r
+      <UniqueIdentifier>{0F70B1A9-BB50-23F5-2AE7-F95E51A00389}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\streams">\r
+      <UniqueIdentifier>{D4C8DC40-2CD2-04B6-05D0-1E7A88841390}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\system">\r
+      <UniqueIdentifier>{58BED6AF-DB89-7560-B2B8-D937C1C0825A}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\text">\r
+      <UniqueIdentifier>{B958F86B-6926-8D9B-2FC6-8BFD4BDC72C9}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\threads">\r
+      <UniqueIdentifier>{DB624F7D-D513-25AC-C13C-B9062EB3BEEE}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\time">\r
+      <UniqueIdentifier>{89AA9B6C-4029-A34F-C1B0-3B5D8691F4D4}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\unit_tests">\r
+      <UniqueIdentifier>{1A7F541C-B032-9C66-C320-A13B2A8A9866}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\xml">\r
+      <UniqueIdentifier>{4BAB7C18-51AB-0D9D-83CD-9C37F28D2E38}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\zip\zlib">\r
+      <UniqueIdentifier>{5523922E-8B0C-A52B-477C-752C09F8197F}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core\zip">\r
+      <UniqueIdentifier>{857B6D8B-0ECB-FE9E-D1EB-D5E45E72F057}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_core">\r
+      <UniqueIdentifier>{BAA582FA-40B7-320E-EE7A-4C3892C7BE72}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_data_structures\app_properties">\r
+      <UniqueIdentifier>{632B4C79-AF7D-BFB5-D006-5AE67F607130}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_data_structures\undomanager">\r
+      <UniqueIdentifier>{B10E20C2-4583-2B79-60B7-FE4D4B044313}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_data_structures\values">\r
+      <UniqueIdentifier>{CFB54F15-8A8A-0505-9B7F-ECA41CEE38E8}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_data_structures">\r
+      <UniqueIdentifier>{911F0159-A7A8-4A43-3FD4-154F62F4A44B}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_events\broadcasters">\r
+      <UniqueIdentifier>{9D5816C2-E2B2-2E3F-B095-AC8BD1100D29}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_events\interprocess">\r
+      <UniqueIdentifier>{3FDCD000-763F-8477-9AF8-70ABA2E91E5E}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_events\messages">\r
+      <UniqueIdentifier>{0947506F-66FA-EF8D-8A4E-4D48BCDBB226}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_events\native">\r
+      <UniqueIdentifier>{E4B6AED3-F54C-3FF2-069F-640BACAE0E08}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_events\timers">\r
+      <UniqueIdentifier>{D5EADBCC-6A1C-C940-0206-26E49110AF08}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_events">\r
+      <UniqueIdentifier>{D27DC92D-5BEB-9294-DCD1-81D54E245AD5}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_graphics\colour">\r
+      <UniqueIdentifier>{BCD73D20-42B1-6CDB-DE66-B06236A60F47}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_graphics\contexts">\r
+      <UniqueIdentifier>{20DC13F6-2369-8841-9F0B-D13FA14EEE74}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_graphics\effects">\r
+      <UniqueIdentifier>{A302A8DB-120F-9EBB-A3D5-2C29963AA56B}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_graphics\fonts">\r
+      <UniqueIdentifier>{45489C2A-6E0E-CCDC-6638-0DACEEB63CCA}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_graphics\geometry">\r
+      <UniqueIdentifier>{F1B90726-DB55-0293-BFAF-C65C7DF5489C}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_graphics\image_formats\jpglib">\r
+      <UniqueIdentifier>{2C55FD42-0ACD-B0B8-7EAE-EB17F09BAEEC}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_graphics\image_formats\pnglib">\r
+      <UniqueIdentifier>{B68CD2B2-701F-9AB7-4638-2485D6E06BCF}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_graphics\image_formats">\r
+      <UniqueIdentifier>{B0B7C78E-729E-0FFA-D611-82AE8BC7FE2C}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_graphics\images">\r
+      <UniqueIdentifier>{0A4F7E12-220C-14EF-0026-9C0629FA9C17}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_graphics\native">\r
+      <UniqueIdentifier>{37F49E10-4E62-6D5C-FF70-722D0CA3D97E}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_graphics\placement">\r
+      <UniqueIdentifier>{160D9882-0F68-278D-C5F9-8960FD7421D2}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_graphics">\r
+      <UniqueIdentifier>{4CED05DA-E0A2-E548-F753-1F2EF299A8E3}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\application">\r
+      <UniqueIdentifier>{294E4CD5-B06F-97D1-04A3-51871CEA507C}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\buttons">\r
+      <UniqueIdentifier>{77228F15-BD91-06FF-2C7E-0377D25C2C94}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\commands">\r
+      <UniqueIdentifier>{5CB531E6-BF9A-2C50-056C-EE5A525D28D3}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\components">\r
+      <UniqueIdentifier>{E4EA47E5-B41C-2A19-1783-7E9104096ECD}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\drawables">\r
+      <UniqueIdentifier>{46A17AC9-0BFF-B5CE-26D6-B9D1992C88AC}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\filebrowser">\r
+      <UniqueIdentifier>{D90A8DF7-FBAB-D363-13C0-6707BB22B72B}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\keyboard">\r
+      <UniqueIdentifier>{8AE77C40-6839-EC37-4515-BD3CC269BCE4}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\layout">\r
+      <UniqueIdentifier>{0EAD99DB-011F-09E5-45A2-365F646EB004}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\lookandfeel">\r
+      <UniqueIdentifier>{F57590C6-3B90-1BE1-1006-488BA33E8BD9}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\menus">\r
+      <UniqueIdentifier>{7C319D73-0D93-5842-0874-398D2D3038D5}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\misc">\r
+      <UniqueIdentifier>{2CB4DB0C-DD3B-6195-D822-76EC7A5C88D2}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\mouse">\r
+      <UniqueIdentifier>{FE3CB19C-EF43-5CF5-DAF0-09D4E43D0AB9}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\native">\r
+      <UniqueIdentifier>{895C2D33-E08D-B1BA-BB36-FC4CA65090C8}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\positioning">\r
+      <UniqueIdentifier>{D64A57DB-A956-5519-1929-1D929B56E1B0}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\properties">\r
+      <UniqueIdentifier>{5A99CC24-AC45-7ED6-C11A-B8B86E76D884}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\widgets">\r
+      <UniqueIdentifier>{7A131EEC-25A7-22F6-2839-A2194DDF3007}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics\windows">\r
+      <UniqueIdentifier>{EA9DB76C-CEF7-6BFC-2070-28B7DF8E8063}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_basics">\r
+      <UniqueIdentifier>{3C206A40-6F1B-E683-ACF1-DEC3703D0140}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_extra\code_editor">\r
+      <UniqueIdentifier>{DF95D4BF-E18C-125A-5EBB-8993A06E232C}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_extra\documents">\r
+      <UniqueIdentifier>{118946F2-AC24-0F09-62D5-753DF87A60CD}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_extra\embedding">\r
+      <UniqueIdentifier>{07329F9B-7D3D-CEB3-C771-714842076140}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_extra\misc">\r
+      <UniqueIdentifier>{08BBBECB-B0D1-7611-37EC-F57E1D0CE2A2}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_extra\native">\r
+      <UniqueIdentifier>{268E8F2A-980C-BF2F-B161-AACABC9D91F3}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules\juce_gui_extra">\r
+      <UniqueIdentifier>{A4D76113-9EDC-DA60-D89B-5BACF7F1C426}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Modules">\r
+      <UniqueIdentifier>{FE955B6B-68AC-AA07-70D8-2413F6DB65C8}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="JUCE Library Code">\r
+      <UniqueIdentifier>{7ED5A90E-41AF-A1EF-659B-37CEEAB9BA61}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="..\..\Source\Main.cpp">\r
+      <Filter>AudioPerformanceTest\Source</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioChannelSet.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioDataConverters.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_FloatVectorOperations.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\effects\juce_CatmullRomInterpolator.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\effects\juce_IIRFilter.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\effects\juce_LagrangeInterpolator.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiBuffer.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiFile.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiKeyboardState.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessage.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessageSequence.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiRPN.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEInstrument.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEMessages.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPENote.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiser.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserBase.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_BufferingAudioSource.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ChannelRemappingAudioSource.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_IIRFilterAudioSource.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MemoryAudioSource.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MixerAudioSource.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ResamplingAudioSource.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ReverbAudioSource.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ToneGeneratorAudioSource.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\synthesisers\juce_Synthesiser.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics\synthesisers</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\juce_audio_basics.cpp">\r
+      <Filter>JUCE Modules\juce_audio_basics</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\juce_audio_basics.mm">\r
+      <Filter>JUCE Modules\juce_audio_basics</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioDeviceManager.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODevice.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODeviceType.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiMessageCollector.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\midi_io</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiOutput.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\midi_io</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_Audio.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_Midi.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_Oboe.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_OpenSL.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_ios_Audio.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_ALSA.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_Bela.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_JackAudio.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_Midi.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_mac_CoreAudio.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_mac_CoreMidi.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_ASIO.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_DirectSound.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_Midi.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_WASAPI.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioSourcePlayer.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\sources</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioTransportSource.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices\sources</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\juce_audio_devices.cpp">\r
+      <Filter>JUCE Modules\juce_audio_devices</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\juce_audio_devices.mm">\r
+      <Filter>JUCE Modules\juce_audio_devices</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\bitmath.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\bitreader.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\bitwriter.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\cpu.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\crc.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\fixed.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\float.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\format.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\lpc_flac.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\md5.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\memory.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\stream_decoder.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\stream_encoder.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\stream_encoder_framing.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\window_flac.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\analysis.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\bitrate.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\block.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\codebook.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\envelope.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\floor0.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\floor1.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\info.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lookup.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lpc.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lsp.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\mapping0.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\mdct.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\psy.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\registry.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\res0.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\sharedbook.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\smallft.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\synthesis.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\vorbisenc.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\vorbisfile.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\window.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\bitwise.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\framing.c">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_AiffAudioFormat.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_CoreAudioFormat.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_FlacAudioFormat.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_LAMEEncoderAudioFormat.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_MP3AudioFormat.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_OggVorbisAudioFormat.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WavAudioFormat.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatManager.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReader.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReaderSource.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatWriter.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioSubsectionReader.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_BufferingAudioFormatReader.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\sampler\juce_Sampler.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats\sampler</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\juce_audio_formats.cpp">\r
+      <Filter>JUCE Modules\juce_audio_formats</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\juce_audio_formats.mm">\r
+      <Filter>JUCE Modules\juce_audio_formats</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormat.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\format</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\format</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_AudioUnitPluginFormat.mm">\r
+      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LADSPAPluginFormat.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LegacyAudioParameter.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTPluginFormat.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioPluginInstance.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessor.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorEditor.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorGraph.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_PluginDescription.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_KnownPluginList.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginDirectoryScanner.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorParameters.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorValueTreeState.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors.cpp">\r
+      <Filter>JUCE Modules\juce_audio_processors</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors.mm">\r
+      <Filter>JUCE Modules\juce_audio_processors</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDReader.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils\audio_cd</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioAppComponent.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioDeviceSelectorComponent.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnail.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnailCache.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioVisualiserComponent.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_android_BluetoothMidiDevicePairingDialogue.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_ios_BluetoothMidiDevicePairingDialogue.mm">\r
+      <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_linux_AudioCDReader.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_linux_BluetoothMidiDevicePairingDialogue.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_mac_AudioCDBurner.mm">\r
+      <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_mac_AudioCDReader.mm">\r
+      <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_mac_BluetoothMidiDevicePairingDialogue.mm">\r
+      <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_win_BluetoothMidiDevicePairingDialogue.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_win32_AudioCDBurner.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_win32_AudioCDReader.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\players\juce_AudioProcessorPlayer.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils\players</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\players\juce_SoundPlayer.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils\players</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\juce_audio_utils.cpp">\r
+      <Filter>JUCE Modules\juce_audio_utils</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\juce_audio_utils.mm">\r
+      <Filter>JUCE Modules\juce_audio_utils</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_AbstractFifo.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_DynamicObject.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_HashMap_test.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.cpp">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_File.cpp">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileFilter.cpp">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileInputStream.cpp">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.cpp">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.cpp">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.cpp">\r
+      <Filter>JUCE Modules\juce_core\javascript</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\javascript\juce_JSON.cpp">\r
+      <Filter>JUCE Modules\juce_core\javascript</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\logging\juce_FileLogger.cpp">\r
+      <Filter>JUCE Modules\juce_core\logging</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\logging\juce_Logger.cpp">\r
+      <Filter>JUCE Modules\juce_core\logging</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_BigInteger.cpp">\r
+      <Filter>JUCE Modules\juce_core\maths</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Expression.cpp">\r
+      <Filter>JUCE Modules\juce_core\maths</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">\r
+      <Filter>JUCE Modules\juce_core\maths</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">\r
+      <Filter>JUCE Modules\juce_core\memory</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_Result.cpp">\r
+      <Filter>JUCE Modules\juce_core\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_RuntimePermissions.cpp">\r
+      <Filter>JUCE Modules\juce_core\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_StdFunctionCompat.cpp">\r
+      <Filter>JUCE Modules\juce_core\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_Uuid.cpp">\r
+      <Filter>JUCE Modules\juce_core\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Files.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Misc.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Network.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_RuntimePermissions.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_SystemStats.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Threads.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_curl_Network.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_CommonFile.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_Files.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_Network.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_SystemStats.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_Threads.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_mac_Files.mm">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_mac_Network.mm">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_mac_Strings.mm">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_mac_SystemStats.mm">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_mac_Threads.mm">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_posix_NamedPipe.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Files.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Network.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Registry.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_SystemStats.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Threads.cpp">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_IPAddress.cpp">\r
+      <Filter>JUCE Modules\juce_core\network</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_MACAddress.cpp">\r
+      <Filter>JUCE Modules\juce_core\network</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_NamedPipe.cpp">\r
+      <Filter>JUCE Modules\juce_core\network</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_Socket.cpp">\r
+      <Filter>JUCE Modules\juce_core\network</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_URL.cpp">\r
+      <Filter>JUCE Modules\juce_core\network</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_WebInputStream.cpp">\r
+      <Filter>JUCE Modules\juce_core\network</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_BufferedInputStream.cpp">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_FileInputSource.cpp">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_InputStream.cpp">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_MemoryInputStream.cpp">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_MemoryOutputStream.cpp">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_OutputStream.cpp">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_SubregionStream.cpp">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_URLInputSource.cpp">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\system\juce_SystemStats.cpp">\r
+      <Filter>JUCE Modules\juce_core\system</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_Base64.cpp">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_CharacterFunctions.cpp">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_Identifier.cpp">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_LocalisedStrings.cpp">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_String.cpp">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_StringArray.cpp">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_StringPairArray.cpp">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_StringPool.cpp">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_TextDiff.cpp">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_ChildProcess.cpp">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_HighResolutionTimer.cpp">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_ReadWriteLock.cpp">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_Thread.cpp">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_ThreadPool.cpp">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_TimeSliceThread.cpp">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\time\juce_PerformanceCounter.cpp">\r
+      <Filter>JUCE Modules\juce_core\time</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\time\juce_RelativeTime.cpp">\r
+      <Filter>JUCE Modules\juce_core\time</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\time\juce_Time.cpp">\r
+      <Filter>JUCE Modules\juce_core\time</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\unit_tests\juce_UnitTest.cpp">\r
+      <Filter>JUCE Modules\juce_core\unit_tests</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\xml\juce_XmlDocument.cpp">\r
+      <Filter>JUCE Modules\juce_core\xml</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\xml\juce_XmlElement.cpp">\r
+      <Filter>JUCE Modules\juce_core\xml</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\adler32.c">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\compress.c">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\crc32.c">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\deflate.c">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\infback.c">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\inffast.c">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\inflate.c">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\inftrees.c">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\trees.c">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\uncompr.c">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\zutil.c">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\juce_GZIPCompressorOutputStream.cpp">\r
+      <Filter>JUCE Modules\juce_core\zip</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\juce_GZIPDecompressorInputStream.cpp">\r
+      <Filter>JUCE Modules\juce_core\zip</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\zip\juce_ZipFile.cpp">\r
+      <Filter>JUCE Modules\juce_core\zip</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\juce_core.cpp">\r
+      <Filter>JUCE Modules\juce_core</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\juce_core.mm">\r
+      <Filter>JUCE Modules\juce_core</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_ApplicationProperties.cpp">\r
+      <Filter>JUCE Modules\juce_data_structures\app_properties</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_PropertiesFile.cpp">\r
+      <Filter>JUCE Modules\juce_data_structures\app_properties</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\undomanager\juce_UndoManager.cpp">\r
+      <Filter>JUCE Modules\juce_data_structures\undomanager</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_CachedValue.cpp">\r
+      <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_Value.cpp">\r
+      <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.cpp">\r
+      <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.cpp">\r
+      <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.cpp">\r
+      <Filter>JUCE Modules\juce_data_structures</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.mm">\r
+      <Filter>JUCE Modules\juce_data_structures</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\broadcasters\juce_ActionBroadcaster.cpp">\r
+      <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\broadcasters\juce_AsyncUpdater.cpp">\r
+      <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\broadcasters\juce_ChangeBroadcaster.cpp">\r
+      <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\interprocess\juce_ConnectedChildProcess.cpp">\r
+      <Filter>JUCE Modules\juce_events\interprocess</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnection.cpp">\r
+      <Filter>JUCE Modules\juce_events\interprocess</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnectionServer.cpp">\r
+      <Filter>JUCE Modules\juce_events\interprocess</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_ApplicationBase.cpp">\r
+      <Filter>JUCE Modules\juce_events\messages</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_DeletedAtShutdown.cpp">\r
+      <Filter>JUCE Modules\juce_events\messages</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_MessageListener.cpp">\r
+      <Filter>JUCE Modules\juce_events\messages</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_MessageManager.cpp">\r
+      <Filter>JUCE Modules\juce_events\messages</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_android_Messaging.cpp">\r
+      <Filter>JUCE Modules\juce_events\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_ios_MessageManager.mm">\r
+      <Filter>JUCE Modules\juce_events\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_linux_Messaging.cpp">\r
+      <Filter>JUCE Modules\juce_events\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_mac_MessageManager.mm">\r
+      <Filter>JUCE Modules\juce_events\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_win32_Messaging.cpp">\r
+      <Filter>JUCE Modules\juce_events\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_win32_WinRTWrapper.cpp">\r
+      <Filter>JUCE Modules\juce_events\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\timers\juce_MultiTimer.cpp">\r
+      <Filter>JUCE Modules\juce_events\timers</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\timers\juce_Timer.cpp">\r
+      <Filter>JUCE Modules\juce_events\timers</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\juce_events.cpp">\r
+      <Filter>JUCE Modules\juce_events</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_events\juce_events.mm">\r
+      <Filter>JUCE Modules\juce_events</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_Colour.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_ColourGradient.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_Colours.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_FillType.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\contexts\juce_GraphicsContext.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\contexts</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsPostScriptRenderer.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\contexts</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsSoftwareRenderer.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\contexts</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\effects\juce_DropShadowEffect.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\effects</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\effects\juce_GlowEffect.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\effects</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_AttributedString.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_CustomTypeface.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_Font.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_GlyphArrangement.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_TextLayout.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_Typeface.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_AffineTransform.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_EdgeTable.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_Path.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathIterator.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcapimin.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcapistd.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jccoefct.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jccolor.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcdctmgr.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jchuff.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcinit.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcmainct.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcmarker.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcmaster.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcomapi.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcparam.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcphuff.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcprepct.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcsample.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jctrans.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdapimin.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdapistd.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdatasrc.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdcoefct.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdcolor.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jddctmgr.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdhuff.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdinput.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmainct.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmarker.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmaster.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmerge.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdphuff.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdpostct.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdsample.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdtrans.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jerror.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jfdctflt.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jfdctfst.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jfdctint.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctflt.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctfst.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctint.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctred.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmemmgr.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmemnobs.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jquant1.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jquant2.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jutils.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\transupp.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\png.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngerror.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngget.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngmem.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngpread.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngread.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngrio.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngrtran.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngrutil.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngset.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngtrans.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwio.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwrite.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwtran.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwutil.c">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\juce_GIFLoader.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\juce_JPEGLoader.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\juce_PNGLoader.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_Image.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_ImageCache.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_ImageConvolutionKernel.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_ImageFileFormat.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_android_Fonts.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_android_GraphicsContext.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_android_IconHelpers.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_freetype_Fonts.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_linux_Fonts.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_linux_IconHelpers.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsContext.mm">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_mac_Fonts.mm">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_mac_IconHelpers.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_Direct2DGraphicsContext.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_DirectWriteTypeface.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_DirectWriteTypeLayout.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_Fonts.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_IconHelpers.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\placement\juce_RectanglePlacement.cpp">\r
+      <Filter>JUCE Modules\juce_graphics\placement</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\juce_graphics.cpp">\r
+      <Filter>JUCE Modules\juce_graphics</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_graphics\juce_graphics.mm">\r
+      <Filter>JUCE Modules\juce_graphics</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\application\juce_Application.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\application</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ArrowButton.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_Button.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_DrawableButton.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_HyperlinkButton.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ImageButton.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ShapeButton.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_TextButton.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToggleButton.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToolbarButton.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandInfo.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandManager.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandTarget.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_KeyPressMappingSet.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_Component.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_ComponentListener.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_Desktop.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_ModalComponentManager.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_Drawable.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableComposite.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableImage.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawablePath.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableRectangle.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableShape.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableText.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_SVGParser.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ContentSharer.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsDisplayComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsList.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileBrowserComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooser.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooserDialogBox.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileListComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FilenameComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileSearchPathListComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileTreeComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ImagePreviewComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_CaretComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyboardFocusTraverser.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyListener.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyPress.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_ModifierKeys.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentAnimator.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBoundsConstrainer.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBuilder.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentMovementWatcher.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ConcertinaPanel.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_FlexBox.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Grid.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GridItem.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GridUnitTests.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GroupComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_MultiDocumentPanel.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableBorderComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableCornerComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableEdgeComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ScrollBar.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_SidePanel.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutManager.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutResizerBar.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableObjectResizer.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedButtonBar.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Viewport.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V1.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V2.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V3.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V4.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_BurgerMenuComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarModel.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_PopupMenu.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_BubbleComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_ComponentDragger.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_DragAndDropContainer.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseCursor.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseEvent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInactivityDetector.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInputSource.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_ContentSharer.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_FileChooser.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_Windowing.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_common_MimeTypes.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_ios_ContentSharer.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_ios_FileChooser.mm">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_ios_UIViewComponentPeer.mm">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_ios_Windowing.mm">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_FileChooser.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11_Clipboard.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11_Windowing.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_mac_FileChooser.mm">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_mac_MainMenu.mm">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_mac_MouseCursor.mm">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_mac_NSViewComponentPeer.mm">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_mac_Windowing.mm">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_DragAndDrop.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_FileChooser.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_Windowing.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_MarkerList.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinate.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinatePositioner.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeParallelogram.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePoint.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePointPath.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeRectangle.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_BooleanPropertyComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ButtonPropertyComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ChoicePropertyComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_MultiChoicePropertyComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyPanel.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_SliderPropertyComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_TextPropertyComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ComboBox.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ImageComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Label.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ListBox.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ProgressBar.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Slider.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableHeaderComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableListBox.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TextEditor.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Toolbar.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemPalette.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TreeView.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_AlertWindow.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_CallOutBox.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ComponentPeer.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DialogWindow.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DocumentWindow.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ResizableWindow.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ThreadWithProgressWindow.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TooltipWindow.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TopLevelWindow.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\juce_gui_basics.cpp">\r
+      <Filter>JUCE Modules\juce_gui_basics</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\juce_gui_basics.mm">\r
+      <Filter>JUCE Modules\juce_gui_basics</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeDocument.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeEditorComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CPlusPlusCodeTokeniser.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_LuaCodeTokeniser.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_XMLCodeTokeniser.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\documents\juce_FileBasedDocument.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\documents</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_AnimatedAppComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_BubbleMessageComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_ColourSelector.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_KeyMappingEditorComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_LiveConstantEditor.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PreferencesPanel.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PushNotifications.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_RecentlyOpenedFilesList.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SplashScreen.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SystemTrayIconComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_android_PushNotifications.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_android_WebBrowserComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_AndroidViewComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_ios_PushNotifications.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_ios_UIViewComponent.mm">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_linux_X11_SystemTrayIcon.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_linux_X11_WebBrowserComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_linux_XEmbedComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_AppleRemote.mm">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_NSViewComponent.mm">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_PushNotifications.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_SystemTrayIcon.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_WebBrowserComponent.mm">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_win32_ActiveXComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_win32_SystemTrayIcon.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_win32_WebBrowserComponent.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\juce_gui_extra.cpp">\r
+      <Filter>JUCE Modules\juce_gui_extra</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_gui_extra\juce_gui_extra.mm">\r
+      <Filter>JUCE Modules\juce_gui_extra</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_basics.cpp">\r
+      <Filter>JUCE Library Code</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_devices.cpp">\r
+      <Filter>JUCE Library Code</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_formats.cpp">\r
+      <Filter>JUCE Library Code</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors.cpp">\r
+      <Filter>JUCE Library Code</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_utils.cpp">\r
+      <Filter>JUCE Library Code</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_core.cpp">\r
+      <Filter>JUCE Library Code</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_data_structures.cpp">\r
+      <Filter>JUCE Library Code</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_events.cpp">\r
+      <Filter>JUCE Library Code</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_graphics.cpp">\r
+      <Filter>JUCE Library Code</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_gui_basics.cpp">\r
+      <Filter>JUCE Library Code</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\JuceLibraryCode\include_juce_gui_extra.cpp">\r
+      <Filter>JUCE Library Code</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\..\Source\MainComponent.h">\r
+      <Filter>AudioPerformanceTest\Source</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\audio_play_head\juce_AudioPlayHead.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\audio_play_head</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioChannelSet.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioDataConverters.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioSampleBuffer.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_FloatVectorOperations.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_CatmullRomInterpolator.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_Decibels.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_IIRFilter.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_LagrangeInterpolator.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_LinearSmoothedValue.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_Reverb.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiBuffer.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiFile.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiKeyboardState.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessage.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessageSequence.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiRPN.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEInstrument.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEMessages.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPENote.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiser.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserBase.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\native\juce_mac_CoreAudioLayouts.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_AudioSource.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_BufferingAudioSource.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ChannelRemappingAudioSource.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_IIRFilterAudioSource.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MemoryAudioSource.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MixerAudioSource.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_PositionableAudioSource.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ResamplingAudioSource.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ReverbAudioSource.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ToneGeneratorAudioSource.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\synthesisers\juce_Synthesiser.h">\r
+      <Filter>JUCE Modules\juce_audio_basics\synthesisers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\juce_audio_basics.h">\r
+      <Filter>JUCE Modules\juce_audio_basics</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioDeviceManager.h">\r
+      <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODevice.h">\r
+      <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODeviceType.h">\r
+      <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_SystemAudioVolume.h">\r
+      <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiInput.h">\r
+      <Filter>JUCE Modules\juce_audio_devices\midi_io</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiMessageCollector.h">\r
+      <Filter>JUCE Modules\juce_audio_devices\midi_io</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiOutput.h">\r
+      <Filter>JUCE Modules\juce_audio_devices\midi_io</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\native\juce_ios_Audio.h">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\native\juce_MidiDataConcatenator.h">\r
+      <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioSourcePlayer.h">\r
+      <Filter>JUCE Modules\juce_audio_devices\sources</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioTransportSource.h">\r
+      <Filter>JUCE Modules\juce_audio_devices\sources</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_devices\juce_audio_devices.h">\r
+      <Filter>JUCE Modules\juce_audio_devices</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\all.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\bitmath.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\bitreader.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\bitwriter.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\cpu.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\crc.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\fixed.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\float.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\format.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\lpc.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\md5.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\memory.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\metadata.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\stream_encoder.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\stream_encoder_framing.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\window.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\protected\all.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\protected\stream_decoder.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\protected\stream_encoder.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\all.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\alloc.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\assert.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\callback.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\compat.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\endswap.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\export.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\format.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\metadata.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\ordinals.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\stream_decoder.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\stream_encoder.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\win_utf8_io.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled\res_books_51.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled\res_books_stereo.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\floor\floor_books.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\floor</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\uncoupled\res_books_uncoupled.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\uncoupled</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\floor_all.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_8.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_11.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_16.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_44.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_8.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_16.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_44.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_44p51.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_44u.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_8.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_11.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_16.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_22.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_32.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_44.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_44p51.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_44u.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_X.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\backends.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\bitrate.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\codebook.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\codec_internal.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\envelope.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\highlevel.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lookup.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lookup_data.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lpc.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lsp.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\masking.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\mdct.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\misc.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\os.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\psy.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\registry.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\scales.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\smallft.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\window.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\codec.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\config_types.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\ogg.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\os_types.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\vorbisenc.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\vorbisfile.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_AiffAudioFormat.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_CoreAudioFormat.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_FlacAudioFormat.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_LAMEEncoderAudioFormat.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_MP3AudioFormat.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_OggVorbisAudioFormat.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WavAudioFormat.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatManager.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReader.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReaderSource.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatWriter.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioSubsectionReader.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_BufferingAudioFormatReader.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_MemoryMappedAudioFormatReader.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\sampler\juce_Sampler.h">\r
+      <Filter>JUCE Modules\juce_audio_formats\sampler</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\juce_audio_formats.h">\r
+      <Filter>JUCE Modules\juce_audio_formats</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormat.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\format</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\format</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_AudioUnitPluginFormat.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LADSPAPluginFormat.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3Common.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3Headers.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTCommon.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTInterface.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTMidiEventList.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTPluginFormat.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioPluginInstance.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessor.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorEditor.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorGraph.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorListener.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorParameter.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_PluginDescription.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_KnownPluginList.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginDirectoryScanner.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterBool.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterChoice.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterFloat.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterInt.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorParameterWithID.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorValueTreeState.h">\r
+      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors.h">\r
+      <Filter>JUCE Modules\juce_audio_processors</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDBurner.h">\r
+      <Filter>JUCE Modules\juce_audio_utils\audio_cd</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDReader.h">\r
+      <Filter>JUCE Modules\juce_audio_utils\audio_cd</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioAppComponent.h">\r
+      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioDeviceSelectorComponent.h">\r
+      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnail.h">\r
+      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnailBase.h">\r
+      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnailCache.h">\r
+      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioVisualiserComponent.h">\r
+      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_BluetoothMidiDevicePairingDialogue.h">\r
+      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.h">\r
+      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\players\juce_AudioProcessorPlayer.h">\r
+      <Filter>JUCE Modules\juce_audio_utils\players</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\players\juce_SoundPlayer.h">\r
+      <Filter>JUCE Modules\juce_audio_utils\players</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\juce_audio_utils.h">\r
+      <Filter>JUCE Modules\juce_audio_utils</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_AbstractFifo.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Array.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ArrayAllocationBase.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_DynamicObject.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ElementComparator.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_HashMap.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_LinkedListPointer.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ListenerList.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_OwnedArray.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ReferenceCountedArray.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ScopedValueSetter.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SortedSet.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Variant.h">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.h">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_File.h">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileFilter.h">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileInputStream.h">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h">\r
+      <Filter>JUCE Modules\juce_core\files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h">\r
+      <Filter>JUCE Modules\juce_core\javascript</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_JSON.h">\r
+      <Filter>JUCE Modules\juce_core\javascript</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\logging\juce_FileLogger.h">\r
+      <Filter>JUCE Modules\juce_core\logging</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\logging\juce_Logger.h">\r
+      <Filter>JUCE Modules\juce_core\logging</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_BigInteger.h">\r
+      <Filter>JUCE Modules\juce_core\maths</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Expression.h">\r
+      <Filter>JUCE Modules\juce_core\maths</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_MathsFunctions.h">\r
+      <Filter>JUCE Modules\juce_core\maths</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_NormalisableRange.h">\r
+      <Filter>JUCE Modules\juce_core\maths</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h">\r
+      <Filter>JUCE Modules\juce_core\maths</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h">\r
+      <Filter>JUCE Modules\juce_core\maths</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">\r
+      <Filter>JUCE Modules\juce_core\maths</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">\r
+      <Filter>JUCE Modules\juce_core\memory</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h">\r
+      <Filter>JUCE Modules\juce_core\memory</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h">\r
+      <Filter>JUCE Modules\juce_core\memory</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_HeapBlock.h">\r
+      <Filter>JUCE Modules\juce_core\memory</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_LeakedObjectDetector.h">\r
+      <Filter>JUCE Modules\juce_core\memory</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Memory.h">\r
+      <Filter>JUCE Modules\juce_core\memory</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.h">\r
+      <Filter>JUCE Modules\juce_core\memory</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_OptionalScopedPointer.h">\r
+      <Filter>JUCE Modules\juce_core\memory</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ReferenceCountedObject.h">\r
+      <Filter>JUCE Modules\juce_core\memory</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ScopedPointer.h">\r
+      <Filter>JUCE Modules\juce_core\memory</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_SharedResourcePointer.h">\r
+      <Filter>JUCE Modules\juce_core\memory</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Singleton.h">\r
+      <Filter>JUCE Modules\juce_core\memory</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_WeakReference.h">\r
+      <Filter>JUCE Modules\juce_core\memory</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_Result.h">\r
+      <Filter>JUCE Modules\juce_core\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_RuntimePermissions.h">\r
+      <Filter>JUCE Modules\juce_core\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_StdFunctionCompat.h">\r
+      <Filter>JUCE Modules\juce_core\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_Uuid.h">\r
+      <Filter>JUCE Modules\juce_core\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_WindowsRegistry.h">\r
+      <Filter>JUCE Modules\juce_core\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_android_JNIHelpers.h">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_BasicNativeHeaders.h">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_win32_ComSmartPtr.h">\r
+      <Filter>JUCE Modules\juce_core\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_IPAddress.h">\r
+      <Filter>JUCE Modules\juce_core\network</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_MACAddress.h">\r
+      <Filter>JUCE Modules\juce_core\network</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_NamedPipe.h">\r
+      <Filter>JUCE Modules\juce_core\network</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_Socket.h">\r
+      <Filter>JUCE Modules\juce_core\network</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_URL.h">\r
+      <Filter>JUCE Modules\juce_core\network</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_WebInputStream.h">\r
+      <Filter>JUCE Modules\juce_core\network</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_BufferedInputStream.h">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_FileInputSource.h">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_InputSource.h">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_InputStream.h">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_MemoryInputStream.h">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_MemoryOutputStream.h">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_OutputStream.h">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_SubregionStream.h">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_URLInputSource.h">\r
+      <Filter>JUCE Modules\juce_core\streams</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_CompilerSupport.h">\r
+      <Filter>JUCE Modules\juce_core\system</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_PlatformDefs.h">\r
+      <Filter>JUCE Modules\juce_core\system</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_StandardHeader.h">\r
+      <Filter>JUCE Modules\juce_core\system</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_SystemStats.h">\r
+      <Filter>JUCE Modules\juce_core\system</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_TargetPlatform.h">\r
+      <Filter>JUCE Modules\juce_core\system</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_Base64.h">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharacterFunctions.h">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_ASCII.h">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_UTF8.h">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_UTF16.h">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_UTF32.h">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_Identifier.h">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_LocalisedStrings.h">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_NewLine.h">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_String.h">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringArray.h">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringPairArray.h">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringPool.h">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringRef.h">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_TextDiff.h">\r
+      <Filter>JUCE Modules\juce_core\text</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ChildProcess.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_CriticalSection.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_DynamicLibrary.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_HighResolutionTimer.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_InterProcessLock.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_Process.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ReadWriteLock.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ScopedLock.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ScopedReadLock.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ScopedWriteLock.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_SpinLock.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_Thread.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ThreadLocalValue.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ThreadPool.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_TimeSliceThread.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_WaitableEvent.h">\r
+      <Filter>JUCE Modules\juce_core\threads</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\time\juce_PerformanceCounter.h">\r
+      <Filter>JUCE Modules\juce_core\time</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\time\juce_RelativeTime.h">\r
+      <Filter>JUCE Modules\juce_core\time</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\time\juce_Time.h">\r
+      <Filter>JUCE Modules\juce_core\time</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\unit_tests\juce_UnitTest.h">\r
+      <Filter>JUCE Modules\juce_core\unit_tests</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\xml\juce_XmlDocument.h">\r
+      <Filter>JUCE Modules\juce_core\xml</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\xml\juce_XmlElement.h">\r
+      <Filter>JUCE Modules\juce_core\xml</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\crc32.h">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\deflate.h">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inffast.h">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inffixed.h">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inflate.h">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inftrees.h">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\trees.h">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zconf.h">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zconf.in.h">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zlib.h">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zutil.h">\r
+      <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\juce_GZIPCompressorOutputStream.h">\r
+      <Filter>JUCE Modules\juce_core\zip</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\juce_GZIPDecompressorInputStream.h">\r
+      <Filter>JUCE Modules\juce_core\zip</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\zip\juce_ZipFile.h">\r
+      <Filter>JUCE Modules\juce_core\zip</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_core\juce_core.h">\r
+      <Filter>JUCE Modules\juce_core</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_ApplicationProperties.h">\r
+      <Filter>JUCE Modules\juce_data_structures\app_properties</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_PropertiesFile.h">\r
+      <Filter>JUCE Modules\juce_data_structures\app_properties</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\undomanager\juce_UndoableAction.h">\r
+      <Filter>JUCE Modules\juce_data_structures\undomanager</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\undomanager\juce_UndoManager.h">\r
+      <Filter>JUCE Modules\juce_data_structures\undomanager</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_CachedValue.h">\r
+      <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_Value.h">\r
+      <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.h">\r
+      <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.h">\r
+      <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h">\r
+      <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h">\r
+      <Filter>JUCE Modules\juce_data_structures</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ActionBroadcaster.h">\r
+      <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ActionListener.h">\r
+      <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_AsyncUpdater.h">\r
+      <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ChangeBroadcaster.h">\r
+      <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ChangeListener.h">\r
+      <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\interprocess\juce_ConnectedChildProcess.h">\r
+      <Filter>JUCE Modules\juce_events\interprocess</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnection.h">\r
+      <Filter>JUCE Modules\juce_events\interprocess</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnectionServer.h">\r
+      <Filter>JUCE Modules\juce_events\interprocess</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_ApplicationBase.h">\r
+      <Filter>JUCE Modules\juce_events\messages</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_CallbackMessage.h">\r
+      <Filter>JUCE Modules\juce_events\messages</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_DeletedAtShutdown.h">\r
+      <Filter>JUCE Modules\juce_events\messages</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_Initialisation.h">\r
+      <Filter>JUCE Modules\juce_events\messages</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_Message.h">\r
+      <Filter>JUCE Modules\juce_events\messages</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_MessageListener.h">\r
+      <Filter>JUCE Modules\juce_events\messages</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_MessageManager.h">\r
+      <Filter>JUCE Modules\juce_events\messages</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_MountedVolumeListChangeDetector.h">\r
+      <Filter>JUCE Modules\juce_events\messages</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_NotificationType.h">\r
+      <Filter>JUCE Modules\juce_events\messages</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_linux_EventLoop.h">\r
+      <Filter>JUCE Modules\juce_events\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_osx_MessageQueue.h">\r
+      <Filter>JUCE Modules\juce_events\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_win32_HiddenMessageWindow.h">\r
+      <Filter>JUCE Modules\juce_events\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_win32_WinRTWrapper.h">\r
+      <Filter>JUCE Modules\juce_events\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\timers\juce_MultiTimer.h">\r
+      <Filter>JUCE Modules\juce_events\timers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\timers\juce_Timer.h">\r
+      <Filter>JUCE Modules\juce_events\timers</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_events\juce_events.h">\r
+      <Filter>JUCE Modules\juce_events</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_Colour.h">\r
+      <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_ColourGradient.h">\r
+      <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_Colours.h">\r
+      <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_FillType.h">\r
+      <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_PixelFormats.h">\r
+      <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_GraphicsContext.h">\r
+      <Filter>JUCE Modules\juce_graphics\contexts</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsContext.h">\r
+      <Filter>JUCE Modules\juce_graphics\contexts</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsPostScriptRenderer.h">\r
+      <Filter>JUCE Modules\juce_graphics\contexts</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsSoftwareRenderer.h">\r
+      <Filter>JUCE Modules\juce_graphics\contexts</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\effects\juce_DropShadowEffect.h">\r
+      <Filter>JUCE Modules\juce_graphics\effects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\effects\juce_GlowEffect.h">\r
+      <Filter>JUCE Modules\juce_graphics\effects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\effects\juce_ImageEffectFilter.h">\r
+      <Filter>JUCE Modules\juce_graphics\effects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_AttributedString.h">\r
+      <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_CustomTypeface.h">\r
+      <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_Font.h">\r
+      <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_GlyphArrangement.h">\r
+      <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_TextLayout.h">\r
+      <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_Typeface.h">\r
+      <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_AffineTransform.h">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_BorderSize.h">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_EdgeTable.h">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Line.h">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Parallelogram.h">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Path.h">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathIterator.h">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.h">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Point.h">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle.h">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.h">\r
+      <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\cderror.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jchuff.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jconfig.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdct.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdhuff.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jerror.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jinclude.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmemsys.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmorecfg.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jpegint.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jpeglib.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jversion.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\transupp.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\png.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngconf.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pnginfo.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngpriv.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngstruct.h">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_Image.h">\r
+      <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageCache.h">\r
+      <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageConvolutionKernel.h">\r
+      <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageFileFormat.h">\r
+      <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsContext.h">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsHelpers.h">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_RenderingHelpers.h">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_win32_Direct2DGraphicsContext.h">\r
+      <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\placement\juce_Justification.h">\r
+      <Filter>JUCE Modules\juce_graphics\placement</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\placement\juce_RectanglePlacement.h">\r
+      <Filter>JUCE Modules\juce_graphics\placement</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_graphics\juce_graphics.h">\r
+      <Filter>JUCE Modules\juce_graphics</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\application\juce_Application.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\application</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ArrowButton.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_Button.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_DrawableButton.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_HyperlinkButton.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ImageButton.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ShapeButton.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_TextButton.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToggleButton.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToolbarButton.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandID.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandInfo.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandManager.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandTarget.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_KeyPressMappingSet.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_CachedComponentImage.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_Component.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_ComponentListener.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_Desktop.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_ModalComponentManager.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_Drawable.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableComposite.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableImage.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawablePath.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableRectangle.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableShape.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableText.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ContentSharer.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsDisplayComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsList.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileBrowserComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileBrowserListener.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooser.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooserDialogBox.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileListComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FilenameComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FilePreviewComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileSearchPathListComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileTreeComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ImagePreviewComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_CaretComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyboardFocusTraverser.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyListener.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyPress.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_ModifierKeys.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_SystemClipboard.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_TextEditorKeyMapper.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_TextInputTarget.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_AnimatedPosition.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_AnimatedPositionBehaviours.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentAnimator.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBoundsConstrainer.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBuilder.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentMovementWatcher.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ConcertinaPanel.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_FlexBox.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_FlexItem.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Grid.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GridItem.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GroupComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_MultiDocumentPanel.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableBorderComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableCornerComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableEdgeComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ScrollBar.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_SidePanel.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutManager.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutResizerBar.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableObjectResizer.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedButtonBar.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Viewport.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V1.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V2.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V3.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V4.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_BurgerMenuComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarModel.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_PopupMenu.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_BubbleComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_ComponentDragger.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_DragAndDropContainer.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_DragAndDropTarget.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_FileDragAndDropTarget.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_LassoComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseCursor.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseEvent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInactivityDetector.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInputSource.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_SelectedItemSet.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_TextDragAndDropTarget.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_TooltipClient.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_MultiTouchMapper.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_MarkerList.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinate.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinatePositioner.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeParallelogram.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePoint.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePointPath.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeRectangle.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_BooleanPropertyComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ButtonPropertyComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ChoicePropertyComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_MultiChoicePropertyComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyPanel.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_SliderPropertyComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_TextPropertyComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ComboBox.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ImageComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Label.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ListBox.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ProgressBar.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Slider.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableHeaderComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableListBox.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TextEditor.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Toolbar.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemFactory.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemPalette.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TreeView.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_AlertWindow.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_CallOutBox.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ComponentPeer.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DialogWindow.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DocumentWindow.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_NativeMessageBox.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ResizableWindow.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ThreadWithProgressWindow.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TooltipWindow.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TopLevelWindow.h">\r
+      <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\juce_gui_basics.h">\r
+      <Filter>JUCE Modules\juce_gui_basics</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeDocument.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeEditorComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeTokeniser.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CPlusPlusCodeTokeniser.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CPlusPlusCodeTokeniserFunctions.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_LuaCodeTokeniser.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_XMLCodeTokeniser.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\documents\juce_FileBasedDocument.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\documents</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_ActiveXControlComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_AndroidViewComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_NSViewComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_UIViewComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_XEmbedComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_AnimatedAppComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_AppleRemote.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_BubbleMessageComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_ColourSelector.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_KeyMappingEditorComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_LiveConstantEditor.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PreferencesPanel.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PushNotifications.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_RecentlyOpenedFilesList.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SplashScreen.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SystemTrayIconComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_WebBrowserComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_CarbonViewWrapperComponent.h">\r
+      <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\juce_gui_extra.h">\r
+      <Filter>JUCE Modules\juce_gui_extra</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\JuceLibraryCode\AppConfig.h">\r
+      <Filter>JUCE Library Code</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\JuceLibraryCode\JuceHeader.h">\r
+      <Filter>JUCE Library Code</Filter>\r
+    </ClInclude>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\Flac Licence.txt">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+    </None>\r
+    <None Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\Ogg Vorbis Licence.txt">\r
+      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+    </None>\r
+    <None Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\changes to libjpeg for JUCE.txt">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+    </None>\r
+    <None Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\libpng_readme.txt">\r
+      <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+    </None>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ResourceCompile Include=".\resources.rc">\r
+      <Filter>JUCE Library Code</Filter>\r
+    </ResourceCompile>\r
+  </ItemGroup>\r
+</Project>\r
diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2017/resources.rc b/extras/AudioPerformanceTest/Builds/VisualStudio2017/resources.rc
new file mode 100644 (file)
index 0000000..2dec142
--- /dev/null
@@ -0,0 +1,31 @@
+#ifdef JUCE_USER_DEFINED_RC_FILE\r
+ #include JUCE_USER_DEFINED_RC_FILE\r
+#else\r
+\r
+#undef  WIN32_LEAN_AND_MEAN\r
+#define WIN32_LEAN_AND_MEAN\r
+#include <windows.h>\r
+\r
+VS_VERSION_INFO VERSIONINFO\r
+FILEVERSION  1,0,0,0\r
+BEGIN\r
+  BLOCK "StringFileInfo"\r
+  BEGIN\r
+    BLOCK "040904E4"\r
+    BEGIN\r
+      VALUE "CompanyName",  "ROLI Ltd.\0"\r
+      VALUE "LegalCopyright",  "ROLI Ltd.\0"\r
+      VALUE "FileDescription",  "AudioPerformanceTest\0"\r
+      VALUE "FileVersion",  "1.0.0\0"\r
+      VALUE "ProductName",  "AudioPerformanceTest\0"\r
+      VALUE "ProductVersion",  "1.0.0\0"\r
+    END\r
+  END\r
+\r
+  BLOCK "VarFileInfo"\r
+  BEGIN\r
+    VALUE "Translation", 0x409, 1252\r
+  END\r
+END\r
+\r
+#endif\r
index 933386d77683d23eb633394e9064218e767af9bb..6e39bf51d43df3cb8230f58c83820dea8a8906e7 100644 (file)
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
                                ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
                                ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                        C86DD529EC94922C2AB61742,
                                        6C2BE2DE2ECC96615ED827AB,
                                        409D569C572B6EF7F4F1702D, ); buildRules = ( ); dependencies = (  ); name = "AudioPerformanceTest - App"; productName = AudioPerformanceTest; productReference = 614F2084407B35D62101F69F; productType = "com.apple.product-type.application"; };
-               9CE2A44801B5B4BE7A9667DA = {isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; attributes = { LastUpgradeCheck = 0830; 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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3BA1BA0CAFE969E99950C06B; projectDirPath = ""; projectRoot = ""; targets = (E9FD2656EC625C9C8DE30219); };
+               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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3BA1BA0CAFE969E99950C06B; projectDirPath = ""; projectRoot = ""; targets = (E9FD2656EC625C9C8DE30219); };
        };
        rootObject = 9CE2A44801B5B4BE7A9667DA;
 }
index 109ec4a7722591d5b77d967201ef56379c87d354..29b0ea00b56dcd17472c4d4ee0651056acc651b7 100644 (file)
  //#define JUCE_PLUGINHOST_AU 0\r
 #endif\r
 \r
+#ifndef    JUCE_PLUGINHOST_LADSPA\r
+ //#define JUCE_PLUGINHOST_LADSPA 0\r
+#endif\r
+\r
 //==============================================================================\r
 // juce_audio_utils flags:\r
 \r
index c7a96755b59113afcd085c6a8e3597e37cf63e7b..bfce625b56007a2d360ce59f5a822c6c33795963 100644 (file)
@@ -43,7 +43,7 @@ public:
     //==============================================================================\r
     void initialise (const String&) override\r
     {\r
-        mainWindow = new MainWindow (getApplicationName());\r
+        mainWindow.reset (new MainWindow (getApplicationName()));\r
     }\r
 \r
     void shutdown() override\r
@@ -88,7 +88,7 @@ public:
     };\r
 \r
 private:\r
-    ScopedPointer<MainWindow> mainWindow;\r
+    std::unique_ptr<MainWindow> mainWindow;\r
 };\r
 \r
 //==============================================================================\r
index 19fbee32daeec370da7e3d0e699dbdc75ad1e083..074a4754b833d9ab7645affba48ba3d3ec0762b2 100644 (file)
   <JUCEOPTIONS JUCE_WASAPI="1" JUCE_DIRECTSOUND="1" JUCE_ALSA="1" JUCE_QUICKTIME="disabled"\r
                JUCE_USE_FLAC="0" JUCE_USE_OGGVORBIS="0" JUCE_USE_CDBURNER="0"\r
                JUCE_USE_CDREADER="0" JUCE_USE_CAMERA="0" JUCE_PLUGINHOST_VST="1"\r
-               JUCE_PLUGINHOST_AU="1" JUCE_WEB_BROWSER="0" JUCE_PLUGINHOST_VST3="1"/>\r
+               JUCE_PLUGINHOST_AU="1" JUCE_WEB_BROWSER="0" JUCE_PLUGINHOST_VST3="1"\r
+               JUCE_PLUGINHOST_LADSPA="1"/>\r
   <MODULES>\r
     <MODULE id="juce_audio_basics" showAllCode="1"/>\r
     <MODULE id="juce_audio_devices" showAllCode="1"/>\r
     <MODULE id="juce_opengl" showAllCode="1"/>\r
     <MODULE id="juce_video" showAllCode="1"/>\r
   </MODULES>\r
+  <LIVE_SETTINGS>\r
+    <OSX/>\r
+  </LIVE_SETTINGS>\r
 </JUCERPROJECT>\r
index 11a1f09e18f633a11c0834f0b6857371d04a5925..3b05e76a115b270b9917d782eac024154f18e51e 100644 (file)
@@ -415,6 +415,7 @@ add_library( ${BINARY_NAME}
     "../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h"\r
     "../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h"\r
     "../../../../../modules/juce_core/containers/juce_SortedSet.h"\r
+    "../../../../../modules/juce_core/containers/juce_SparseSet.cpp"\r
     "../../../../../modules/juce_core/containers/juce_SparseSet.h"\r
     "../../../../../modules/juce_core/containers/juce_Variant.cpp"\r
     "../../../../../modules/juce_core/containers/juce_Variant.h"\r
@@ -1250,6 +1251,7 @@ add_library( ${BINARY_NAME}
     "../../../../../modules/juce_video/capture/juce_CameraDevice.cpp"\r
     "../../../../../modules/juce_video/capture/juce_CameraDevice.h"\r
     "../../../../../modules/juce_video/native/juce_android_CameraDevice.h"\r
+    "../../../../../modules/juce_video/native/juce_ios_CameraDevice.h"\r
     "../../../../../modules/juce_video/native/juce_mac_CameraDevice.h"\r
     "../../../../../modules/juce_video/native/juce_mac_Video.h"\r
     "../../../../../modules/juce_video/native/juce_win32_CameraDevice.h"\r
@@ -1653,6 +1655,7 @@ set_source_files_properties("../../../../../modules/juce_core/containers/juce_Pr
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_SortedSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
+set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
@@ -2488,6 +2491,7 @@ set_source_files_properties("../../../../../modules/juce_opengl/juce_opengl.h" P
 set_source_files_properties("../../../../../modules/juce_video/capture/juce_CameraDevice.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_video/capture/juce_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_video/native/juce_android_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
+set_source_files_properties("../../../../../modules/juce_video/native/juce_ios_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_video/native/juce_mac_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_video/native/juce_mac_Video.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_video/native/juce_win32_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
index 11134d24e2d7f239386a1762c37d89f61eb22af2..2b62f5a596df7519dac15fde7bb6450722a25c54 100644 (file)
@@ -30,6 +30,7 @@ import android.content.Intent;
 import android.content.res.Configuration;\r
 import android.content.pm.PackageInfo;\r
 import android.content.pm.PackageManager;\r
+import android.hardware.camera2.*;\r
 import android.net.http.SslError;\r
 import android.net.Uri;\r
 import android.os.Bundle;\r
@@ -119,6 +120,7 @@ public class AudioPluginHost   extends Activity
     private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2;\r
     private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3;\r
     private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4;\r
+    private static final int JUCE_PERMISSIONS_CAMERA = 5;\r
 \r
     private static String getAndroidPermissionName (int permissionID)\r
     {\r
@@ -129,6 +131,7 @@ public class AudioPluginHost   extends Activity
                                                           // use string value as this is not defined in SDKs < 16\r
             case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE:  return "android.permission.READ_EXTERNAL_STORAGE";\r
             case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE;\r
+            case JUCE_PERMISSIONS_CAMERA:                 return Manifest.permission.CAMERA;\r
         }\r
 \r
         // unknown permission ID!\r
@@ -1205,6 +1208,7 @@ public class AudioPluginHost   extends Activity
         setVolumeControlStream (AudioManager.STREAM_MUSIC);\r
 \r
         permissionCallbackPtrMap = new HashMap<Integer, Long>();\r
+        appPausedResumedListeners = new HashMap<Long, AppPausedResumedListener>();\r
     }\r
 \r
     @Override\r
@@ -1221,6 +1225,11 @@ public class AudioPluginHost   extends Activity
     {\r
         suspendApp();\r
 \r
+        Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+        for (Long k : keys)\r
+            appPausedResumedListeners.get (k).appPaused();\r
+\r
         try\r
         {\r
             Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down\r
@@ -1236,12 +1245,10 @@ public class AudioPluginHost   extends Activity
         super.onResume();\r
         resumeApp();\r
 \r
-        // Ensure that navigation/status bar visibility is correctly restored.\r
-        for (int i = 0; i < viewHolder.getChildCount(); ++i)\r
-        {\r
-            if (viewHolder.getChildAt (i) instanceof ComponentPeerView)\r
-                ((ComponentPeerView) viewHolder.getChildAt (i)).appResumed();\r
-        }\r
+        Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+        for (Long k : keys)\r
+            appPausedResumedListeners.get (k).appResumed();\r
     }\r
 \r
     @Override\r
@@ -1368,11 +1375,14 @@ public class AudioPluginHost   extends Activity
     {\r
         ComponentPeerView v = new ComponentPeerView (this, opaque, host);\r
         viewHolder.addView (v);\r
+        addAppPausedResumedListener (v, host);\r
         return v;\r
     }\r
 \r
     public final void deleteView (ComponentPeerView view)\r
     {\r
+        removeAppPausedResumedListener (view, view.host);\r
+\r
         view.host = 0;\r
 \r
         ViewGroup group = (ViewGroup) (view.getParent());\r
@@ -1590,9 +1600,28 @@ public class AudioPluginHost   extends Activity
 \r
     public native void alertDismissed (long callback, int id);\r
 \r
+    //==============================================================================\r
+    public interface AppPausedResumedListener\r
+    {\r
+        void appPaused();\r
+        void appResumed();\r
+    }\r
+\r
+    private Map<Long, AppPausedResumedListener> appPausedResumedListeners;\r
+\r
+    public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+    {\r
+        appPausedResumedListeners.put (new Long (listenerHost), l);\r
+    }\r
+\r
+    public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+    {\r
+        appPausedResumedListeners.remove (new Long (listenerHost));\r
+    }\r
+\r
     //==============================================================================\r
     public final class ComponentPeerView extends ViewGroup\r
-                                         implements View.OnFocusChangeListener\r
+                                         implements View.OnFocusChangeListener, AppPausedResumedListener\r
     {\r
         public ComponentPeerView (Context context, boolean opaque_, long host)\r
         {\r
@@ -1940,13 +1969,25 @@ public class AudioPluginHost   extends Activity
         }\r
 \r
         //==============================================================================\r
+        private native void handleAppPaused (long host);\r
         private native void handleAppResumed (long host);\r
 \r
+        @Override\r
+        public void appPaused()\r
+        {\r
+            if (host == 0)\r
+                return;\r
+\r
+            handleAppPaused (host);\r
+        }\r
+\r
+        @Override\r
         public void appResumed()\r
         {\r
             if (host == 0)\r
                 return;\r
 \r
+            // Ensure that navigation/status bar visibility is correctly restored.\r
             handleAppResumed (host);\r
         }\r
     }\r
@@ -2616,6 +2657,175 @@ public class AudioPluginHost   extends Activity
         private final Object hostLock = new Object();\r
     }\r
 \r
+\r
+    //==============================================================================\r
+    public class CameraDeviceStateCallback  extends CameraDevice.StateCallback\r
+    {\r
+        private native void cameraDeviceStateClosed       (long host, CameraDevice camera);\r
+        private native void cameraDeviceStateDisconnected (long host, CameraDevice camera);\r
+        private native void cameraDeviceStateError        (long host, CameraDevice camera, int error);\r
+        private native void cameraDeviceStateOpened       (long host, CameraDevice camera);\r
+\r
+        CameraDeviceStateCallback (long hostToUse)\r
+        {\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onClosed (CameraDevice camera)\r
+        {\r
+            cameraDeviceStateClosed (host, camera);\r
+        }\r
+\r
+        @Override\r
+        public void onDisconnected (CameraDevice camera)\r
+        {\r
+            cameraDeviceStateDisconnected (host, camera);\r
+        }\r
+\r
+        @Override\r
+        public void onError (CameraDevice camera, int error)\r
+        {\r
+            cameraDeviceStateError (host, camera, error);\r
+        }\r
+\r
+        @Override\r
+        public void onOpened (CameraDevice camera)\r
+        {\r
+            cameraDeviceStateOpened (host, camera);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+    //==============================================================================\r
+    public class CameraCaptureSessionStateCallback  extends CameraCaptureSession.StateCallback\r
+    {\r
+        private native void cameraCaptureSessionActive          (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionClosed          (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionConfigured      (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionReady           (long host, CameraCaptureSession session);\r
+\r
+        CameraCaptureSessionStateCallback (long hostToUse)\r
+        {\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onActive (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionActive (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onClosed (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionClosed (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onConfigureFailed (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionConfigureFailed (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onConfigured (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionConfigured (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onReady (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionReady (host, session);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+    //==============================================================================\r
+    public class CameraCaptureSessionCaptureCallback    extends CameraCaptureSession.CaptureCallback\r
+    {\r
+        private native void cameraCaptureSessionCaptureCompleted  (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, TotalCaptureResult result);\r
+        private native void cameraCaptureSessionCaptureFailed     (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureFailure failure);\r
+        private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureResult partialResult);\r
+        private native void cameraCaptureSessionCaptureStarted    (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, long timestamp, long frameNumber);\r
+        private native void cameraCaptureSessionCaptureSequenceAborted   (long host, boolean isPreview, CameraCaptureSession session, int sequenceId);\r
+        private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber);\r
+\r
+        CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview)\r
+        {\r
+            host = hostToUse;\r
+            preview = shouldBePreview;\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request,\r
+                                        TotalCaptureResult result)\r
+        {\r
+            cameraCaptureSessionCaptureCompleted (host, preview, session, request, result);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure)\r
+        {\r
+            cameraCaptureSessionCaptureFailed (host, preview, session, request, failure);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request,\r
+                                         CaptureResult partialResult)\r
+        {\r
+            cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId)\r
+        {\r
+            cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber)\r
+        {\r
+            cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp,\r
+                                      long frameNumber)\r
+        {\r
+            cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber);\r
+        }\r
+\r
+        private long host;\r
+        private boolean preview;\r
+    }\r
+\r
+    //==============================================================================\r
+    public class JuceOrientationEventListener    extends OrientationEventListener\r
+    {\r
+        private native void deviceOrientationChanged (long host, int orientation);\r
+\r
+        public JuceOrientationEventListener (long hostToUse, Context context, int rate)\r
+        {\r
+            super (context, rate);\r
+\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onOrientationChanged (int orientation)\r
+        {\r
+            deviceOrientationChanged (host, orientation);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+\r
     //==============================================================================\r
     public static final String getLocaleValue (boolean isRegion)\r
     {\r
index 8fe60e822099d9f93ecc2b9e0ac17628ba9f5542..58f02ecb50eeb6f7464fe05bd8a61ac12c3ad03f 100644 (file)
                                        D85C0D11EE4F6C73B9EB5BCD, ); name = Source; sourceTree = "<group>"; };
                C8B793AC1BEFBE7A99BE8352 = {isa = XCBuildConfiguration; buildSettings = {
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                USE_HEADERMAP = NO; }; name = Debug; };
                49453CC5AD9F08D2738464AC = {isa = XCBuildConfiguration; buildSettings = {
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                        2429BB4D705CC57F49418CFB,
                                        E8E94B3C187DA578BFCBDA98,
                                        C515A1FE1A53D3968C22FAEF, ); buildRules = ( ); dependencies = (  ); name = "AudioPluginHost - App"; productName = AudioPluginHost; productReference = 8D8BBC353637DA442C5575DA; productType = "com.apple.product-type.application"; };
-               ADE6E539DB98A302483A82D0 = {isa = PBXProject; buildConfigurationList = 493C2C5E457692E5149C5525; attributes = { LastUpgradeCheck = 0830; 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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 65BEFC705A89E5C8A9E35C97; projectDirPath = ""; projectRoot = ""; targets = (DE12B7643D374BFF7E4FEB1C); };
+               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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 65BEFC705A89E5C8A9E35C97; projectDirPath = ""; projectRoot = ""; targets = (DE12B7643D374BFF7E4FEB1C); };
        };
        rootObject = ADE6E539DB98A302483A82D0;
 }
index dcc1d5dd8ade4fd1dd47b5c153bdf7db2033c64b..5a1405834680febdb0f7cb93d72c48b47fbfb39c 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_opengl\juce_opengl.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
index 7415956798b038392d7c2ea73b9bfe668a1abd4c..d73bb1e3348b88a7af0bef9611a73759d061eeda 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+      <Filter>JUCE Modules\juce_video\native</Filter>\r
+    </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
index a27197c849f83b13bba1250435e47c055a324a5f..03cea25fd4d775d50cd067dcfe66422579584d74 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_opengl\juce_opengl.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
index 87f7846b1ae5a96aed03606f9bdfd2756990cf29..3425cca7a58e50977acc7ce00a31f608eb4c5666 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+      <Filter>JUCE Modules\juce_video\native</Filter>\r
+    </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
index 989607160f59eaa28238b1c9368bb212e0fcca34..5d76b0597bd299bf27bca00695a38a0b623f93b5 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_opengl\juce_opengl.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
index 87a6356e2ba153775e17054ef06450d10d265016..33384a787edb862ae0bb15cb3c253e3b9be55e90 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+      <Filter>JUCE Modules\juce_video\native</Filter>\r
+    </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
index ddd00def8ca057b07468ce064dbc96ab9681a2b8..a3452b3e1aa8aca2730d3868554ffb58974e13a3 100644 (file)
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
                                ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
                                ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                        2429BB4D705CC57F49418CFB,
                                        E8E94B3C187DA578BFCBDA98,
                                        C515A1FE1A53D3968C22FAEF, ); buildRules = ( ); dependencies = (  ); name = "AudioPluginHost - App"; productName = AudioPluginHost; productReference = 8D8BBC353637DA442C5575DA; productType = "com.apple.product-type.application"; };
-               ADE6E539DB98A302483A82D0 = {isa = PBXProject; buildConfigurationList = 493C2C5E457692E5149C5525; attributes = { LastUpgradeCheck = 0830; 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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 65BEFC705A89E5C8A9E35C97; projectDirPath = ""; projectRoot = ""; targets = (DE12B7643D374BFF7E4FEB1C); };
+               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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 65BEFC705A89E5C8A9E35C97; projectDirPath = ""; projectRoot = ""; targets = (DE12B7643D374BFF7E4FEB1C); };
        };
        rootObject = ADE6E539DB98A302483A82D0;
 }
index a319a11eb7f4edba5409b4b8c8e5029c24b3dfe0..6b8cbf5efae44e25bfd5a94702964078932b2952 100644 (file)
  #define   JUCE_PLUGINHOST_AU 1\r
 #endif\r
 \r
+#ifndef    JUCE_PLUGINHOST_LADSPA\r
+ #define   JUCE_PLUGINHOST_LADSPA 1\r
+#endif\r
+\r
 //==============================================================================\r
 // juce_audio_utils flags:\r
 \r
index 8d0192f8daaa60ac1163b279787ad15fa533f354..07ae322ad172bb9a2c0eded8f1e6aa6a2dc2323f 100644 (file)
@@ -657,7 +657,7 @@ static const unsigned char temp_binary_data_0[] =
 const char* JUCEAppIcon_png = (const char*) temp_binary_data_0;\r
 \r
 \r
-const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) noexcept\r
+const char* getNamedResource (const char* resourceNameUTF8, int& numBytes)\r
 {\r
     unsigned int hash = 0;\r
     if (resourceNameUTF8 != 0)\r
@@ -684,7 +684,7 @@ const char* originalFilenames[] =
     "JUCEAppIcon.png"\r
 };\r
 \r
-const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept\r
+const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8)\r
 {\r
     for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i)\r
     {\r
index 60258e0ad04d5469fcbce2acb04c105b84c444bc..10d01a63a12dc78dba9988c581f249ae858e4043 100644 (file)
@@ -22,9 +22,9 @@ namespace BinaryData
 \r
     // If you provide the name of one of the binary resource variables above, this function will\r
     // return the corresponding data and its size (or a null pointer if the name isn't found).\r
-    const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) noexcept;\r
+    const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes);\r
 \r
     // If you provide the name of one of the binary resource variables above, this function will\r
     // return the corresponding original, non-mangled filename (or a null pointer if the name isn't found).\r
-    const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept;\r
+    const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8);\r
 }\r
index c894505d22ff96e6fb82ad170337d4f85463111a..47a3223712e3f6a563727cfb5f7aed1d10507962 100644 (file)
@@ -212,7 +212,7 @@ void FilterGraph::newDocument()
 Result FilterGraph::loadDocument (const File& file)\r
 {\r
     XmlDocument doc (file);\r
-    ScopedPointer<XmlElement> xml (doc.getDocumentElement());\r
+    std::unique_ptr<XmlElement> xml (doc.getDocumentElement());\r
 \r
     if (xml == nullptr || ! xml->hasTagName ("FILTERGRAPH"))\r
         return Result::fail ("Not a valid filter graph file");\r
@@ -223,7 +223,7 @@ Result FilterGraph::loadDocument (const File& file)
 \r
 Result FilterGraph::saveDocument (const File& file)\r
 {\r
-    ScopedPointer<XmlElement> xml (createXml());\r
+    std::unique_ptr<XmlElement> xml (createXml());\r
 \r
     if (! xml->writeToFile (file, {}))\r
         return Result::fail ("Couldn't write to the file");\r
index 3261ba9ede777b98ecba78c6abc449acda774175..db17db82187a45426caff7a6626aff00b41c1fd7 100644 (file)
@@ -448,10 +448,16 @@ FilterIOConfigurationWindow::FilterIOConfigurationWindow (AudioProcessor& p)
     }\r
 \r
     if (p.getBusCount (true)  > 0 || p.canAddBus (true))\r
-        addAndMakeVisible (inConfig = new InputOutputConfig (*this, true));\r
+    {\r
+        inConfig.reset (new InputOutputConfig (*this, true));\r
+        addAndMakeVisible (inConfig.get());\r
+    }\r
 \r
     if (p.getBusCount (false) > 0 || p.canAddBus (false))\r
-        addAndMakeVisible (outConfig = new InputOutputConfig (*this, false));\r
+    {\r
+        outConfig.reset (new InputOutputConfig (*this, false));\r
+        addAndMakeVisible (outConfig.get());\r
+    }\r
 \r
     currentLayout = p.getBusesLayout();\r
     setSize (400, (inConfig != nullptr && outConfig != nullptr ? 160 : 0) + 200);\r
index 4666ddc73f53087386a96d24ce55944a123d45a5..4fcf3ba6bc4a097d9ba01ecf646af8016e0dbb28 100644 (file)
@@ -46,9 +46,9 @@ private:
 \r
     AudioProcessor::BusesLayout currentLayout;\r
     Label title;\r
-    ScopedPointer<InputOutputConfig> inConfig, outConfig;\r
+    std::unique_ptr<InputOutputConfig> inConfig, outConfig;\r
 \r
-    InputOutputConfig* getConfig (bool isInput) noexcept    { return isInput ? inConfig : outConfig; }\r
+    InputOutputConfig* getConfig (bool isInput) noexcept    { return isInput ? inConfig.get() : outConfig.get(); }\r
     void update();\r
 \r
     MainHostWindow* getMainWindow() const;\r
index b350f6420e46e6190a3a86d479a857da24bcdd6c..63e8713b37e12616882fab06a6a84d05eeb00a73 100644 (file)
@@ -49,14 +49,14 @@ public:
         options.filenameSuffix      = "settings";\r
         options.osxLibrarySubFolder = "Preferences";\r
 \r
-        appProperties = new ApplicationProperties();\r
+        appProperties.reset (new ApplicationProperties());\r
         appProperties->setStorageParameters (options);\r
 \r
-        mainWindow = new MainHostWindow();\r
+        mainWindow.reset (new MainHostWindow());\r
         mainWindow->setUsingNativeTitleBar (true);\r
 \r
         commandManager.registerAllCommandsForTarget (this);\r
-        commandManager.registerAllCommandsForTarget (mainWindow);\r
+        commandManager.registerAllCommandsForTarget (mainWindow.get());\r
 \r
         mainWindow->menuItemsChanged();\r
 \r
@@ -137,10 +137,10 @@ public:
     bool moreThanOneInstanceAllowed() override       { return true; }\r
 \r
     ApplicationCommandManager commandManager;\r
-    ScopedPointer<ApplicationProperties> appProperties;\r
+    std::unique_ptr<ApplicationProperties> appProperties;\r
 \r
 private:\r
-    ScopedPointer<MainHostWindow> mainWindow;\r
+    std::unique_ptr<MainHostWindow> mainWindow;\r
 };\r
 \r
 static PluginHostApp& getApp()                    { return *dynamic_cast<PluginHostApp*>(JUCEApplication::getInstance()); }\r
index dfd815521bb225045e1f58ace64b346ce8df11a2..cd51a8bbded63db8551401c03202a651d0d24d00 100644 (file)
@@ -47,7 +47,7 @@
      KnownPluginList& knownPluginList;\r
      AudioUnitPluginFormat formatToScan;\r
 \r
-     ScopedPointer<PluginDirectoryScanner> scanner;\r
+     std::unique_ptr<PluginDirectoryScanner> scanner;\r
      FileSearchPath paths;\r
 \r
      ThreadPool pool;\r
@@ -57,8 +57,8 @@
          auto deadMansPedalFile = getAppProperties().getUserSettings()\r
                                      ->getFile().getSiblingFile ("RecentlyCrashedPluginsList");\r
 \r
-         scanner = new PluginDirectoryScanner (knownPluginList, formatToScan, paths,\r
-                                               true, deadMansPedalFile, true);\r
+         scanner.reset (new PluginDirectoryScanner (knownPluginList, formatToScan, paths,\r
+                                                    true, deadMansPedalFile, true));\r
 \r
          for (int i = 5; --i >= 0;)\r
              pool.addJob (new ScanJob (*this), true);\r
@@ -399,7 +399,7 @@ struct GraphEditorPanel::FilterComponent   : public Component,
 \r
     void showPopupMenu()\r
     {\r
-        menu = new PopupMenu;\r
+        menu.reset (new PopupMenu);\r
         menu->addItem (1, "Delete this filter");\r
         menu->addItem (2, "Disconnect all pins");\r
         menu->addItem (3, "Toggle Bypass");\r
@@ -485,7 +485,7 @@ struct GraphEditorPanel::FilterComponent   : public Component,
     Font font { 13.0f, Font::bold };\r
     int numIns = 0, numOuts = 0;\r
     DropShadowEffect shadow;\r
-    ScopedPointer<PopupMenu> menu;\r
+    std::unique_ptr<PopupMenu> menu;\r
 };\r
 \r
 \r
@@ -820,7 +820,7 @@ void GraphEditorPanel::updateComponents()
 \r
 void GraphEditorPanel::showPopupMenu (Point<int> mousePos)\r
 {\r
-    menu = new PopupMenu;\r
+    menu.reset (new PopupMenu);\r
 \r
     if (auto* mainWindow = findParentComponentOfClass<MainHostWindow>())\r
     {\r
@@ -842,15 +842,15 @@ void GraphEditorPanel::beginConnectorDrag (AudioProcessorGraph::NodeAndChannel s
 {\r
     auto* c = dynamic_cast<ConnectorComponent*> (e.originalComponent);\r
     connectors.removeObject (c, false);\r
-    draggingConnector = c;\r
+    draggingConnector.reset (c);\r
 \r
     if (draggingConnector == nullptr)\r
-        draggingConnector = new ConnectorComponent (*this);\r
+        draggingConnector.reset (new ConnectorComponent (*this));\r
 \r
     draggingConnector->setInput (source);\r
     draggingConnector->setOutput (dest);\r
 \r
-    addAndMakeVisible (draggingConnector);\r
+    addAndMakeVisible (draggingConnector.get());\r
     draggingConnector->toFront (false);\r
 \r
     dragConnector (e);\r
@@ -1081,7 +1081,7 @@ struct GraphDocumentComponent::PluginListBoxModel    : public ListBoxModel,
         owner.addMouseListener (this, true);\r
 \r
        #if JUCE_IOS\r
-        scanner = new AUScanner (knownPlugins);\r
+        scanner.reset (new AUScanner (knownPlugins));\r
        #endif\r
     }\r
 \r
@@ -1133,7 +1133,7 @@ struct GraphDocumentComponent::PluginListBoxModel    : public ListBoxModel,
     bool isOverSelectedRow = false;\r
 \r
    #if JUCE_IOS\r
-    ScopedPointer<AUScanner> scanner;\r
+    std::unique_ptr<AUScanner> scanner;\r
    #endif\r
 };\r
 \r
@@ -1148,31 +1148,37 @@ GraphDocumentComponent::GraphDocumentComponent (AudioPluginFormatManager& fm,
 {\r
     init();\r
 \r
-    deviceManager.addChangeListener (graphPanel);\r
+    deviceManager.addChangeListener (graphPanel.get());\r
     deviceManager.addAudioCallback (&graphPlayer);\r
     deviceManager.addMidiInputCallback (String(), &graphPlayer.getMidiMessageCollector());\r
 }\r
 \r
 void GraphDocumentComponent::init()\r
 {\r
-    addAndMakeVisible (graphPanel = new GraphEditorPanel (*graph));\r
+    graphPanel.reset (new GraphEditorPanel (*graph));\r
+    addAndMakeVisible (graphPanel.get());\r
     graphPlayer.setProcessor (&graph->graph);\r
 \r
     keyState.addListener (&graphPlayer.getMidiMessageCollector());\r
 \r
-    addAndMakeVisible (keyboardComp = new MidiKeyboardComponent (keyState, MidiKeyboardComponent::horizontalKeyboard));\r
-    addAndMakeVisible (statusBar = new TooltipBar());\r
+    keyboardComp.reset (new MidiKeyboardComponent (keyState, MidiKeyboardComponent::horizontalKeyboard));\r
+    addAndMakeVisible (keyboardComp.get());\r
+    statusBar.reset (new TooltipBar());\r
+    addAndMakeVisible (statusBar.get());\r
 \r
     graphPanel->updateComponents();\r
 \r
     if (isOnTouchDevice())\r
     {\r
         if (isOnTouchDevice())\r
-            addAndMakeVisible (titleBarComponent = new TitleBarComponent (*this));\r
+        {\r
+            titleBarComponent.reset (new TitleBarComponent (*this));\r
+            addAndMakeVisible (titleBarComponent.get());\r
+        }\r
 \r
-        pluginListBoxModel = new PluginListBoxModel (pluginListBox, pluginList);\r
+        pluginListBoxModel.reset (new PluginListBoxModel (pluginListBox, pluginList));\r
 \r
-        pluginListBox.setModel (pluginListBoxModel);\r
+        pluginListBox.setModel (pluginListBoxModel.get());\r
         pluginListBox.setRowHeight (40);\r
 \r
         pluginListSidePanel.setContent (&pluginListBox, false);\r
@@ -1230,7 +1236,7 @@ void GraphDocumentComponent::releaseGraph()
 \r
     if (graphPanel != nullptr)\r
     {\r
-        deviceManager.removeChangeListener (graphPanel);\r
+        deviceManager.removeChangeListener (graphPanel.get());\r
         graphPanel = nullptr;\r
     }\r
 \r
index cf24387f232253e81ac07388c28d65efbc53fccf..7112e05a373197c4f75f608a57c926cfba98e79b 100644 (file)
@@ -76,8 +76,8 @@ private:
 \r
     OwnedArray<FilterComponent> nodes;\r
     OwnedArray<ConnectorComponent> connectors;\r
-    ScopedPointer<ConnectorComponent> draggingConnector;\r
-    ScopedPointer<PopupMenu> menu;\r
+    std::unique_ptr<ConnectorComponent> draggingConnector;\r
+    std::unique_ptr<PopupMenu> menu;\r
 \r
     FilterComponent* getComponentForFilter (AudioProcessorGraph::NodeID) const;\r
     ConnectorComponent* getComponentForConnection (const AudioProcessorGraph::Connection&) const;\r
@@ -115,7 +115,7 @@ public:
     bool closeAnyOpenPluginWindows();\r
 \r
     //==============================================================================\r
-    ScopedPointer<FilterGraph> graph;\r
+    std::unique_ptr<FilterGraph> graph;\r
 \r
     void resized() override;\r
     void unfocusKeyboardComponent();\r
@@ -126,8 +126,8 @@ public:
     void itemDropped (const SourceDetails&) override;\r
 \r
     //==============================================================================\r
-    ScopedPointer<GraphEditorPanel> graphPanel;\r
-    ScopedPointer<MidiKeyboardComponent> keyboardComp;\r
+    std::unique_ptr<GraphEditorPanel> graphPanel;\r
+    std::unique_ptr<MidiKeyboardComponent> keyboardComp;\r
 \r
     //==============================================================================\r
     void showSidePanel (bool isSettingsPanel);\r
@@ -144,14 +144,14 @@ private:
     MidiKeyboardState keyState;\r
 \r
     struct TooltipBar;\r
-    ScopedPointer<TooltipBar> statusBar;\r
+    std::unique_ptr<TooltipBar> statusBar;\r
 \r
     class TitleBarComponent;\r
-    ScopedPointer<TitleBarComponent> titleBarComponent;\r
+    std::unique_ptr<TitleBarComponent> titleBarComponent;\r
 \r
     //==============================================================================\r
     struct PluginListBoxModel;\r
-    ScopedPointer<PluginListBoxModel> pluginListBoxModel;\r
+    std::unique_ptr<PluginListBoxModel> pluginListBoxModel;\r
 \r
     ListBox pluginListBox;\r
 \r
index 23f99fcadd35751238a9613f5a1ead022ad0c5c7..9abd73a38c3a20b6e6286ebb7bd00bb1ee549ec3 100644 (file)
@@ -84,10 +84,10 @@ MainHostWindow::MainHostWindow()
     RuntimePermissions::request (RuntimePermissions::recordAudio,\r
                                  [safeThis = SafePointer<MainHostWindow> (this)] (bool granted) mutable\r
                                  {\r
-                                     ScopedPointer<XmlElement> savedAudioState (getAppProperties().getUserSettings()\r
-                                                                                ->getXmlValue ("audioDeviceState"));\r
+                                     std::unique_ptr<XmlElement> savedAudioState (getAppProperties().getUserSettings()\r
+                                                                                  ->getXmlValue ("audioDeviceState"));\r
 \r
-                                     safeThis->deviceManager.initialise (granted ? 256 : 0, 256, savedAudioState, true);\r
+                                     safeThis->deviceManager.initialise (granted ? 256 : 0, 256, savedAudioState.get(), true);\r
                                  });\r
 \r
    #if JUCE_IOS || JUCE_ANDROID\r
@@ -98,9 +98,9 @@ MainHostWindow::MainHostWindow()
     centreWithSize (800, 600);\r
    #endif\r
 \r
-    graphHolder = new GraphDocumentComponent (formatManager, deviceManager, knownPluginList);\r
+    graphHolder.reset (new GraphDocumentComponent (formatManager, deviceManager, knownPluginList));\r
 \r
-    setContentNonOwned (graphHolder, false);\r
+    setContentNonOwned (graphHolder.get(), false);\r
 \r
     restoreWindowStateFromString (getAppProperties().getUserSettings()->getValue ("mainWindowPos"));\r
 \r
@@ -109,7 +109,7 @@ MainHostWindow::MainHostWindow()
     InternalPluginFormat internalFormat;\r
     internalFormat.getAllTypes (internalTypes);\r
 \r
-    ScopedPointer<XmlElement> savedPluginList (getAppProperties().getUserSettings()->getXmlValue ("pluginList"));\r
+    std::unique_ptr<XmlElement> savedPluginList (getAppProperties().getUserSettings()->getXmlValue ("pluginList"));\r
 \r
     if (savedPluginList != nullptr)\r
         knownPluginList.recreateFromXml (*savedPluginList);\r
@@ -220,15 +220,15 @@ void MainHostWindow::changeListenerCallback (ChangeBroadcaster* changed)
 \r
         // save the plugin list every time it gets changed, so that if we're scanning\r
         // and it crashes, we've still saved the previous ones\r
-        ScopedPointer<XmlElement> savedPluginList (knownPluginList.createXml());\r
+        std::unique_ptr<XmlElement> savedPluginList (knownPluginList.createXml());\r
 \r
         if (savedPluginList != nullptr)\r
         {\r
-            getAppProperties().getUserSettings()->setValue ("pluginList", savedPluginList);\r
+            getAppProperties().getUserSettings()->setValue ("pluginList", savedPluginList.get());\r
             getAppProperties().saveIfNeeded();\r
         }\r
     }\r
-    else if (graphHolder != nullptr && changed == graphHolder->graph)\r
+    else if (graphHolder != nullptr && changed == graphHolder->graph.get())\r
     {\r
         auto title = JUCEApplication::getInstance()->getApplicationName();\r
         auto f = graphHolder->graph->getFile();\r
@@ -506,7 +506,7 @@ bool MainHostWindow::perform (const InvocationInfo& info)
 \r
     case CommandIDs::showPluginListEditor:\r
         if (pluginListWindow == nullptr)\r
-            pluginListWindow = new PluginListWindow (*this, formatManager);\r
+            pluginListWindow.reset (new PluginListWindow (*this, formatManager));\r
 \r
         pluginListWindow->toFront (true);\r
         break;\r
@@ -577,9 +577,9 @@ void MainHostWindow::showAudioSettings()
                          ModalCallbackFunction::create\r
                          ([safeThis = SafePointer<MainHostWindow> (this)] (int)\r
                          {\r
-                             ScopedPointer<XmlElement> audioState (safeThis->deviceManager.createStateXml());\r
+                             std::unique_ptr<XmlElement> audioState (safeThis->deviceManager.createStateXml());\r
 \r
-                             getAppProperties().getUserSettings()->setValue ("audioDeviceState", audioState);\r
+                             getAppProperties().getUserSettings()->setValue ("audioDeviceState", audioState.get());\r
                              getAppProperties().getUserSettings()->saveIfNeeded();\r
 \r
                              if (safeThis->graphHolder != nullptr)\r
index 7b64ff327ed2657cf880831528c14d4459f1e657..78e87e8992142a5522d67884961341bc8cc00e7a 100644 (file)
@@ -92,7 +92,7 @@ public:
     bool isDoublePrecisionProcessing();\r
     void updatePrecisionMenuItem (ApplicationCommandInfo& info);\r
 \r
-    ScopedPointer<GraphDocumentComponent> graphHolder;\r
+    std::unique_ptr<GraphDocumentComponent> graphHolder;\r
 \r
 private:\r
     //==============================================================================\r
@@ -104,7 +104,7 @@ private:
     KnownPluginList::SortMethod pluginSortMethod;\r
 \r
     class PluginListWindow;\r
-    ScopedPointer<PluginListWindow> pluginListWindow;\r
+    std::unique_ptr<PluginListWindow> pluginListWindow;\r
 \r
     void showAudioSettings();\r
 \r
index 004beb573a68243b413d400c528d6a3a4a745707..bbbbf3cbd261ec06105c8cd19e7ec8dc8d106147 100644 (file)
@@ -44,4 +44,7 @@
   <MODULES>\r
     <MODULE id="juce_core" showAllCode="1"/>\r
   </MODULES>\r
+  <LIVE_SETTINGS>\r
+    <OSX/>\r
+  </LIVE_SETTINGS>\r
 </JUCERPROJECT>\r
index 91fed9659dbab669be045dfb5cf127def463e341..a88b226942dad245ac1f7dab2f55b716f00bd600 100644 (file)
@@ -47,6 +47,7 @@
                                        70A875922C34E55D4F48A196, ); name = Source; sourceTree = "<group>"; };
                00F18709927DE6070FBA7BD0 = {isa = XCBuildConfiguration; buildSettings = {
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
@@ -76,6 +77,7 @@
                                USE_HEADERMAP = NO; }; name = Debug; };
                8A190EF24B99F557190320DA = {isa = XCBuildConfiguration; buildSettings = {
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                        4F5C64675AD3AC67829798FF,
                                        A69CF4AD8F7015A8D3228FDE,
                                        2722C90F3B5DAD661891FDF4, ); buildRules = ( ); dependencies = (  ); name = "BinaryBuilder - ConsoleApp"; productName = BinaryBuilder; productReference = 799073185F72F5FAD05253C3; productType = "com.apple.product-type.tool"; };
-               36B6F402BC83F21646259DEF = {isa = PBXProject; buildConfigurationList = E4C85B0464A93027D035AA1F; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = C18D022743CF5BD14D6A6A9E; projectDirPath = ""; projectRoot = ""; targets = (80B70DE094998C267F152DD5); };
+               36B6F402BC83F21646259DEF = {isa = PBXProject; buildConfigurationList = E4C85B0464A93027D035AA1F; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = C18D022743CF5BD14D6A6A9E; projectDirPath = ""; projectRoot = ""; targets = (80B70DE094998C267F152DD5); };
        };
        rootObject = 36B6F402BC83F21646259DEF;
 }
index 3249110293999572bc5071d67f3d08a038494b07..151ce86a9317f76b7b17dfc1a4795fa18e7f0d89 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
index 427c4c833e2fe69c5637c0ba0e3cf2757cbc6afe..1150273d70c89adbbaf0133492d17f80b9807496 100644 (file)
@@ -91,6 +91,9 @@
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
index eaf759cc04f9ff88a0be96a3dae3bbbcc669437d..e6c4aeaac53aab8a9a53ee035d3caa632fec3147 100644 (file)
@@ -81,7 +81,7 @@ static int addFile (const File& file,
     cppStream << "const char* " << classname << "::" << name\r
               << " = (const char*) temp" << tempNum << ";\r\n\r\n";\r
 \r
-    return mb.getSize();\r
+    return (int) mb.getSize();\r
 }\r
 \r
 static bool isHiddenFile (const File& f, const File& root)\r
@@ -159,7 +159,7 @@ int main (int argc, char* argv[])
     headerFile.deleteFile();\r
     cppFile.deleteFile();\r
 \r
-    ScopedPointer<OutputStream> header (headerFile.createOutputStream());\r
+    std::unique_ptr<OutputStream> header (headerFile.createOutputStream());\r
 \r
     if (header == nullptr)\r
     {\r
@@ -168,7 +168,7 @@ int main (int argc, char* argv[])
         return 0;\r
     }\r
 \r
-    ScopedPointer<OutputStream> cpp (cppFile.createOutputStream());\r
+    std::unique_ptr<OutputStream> cpp (cppFile.createOutputStream());\r
 \r
     if (cpp == nullptr)\r
     {\r
index da821bb39ca252ef485294b4e7ed98773ca07b38..0b94bf62c489ab8e7daea46fe665c2249ca3cb29 100644 (file)
@@ -403,6 +403,7 @@ add_library( ${BINARY_NAME}
     "../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h"\r
     "../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h"\r
     "../../../../../modules/juce_core/containers/juce_SortedSet.h"\r
+    "../../../../../modules/juce_core/containers/juce_SparseSet.cpp"\r
     "../../../../../modules/juce_core/containers/juce_SparseSet.h"\r
     "../../../../../modules/juce_core/containers/juce_Variant.cpp"\r
     "../../../../../modules/juce_core/containers/juce_Variant.h"\r
@@ -1645,6 +1646,7 @@ set_source_files_properties("../../../../../modules/juce_core/containers/juce_Pr
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_SortedSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
+set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
 set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
index e37f33ec908692cb2be2eae7d2eb99abea688c8f..fb24cf73542faf4a177a656e5450462c8187a89e 100644 (file)
@@ -113,6 +113,7 @@ public class JUCENetworkGraphicsDemo   extends Activity
     private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2;\r
     private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3;\r
     private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4;\r
+    private static final int JUCE_PERMISSIONS_CAMERA = 5;\r
 \r
     private static String getAndroidPermissionName (int permissionID)\r
     {\r
@@ -123,6 +124,7 @@ public class JUCENetworkGraphicsDemo   extends Activity
                                                           // use string value as this is not defined in SDKs < 16\r
             case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE:  return "android.permission.READ_EXTERNAL_STORAGE";\r
             case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE;\r
+            case JUCE_PERMISSIONS_CAMERA:                 return Manifest.permission.CAMERA;\r
         }\r
 \r
         // unknown permission ID!\r
@@ -273,6 +275,7 @@ public class JUCENetworkGraphicsDemo   extends Activity
         setVolumeControlStream (AudioManager.STREAM_MUSIC);\r
 \r
         permissionCallbackPtrMap = new HashMap<Integer, Long>();\r
+        appPausedResumedListeners = new HashMap<Long, AppPausedResumedListener>();\r
     }\r
 \r
     @Override\r
@@ -289,6 +292,11 @@ public class JUCENetworkGraphicsDemo   extends Activity
     {\r
         suspendApp();\r
 \r
+        Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+        for (Long k : keys)\r
+            appPausedResumedListeners.get (k).appPaused();\r
+\r
         try\r
         {\r
             Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down\r
@@ -304,12 +312,10 @@ public class JUCENetworkGraphicsDemo   extends Activity
         super.onResume();\r
         resumeApp();\r
 \r
-        // Ensure that navigation/status bar visibility is correctly restored.\r
-        for (int i = 0; i < viewHolder.getChildCount(); ++i)\r
-        {\r
-            if (viewHolder.getChildAt (i) instanceof ComponentPeerView)\r
-                ((ComponentPeerView) viewHolder.getChildAt (i)).appResumed();\r
-        }\r
+        Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+        for (Long k : keys)\r
+            appPausedResumedListeners.get (k).appResumed();\r
     }\r
 \r
     @Override\r
@@ -436,11 +442,14 @@ public class JUCENetworkGraphicsDemo   extends Activity
     {\r
         ComponentPeerView v = new ComponentPeerView (this, opaque, host);\r
         viewHolder.addView (v);\r
+        addAppPausedResumedListener (v, host);\r
         return v;\r
     }\r
 \r
     public final void deleteView (ComponentPeerView view)\r
     {\r
+        removeAppPausedResumedListener (view, view.host);\r
+\r
         view.host = 0;\r
 \r
         ViewGroup group = (ViewGroup) (view.getParent());\r
@@ -658,9 +667,28 @@ public class JUCENetworkGraphicsDemo   extends Activity
 \r
     public native void alertDismissed (long callback, int id);\r
 \r
+    //==============================================================================\r
+    public interface AppPausedResumedListener\r
+    {\r
+        void appPaused();\r
+        void appResumed();\r
+    }\r
+\r
+    private Map<Long, AppPausedResumedListener> appPausedResumedListeners;\r
+\r
+    public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+    {\r
+        appPausedResumedListeners.put (new Long (listenerHost), l);\r
+    }\r
+\r
+    public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+    {\r
+        appPausedResumedListeners.remove (new Long (listenerHost));\r
+    }\r
+\r
     //==============================================================================\r
     public final class ComponentPeerView extends ViewGroup\r
-                                         implements View.OnFocusChangeListener\r
+                                         implements View.OnFocusChangeListener, AppPausedResumedListener\r
     {\r
         public ComponentPeerView (Context context, boolean opaque_, long host)\r
         {\r
@@ -1008,13 +1036,25 @@ public class JUCENetworkGraphicsDemo   extends Activity
         }\r
 \r
         //==============================================================================\r
+        private native void handleAppPaused (long host);\r
         private native void handleAppResumed (long host);\r
 \r
+        @Override\r
+        public void appPaused()\r
+        {\r
+            if (host == 0)\r
+                return;\r
+\r
+            handleAppPaused (host);\r
+        }\r
+\r
+        @Override\r
         public void appResumed()\r
         {\r
             if (host == 0)\r
                 return;\r
 \r
+            // Ensure that navigation/status bar visibility is correctly restored.\r
             handleAppResumed (host);\r
         }\r
     }\r
@@ -1656,6 +1696,7 @@ public class JUCENetworkGraphicsDemo   extends Activity
         private final Object hostLock = new Object();\r
     }\r
 \r
+\r
     //==============================================================================\r
     public static final String getLocaleValue (boolean isRegion)\r
     {\r
index da7e019c8ed8c102e13511dee531ad2d813d64ba..c783ae58a44485d8123745f17863e3f5b901694b 100644 (file)
                                        8B59A884C62D960EE9DFEF47, ); name = Source; sourceTree = "<group>"; };
                EE7498599191DDC73ECB55B0 = {isa = XCBuildConfiguration; buildSettings = {
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                USE_HEADERMAP = NO; }; name = Debug; };
                2E06386CE7CCA5FF76819BFF = {isa = XCBuildConfiguration; buildSettings = {
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                        714944DB86A4D402E7FA269E,
                                        C2977559BF9148DB70CA10AE,
                                        865E89B94B41EB14C202CBB0, ); buildRules = ( ); dependencies = (  ); name = "NetworkGraphicsDemo - App"; productName = NetworkGraphicsDemo; productReference = E4162459ED4C829EF7B19691; productType = "com.apple.product-type.application"; };
-               A5398ADB6F5B128C00EB935C = {isa = PBXProject; buildConfigurationList = 02715337C584F3C721251428; attributes = { LastUpgradeCheck = 0830; 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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D2EB65517396C974F0415A7F; projectDirPath = ""; projectRoot = ""; targets = (4311FBCBD02948A0ED96C7DD); };
+               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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D2EB65517396C974F0415A7F; projectDirPath = ""; projectRoot = ""; targets = (4311FBCBD02948A0ED96C7DD); };
        };
        rootObject = A5398ADB6F5B128C00EB935C;
 }
index 68a37b87c1633a35f8e0e1c6ce9b236cfdea56e0..deec8db8696c9bd74f188007ad86fed5df49b210 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
index 0694a1b51519a12dc75a73ff2bc54b2a88d13570..fdeb11f1489bfd52d901bba2cecb8364f4f70fa8 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
index db60810df03d17000211cc93f29eccd5b84248a4..2eaf232c5b40f4fb94811c9732fdd5ab2421c549 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
index 0801a22dccd86c4dfccfbc1a5f2012d8e6958d50..70136663bb91dd80890323fd5f32c5f86959bdc2 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
index cf45e138a80f21052aa74b43e792429027c8d549..590ad9014c9f30af9df909eef14120fe489ea594 100644 (file)
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
                                ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
                                ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                        714944DB86A4D402E7FA269E,
                                        C2977559BF9148DB70CA10AE,
                                        865E89B94B41EB14C202CBB0, ); buildRules = ( ); dependencies = (  ); name = "NetworkGraphicsDemo - App"; productName = NetworkGraphicsDemo; productReference = E4162459ED4C829EF7B19691; productType = "com.apple.product-type.application"; };
-               A5398ADB6F5B128C00EB935C = {isa = PBXProject; buildConfigurationList = 02715337C584F3C721251428; attributes = { LastUpgradeCheck = 0830; 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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D2EB65517396C974F0415A7F; projectDirPath = ""; projectRoot = ""; targets = (4311FBCBD02948A0ED96C7DD); };
+               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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D2EB65517396C974F0415A7F; projectDirPath = ""; projectRoot = ""; targets = (4311FBCBD02948A0ED96C7DD); };
        };
        rootObject = A5398ADB6F5B128C00EB935C;
 }
index a7d5fe14aab2b068730a23196c8eb97c4f2b9d18..4efb82c60ae497beb1cd78a86c713b3b6c1cbe4c 100644 (file)
  //#define JUCE_PLUGINHOST_AU 0\r
 #endif\r
 \r
+#ifndef    JUCE_PLUGINHOST_LADSPA\r
+ //#define JUCE_PLUGINHOST_LADSPA 0\r
+#endif\r
+\r
 //==============================================================================\r
 // juce_audio_utils flags:\r
 \r
index 73cf0656d640bbec29c3b3722f753a1b8ee34ac1..b2aadd3b0e4a240aad147a77a5c0ead89259c58c 100644 (file)
@@ -657,7 +657,7 @@ static const unsigned char temp_binary_data_0[] =
 const char* juce_icon_png = (const char*) temp_binary_data_0;\r
 \r
 \r
-const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) noexcept\r
+const char* getNamedResource (const char* resourceNameUTF8, int& numBytes)\r
 {\r
     unsigned int hash = 0;\r
     if (resourceNameUTF8 != 0)\r
@@ -684,7 +684,7 @@ const char* originalFilenames[] =
     "juce_icon.png"\r
 };\r
 \r
-const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept\r
+const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8)\r
 {\r
     for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i)\r
     {\r
index dd1ad0e91699bd430e857b497a79bdc4c9081645..b0f133c7c693d33ff9c993bf378b76bc119990c2 100644 (file)
@@ -22,9 +22,9 @@ namespace BinaryData
 \r
     // If you provide the name of one of the binary resource variables above, this function will\r
     // return the corresponding data and its size (or a null pointer if the name isn't found).\r
-    const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) noexcept;\r
+    const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes);\r
 \r
     // If you provide the name of one of the binary resource variables above, this function will\r
     // return the corresponding original, non-mangled filename (or a null pointer if the name isn't found).\r
-    const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept;\r
+    const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8);\r
 }\r
index 3e9ef3e1f9c36f6720d99b0b63cfa4c9b7445d86..8eeee6b78de175b099ad344a4fabcc5685361848 100644 (file)
     <MODULE id="juce_osc" showAllCode="1" useLocalCopy="0"/>\r
   </MODULES>\r
   <JUCEOPTIONS/>\r
+  <LIVE_SETTINGS>\r
+    <OSX/>\r
+  </LIVE_SETTINGS>\r
 </JUCERPROJECT>\r
index b2e0797451099c42c8fcf90714d6757e2a695845..24517755e7a00b30f64d66d5c04ad1c13fbfec1c 100644 (file)
@@ -84,8 +84,8 @@ struct BackgroundLogo  : public AnimatedContent
             </svg>\r
             )blahblah";\r
 \r
-        ScopedPointer<XmlElement> svg (XmlDocument::parse (logoData));\r
-        logo = Drawable::createFromSVG (*svg);\r
+        std::unique_ptr<XmlElement> svg (XmlDocument::parse (logoData));\r
+        logo.reset (Drawable::createFromSVG (*svg));\r
     }\r
 \r
     String getName() const override      { return "Background Image"; }\r
@@ -97,7 +97,7 @@ struct BackgroundLogo  : public AnimatedContent
         logo->drawWithin (g, canvas.getLimits().reduced (3.0f), RectanglePlacement (RectanglePlacement::centred), 0.6f);\r
     }\r
 \r
-    ScopedPointer<Drawable> logo;\r
+    std::unique_ptr<Drawable> logo;\r
 };\r
 \r
 //==============================================================================\r
@@ -205,18 +205,18 @@ struct FlockDemo  : public BackgroundLogo
     {\r
         Bird()\r
         {\r
-            Random rng;\r
-            pos.x = rng.nextFloat() * 10.0f - 5.0f;\r
-            pos.y = rng.nextFloat() * 10.0f - 5.0f;\r
-            velocity.x = rng.nextFloat() * 0.001f;\r
-            velocity.y = rng.nextFloat() * 0.001f;\r
+            Random randGen;\r
+            pos.x = randGen.nextFloat() * 10.0f - 5.0f;\r
+            pos.y = randGen.nextFloat() * 10.0f - 5.0f;\r
+            velocity.x = randGen.nextFloat() * 0.001f;\r
+            velocity.y = randGen.nextFloat() * 0.001f;\r
 \r
-            colour = Colour::fromHSV (rng.nextFloat(), 0.2f, 0.9f, rng.nextFloat() * 0.4f + 0.2f);\r
+            colour = Colour::fromHSV (randGen.nextFloat(), 0.2f, 0.9f, randGen.nextFloat() * 0.4f + 0.2f);\r
 \r
             shape.addTriangle (0.0f, 0.0f, -0.3f, 1.0f, 0.3f, 1.0f);\r
             shape = shape.createPathWithRoundedCorners (0.2f);\r
 \r
-            shape.applyTransform (AffineTransform::scale (rng.nextFloat() + 1.0f));\r
+            shape.applyTransform (AffineTransform::scale (randGen.nextFloat() + 1.0f));\r
         }\r
 \r
         Point<float> pos, velocity, acc;\r
@@ -410,8 +410,8 @@ struct FlockWithText  : public FlockDemo
         as.append (text, Font (textSize * scale), Colour (0x80ffffff).withMultipliedAlpha (alpha));\r
 \r
         as.setJustification (Justification::centred);\r
-        auto centre = canvas.clients[clientIndex % canvas.clients.size()].centre * scale;\r
-        as.draw (g, Rectangle<float> (textBlockWidth * scale, textBlockWidth * scale).withCentre (centre));\r
+        auto middle = canvas.clients[clientIndex % canvas.clients.size()].centre * scale;\r
+        as.draw (g, Rectangle<float> (textBlockWidth * scale, textBlockWidth * scale).withCentre (middle));\r
     }\r
 \r
     void tick()\r
index c260e759cbc92a4dc15b3c39a85f803fcec1cbd8..8464f6699953bde37718326df39658ff653fb74a 100644 (file)
@@ -42,8 +42,8 @@ struct MasterContentComponent  : public Component,
         createAllDemos (demos);\r
         setContent (0);\r
 \r
-        setSize (15.0f * currentCanvas.getLimits().getWidth(),\r
-                 15.0f * currentCanvas.getLimits().getHeight());\r
+        setSize ((int) (15.0f * currentCanvas.getLimits().getWidth()),\r
+                 (int) (15.0f * currentCanvas.getLimits().getHeight()));\r
 \r
         if (! OSCSender::connect (getBroadcastIPAddress(), masterPortNumber))\r
             error = "Master app OSC sender: network connection error.";\r
@@ -348,7 +348,7 @@ private:
         updateCanvasInfo (currentCanvas);\r
 \r
         {\r
-            ScopedPointer<CanvasGeneratingContext> context (new CanvasGeneratingContext (currentCanvas));\r
+            std::unique_ptr<CanvasGeneratingContext> context (new CanvasGeneratingContext (currentCanvas));\r
             Graphics g (*context);\r
 \r
             if (content != nullptr)\r
index d714b21567a0338241fea5343add983d61334c65..18739e54cf502d4812cb0b92d53586f7b13835bc 100644 (file)
@@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug)
     TARGET_ARCH := -march=native\r
   endif\r
 \r
-  JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.3.1 -DJUCE_APP_VERSION_HEX=0x50301 $(shell pkg-config --cflags freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
+  JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.3.2 -DJUCE_APP_VERSION_HEX=0x50302 $(shell pkg-config --cflags freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
   JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0
   JUCE_TARGET_APP := Projucer\r
 \r
@@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release)
     TARGET_ARCH := -march=native\r
   endif\r
 \r
-  JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.3.1 -DJUCE_APP_VERSION_HEX=0x50301 $(shell pkg-config --cflags freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
+  JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.3.2 -DJUCE_APP_VERSION_HEX=0x50302 $(shell pkg-config --cflags freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
   JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0
   JUCE_TARGET_APP := Projucer\r
 \r
index 57fa3f929a7b74a0ca1c73b207d22f824f3f1a2f..34a5755ca13e19457e3eed88b8837e982a045a1b 100644 (file)
@@ -33,9 +33,9 @@
     <key>CFBundleSignature</key>\r
     <string>????</string>\r
     <key>CFBundleShortVersionString</key>\r
-    <string>5.3.1</string>\r
+    <string>5.3.2</string>\r
     <key>CFBundleVersion</key>\r
-    <string>5.3.1</string>\r
+    <string>5.3.2</string>\r
     <key>NSHumanReadableCopyright</key>\r
     <string>ROLI Ltd.</string>\r
     <key>NSHighResolutionCapable</key>\r
index 1aaba299c5dcdca2192f52f30cc64cff377365d7..27a8ec6277123e59e1c70e41077cc10ccf577c30 100644 (file)
                                        "_DEBUG=1",
                                        "DEBUG=1",
                                        "JUCER_XCODE_MAC_F6D2F4CF=1",
-                                       "JUCE_APP_VERSION=5.3.1",
-                                       "JUCE_APP_VERSION_HEX=0x50301",
+                                       "JUCE_APP_VERSION=5.3.2",
+                                       "JUCE_APP_VERSION_HEX=0x50302",
                                        "JucePlugin_Build_VST=0",
                                        "JucePlugin_Build_VST3=0",
                                        "JucePlugin_Build_AU=0",
                                        "_NDEBUG=1",
                                        "NDEBUG=1",
                                        "JUCER_XCODE_MAC_F6D2F4CF=1",
-                                       "JUCE_APP_VERSION=5.3.1",
-                                       "JUCE_APP_VERSION_HEX=0x50301",
+                                       "JUCE_APP_VERSION=5.3.2",
+                                       "JUCE_APP_VERSION_HEX=0x50302",
                                        "JucePlugin_Build_VST=0",
                                        "JucePlugin_Build_VST3=0",
                                        "JucePlugin_Build_AU=0",
                                        C262D0F297DDE25326F5AC81,
                                        5CB869A8DA78BE6FA2757034,
                                        D150288A32EE596408C2B99F, ); buildRules = ( ); dependencies = (  ); name = "Projucer - App"; productName = Projucer; productReference = 09DE066936CF037E9709ADB1; productType = "com.apple.product-type.application"; };
-               74EA481348A24104E6ACE009 = {isa = PBXProject; buildConfigurationList = F90407F24422C589DA251604; attributes = { LastUpgradeCheck = 0830; 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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3CC531922CC2D398E283A845; projectDirPath = ""; projectRoot = ""; targets = (0039FE1A254FE518518BF8B8); };
+               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; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3CC531922CC2D398E283A845; projectDirPath = ""; projectRoot = ""; targets = (0039FE1A254FE518518BF8B8); };
        };
        rootObject = 74EA481348A24104E6ACE009;
 }
index c442d2a2f8ace3d8fe7c5bd42015bb56964742db..2f2992ca0a5adb11f51f5348f65a5049316a8671 100644 (file)
@@ -74,7 +74,7 @@
       <Optimization>Disabled</Optimization>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;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)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;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)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
       <PrecompiledHeader/>\r
     <ClCompile>\r
       <Optimization>Full</Optimization>\r
       <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;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)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;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)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
       <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
       <PrecompiledHeader/>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
index 695f3e93aa1550f6020c686262d2f5b305357d3d..4163efab29f42fff8b3acdcdcb1bd97f8bb21161 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
index a1f43a9bffdf16260135a31a9c10d59444f82bf7..1c354c762fd9be739eb829a2527b544ec26b79bb 100644 (file)
@@ -7,7 +7,7 @@
 #include <windows.h>\r
 \r
 VS_VERSION_INFO VERSIONINFO\r
-FILEVERSION  5,3,1,0\r
+FILEVERSION  5,3,2,0\r
 BEGIN\r
   BLOCK "StringFileInfo"\r
   BEGIN\r
@@ -16,9 +16,9 @@ BEGIN
       VALUE "CompanyName",  "ROLI Ltd.\0"\r
       VALUE "LegalCopyright",  "ROLI Ltd.\0"\r
       VALUE "FileDescription",  "Projucer\0"\r
-      VALUE "FileVersion",  "5.3.1\0"\r
+      VALUE "FileVersion",  "5.3.2\0"\r
       VALUE "ProductName",  "Projucer\0"\r
-      VALUE "ProductVersion",  "5.3.1\0"\r
+      VALUE "ProductVersion",  "5.3.2\0"\r
     END\r
   END\r
 \r
index a57dea78776992b2fa5344b553cf01e27d52c6aa..a7039ba26a87e72f81d73074f941943341335334 100644 (file)
@@ -74,7 +74,7 @@
       <Optimization>Disabled</Optimization>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;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)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;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)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
       <PrecompiledHeader/>\r
     <ClCompile>\r
       <Optimization>Full</Optimization>\r
       <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;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)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;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)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
       <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
       <PrecompiledHeader/>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
index 22073c7afb1a3797dcd5be00de93e91d33d9701e..8d2da9e4f24b1a907bc99beb31e99d68e00debff 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
index a1f43a9bffdf16260135a31a9c10d59444f82bf7..1c354c762fd9be739eb829a2527b544ec26b79bb 100644 (file)
@@ -7,7 +7,7 @@
 #include <windows.h>\r
 \r
 VS_VERSION_INFO VERSIONINFO\r
-FILEVERSION  5,3,1,0\r
+FILEVERSION  5,3,2,0\r
 BEGIN\r
   BLOCK "StringFileInfo"\r
   BEGIN\r
@@ -16,9 +16,9 @@ BEGIN
       VALUE "CompanyName",  "ROLI Ltd.\0"\r
       VALUE "LegalCopyright",  "ROLI Ltd.\0"\r
       VALUE "FileDescription",  "Projucer\0"\r
-      VALUE "FileVersion",  "5.3.1\0"\r
+      VALUE "FileVersion",  "5.3.2\0"\r
       VALUE "ProductName",  "Projucer\0"\r
-      VALUE "ProductVersion",  "5.3.1\0"\r
+      VALUE "ProductVersion",  "5.3.2\0"\r
     END\r
   END\r
 \r
index 055a65ae002e22d8ca16b02f002494beb69b42e8..cd8b1d4a7d15427ec3d8502911c4ec3a1ace133b 100644 (file)
@@ -74,7 +74,7 @@
       <Optimization>Disabled</Optimization>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;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)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;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)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
       <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
       <PrecompiledHeader/>\r
     <ClCompile>\r
       <Optimization>Full</Optimization>\r
       <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;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)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;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)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
       <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
       <PrecompiledHeader/>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
index ecaaaa4f756baaa745cc660fbc55eede95381fd3..42313cdb1eca8ee164c0812f5ca7bf3d68b5f007 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
index a1f43a9bffdf16260135a31a9c10d59444f82bf7..1c354c762fd9be739eb829a2527b544ec26b79bb 100644 (file)
@@ -7,7 +7,7 @@
 #include <windows.h>\r
 \r
 VS_VERSION_INFO VERSIONINFO\r
-FILEVERSION  5,3,1,0\r
+FILEVERSION  5,3,2,0\r
 BEGIN\r
   BLOCK "StringFileInfo"\r
   BEGIN\r
@@ -16,9 +16,9 @@ BEGIN
       VALUE "CompanyName",  "ROLI Ltd.\0"\r
       VALUE "LegalCopyright",  "ROLI Ltd.\0"\r
       VALUE "FileDescription",  "Projucer\0"\r
-      VALUE "FileVersion",  "5.3.1\0"\r
+      VALUE "FileVersion",  "5.3.2\0"\r
       VALUE "ProductName",  "Projucer\0"\r
-      VALUE "ProductVersion",  "5.3.1\0"\r
+      VALUE "ProductVersion",  "5.3.2\0"\r
     END\r
   END\r
 \r
index a143ceafbf602c715570c60bd5ff0eb309fcb3bc..ff35bfd9479f826593a0c4d376e6e854ef2c28b6 100644 (file)
@@ -6498,7 +6498,7 @@ static const unsigned char temp_binary_data_42[] =
 "    {\r\n"\r
 "        // This method is where you should put your application's initialisation code..\r\n"\r
 "\r\n"\r
-"        mainWindow = new MainWindow (getApplicationName());\r\n"\r
+"        mainWindow.reset (new MainWindow (getApplicationName()));\r\n"\r
 "    }\r\n"\r
 "\r\n"\r
 "    void shutdown() override\r\n"\r
@@ -6564,7 +6564,7 @@ static const unsigned char temp_binary_data_42[] =
 "    };\r\n"\r
 "\r\n"\r
 "private:\r\n"\r
-"    ScopedPointer<MainWindow> mainWindow;\r\n"\r
+"    std::unique_ptr<MainWindow> mainWindow;\r\n"\r
 "};\r\n"\r
 "\r\n"\r
 "//==============================================================================\r\n"\r
@@ -6603,7 +6603,7 @@ static const unsigned char temp_binary_data_43[] =
 "    {\r\n"\r
 "        // This method is where you should put your application's initialisation code..\r\n"\r
 "\r\n"\r
-"        mainWindow = new MainWindow (getApplicationName());\r\n"\r
+"        mainWindow.reset (new MainWindow (getApplicationName()));\r\n"\r
 "    }\r\n"\r
 "\r\n"\r
 "    void shutdown() override\r\n"\r
@@ -6668,7 +6668,7 @@ static const unsigned char temp_binary_data_43[] =
 "    };\r\n"\r
 "\r\n"\r
 "private:\r\n"\r
-"    ScopedPointer<MainWindow> mainWindow;\r\n"\r
+"    std::unique_ptr<MainWindow> mainWindow;\r\n"\r
 "};\r\n"\r
 "\r\n"\r
 "//==============================================================================\r\n"\r
@@ -7224,7 +7224,8 @@ static const unsigned char temp_binary_data_53[] =
 "        //==============================================================================\r\n"\r
 "        JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)\r\n"\r
 "    };\r\n"\r
-"    ScopedPointer<MainWindow> mainWindow;\r\n"\r
+"\r\n"\r
+"    std::unique_ptr<MainWindow> mainWindow;\r\n"\r
 "};\r\n"\r
 "\r\n"\r
 "//==============================================================================\r\n"\r
@@ -7583,7 +7584,7 @@ static const unsigned char temp_binary_data_60[] =
 const char* RecentFilesMenuTemplate_nib = (const char*) temp_binary_data_60;\r
 \r
 \r
-const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) noexcept\r
+const char* getNamedResource (const char* resourceNameUTF8, int& numBytes)\r
 {\r
     unsigned int hash = 0;\r
     if (resourceNameUTF8 != 0)\r
@@ -7634,8 +7635,8 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) noexc
         case 0x28d496ad:  numBytes = 1233; return jucer_InlineComponentTemplate_h;\r
         case 0x8905395b:  numBytes = 473; return jucer_MainConsoleAppTemplate_cpp;\r
         case 0x5e5ea047:  numBytes = 2021; return jucer_MainTemplate_NoWindow_cpp;\r
-        case 0xda2391f8:  numBytes = 4004; return jucer_MainTemplate_SimpleWindow_cpp;\r
-        case 0x400bc026:  numBytes = 3964; return jucer_MainTemplate_Window_cpp;\r
+        case 0xda2391f8:  numBytes = 4012; return jucer_MainTemplate_SimpleWindow_cpp;\r
+        case 0x400bc026:  numBytes = 3972; return jucer_MainTemplate_Window_cpp;\r
         case 0xf4842835:  numBytes = 1491; return jucer_NewComponentTemplate_cpp;\r
         case 0xe7bf237a:  numBytes = 646; return jucer_NewComponentTemplate_h;\r
         case 0x02a2a077:  numBytes = 278; return jucer_NewCppFileTemplate_cpp;\r
@@ -7645,7 +7646,7 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) noexc
         case 0x7fbac252:  numBytes = 1665; return jucer_OpenGLComponentTemplate_cpp;\r
         case 0x491fa0d7:  numBytes = 1263; return jucer_OpenGLComponentTemplate_h;\r
         case 0xbc050edc:  numBytes = 4926; return jucer_PIPAudioProcessorTemplate_h;\r
-        case 0xf4ca9e9a:  numBytes = 2443; return jucer_PIPMain_cpp;\r
+        case 0xf4ca9e9a:  numBytes = 2447; return jucer_PIPMain_cpp;\r
         case 0x0b16e320:  numBytes = 517; return jucer_PIPTemplate_h;\r
         case 0x763d39dc:  numBytes = 1050; return colourscheme_dark_xml;\r
         case 0xe8b08520:  numBytes = 1050; return colourscheme_light_xml;\r
@@ -7790,7 +7791,7 @@ const char* originalFilenames[] =
     "RecentFilesMenuTemplate.nib"\r
 };\r
 \r
-const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept\r
+const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8)\r
 {\r
     for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i)\r
     {\r
index 4c0adcd9b3960138f3f35947bdbb955189c72cd0..79fa6ece5e21722f25118980da94ab6fc8b5d85c 100644 (file)
@@ -135,10 +135,10 @@ namespace BinaryData
     const int            jucer_MainTemplate_NoWindow_cppSize = 2021;\r
 \r
     extern const char*   jucer_MainTemplate_SimpleWindow_cpp;\r
-    const int            jucer_MainTemplate_SimpleWindow_cppSize = 4004;\r
+    const int            jucer_MainTemplate_SimpleWindow_cppSize = 4012;\r
 \r
     extern const char*   jucer_MainTemplate_Window_cpp;\r
-    const int            jucer_MainTemplate_Window_cppSize = 3964;\r
+    const int            jucer_MainTemplate_Window_cppSize = 3972;\r
 \r
     extern const char*   jucer_NewComponentTemplate_cpp;\r
     const int            jucer_NewComponentTemplate_cppSize = 1491;\r
@@ -168,7 +168,7 @@ namespace BinaryData
     const int            jucer_PIPAudioProcessorTemplate_hSize = 4926;\r
 \r
     extern const char*   jucer_PIPMain_cpp;\r
-    const int            jucer_PIPMain_cppSize = 2443;\r
+    const int            jucer_PIPMain_cppSize = 2447;\r
 \r
     extern const char*   jucer_PIPTemplate_h;\r
     const int            jucer_PIPTemplate_hSize = 517;\r
@@ -202,9 +202,9 @@ namespace BinaryData
 \r
     // If you provide the name of one of the binary resource variables above, this function will\r
     // return the corresponding data and its size (or a null pointer if the name isn't found).\r
-    const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) noexcept;\r
+    const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes);\r
 \r
     // If you provide the name of one of the binary resource variables above, this function will\r
     // return the corresponding original, non-mangled filename (or a null pointer if the name isn't found).\r
-    const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept;\r
+    const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8);\r
 }\r
index e7fa6cc221f5335bae7e443fec4c5121eeb1b24e..c62718aff37121a50b57830680146874a292ca5c 100644 (file)
@@ -35,7 +35,7 @@
 namespace ProjectInfo\r
 {\r
     const char* const  projectName    = "Projucer";\r
-    const char* const  versionString  = "5.3.1";\r
-    const int          versionNumber  = 0x50301;\r
+    const char* const  versionString  = "5.3.2";\r
+    const int          versionNumber  = 0x50302;\r
 }\r
 #endif\r
index b1c11a2d652d85cdd94dc3eae482a24d53af3805..9444f7102f8116e220cc92caa3220a6fc89ae854 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 \r
 <JUCERPROJECT id="M70qfTRRk" name="Projucer" projectType="guiapp" juceFolder="../../juce"\r
-              jucerVersion="5.3.1" version="5.3.1" bundleIdentifier="com.juce.theprojucer"\r
+              jucerVersion="5.3.1" version="5.3.2" bundleIdentifier="com.juce.theprojucer"\r
               defines="" splashScreenColour="Dark" displaySplashScreen="0"\r
               reportAppUsage="0" companyName="ROLI Ltd." companyCopyright="ROLI Ltd."\r
               cppLanguageStandard="11">\r
index df2db4a5dd6b5b1f4a853294834f7bc44f54f319..aa33c486c8ddaf8271031bfe985f57d97f1d9722 100644 (file)
@@ -132,11 +132,11 @@ private:
 \r
     Rectangle<float> huckleberryLogoBounds, juceLogoBounds;\r
 \r
-    ScopedPointer<Drawable> juceLogo { Drawable::createFromImageData (BinaryData::juce_icon_png,\r
-                                                                      BinaryData::juce_icon_pngSize) };\r
+    std::unique_ptr<Drawable> juceLogo { Drawable::createFromImageData (BinaryData::juce_icon_png,\r
+                                                                        BinaryData::juce_icon_pngSize) };\r
 \r
-    ScopedPointer<Drawable> huckleberryLogo { Drawable::createFromImageData (BinaryData::huckleberry_icon_svg,\r
-                                                                             BinaryData::huckleberry_icon_svgSize) };\r
+    std::unique_ptr<Drawable> huckleberryLogo { Drawable::createFromImageData (BinaryData::huckleberry_icon_svg,\r
+                                                                               BinaryData::huckleberry_icon_svgSize) };\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AboutWindowComponent)\r
 };\r
index 3e784c6e08f0607538f8144b2974db822a9aef67..15ccb5b1fb4fe59bc696d69adfb5d5b742491c7e 100644 (file)
@@ -64,7 +64,8 @@ public:
 \r
         if (showCheckbox)\r
         {\r
-            addAndMakeVisible (shareApplicationUsageDataToggle = new ToggleButton());\r
+            shareApplicationUsageDataToggle.reset (new ToggleButton());\r
+            addAndMakeVisible (shareApplicationUsageDataToggle.get());\r
 \r
             auto* controller = ProjucerApplication::getApp().licenseController.get();\r
 \r
@@ -151,7 +152,7 @@ private:
     Label headerLabel, bodyLabel;\r
     HyperlinkButton juceEULALink, privacyPolicyLink;\r
     Label shareApplicationUsageDataLabel { {}, "Help JUCE to improve its software and services by sharing my application usage data" };\r
-    ScopedPointer<ToggleButton> shareApplicationUsageDataToggle;\r
+    std::unique_ptr<ToggleButton> shareApplicationUsageDataToggle;\r
     TextButton okButton { "OK" }, upgradeLicenseButton { "Upgrade License" };\r
 \r
     void lookAndFeelChanged() override\r
index beca635c5a3248eb17357acff6ca722b32907afc..978324745851f542f7027e5df3f30b45c221da3c 100644 (file)
@@ -60,7 +60,7 @@ public:
     }\r
 \r
 private:\r
-    ScopedPointer<Component> content;\r
+    std::unique_ptr<Component> content;\r
 \r
     //==============================================================================\r
     struct AppearanceEditor\r
index 99208f302bcd8e154abb0fb4fef776ca2ec1d376..ff2fdb3ab929410382fe34875626e7d60966365a 100644 (file)
@@ -33,7 +33,7 @@ struct FloatingToolWindow  : public DialogWindow
     FloatingToolWindow (const String& title,\r
                         const String& windowPosPropertyName,\r
                         Component* content,\r
-                        ScopedPointer<Component>& ownerPointer,\r
+                        std::unique_ptr<Component>& ownerPointer,\r
                         bool shouldBeResizable,\r
                         int defaultW, int defaultH,\r
                         int minW, int minH,\r
@@ -84,7 +84,7 @@ struct FloatingToolWindow  : public DialogWindow
 \r
 private:\r
     String windowPosProperty;\r
-    ScopedPointer<Component>& owner;\r
+    std::unique_ptr<Component>& owner;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FloatingToolWindow)\r
 };\r
index 184c04bf45302810fe659bff0420090165882285..b439d75ca9110b023caa388d430b30d3930500e7 100644 (file)
@@ -63,7 +63,8 @@ class PIPCreatorWindowComponent    : public Component,
 public:\r
     PIPCreatorWindowComponent()\r
     {\r
-        setLookAndFeel (lf = new PIPCreatorLookAndFeel());\r
+        lf.reset (new PIPCreatorLookAndFeel());\r
+        setLookAndFeel (lf.get());\r
 \r
         addAndMakeVisible (propertyViewport);\r
         propertyViewport.setViewedComponent (&propertyGroup, false);\r
@@ -306,7 +307,7 @@ private:
     }\r
 \r
     //==============================================================================\r
-    ScopedPointer<LookAndFeel> lf;\r
+    std::unique_ptr<LookAndFeel> lf;\r
 \r
     Viewport propertyViewport;\r
     PropertyGroupComponent propertyGroup  { "PIP Creator", { getIcons().juceLogo, Colours::transparentBlack } };\r
index 7c48ecb769bde954595eea8a0a55070907586b89..fed80a62aa02ed657440da420c50c35022a6eef3 100644 (file)
@@ -163,11 +163,13 @@ public:
         dragOver = false;\r
         repaint();\r
 \r
-        if (ScopedPointer<XmlElement> e = XmlDocument::parse (File (files[0])))\r
+        std::unique_ptr<XmlElement> element (XmlDocument::parse (File (files[0])));\r
+\r
+        if (element != nullptr)\r
         {\r
-            if (auto* ePath = e->getChildByName ("path"))\r
+            if (auto* ePath = element->getChildByName ("path"))\r
                 userText.setText (ePath->getStringAttribute ("d"), true);\r
-            else if (auto* ePolygon = e->getChildByName ("polygon"))\r
+            else if (auto* ePolygon = element->getChildByName ("polygon"))\r
                 userText.setText (ePolygon->getStringAttribute ("points"), true);\r
         }\r
     }\r
index f9a7647e9035c1de53cb7d62ccad1fb184cb97c5..c606b225eb536b09d8172267daa5b51ca14b932a 100644 (file)
@@ -85,7 +85,7 @@ void ProjucerApplication::initialise (const String& commandLine)
 \r
         isRunningCommandLine = commandLine.isNotEmpty();\r
 \r
-        licenseController = new LicenseController;\r
+        licenseController.reset (new LicenseController);\r
         licenseController->addLicenseStatusChangedCallback (this);\r
 \r
         if (isRunningCommandLine)\r
@@ -111,10 +111,10 @@ void ProjucerApplication::initialise (const String& commandLine)
 \r
         openDocumentManager.registerType (new ProjucerAppClasses::LiveBuildCodeEditorDocument::Type(), 2);\r
 \r
-        childProcessCache = new ChildProcessCache();\r
+        childProcessCache.reset (new ChildProcessCache());\r
 \r
         initCommandManager();\r
-        menuModel = new MainMenuModel();\r
+        menuModel.reset (new MainMenuModel());\r
 \r
         settings->appearance.refreshPresetSchemeList();\r
 \r
@@ -131,9 +131,9 @@ void ProjucerApplication::initialiseBasics()
 {\r
     LookAndFeel::setDefaultLookAndFeel (&lookAndFeel);\r
 \r
-    settings = new StoredSettings();\r
+    settings.reset (new StoredSettings());\r
     ImageCache::setCacheTimeout (30 * 1000);\r
-    icons = new Icons();\r
+    icons.reset (new Icons());\r
     tooltipWindow.setMillisecondsBeforeTipAppears (1200);\r
 }\r
 \r
@@ -147,10 +147,10 @@ bool ProjucerApplication::initialiseLogger (const char* filePrefix)
         String folder = "com.juce.projucer";\r
        #endif\r
 \r
-        logger = FileLogger::createDateStampedLogger (folder, filePrefix, ".txt",\r
-                                                      getApplicationName() + " " + getApplicationVersion()\r
-                                                        + "  ---  Build date: " __DATE__);\r
-        Logger::setCurrentLogger (logger);\r
+        logger.reset (FileLogger::createDateStampedLogger (folder, filePrefix, ".txt",\r
+                                                           getApplicationName() + " " + getApplicationVersion()\r
+                                                               + "  ---  Build date: " __DATE__));\r
+        Logger::setCurrentLogger (logger.get());\r
     }\r
 \r
     return logger != nullptr;\r
@@ -167,10 +167,10 @@ void ProjucerApplication::handleAsyncUpdate()
 \r
     // workaround broken "Open Recent" submenu: not passing the\r
     // submenu's title here avoids the defect in JuceMainMenuHandler::addMenuItem\r
-    MenuBarModel::setMacMainMenu (menuModel, &extraAppleMenuItems); //, "Open Recent");\r
+    MenuBarModel::setMacMainMenu (menuModel.get(), &extraAppleMenuItems); //, "Open Recent");\r
    #endif\r
 \r
-    versionChecker = new LatestVersionChecker();\r
+    versionChecker.reset (new LatestVersionChecker());\r
 \r
     if (licenseController != nullptr)\r
     {\r
@@ -334,7 +334,7 @@ ProjucerApplication& ProjucerApplication::getApp()
 \r
 ApplicationCommandManager& ProjucerApplication::getCommandManager()\r
 {\r
-    ApplicationCommandManager* cm = ProjucerApplication::getApp().commandManager;\r
+    auto* cm = ProjucerApplication::getApp().commandManager.get();\r
     jassert (cm != nullptr);\r
     return *cm;\r
 }\r
@@ -378,11 +378,11 @@ void ProjucerApplication::createMenu (PopupMenu& menu, const String& menuName)
 \r
 void ProjucerApplication::createFileMenu (PopupMenu& menu)\r
 {\r
-    menu.addCommandItem (commandManager, CommandIDs::newProject);\r
-    menu.addCommandItem (commandManager, CommandIDs::newProjectFromClipboard);\r
-    menu.addCommandItem (commandManager, CommandIDs::newPIP);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::newProject);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::newProjectFromClipboard);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::newPIP);\r
     menu.addSeparator();\r
-    menu.addCommandItem (commandManager, CommandIDs::open);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::open);\r
 \r
     {\r
         PopupMenu recentFiles;\r
@@ -392,7 +392,7 @@ void ProjucerApplication::createFileMenu (PopupMenu& menu)
         if (recentFiles.getNumItems() > 0)\r
         {\r
             recentFiles.addSeparator();\r
-            recentFiles.addCommandItem (commandManager, CommandIDs::clearRecentFiles);\r
+            recentFiles.addCommandItem (commandManager.get(), CommandIDs::clearRecentFiles);\r
         }\r
 \r
         menu.addSubMenu ("Open Recent", recentFiles);\r
@@ -406,58 +406,58 @@ void ProjucerApplication::createFileMenu (PopupMenu& menu)
     }\r
 \r
     menu.addSeparator();\r
-    menu.addCommandItem (commandManager, CommandIDs::closeDocument);\r
-    menu.addCommandItem (commandManager, CommandIDs::saveDocument);\r
-    menu.addCommandItem (commandManager, CommandIDs::saveDocumentAs);\r
-    menu.addCommandItem (commandManager, CommandIDs::saveAll);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::closeDocument);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::saveDocument);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::saveDocumentAs);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::saveAll);\r
     menu.addSeparator();\r
-    menu.addCommandItem (commandManager, CommandIDs::closeProject);\r
-    menu.addCommandItem (commandManager, CommandIDs::saveProject);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::closeProject);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::saveProject);\r
     menu.addSeparator();\r
-    menu.addCommandItem (commandManager, CommandIDs::openInIDE);\r
-    menu.addCommandItem (commandManager, CommandIDs::saveAndOpenInIDE);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::openInIDE);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::saveAndOpenInIDE);\r
     menu.addSeparator();\r
 \r
    #if ! JUCER_ENABLE_GPL_MODE\r
-    menu.addCommandItem (commandManager, CommandIDs::loginLogout);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::loginLogout);\r
    #endif\r
 \r
     #if ! JUCE_MAC\r
-      menu.addCommandItem (commandManager, CommandIDs::showAboutWindow);\r
-      menu.addCommandItem (commandManager, CommandIDs::showAppUsageWindow);\r
-      menu.addCommandItem (commandManager, CommandIDs::showGlobalPathsWindow);\r
+      menu.addCommandItem (commandManager.get(), CommandIDs::showAboutWindow);\r
+      menu.addCommandItem (commandManager.get(), CommandIDs::showAppUsageWindow);\r
+      menu.addCommandItem (commandManager.get(), CommandIDs::showGlobalPathsWindow);\r
       menu.addSeparator();\r
-      menu.addCommandItem (commandManager, StandardApplicationCommandIDs::quit);\r
+      menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::quit);\r
     #endif\r
 }\r
 \r
 void ProjucerApplication::createEditMenu (PopupMenu& menu)\r
 {\r
-    menu.addCommandItem (commandManager, StandardApplicationCommandIDs::undo);\r
-    menu.addCommandItem (commandManager, StandardApplicationCommandIDs::redo);\r
+    menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::undo);\r
+    menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::redo);\r
     menu.addSeparator();\r
-    menu.addCommandItem (commandManager, StandardApplicationCommandIDs::cut);\r
-    menu.addCommandItem (commandManager, StandardApplicationCommandIDs::copy);\r
-    menu.addCommandItem (commandManager, StandardApplicationCommandIDs::paste);\r
-    menu.addCommandItem (commandManager, StandardApplicationCommandIDs::del);\r
-    menu.addCommandItem (commandManager, StandardApplicationCommandIDs::selectAll);\r
-    menu.addCommandItem (commandManager, StandardApplicationCommandIDs::deselectAll);\r
+    menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::cut);\r
+    menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::copy);\r
+    menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::paste);\r
+    menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::del);\r
+    menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::selectAll);\r
+    menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::deselectAll);\r
     menu.addSeparator();\r
-    menu.addCommandItem (commandManager, CommandIDs::showFindPanel);\r
-    menu.addCommandItem (commandManager, CommandIDs::findSelection);\r
-    menu.addCommandItem (commandManager, CommandIDs::findNext);\r
-    menu.addCommandItem (commandManager, CommandIDs::findPrevious);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showFindPanel);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::findSelection);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::findNext);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::findPrevious);\r
 }\r
 \r
 void ProjucerApplication::createViewMenu (PopupMenu& menu)\r
 {\r
-    menu.addCommandItem (commandManager, CommandIDs::showProjectSettings);\r
-    menu.addCommandItem (commandManager, CommandIDs::showProjectTab);\r
-    menu.addCommandItem (commandManager, CommandIDs::showBuildTab);\r
-    menu.addCommandItem (commandManager, CommandIDs::showFileExplorerPanel);\r
-    menu.addCommandItem (commandManager, CommandIDs::showModulesPanel);\r
-    menu.addCommandItem (commandManager, CommandIDs::showExportersPanel);\r
-    menu.addCommandItem (commandManager, CommandIDs::showExporterSettings);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showProjectSettings);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showProjectTab);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showBuildTab);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showFileExplorerPanel);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showModulesPanel);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showExportersPanel);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showExporterSettings);\r
 \r
     menu.addSeparator();\r
     createColourSchemeItems (menu);\r
@@ -465,19 +465,19 @@ void ProjucerApplication::createViewMenu (PopupMenu& menu)
 \r
 void ProjucerApplication::createBuildMenu (PopupMenu& menu)\r
 {\r
-    menu.addCommandItem (commandManager, CommandIDs::toggleBuildEnabled);\r
-    menu.addCommandItem (commandManager, CommandIDs::buildNow);\r
-    menu.addCommandItem (commandManager, CommandIDs::toggleContinuousBuild);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::toggleBuildEnabled);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::buildNow);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::toggleContinuousBuild);\r
     menu.addSeparator();\r
-    menu.addCommandItem (commandManager, CommandIDs::launchApp);\r
-    menu.addCommandItem (commandManager, CommandIDs::killApp);\r
-    menu.addCommandItem (commandManager, CommandIDs::cleanAll);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::launchApp);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::killApp);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::cleanAll);\r
     menu.addSeparator();\r
-    menu.addCommandItem (commandManager, CommandIDs::reinstantiateComp);\r
-    menu.addCommandItem (commandManager, CommandIDs::showWarnings);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::reinstantiateComp);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showWarnings);\r
     menu.addSeparator();\r
-    menu.addCommandItem (commandManager, CommandIDs::nextError);\r
-    menu.addCommandItem (commandManager, CommandIDs::prevError);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::nextError);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::prevError);\r
 }\r
 \r
 void ProjucerApplication::createColourSchemeItems (PopupMenu& menu)\r
@@ -518,9 +518,9 @@ void ProjucerApplication::createColourSchemeItems (PopupMenu& menu)
 \r
 void ProjucerApplication::createWindowMenu (PopupMenu& menu)\r
 {\r
-    menu.addCommandItem (commandManager, CommandIDs::goToPreviousWindow);\r
-    menu.addCommandItem (commandManager, CommandIDs::goToNextWindow);\r
-    menu.addCommandItem (commandManager, CommandIDs::closeWindow);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::goToPreviousWindow);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::goToNextWindow);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::closeWindow);\r
     menu.addSeparator();\r
 \r
     int counter = 0;\r
@@ -534,14 +534,14 @@ void ProjucerApplication::createWindowMenu (PopupMenu& menu)
     }\r
 \r
     menu.addSeparator();\r
-    menu.addCommandItem (commandManager, CommandIDs::closeAllWindows);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::closeAllWindows);\r
 }\r
 \r
 void ProjucerApplication::createDocumentMenu (PopupMenu& menu)\r
 {\r
-    menu.addCommandItem (commandManager, CommandIDs::goToPreviousDoc);\r
-    menu.addCommandItem (commandManager, CommandIDs::goToNextDoc);\r
-    menu.addCommandItem (commandManager, CommandIDs::goToCounterpart);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::goToPreviousDoc);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::goToNextDoc);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::goToCounterpart);\r
     menu.addSeparator();\r
 \r
     auto numDocs = jmin (50, openDocumentManager.getNumOpenDocuments());\r
@@ -553,31 +553,31 @@ void ProjucerApplication::createDocumentMenu (PopupMenu& menu)
     }\r
 \r
     menu.addSeparator();\r
-    menu.addCommandItem (commandManager, CommandIDs::closeAllDocuments);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::closeAllDocuments);\r
 }\r
 \r
 void ProjucerApplication::createToolsMenu (PopupMenu& menu)\r
 {\r
-    menu.addCommandItem (commandManager, CommandIDs::showUTF8Tool);\r
-    menu.addCommandItem (commandManager, CommandIDs::showSVGPathTool);\r
-    menu.addCommandItem (commandManager, CommandIDs::showTranslationTool);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showUTF8Tool);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showSVGPathTool);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showTranslationTool);\r
 }\r
 \r
 void ProjucerApplication::createHelpMenu (PopupMenu& menu)\r
 {\r
-    menu.addCommandItem (commandManager, CommandIDs::showForum);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showForum);\r
     menu.addSeparator();\r
-    menu.addCommandItem (commandManager, CommandIDs::showAPIModules);\r
-    menu.addCommandItem (commandManager, CommandIDs::showAPIClasses);\r
-    menu.addCommandItem (commandManager, CommandIDs::showTutorials);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showAPIModules);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showAPIClasses);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showTutorials);\r
 }\r
 \r
 void ProjucerApplication::createExtraAppleMenuItems (PopupMenu& menu)\r
 {\r
-    menu.addCommandItem (commandManager, CommandIDs::showAboutWindow);\r
-    menu.addCommandItem (commandManager, CommandIDs::showAppUsageWindow);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showAboutWindow);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showAppUsageWindow);\r
     menu.addSeparator();\r
-    menu.addCommandItem (commandManager, CommandIDs::showGlobalPathsWindow);\r
+    menu.addCommandItem (commandManager.get(), CommandIDs::showGlobalPathsWindow);\r
 }\r
 \r
 void ProjucerApplication::createExamplesPopupMenu (PopupMenu& menu) noexcept\r
@@ -602,7 +602,7 @@ void ProjucerApplication::createExamplesPopupMenu (PopupMenu& menu) noexcept
     else\r
     {\r
         menu.addSeparator();\r
-        menu.addCommandItem (commandManager, CommandIDs::launchDemoRunner);\r
+        menu.addCommandItem (commandManager.get(), CommandIDs::launchDemoRunner);\r
     }\r
 }\r
 \r
@@ -809,16 +809,16 @@ void ProjucerApplication::launchDemoRunner()
     else if (findDemoRunnerProject() != File())\r
     {\r
         auto& lf = Desktop::getInstance().getDefaultLookAndFeel();\r
-        demoRunnerAlert = lf.createAlertWindow ("Open Project",\r
-                                                "Couldn't find a compiled version of the Demo Runner."\r
-                                               #if JUCE_LINUX\r
-                                                " Do you want to build it now?", "Build project", "Cancel",\r
-                                               #else\r
-                                                " Do you want to open the project?", "Open project", "Cancel",\r
-                                               #endif\r
-                                                {},\r
-                                                AlertWindow::QuestionIcon, 2,\r
-                                                mainWindowList.getFrontmostWindow (false));\r
+        demoRunnerAlert.reset (lf.createAlertWindow ("Open Project",\r
+                                                     "Couldn't find a compiled version of the Demo Runner."\r
+                                                    #if JUCE_LINUX\r
+                                                     " Do you want to build it now?", "Build project", "Cancel",\r
+                                                    #else\r
+                                                     " Do you want to open the project?", "Open project", "Cancel",\r
+                                                    #endif\r
+                                                     {},\r
+                                                     AlertWindow::QuestionIcon, 2,\r
+                                                     mainWindowList.getFrontmostWindow (false)));\r
 \r
         demoRunnerAlert->enterModalState (true, ModalCallbackFunction::create ([this] (int retVal)\r
                                                 {\r
@@ -1327,7 +1327,7 @@ void ProjucerApplication::updateAllBuildTabs()
 \r
 void ProjucerApplication::initCommandManager()\r
 {\r
-    commandManager = new ApplicationCommandManager();\r
+    commandManager.reset (new ApplicationCommandManager());\r
     commandManager->registerAllCommandsForTarget (this);\r
 \r
     {\r
@@ -1386,11 +1386,11 @@ void ProjucerApplication::setupAnalytics()
 void ProjucerApplication::showSetJUCEPathAlert()\r
 {\r
     auto& lf = Desktop::getInstance().getDefaultLookAndFeel();\r
-    pathAlert = lf.createAlertWindow ("Set JUCE Path", "Your global JUCE path is invalid. This path is used to access the JUCE examples and demo project - "\r
-                                      "would you like to set it now?",\r
-                                      "Set path", "Cancel", "Don't ask again",\r
-                                      AlertWindow::WarningIcon, 3,\r
-                                      mainWindowList.getFrontmostWindow (false));\r
+    pathAlert.reset (lf.createAlertWindow ("Set JUCE Path", "Your global JUCE path is invalid. This path is used to access the JUCE examples and demo project - "\r
+                                           "would you like to set it now?",\r
+                                           "Set path", "Cancel", "Don't ask again",\r
+                                           AlertWindow::WarningIcon, 3,\r
+                                           mainWindowList.getFrontmostWindow (false)));\r
 \r
     pathAlert->enterModalState (true, ModalCallbackFunction::create ([this] (int retVal)\r
                                                                     {\r
index 97b1871c4afd3542493947a18738c95957a73eb1..6689d45fa64b8216b68ca0281b51e5f988fbfe44 100644 (file)
@@ -141,29 +141,29 @@ public:
     //==============================================================================\r
     ProjucerLookAndFeel lookAndFeel;\r
 \r
-    ScopedPointer<StoredSettings> settings;\r
-    ScopedPointer<Icons> icons;\r
+    std::unique_ptr<StoredSettings> settings;\r
+    std::unique_ptr<Icons> icons;\r
 \r
     struct MainMenuModel;\r
-    ScopedPointer<MainMenuModel> menuModel;\r
+    std::unique_ptr<MainMenuModel> menuModel;\r
 \r
     MainWindowList mainWindowList;\r
     OpenDocumentManager openDocumentManager;\r
-    ScopedPointer<ApplicationCommandManager> commandManager;\r
+    std::unique_ptr<ApplicationCommandManager> commandManager;\r
 \r
-    ScopedPointer<Component> utf8Window, svgPathWindow, aboutWindow, applicationUsageDataWindow,\r
+    std::unique_ptr<Component> utf8Window, svgPathWindow, aboutWindow, applicationUsageDataWindow,\r
                              pathsWindow, editorColourSchemeWindow, pipCreatorWindow;\r
 \r
-    ScopedPointer<FileLogger> logger;\r
+    std::unique_ptr<FileLogger> logger;\r
 \r
     bool isRunningCommandLine;\r
-    ScopedPointer<ChildProcessCache> childProcessCache;\r
-    ScopedPointer<LicenseController> licenseController;\r
+    std::unique_ptr<ChildProcessCache> childProcessCache;\r
+    std::unique_ptr<LicenseController> licenseController;\r
 \r
 private:\r
     void* server = nullptr;\r
 \r
-    ScopedPointer<LatestVersionChecker> versionChecker;\r
+    std::unique_ptr<LatestVersionChecker> versionChecker;\r
     TooltipWindow tooltipWindow;\r
 \r
     void loginOrLogout();\r
@@ -191,7 +191,7 @@ private:
     void launchDemoRunner();\r
 \r
     int numExamples = 0;\r
-    ScopedPointer<AlertWindow> demoRunnerAlert;\r
+    std::unique_ptr<AlertWindow> demoRunnerAlert;\r
 \r
    #if JUCE_LINUX\r
     ChildProcess makeProcess;\r
@@ -201,7 +201,7 @@ private:
     void setupAnalytics();\r
 \r
     void showSetJUCEPathAlert();\r
-    ScopedPointer<AlertWindow> pathAlert;\r
+    std::unique_ptr<AlertWindow> pathAlert;\r
 \r
     //==============================================================================\r
     void setColourScheme (int index, bool saveSetting);\r
index 59451251901e41d845f242aace642ffcede0801e..1d4060448aab31c228e7d4edf44b9ce5e3ebc123 100644 (file)
@@ -178,7 +178,7 @@ public:
         const int maxRedirects = 5;\r
 \r
         // we need to do the redirecting manually due to inconsistencies on the way headers are handled on redirects\r
-        ScopedPointer<InputStream> in;\r
+        std::unique_ptr<InputStream> in;\r
 \r
         for (int redirect = 0; redirect < maxRedirects; ++redirect)\r
         {\r
@@ -214,7 +214,7 @@ public:
 \r
                 total += written;\r
 \r
-                setStatusMessage (String (TRANS ("Downloading...  (123)"))\r
+                setStatusMessage (String (TRANS("Downloading...  (123)"))\r
                                   .replace ("123", File::descriptionOfSizeInBytes (total)));\r
             }\r
 \r
@@ -243,36 +243,42 @@ public:
                       const char* overwriteFolderPath)\r
         : hasOverwriteButton (overwriteFolderPath != nullptr)\r
     {\r
-        addAndMakeVisible (titleLabel = new Label ("Title Label",\r
-                                                   TRANS ("Download \"123\" version 456?").replace ("123", productName)\r
-                                                                                          .replace ("456", version.toString())));\r
+        titleLabel.reset (new Label ("Title Label",\r
+                                     TRANS("Download \"123\" version 456?")\r
+                                         .replace ("123", productName)\r
+                                         .replace ("456", version.toString())));\r
+        addAndMakeVisible (titleLabel.get());\r
 \r
         titleLabel->setFont (Font (15.00f, Font::bold));\r
         titleLabel->setJustificationType (Justification::centredLeft);\r
         titleLabel->setEditable (false, false, false);\r
 \r
-        addAndMakeVisible (contentLabel = new Label ("Content Label",\r
-                                                     TRANS ("A new version of \"123\" is available - would you like to download it?")\r
-                                                        .replace ("123", productName)));\r
+        contentLabel.reset(new Label ("Content Label",\r
+                                      TRANS("A new version of \"123\" is available - would you like to download it?")\r
+                                          .replace ("123", productName)));\r
+        addAndMakeVisible (contentLabel.get());\r
         contentLabel->setFont (Font (15.00f, Font::plain));\r
         contentLabel->setJustificationType (Justification::topLeft);\r
         contentLabel->setEditable (false, false, false);\r
 \r
-        addAndMakeVisible (okButton = new TextButton ("OK Button"));\r
+        okButton.reset (new TextButton ("OK Button"));\r
+        addAndMakeVisible (okButton.get());\r
         okButton->setButtonText (TRANS(hasOverwriteButton ? "Choose Another Folder..." : "OK"));\r
         okButton->onClick = [this] { exitParentDialog (2); };\r
 \r
-        addAndMakeVisible (cancelButton = new TextButton ("Cancel Button"));\r
+        cancelButton.reset (new TextButton ("Cancel Button"));\r
+        addAndMakeVisible (cancelButton.get());\r
         cancelButton->setButtonText (TRANS("Cancel"));\r
         cancelButton->onClick = [this] { exitParentDialog (-1); };\r
 \r
-        addAndMakeVisible (changeLogLabel = new Label ("Change Log Label",\r
-                                                       TRANS("Release Notes:")));\r
+        changeLogLabel.reset (new Label ("Change Log Label", TRANS("Release Notes:")));\r
+        addAndMakeVisible (changeLogLabel.get());\r
         changeLogLabel->setFont (Font (15.00f, Font::plain));\r
         changeLogLabel->setJustificationType (Justification::topLeft);\r
         changeLogLabel->setEditable (false, false, false);\r
 \r
-        addAndMakeVisible (changeLog = new TextEditor ("Change Log"));\r
+        changeLog.reset (new TextEditor ("Change Log"));\r
+        addAndMakeVisible (changeLog.get());\r
         changeLog->setMultiLine (true);\r
         changeLog->setReturnKeyStartsNewLine (true);\r
         changeLog->setReadOnly (true);\r
@@ -283,24 +289,27 @@ public:
 \r
         if (hasOverwriteButton)\r
         {\r
-            addAndMakeVisible (overwriteLabel = new Label ("Overwrite Label",\r
-                                                           TRANS("Updating will overwrite everything in the following folder:")));\r
+            overwriteLabel.reset (new Label ("Overwrite Label",\r
+                                             TRANS("Updating will overwrite everything in the following folder:")));\r
+            addAndMakeVisible (overwriteLabel.get());\r
             overwriteLabel->setFont (Font (15.00f, Font::plain));\r
             overwriteLabel->setJustificationType (Justification::topLeft);\r
             overwriteLabel->setEditable (false, false, false);\r
 \r
-            addAndMakeVisible (overwritePath = new Label ("Overwrite Path", overwriteFolderPath));\r
+            overwritePath.reset (new Label ("Overwrite Path", overwriteFolderPath));\r
+            addAndMakeVisible (overwritePath.get());\r
             overwritePath->setFont (Font (15.00f, Font::bold));\r
             overwritePath->setJustificationType (Justification::topLeft);\r
             overwritePath->setEditable (false, false, false);\r
 \r
-            addAndMakeVisible (overwriteButton = new TextButton ("Overwrite Button"));\r
+            overwriteButton.reset (new TextButton ("Overwrite Button"));\r
+            addAndMakeVisible (overwriteButton.get());\r
             overwriteButton->setButtonText (TRANS("Overwrite"));\r
             overwriteButton->onClick = [this] { exitParentDialog (1); };\r
         }\r
 \r
-        juceIcon = Drawable::createFromImageData (BinaryData::juce_icon_png,\r
-                                                  BinaryData::juce_icon_pngSize);\r
+        juceIcon.reset (Drawable::createFromImageData (BinaryData::juce_icon_png,\r
+                                                       BinaryData::juce_icon_pngSize));\r
 \r
         setSize (518, overwritePath != nullptr ? 345 : 269);\r
 \r
@@ -371,7 +380,7 @@ public:
                                                                            releaseNotes, overwritePath), true);\r
 \r
         DialogWindow::LaunchOptions lo;\r
-        lo.dialogTitle = TRANS ("Download \"123\" version 456?").replace ("456", version.toString())\r
+        lo.dialogTitle = TRANS("Download \"123\" version 456?").replace ("456", version.toString())\r
                                                                 .replace ("123", productName);\r
         lo.dialogBackgroundColour = userDialog->findColour (backgroundColourId);\r
         lo.content = userDialog;\r
@@ -386,11 +395,11 @@ public:
 \r
 private:\r
     bool hasOverwriteButton;\r
-    ScopedPointer<Label> titleLabel, contentLabel, changeLogLabel, overwriteLabel, overwritePath;\r
-    ScopedPointer<TextButton> okButton, cancelButton;\r
-    ScopedPointer<TextEditor> changeLog;\r
-    ScopedPointer<TextButton> overwriteButton;\r
-    ScopedPointer<Drawable> juceIcon;\r
+    std::unique_ptr<Label> titleLabel, contentLabel, changeLogLabel, overwriteLabel, overwritePath;\r
+    std::unique_ptr<TextButton> okButton, cancelButton;\r
+    std::unique_ptr<TextEditor> changeLog;\r
+    std::unique_ptr<TextButton> overwriteButton;\r
+    std::unique_ptr<Drawable> juceIcon;\r
 \r
     void lookAndFeelChanged() override\r
     {\r
@@ -617,9 +626,9 @@ void LatestVersionChecker::checkForNewVersion()
 \r
         const int numRedirects = 0;\r
 \r
-        const ScopedPointer<InputStream> in (updateURL.createInputStream (false, nullptr, nullptr,\r
-                                                                          extraHeaders, 0, &responseHeaders,\r
-                                                                          &statusCode, numRedirects));\r
+        const std::unique_ptr<InputStream> in (updateURL.createInputStream (false, nullptr, nullptr,\r
+                                                                            extraHeaders, 0, &responseHeaders,\r
+                                                                            &statusCode, numRedirects));\r
 \r
         if (threadShouldExit())\r
             return;  // can't connect: fail silently.\r
@@ -763,8 +772,8 @@ void LatestVersionChecker::askUserForLocationToDownload (URL& newVersionToDownlo
         if (targetFolder.getChildFile (".git").isDirectory())\r
         {\r
             AlertWindow::showMessageBox (AlertWindow::WarningIcon,\r
-                                         TRANS ("Downloading new JUCE version"),\r
-                                         TRANS ("This folder is a GIT repository!\n\n"\r
+                                         TRANS("Downloading new JUCE version"),\r
+                                         TRANS("This folder is a GIT repository!\n\n"\r
                                                 "You should use a \"git pull\" to update it to the latest version. "\r
                                                 "Or to use the Projucer to get an update, you should select an empty "\r
                                                 "folder into which you'd like to download the new code."));\r
index c6070c74398cb6c57610a333f762211aeb05c842..4dfe6cfc44817cbc4d16d84f7616e191e8828643 100644 (file)
@@ -121,7 +121,7 @@ namespace
 \r
         TemporaryFile temp (file);\r
 \r
-        if (! temp.getFile().replaceWithText (newText, false, false))\r
+        if (! temp.getFile().replaceWithText (newText, false, false, nullptr))\r
             throw CommandLineError ("!!! ERROR Couldn't write to temp file!");\r
 \r
         if (! temp.overwriteTargetFileWithTemporary())\r
@@ -163,7 +163,7 @@ namespace
             }\r
         }\r
 \r
-        ScopedPointer<Project> project;\r
+        std::unique_ptr<Project> project;\r
     };\r
 \r
     //==============================================================================\r
@@ -307,7 +307,7 @@ namespace
         std::cout << "Writing: " << targetFile.getFullPathName() << std::endl;\r
 \r
         TemporaryFile temp (targetFile);\r
-        ScopedPointer<FileOutputStream> out (temp.getFile().createOutputStream());\r
+        std::unique_ptr<FileOutputStream> out (temp.getFile().createOutputStream());\r
 \r
         bool ok = out != nullptr && zip.writeToStream (*out, nullptr);\r
         out.reset();\r
@@ -368,7 +368,7 @@ namespace
 \r
     static void cleanWhitespace (const File& file, CleanupOptions options)\r
     {\r
-        const String content (file.loadFileAsString());\r
+        auto content = file.loadFileAsString();\r
 \r
         if (content.contains ("%""%") && content.contains ("//["))\r
             return; // ignore projucer GUI template files\r
@@ -400,7 +400,7 @@ namespace
 \r
             if (options.fixDividerComments)\r
             {\r
-                String afterIndent (line.trim());\r
+                auto afterIndent = line.trim();\r
 \r
                 if (afterIndent.startsWith ("//") && afterIndent.length() > 20)\r
                 {\r
@@ -435,7 +435,7 @@ namespace
 \r
         for (auto it = args.begin() + 1; it < args.end(); ++it)\r
         {\r
-            const File target (getFileCheckingForExistence (*it));\r
+            auto target = getFileCheckingForExistence (*it);\r
 \r
             Array<File> files;\r
 \r
@@ -732,7 +732,7 @@ namespace
        #endif\r
 \r
         auto settingsFile = userAppData.getChildFile ("Projucer").getChildFile ("Projucer.settings");\r
-        ScopedPointer<XmlElement> xml (XmlDocument::parse (settingsFile));\r
+        std::unique_ptr<XmlElement> xml (XmlDocument::parse (settingsFile));\r
         auto settingsTree = ValueTree::fromXml (*xml);\r
 \r
         if (! settingsTree.isValid())\r
index 394d3f5cfbdc6f96a3aa02f0175d4b1ecdc15449..6a07ad3059db48d9b6e6ddbe75cc5551cc31f980 100644 (file)
@@ -60,7 +60,7 @@ MainWindow::MainWindow()
     {\r
         commandManager.getKeyMappings()->resetToDefaultMappings();\r
 \r
-        ScopedPointer<XmlElement> keys (getGlobalProperties().getXmlValue ("keyMappings"));\r
+        std::unique_ptr<XmlElement> keys (getGlobalProperties().getXmlValue ("keyMappings"));\r
 \r
         if (keys != nullptr)\r
             commandManager.getKeyMappings()->restoreFromXml (*keys);\r
@@ -142,7 +142,7 @@ void MainWindow::closeButtonPressed()
 \r
 bool MainWindow::closeProject (Project* project, bool askUserToSave)\r
 {\r
-    jassert (project == currentProject && project != nullptr);\r
+    jassert (project == currentProject.get() && project != nullptr);\r
 \r
     if (project == nullptr)\r
         return true;\r
@@ -177,7 +177,7 @@ void MainWindow::moveProject (File newProjectFileToOpen)
 {\r
     auto openInIDE = currentProject->shouldOpenInIDEAfterSaving();\r
 \r
-    closeProject (currentProject, false);\r
+    closeProject (currentProject.get(), false);\r
     openFile (newProjectFileToOpen);\r
 \r
     if (currentProject != nullptr)\r
@@ -234,7 +234,7 @@ bool MainWindow::openFile (const File& file)
 \r
     if (file.hasFileExtension (Project::projectFileExtension))\r
     {\r
-        ScopedPointer<Project> newDoc (new Project (file));\r
+        std::unique_ptr<Project> newDoc (new Project (file));\r
 \r
         auto result = newDoc->loadFrom (file, true);\r
 \r
index b939acde7b86819b51609ea6858775fd7e0e03db..3a1b43127c67f268d935f458525d52cc8aedefc0 100644 (file)
@@ -78,7 +78,7 @@ public:
     bool shouldDropFilesWhenDraggedExternally (const DragAndDropTarget::SourceDetails& sourceDetails,\r
                                                StringArray& files, bool& canMoveFiles) override;\r
 private:\r
-    ScopedPointer<Project> currentProject;\r
+    std::unique_ptr<Project> currentProject;\r
     Value projectNameValue;\r
 \r
     static const char* getProjectWindowPosName()   { return "projectWindowPos"; }\r
index b854043584d5a862c83ca2221775e220e941b819..7efafdfdbe5f3fd8cc34047f4d8f4bc6d5f4f8ec 100644 (file)
@@ -26,7 +26,7 @@ public:
     {\r
         // This method is where you should put your application's initialisation code..\r
 \r
-        mainWindow = new MainWindow (getApplicationName());\r
+        mainWindow.reset (new MainWindow (getApplicationName()));\r
     }\r
 \r
     void shutdown() override\r
@@ -92,7 +92,7 @@ public:
     };\r
 \r
 private:\r
-    ScopedPointer<MainWindow> mainWindow;\r
+    std::unique_ptr<MainWindow> mainWindow;\r
 };\r
 \r
 //==============================================================================\r
index 77cdc194db80e67c6d5410c2da0efca04b3397b6..53a5a9bb7b2b6117b6c30363e87a5c37ae7d5e37 100644 (file)
@@ -26,7 +26,7 @@ public:
     {\r
         // This method is where you should put your application's initialisation code..\r
 \r
-        mainWindow = new MainWindow (getApplicationName());\r
+        mainWindow.reset (new MainWindow (getApplicationName()));\r
     }\r
 \r
     void shutdown() override\r
@@ -91,7 +91,7 @@ public:
     };\r
 \r
 private:\r
-    ScopedPointer<MainWindow> mainWindow;\r
+    std::unique_ptr<MainWindow> mainWindow;\r
 };\r
 \r
 //==============================================================================\r
index 36763f82cd9c20bf9fa421c8ffb377838241a276..c26a2d0465946409833f2fc3d13275eb69a398e1 100644 (file)
@@ -57,7 +57,8 @@ private:
         //==============================================================================\r
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)\r
     };\r
-    ScopedPointer<MainWindow> mainWindow;\r
+\r
+    std::unique_ptr<MainWindow> mainWindow;\r
 };\r
 \r
 //==============================================================================\r
index d08202a845d0c26573fc2d9e9b4367ec4343511b..507d2e7da05112898142b6122a0ee3dbde37e2e3 100644 (file)
@@ -74,7 +74,7 @@ public:
 private:\r
     StringArray facts;\r
     File file;\r
-    ScopedPointer<Drawable> drawable;\r
+    std::unique_ptr<Drawable> drawable;\r
 \r
     void tryToLoadImage()\r
     {\r
@@ -83,7 +83,7 @@ private:
         drawable.reset();\r
 \r
         {\r
-            ScopedPointer<InputStream> input (file.createInputStream());\r
+            std::unique_ptr<InputStream> input (file.createInputStream());\r
 \r
             if (input != nullptr)\r
             {\r
@@ -113,7 +113,7 @@ private:
 \r
         if (drawable == nullptr)\r
         {\r
-            ScopedPointer<XmlElement> svg (XmlDocument::parse (file));\r
+            std::unique_ptr<XmlElement> svg (XmlDocument::parse (file));\r
 \r
             if (svg != nullptr)\r
                 drawable.reset (Drawable::createFromSVG (*svg));\r
index 8f37ed8a9c6503a663e7aac6f20c31d8f1219065..71e32d3e136bcc087cdcf81cb308c95254728415 100644 (file)
@@ -362,7 +362,7 @@ private:
                 String text = getTextInRange (selection).toLowerCase();\r
 \r
                 if (isIntegerLiteral (text) || isFloatLiteral (text))\r
-                    overlay = new LiteralHighlightOverlay (*this, selection, mightBeColourValue (text));\r
+                    overlay.reset (new LiteralHighlightOverlay (*this, selection, mightBeColourValue (text)));\r
             }\r
         }\r
 \r
@@ -677,7 +677,7 @@ private:
         static Colour getBackgroundColour() { return Colour (0xcb5c7879); }\r
     };\r
 \r
-    ScopedPointer<LiteralHighlightOverlay> overlay;\r
+    std::unique_ptr<LiteralHighlightOverlay> overlay;\r
 };\r
 \r
 //==============================================================================\r
index 979d61054cc9abf8b9e6926203583e9bc59eaa3f..13604b1cd8fbafe96c0bd21fd0331cf261aaf948 100644 (file)
@@ -127,10 +127,10 @@ public:
 \r
 protected:\r
     FileModificationDetector modDetector;\r
-    ScopedPointer<CodeDocument> codeDoc;\r
+    std::unique_ptr<CodeDocument> codeDoc;\r
     Project* project;\r
 \r
-    ScopedPointer<CodeEditorComponent::State> lastState;\r
+    std::unique_ptr<CodeEditorComponent::State> lastState;\r
 \r
     void reloadInternal();\r
 };\r
@@ -150,7 +150,7 @@ public:
     void scrollToKeepRangeOnScreen (Range<int> range);\r
     void highlight (Range<int> range, bool cursorAtStart);\r
 \r
-    ScopedPointer<GenericCodeEditorComponent> editor;\r
+    std::unique_ptr<GenericCodeEditorComponent> editor;\r
 \r
 private:\r
     void resized() override;\r
@@ -214,7 +214,7 @@ public:
 private:\r
     File file;\r
     class FindPanel;\r
-    ScopedPointer<FindPanel> findPanel;\r
+    std::unique_ptr<FindPanel> findPanel;\r
     ListenerList<Listener> listeners;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GenericCodeEditorComponent)\r
index dbe58df233956b24f77bdc6436c78217d5d69e12..16d5fb1e3ed578c0977afd00d6b17fe55d576243 100644 (file)
@@ -158,8 +158,8 @@ public:
             const String userCodeComment ("UserButtonCode_" + memberVariableName);\r
 \r
             callback\r
-                << "if (buttonThatWasClicked == " << memberVariableName\r
-                << ")\n{\n    //[" << userCodeComment << "] -- add your button handler code here..\n    //[/" << userCodeComment << "]\n}\n";\r
+                << "if (buttonThatWasClicked == " << memberVariableName << ".get())\n"\r
+                << "{\n    //[" << userCodeComment << "] -- add your button handler code here..\n    //[/" << userCodeComment << "]\n}\n";\r
         }\r
     }\r
 \r
index 9c86cd47bfb9fcdf4106101a81e66f935aff4fb1..55be623ae025fc17ba107cc88994ae770361385c 100644 (file)
@@ -152,8 +152,8 @@ public:
             const String userCodeComment ("UserComboBoxCode_" + memberVariableName);\r
 \r
             callback\r
-                << "if (comboBoxThatHasChanged == " << memberVariableName\r
-                << ")\n{\n    //[" << userCodeComment << "] -- add your combo box handling code here..\n    //[/" << userCodeComment << "]\n}\n";\r
+                << "if (comboBoxThatHasChanged == " << memberVariableName << ".get())\n"\r
+                << "{\n    //[" << userCodeComment << "] -- add your combo box handling code here..\n    //[/" << userCodeComment << "]\n}\n";\r
         }\r
     }\r
 \r
index d30c7939b5d74c4ec2f8fb1b35b14393a6691e1f..45624392fa35f49cc1595f57cc650e4c6fe3a5f3 100644 (file)
@@ -63,7 +63,7 @@ Component* ComponentTypeHandler::createCopyOf (JucerDocument* document, Componen
     jassert (getHandlerFor (existing) == this);\r
 \r
     Component* const newOne = createNewComponent (document);\r
-    ScopedPointer<XmlElement> xml (createXmlFor (&existing, document->getComponentLayout()));\r
+    std::unique_ptr<XmlElement> xml (createXmlFor (&existing, document->getComponentLayout()));\r
 \r
     if (xml != nullptr)\r
         restoreFromXml (*xml, newOne, document->getComponentLayout());\r
@@ -559,7 +559,7 @@ void ComponentTypeHandler::fillInMemberVariableDeclarations (GeneratedCode& code
         clsName = getClassName (component);\r
 \r
     code.privateMemberDeclarations\r
-        << "ScopedPointer<" << clsName << "> " << memberVariableName << ";\n";\r
+        << "std::unique_ptr<" << clsName << "> " << memberVariableName << ";\n";\r
 }\r
 \r
 void ComponentTypeHandler::fillInResizeCode (GeneratedCode& code, Component* component, const String& memberVariableName)\r
@@ -589,7 +589,7 @@ void ComponentTypeHandler::fillInCreationCode (GeneratedCode& code, Component* c
     const String virtualName (component->getProperties() ["virtualName"].toString());\r
 \r
     String s;\r
-    s << "addAndMakeVisible (" << memberVariableName << " = new ";\r
+    s << memberVariableName << ".reset (new ";\r
 \r
     if (virtualName.isNotEmpty())\r
         s << CodeHelpers::makeValidIdentifier (virtualName, false, false, true);\r
@@ -597,7 +597,9 @@ void ComponentTypeHandler::fillInCreationCode (GeneratedCode& code, Component* c
         s << getClassName (component);\r
 \r
     if (params.isEmpty())\r
+    {\r
         s << "());\n";\r
+    }\r
     else\r
     {\r
         StringArray lines;\r
@@ -608,6 +610,9 @@ void ComponentTypeHandler::fillInCreationCode (GeneratedCode& code, Component* c
         s << " (" << params << "));\n";\r
     }\r
 \r
+    s << "addAndMakeVisible (" << memberVariableName << ".get());\n";\r
+\r
+\r
     if (SettableTooltipClient* ttc = dynamic_cast<SettableTooltipClient*> (component))\r
     {\r
         if (ttc->getTooltip().isNotEmpty())\r
index d206f143c3dc3a3e88f0b8105698e8444a831a7e..25c5fc73078df341e6049144024a9a2902c3c2f6 100644 (file)
@@ -171,8 +171,8 @@ struct SliderHandler  : public ComponentTypeHandler
             const String userCodeComment ("UserSliderCode_" + memberVariableName);\r
 \r
             callback\r
-                << "if (sliderThatWasMoved == " << memberVariableName\r
-                << ")\n{\n    //[" << userCodeComment << "] -- add your slider handling code here..\n    //[/" << userCodeComment << "]\n}\n";\r
+                << "if (sliderThatWasMoved == " << memberVariableName << ".get())\n"\r
+                << "{\n    //[" << userCodeComment << "] -- add your slider handling code here..\n    //[/" << userCodeComment << "]\n}\n";\r
         }\r
     }\r
 \r
index 9cc48e2422bfcad47177a7b0ff071acade5cc9ca..b7e97d4d8b56167acbbd198c647bcebb0ceeae20 100644 (file)
@@ -179,7 +179,7 @@ public:
             {\r
                 File jucerCpp = code.document->getCppFile().getSiblingFile (getTabJucerFile (t, i));\r
 \r
-                ScopedPointer<JucerDocument> doc (JucerDocument::createForCppFile (nullptr, jucerCpp));\r
+                std::unique_ptr<JucerDocument> doc (JucerDocument::createForCppFile (nullptr, jucerCpp));\r
 \r
                 if (doc != nullptr)\r
                 {\r
@@ -384,7 +384,7 @@ private:
                     jucerComp->setFilename (jucerComponentFile);\r
                     jucerComp->setToInitialSize();\r
 \r
-                    addAndMakeVisible (jucerComp);\r
+                    addAndMakeVisible (jucerComp.get());\r
                 }\r
             }\r
             else\r
@@ -403,7 +403,7 @@ private:
         bool isUsingJucerComp;\r
         String contentClassName, constructorParams;\r
         String jucerComponentFile;\r
-        ScopedPointer<TestComponent> jucerComp;\r
+        std::unique_ptr<TestComponent> jucerComp;\r
     };\r
 \r
     //==============================================================================\r
@@ -698,7 +698,7 @@ private:
                 : ComponentUndoableAction<TabbedComponent> (comp, l),\r
                   indexToRemove (indexToRemove_)\r
             {\r
-                previousState = getTabState (comp, indexToRemove);\r
+                previousState.reset (getTabState (comp, indexToRemove));\r
             }\r
 \r
             bool perform()\r
@@ -723,7 +723,7 @@ private:
 \r
         private:\r
             int indexToRemove;\r
-            ScopedPointer<XmlElement> previousState;\r
+            std::unique_ptr<XmlElement> previousState;\r
         };\r
     };\r
 \r
@@ -1164,7 +1164,7 @@ private:
             {\r
                 showCorrectTab();\r
 \r
-                ScopedPointer<XmlElement> state (getTabState (getComponent(), from));\r
+                std::unique_ptr<XmlElement> state (getTabState (getComponent(), from));\r
 \r
                 getComponent()->removeTab (from);\r
                 addNewTab (getComponent(), to);\r
index 3ac593c50864b8fc90e8e40ccc0ecc19d79011f6..f416c23ab41bc304e211a213a8f42ad149107bb0 100644 (file)
@@ -148,7 +148,7 @@ public:
                 if (filename.isNotEmpty())\r
                     file = code.document->getCppFile().getSiblingFile (filename);\r
 \r
-                ScopedPointer<JucerDocument> doc (JucerDocument::createForCppFile (nullptr, file));\r
+                std::unique_ptr<JucerDocument> doc (JucerDocument::createForCppFile (nullptr, file));\r
 \r
                 if (doc != nullptr)\r
                 {\r
index 955e8c55255052b571267cd56963969cffafe2ce..89698edd5c4213c9b1314d116353ab3c8365ead8 100644 (file)
@@ -168,7 +168,7 @@ JucerDocument* ButtonDocument::createCopy()
     ButtonDocument* newOne = new ButtonDocument (cpp);\r
     newOne->resources = resources;\r
 \r
-    ScopedPointer<XmlElement> xml (createXml());\r
+    std::unique_ptr<XmlElement> xml (createXml());\r
     newOne->loadFromXml (*xml);\r
 \r
     return newOne;\r
index 3c4014d0e945e8db3a634dc6f22f1d713e68179c..106788736b4b6a7da5ec36589a272226991872dd 100644 (file)
@@ -67,6 +67,6 @@ public:
                              StringArray& initialContents) const;\r
 \r
     //==============================================================================\r
-    ScopedPointer<PaintRoutine> paintRoutines[7];\r
+    std::unique_ptr<PaintRoutine> paintRoutines[7];\r
     bool paintStatesEnabled [7];\r
 };\r
index 6c2000bedf32dd671c9f5bad32062595ea5b949a..a7f0a1d016e36a077f66fbe056a6d16d76dcfb01 100644 (file)
@@ -55,7 +55,7 @@ JucerDocument* ComponentDocument::createCopy()
 \r
     newOne->resources = resources;\r
 \r
-    ScopedPointer<XmlElement> xml (createXml());\r
+    std::unique_ptr<XmlElement> xml (createXml());\r
     newOne->loadFromXml (*xml);\r
 \r
     return newOne;\r
index 5981e0b7a6891738832efe3a8860abe7542d86e0..4df2f956f0134aad2eef3ca91b9bfa21d650d9e3 100644 (file)
@@ -55,6 +55,6 @@ public:
     void applyCustomPaintSnippets (StringArray&);\r
 \r
 private:\r
-    ScopedPointer<ComponentLayout> components;\r
-    ScopedPointer<PaintRoutine> backgroundGraphics;\r
+    std::unique_ptr<ComponentLayout> components;\r
+    std::unique_ptr<PaintRoutine> backgroundGraphics;\r
 };\r
index a6a33f54dfef882c5cc4d6d57bbb8393d85cccda..6caa8b1f7e0fccdd0d6d3ddc6f9e992b40b91e99 100644 (file)
@@ -919,7 +919,7 @@ void ColouredElement::convertToNewPathElement (const Path& path)
         newElement.setStrokeType (getStrokeType().stroke, false);\r
         newElement.setStrokeFill (getStrokeType().fill, false);\r
 \r
-        ScopedPointer<XmlElement> xml (newElement.createXml());\r
+        std::unique_ptr<XmlElement> xml (newElement.createXml());\r
 \r
         PaintElement* e = getOwner()->addElementFromXml (*xml, getOwner()->indexOfElement (this), true);\r
 \r
index a4b8c99f4df5fbf32dd499e1ca45ec688124c94e..26e196b32e09e552e0583fd4d7e67fa5c5672bbd 100644 (file)
@@ -53,7 +53,8 @@ PaintElement::PaintElement (PaintRoutine* owner_,
     setMinimumOnscreenAmounts (0, 0, 0, 0);\r
     setSizeLimits (borderThickness * 2 + 1, borderThickness * 2 + 1, 8192, 8192);\r
 \r
-    addChildComponent (border = new ResizableBorderComponent (this, this));\r
+    border.reset (new ResizableBorderComponent (this, this));\r
+    addChildComponent (border.get());\r
 \r
     border->setBorderThickness (BorderSize<int> (borderThickness));\r
 \r
@@ -514,7 +515,7 @@ void PaintElement::checkBounds (Rectangle<int>& b,
                                 const bool isStretchingBottom,\r
                                 const bool isStretchingRight)\r
 {\r
-    if (ModifierKeys::getCurrentModifiers().isShiftDown())\r
+    if (ModifierKeys::currentModifiers.isShiftDown())\r
         setFixedAspectRatio (originalAspectRatio);\r
     else\r
         setFixedAspectRatio (0.0);\r
index 6f28988230ea9db597acdde56f7f66cb5b82bc25..e877f014f0d14ecd0ed3c5f46d94e09b6131a715 100644 (file)
@@ -130,7 +130,7 @@ protected:
     void updateSiblingComps();\r
 \r
 private:\r
-    ScopedPointer<ResizableBorderComponent> border;\r
+    std::unique_ptr<ResizableBorderComponent> border;\r
     String typeName;\r
     bool selected, dragging, mouseDownSelectStatus;\r
     double originalAspectRatio;\r
index c835c96f11a6ea0899a908f177e4e63852eefc04..489a70ce9aa169b8652a11d34d07436ce0016bd3 100644 (file)
@@ -43,7 +43,7 @@ void PaintElementGroup::ungroup (const bool undoable)
 \r
     for (int i = 0; i < subElements.size(); ++i)\r
     {\r
-        ScopedPointer<XmlElement> xml (subElements.getUnchecked(i)->createXml());\r
+        std::unique_ptr<XmlElement> xml (subElements.getUnchecked(i)->createXml());\r
 \r
         PaintElement* newOne = getOwner()->addElementFromXml (*xml, index, undoable);\r
         getOwner()->getSelectedElements().addToSelection (newOne);\r
@@ -63,9 +63,9 @@ void PaintElementGroup::groupSelected (PaintRoutine* routine)
         {\r
             if (routine->getSelectedElements().isSelected (routine->getElement (i)))\r
             {\r
-                ScopedPointer<XmlElement> xml (routine->getElement(i)->createXml());\r
+                std::unique_ptr<XmlElement> xml (routine->getElement(i)->createXml());\r
 \r
-                if (auto* newOne = ObjectTypes::createElementForXml (xml, routine))\r
+                if (auto* newOne = ObjectTypes::createElementForXml (xml.get(), routine))\r
                     newGroup->subElements.add (newOne);\r
 \r
                 if (i > frontIndex)\r
index 4bd9c28e2f15779156f18c209fce51c4c588411f..8976ce1ce7be24bb8da9d8b8896cc7894f96c879 100644 (file)
@@ -91,7 +91,7 @@ void PaintElementImage::fillInGeneratedCode (GeneratedCode& code, String& paintM
           << customPaintCode\r
           << "    //[/UserPaintCustomArguments]\n";\r
 \r
-        if (dynamic_cast<const DrawableImage*> (getDrawable()) != 0)\r
+        if (dynamic_cast<const DrawableImage*> (getDrawable()))\r
         {\r
             const String imageVariable ("cachedImage_" + resourceName.replace ("::", "_") + "_" + String (code.getUniqueSuffix()));\r
 \r
@@ -102,7 +102,6 @@ void PaintElementImage::fillInGeneratedCode (GeneratedCode& code, String& paintM
             else\r
                 r << "    g.setColour (Colours::black.withAlpha (" << CodeHelpers::floatLiteral (opacity, 3) << "));\n";\r
 \r
-\r
             if (mode == stretched)\r
             {\r
                 r << "    g.drawImage (" << imageVariable << ",\n"\r
@@ -132,11 +131,11 @@ void PaintElementImage::fillInGeneratedCode (GeneratedCode& code, String& paintM
                 const String imageVariable ("drawable" + String (code.getUniqueSuffix()));\r
 \r
                 code.privateMemberDeclarations\r
-                    << "ScopedPointer<Drawable> " << imageVariable << ";\n";\r
+                    << "std::unique_ptr<Drawable> " << imageVariable << ";\n";\r
 \r
                 code.constructorCode\r
-                    << imageVariable << " = Drawable::createFromImageData ("\r
-                    << resourceName << ", " << resourceName << "Size);\n";\r
+                    << imageVariable << ".reset (Drawable::createFromImageData ("\r
+                    << resourceName << ", " << resourceName << "Size));\n";\r
 \r
                 code.destructorCode\r
                     << imageVariable << " = nullptr;\n";\r
index 6df7cae2b85cfb287b3e92e98fb34a168e934027..35384cbe26a41d3c5cb8f921e203c092b625d8a0 100644 (file)
@@ -598,7 +598,7 @@ void PaintElementPath::restorePathFromString (const String& s)
 \r
     for (int i = 0; i < tokens.size(); ++i)\r
     {\r
-        ScopedPointer<PathPoint> p (new PathPoint (this));\r
+        std::unique_ptr<PathPoint> p (new PathPoint (this));\r
 \r
         if (tokens[i] == "s")\r
         {\r
@@ -653,7 +653,7 @@ void PaintElementPath::setToPath (const Path& newPath)
 \r
     while (i.next())\r
     {\r
-        ScopedPointer<PathPoint> p (new PathPoint (this));\r
+        std::unique_ptr<PathPoint> p (new PathPoint (this));\r
         p->type = i.elementType;\r
 \r
         if (i.elementType == Path::Iterator::startNewSubPath)\r
index b5acfba6518097fdde8dea9f785705790412e11c..971f2167243259f04be55eeba10b94cf6e33d5b8 100644 (file)
@@ -36,7 +36,7 @@ public:
         : PropertyComponent (name)\r
     {\r
         colourPropEditor.reset (new ColourPropEditorComponent (this, canReset));\r
-        addAndMakeVisible (colourPropEditor);\r
+        addAndMakeVisible (colourPropEditor.get());\r
     }\r
 \r
     virtual void setColour (Colour newColour) = 0;\r
@@ -205,5 +205,5 @@ public:
         }\r
     };\r
 \r
-    ScopedPointer<ColourPropEditorComponent> colourPropEditor;\r
+    std::unique_ptr<ColourPropEditorComponent> colourPropEditor;\r
 };\r
index 71498b4126585efe4a4319e132024345ed54280f..3c3cbd40447eb247bcd96efa55822bef1f96a47b 100644 (file)
@@ -68,7 +68,8 @@ public:
                 refresh(); // (to clear the text editor if it's got focus)\r
         };\r
 \r
-        addAndMakeVisible (textEditor = new PositionPropLabel (*this));\r
+        textEditor.reset (new PositionPropLabel (*this));\r
+        addAndMakeVisible (textEditor.get());\r
     }\r
 \r
     String getText() const\r
@@ -440,7 +441,7 @@ protected:
     };\r
 \r
     ComponentLayout* layout;\r
-    ScopedPointer<PositionPropLabel> textEditor;\r
+    std::unique_ptr<PositionPropLabel> textEditor;\r
     TextButton button;\r
 \r
     Component* component;\r
index ebfc177a172d09f184666b5f91723eda6ecc8b4a..1895f5d44136573387736296d9b321ca8f8df439 100644 (file)
@@ -201,7 +201,7 @@ void ComponentLayoutEditor::refreshAllComponents()
 {\r
     for (int i = getNumChildComponents(); --i >= 0;)\r
     {\r
-        ScopedPointer<ComponentOverlayComponent> overlay (dynamic_cast<ComponentOverlayComponent*> (getChildComponent (i)));\r
+        std::unique_ptr<ComponentOverlayComponent> overlay (dynamic_cast<ComponentOverlayComponent*> (getChildComponent (i)));\r
 \r
         if (overlay != nullptr && layout.containsComponent (overlay->target))\r
             overlay.release();\r
@@ -350,7 +350,7 @@ bool ComponentLayoutEditor::keyPressed (const KeyPress& key)
 bool ComponentLayoutEditor::isInterestedInFileDrag (const StringArray& filenames)\r
 {\r
     const File f (filenames [0]);\r
-    return f.hasFileExtension (".cpp");\r
+    return f.hasFileExtension (cppFileExtensions);\r
 }\r
 \r
 void ComponentLayoutEditor::filesDropped (const StringArray& filenames, int x, int y)\r
@@ -394,7 +394,7 @@ void ComponentLayoutEditor::itemDropped (const SourceDetails& dragSourceDetails)
     StringArray filenames;\r
 \r
     for (int i = 0; i < selectedNodes.size(); ++i)\r
-        if (selectedNodes.getUnchecked(i)->getFile().hasFileExtension (".cpp"))\r
+        if (selectedNodes.getUnchecked(i)->getFile().hasFileExtension (cppFileExtensions))\r
             filenames.add (selectedNodes.getUnchecked(i)->getFile().getFullPathName());\r
 \r
     filesDropped (filenames, dragSourceDetails.localPosition.x, dragSourceDetails.localPosition.y);\r
index 779a13d7d5cc4c80e0cd6dd93c1c0f9915810753..3ced81830818e29ecdceb40c025824babdbdccbe 100644 (file)
@@ -41,7 +41,8 @@ ComponentOverlayComponent::ComponentOverlayComponent (Component* const target_,
     setMinimumOnscreenAmounts (0, 0, 0, 0);\r
     setSizeLimits (borderThickness * 2 + 2, borderThickness * 2 + 2, 8192, 8192);\r
 \r
-    addChildComponent (border = new ResizableBorderComponent (this, this));\r
+    border.reset (new ResizableBorderComponent (this, this));\r
+    addChildComponent (border.get());\r
 \r
     border->setBorderThickness (BorderSize<int> (borderThickness));\r
 \r
@@ -188,7 +189,7 @@ void ComponentOverlayComponent::checkBounds (Rectangle<int>& b,
                                              const bool isStretchingBottom,\r
                                              const bool isStretchingRight)\r
 {\r
-    if (ModifierKeys::getCurrentModifiers().isShiftDown())\r
+    if (ModifierKeys::currentModifiers.isShiftDown())\r
         setFixedAspectRatio (originalAspectRatio);\r
     else\r
         setFixedAspectRatio (0.0);\r
index 94bd0f59fca9d095460f3f3ddde1b67499583e15..85b1ba18a8312ec5ff110567dacfa9cb270d617a 100644 (file)
@@ -76,7 +76,7 @@ public:
     const int borderThickness;\r
 \r
 private:\r
-    ScopedPointer<ResizableBorderComponent> border;\r
+    std::unique_ptr<ResizableBorderComponent> border;\r
 \r
     ComponentLayout& layout;\r
 \r
index 120e2fe429f4cdd68468b55377edbf1c7efd583d..8765e20de8398c388205db2c16b71aaf048d8848 100644 (file)
@@ -54,7 +54,7 @@ public:
 \r
 private:\r
     double scaleFactor = 1.0;\r
-    ScopedPointer<Component> content;\r
+    std::unique_ptr<Component> content;\r
 };\r
 \r
 //==============================================================================\r
@@ -93,7 +93,7 @@ public:
             else\r
             {\r
                 for (int i = getNumChildComponents(); --i >= 0;)\r
-                    ScopedPointer<DraggerOverlayComp> deleter (dynamic_cast<DraggerOverlayComp*> (getChildComponent (i)));\r
+                    std::unique_ptr<DraggerOverlayComp> deleter (dynamic_cast<DraggerOverlayComp*> (getChildComponent (i)));\r
             }\r
         }\r
     }\r
index 11027570ed4addadc0068d7e34a74f013e1e5bff..558e4c773ed8558cc787228585e72bc819c98b3d 100644 (file)
   ==============================================================================\r
 */\r
 \r
+#pragma once\r
+\r
+\r
+//==============================================================================\r
 /**\r
     A namespace to hold all the possible command IDs.\r
 */\r
index a05aa281972d4acd8d02da0ef84c25757ac66175..9aab5943417993cd0e447f1dc21979d72de4cd9f 100644 (file)
@@ -47,7 +47,8 @@ public:
         : PropertyComponent ("extra callbacks", 250),\r
           document (doc)\r
     {\r
-        addAndMakeVisible (listBox = new ListBox (String(), this));\r
+        listBox.reset (new ListBox (String(), this));\r
+        addAndMakeVisible (listBox.get());\r
         listBox->setRowHeight (22);\r
 \r
         document.addChangeListener (this);\r
@@ -126,7 +127,7 @@ public:
 \r
 private:\r
     JucerDocument& document;\r
-    ScopedPointer<ListBox> listBox;\r
+    std::unique_ptr<ListBox> listBox;\r
 \r
     StringArray baseClasses, returnValues, methods, initialContents;\r
 };\r
@@ -608,10 +609,10 @@ void JucerDocumentEditor::saveLastSelectedTab() const
         {\r
             auto& projectProps = project->getStoredProperties();\r
 \r
-            ScopedPointer<XmlElement> root (projectProps.getXmlValue ("GUIComponentsLastTab"));\r
+            std::unique_ptr<XmlElement> root (projectProps.getXmlValue ("GUIComponentsLastTab"));\r
 \r
             if (root == nullptr)\r
-                root = new XmlElement ("FILES");\r
+                root.reset (new XmlElement ("FILES"));\r
 \r
             auto fileName = document->getCppFile().getFileName();\r
 \r
@@ -633,7 +634,7 @@ void JucerDocumentEditor::restoreLastSelectedTab()
     {\r
         if (auto* project = document->getCppDocument().getProject())\r
         {\r
-            ScopedPointer<XmlElement> root (project->getStoredProperties().getXmlValue ("GUIComponentsLastTab"));\r
+            std::unique_ptr<XmlElement> root (project->getStoredProperties().getXmlValue ("GUIComponentsLastTab"));\r
 \r
             if (root != nullptr)\r
             {\r
@@ -937,7 +938,7 @@ void JucerDocumentEditor::getCommandInfo (const CommandID commandID, Application
 \r
             bool canPaste = false;\r
 \r
-            ScopedPointer<XmlElement> doc (XmlDocument::parse (SystemClipboard::getTextFromClipboard()));\r
+            std::unique_ptr<XmlElement> doc (XmlDocument::parse (SystemClipboard::getTextFromClipboard()));\r
 \r
             if (doc != nullptr)\r
             {\r
@@ -1155,7 +1156,9 @@ bool JucerDocumentEditor::perform (const InvocationInfo& info)
 \r
         case StandardApplicationCommandIDs::paste:\r
             {\r
-                if (ScopedPointer<XmlElement> doc = XmlDocument::parse (SystemClipboard::getTextFromClipboard()))\r
+                std::unique_ptr<XmlElement> doc (XmlDocument::parse (SystemClipboard::getTextFromClipboard()));\r
+\r
+                if (doc != nullptr)\r
                 {\r
                     if (doc->hasTagName (ComponentLayout::clipboardXmlTag))\r
                     {\r
index 89f8bf6d1796b274515653c08a772900459171d1..479b14ea654d0fb4d30c3b1b1d77a7066fb93d7d 100644 (file)
@@ -69,7 +69,7 @@ public:
     static JucerDocumentEditor* getActiveDocumentHolder();\r
 \r
 private:\r
-    ScopedPointer<JucerDocument> document;\r
+    std::unique_ptr<JucerDocument> document;\r
     ComponentLayoutPanel* compLayoutPanel = nullptr;\r
 \r
     struct JucerDocumentTabs  : public TabbedComponent\r
index c432106d12378d1ce7f521ecd09829850d19e75e..f75505912c7a546a20f580b09bf2a6bc8c66572a 100644 (file)
@@ -264,7 +264,7 @@ void PaintRoutineEditor::filesDropped (const StringArray& filenames, int x, int
 \r
     if (f.existsAsFile())\r
     {\r
-        ScopedPointer<Drawable> d (Drawable::createFromImageFile (f));\r
+        std::unique_ptr<Drawable> d (Drawable::createFromImageFile (f));\r
 \r
         if (d != nullptr)\r
         {\r
index 9fcaacc9e4d46017acfac7179dbd8d16677c6b7b..4c17bca1adddf0a5494ce1fd16626530b04ea002 100644 (file)
@@ -109,7 +109,7 @@ public:
 \r
     void updateList()\r
     {\r
-        ScopedPointer<XmlElement> state (propsPanel->getOpennessState());\r
+        std::unique_ptr<XmlElement> state (propsPanel->getOpennessState());\r
 \r
         clear();\r
 \r
index 4ed707a1b237f95c59e9da259f9afbbcdcb409a8..11bf9cb7c7b98642e90619dcf2af568cf38af94d 100644 (file)
@@ -79,7 +79,8 @@ ResourceEditorPanel::ResourceEditorPanel (JucerDocument& doc)
     delButton.setEnabled (false);\r
     delButton.onClick = [this] { document.getResources().remove (listBox->getSelectedRow (0)); };\r
 \r
-    addAndMakeVisible (listBox = new TableListBox (String(), this));\r
+    listBox.reset (new TableListBox (String(), this));\r
+    addAndMakeVisible (listBox.get());\r
     listBox->getHeader().addColumn ("name", 1, 150, 80, 400);\r
     listBox->getHeader().addColumn ("original file", 2, 350, 80, 800);\r
     listBox->getHeader().addColumn ("size", 3, 100, 40, 150);\r
index 921a1d9bcdb3e88581ab815feeccf1d4e0f24983..bc97e817b2f507489c9c52a9edf1427f9fc6fb30 100644 (file)
@@ -55,6 +55,6 @@ private:
     void reloadAll();\r
 \r
     JucerDocument& document;\r
-    ScopedPointer<TableListBox> listBox;\r
+    std::unique_ptr<TableListBox> listBox;\r
     TextButton addButton, reloadAllButton, delButton;\r
 };\r
index da9460879cfc9662dfac0de3675237bbdca777ac..e47b8489668174eb74c26437698e3fdbc3cf1acf 100644 (file)
@@ -99,7 +99,7 @@ void TestComponent::setFilename (const String& newName)
         filename = newName;\r
         lastModificationTime = findFile().getLastModificationTime();\r
 \r
-        loadedDocument = JucerDocument::createForCppFile (nullptr, findFile());\r
+        loadedDocument.reset (JucerDocument::createForCppFile (nullptr, findFile()));\r
 \r
         updateContents();\r
         repaint();\r
index 29e9c891b0e74382457d190175cadbcd66d5834c..ba6f3bde91768ac154ce9b45bfacc6bf4db07990 100644 (file)
@@ -64,7 +64,7 @@ public:
 \r
 private:\r
     JucerDocument* ownerDocument;\r
-    ScopedPointer<JucerDocument> loadedDocument;\r
+    std::unique_ptr<JucerDocument> loadedDocument;\r
     String filename, constructorParams;\r
     Time lastModificationTime;\r
     const bool alwaysFillBackground;\r
index 56dfe16108cd31702560734c41b33f73aa3a0156..aa38c715e672d528f13ae89a4bfcfc8c26056a80 100644 (file)
@@ -50,7 +50,7 @@ public:
         String name;\r
         String originalFilename;\r
         MemoryBlock data;\r
-        ScopedPointer<Drawable> drawable;\r
+        std::unique_ptr<Drawable> drawable;\r
     };\r
 \r
     void clear();\r
index 136599af3bc43bc6b6be9ce0b967dad776afe68c..1d7b0bf97a5ce5ee009b5829c23c7bf5ee53494a 100644 (file)
@@ -59,7 +59,7 @@ void ComponentLayout::perform (UndoableAction* action, const String& actionName)
     }\r
     else\r
     {\r
-        ScopedPointer<UndoableAction> deleter (action);\r
+        std::unique_ptr<UndoableAction> deleter (action);\r
         action->perform();\r
     }\r
 }\r
@@ -107,7 +107,7 @@ public:
     int indexAdded;\r
 \r
 private:\r
-    ScopedPointer<XmlElement> xml;\r
+    std::unique_ptr<XmlElement> xml;\r
     ComponentLayout& layout;\r
 \r
     static void showCorrectTab()\r
@@ -129,7 +129,7 @@ public:
          oldIndex (-1)\r
     {\r
         if (ComponentTypeHandler* const h = ComponentTypeHandler::getHandlerFor (*comp))\r
-            xml = h->createXmlFor (comp, &layout);\r
+            xml.reset (h->createXmlFor (comp, &layout));\r
         else\r
             jassertfalse;\r
 \r
@@ -155,7 +155,7 @@ public:
     }\r
 \r
 private:\r
-    ScopedPointer<XmlElement> xml;\r
+    std::unique_ptr<XmlElement> xml;\r
     int oldIndex;\r
 };\r
 \r
@@ -272,7 +272,7 @@ void ComponentLayout::copySelectedToClipboard()
 void ComponentLayout::paste()\r
 {\r
     XmlDocument clip (SystemClipboard::getTextFromClipboard());\r
-    ScopedPointer<XmlElement> doc (clip.getDocumentElement());\r
+    std::unique_ptr<XmlElement> doc (clip.getDocumentElement());\r
 \r
     if (doc != nullptr && doc->hasTagName (clipboardXmlTag))\r
     {\r
@@ -408,25 +408,24 @@ void ComponentLayout::bringLostItemsBackOnScreen (int width, int height)
 \r
 Component* ComponentLayout::addNewComponent (ComponentTypeHandler* const type, int x, int y)\r
 {\r
-    ScopedPointer<Component> c (type->createNewComponent (getDocument()));\r
+    std::unique_ptr<Component> c (type->createNewComponent (getDocument()));\r
     jassert (c != nullptr);\r
 \r
     if (c != nullptr)\r
     {\r
         c->setSize (type->getDefaultWidth(), type->getDefaultHeight());\r
         c->setCentrePosition (x, y);\r
-        updateStoredComponentPosition (c, false);\r
+        updateStoredComponentPosition (c.get(), false);\r
 \r
         c->getProperties().set ("id", nextCompUID++);\r
 \r
-        ScopedPointer<XmlElement> xml (type->createXmlFor (c, this));\r
-        c.reset();\r
-        c = addComponentFromXml (*xml, true);\r
+        std::unique_ptr<XmlElement> xml (type->createXmlFor (c.get(), this));\r
+        c.reset (addComponentFromXml (*xml, true));\r
 \r
-        String memberName (CodeHelpers::makeValidIdentifier (type->getClassName (c), true, true, false));\r
-        setComponentMemberVariableName (c, memberName);\r
+        String memberName (CodeHelpers::makeValidIdentifier (type->getClassName (c.get()), true, true, false));\r
+        setComponentMemberVariableName (c.get(), memberName);\r
 \r
-        selected.selectOnly (c);\r
+        selected.selectOnly (c.get());\r
     }\r
 \r
     return c.release();\r
@@ -445,18 +444,18 @@ Component* ComponentLayout::addComponentFromXml (const XmlElement& xml, const bo
     if (ComponentTypeHandler* const type\r
            = ComponentTypeHandler::getHandlerForXmlTag (xml.getTagName()))\r
     {\r
-        ScopedPointer<Component> newComp (type->createNewComponent (getDocument()));\r
+        std::unique_ptr<Component> newComp (type->createNewComponent (getDocument()));\r
 \r
-        if (type->restoreFromXml (xml, newComp, this))\r
+        if (type->restoreFromXml (xml, newComp.get(), this))\r
         {\r
             // ensure that the new comp's name is unique\r
-            setComponentMemberVariableName (newComp, getComponentMemberVariableName (newComp));\r
+            setComponentMemberVariableName (newComp.get(), getComponentMemberVariableName (newComp.get()));\r
 \r
             // check for duped IDs..\r
-            while (findComponentWithId (ComponentTypeHandler::getComponentId (newComp)) != nullptr)\r
-                ComponentTypeHandler::setComponentId (newComp, Random::getSystemRandom().nextInt64());\r
+            while (findComponentWithId (ComponentTypeHandler::getComponentId (newComp.get())) != nullptr)\r
+                ComponentTypeHandler::setComponentId (newComp.get(), Random::getSystemRandom().nextInt64());\r
 \r
-            components.add (newComp);\r
+            components.add (newComp.get());\r
             changed();\r
             return newComp.release();\r
         }\r
index 7910a38b7ac157097df44727f298cdcad61ce69e..0c3c09f308e6bcb2beb671e39657a54d89ad4866 100644 (file)
@@ -76,7 +76,7 @@ struct UserDocChangeTimer  : public Timer
 void JucerDocument::userEditedCpp()\r
 {\r
     if (userDocChangeTimer == nullptr)\r
-        userDocChangeTimer = new UserDocChangeTimer (*this);\r
+        userDocChangeTimer.reset (new UserDocChangeTimer (*this));\r
 \r
     userDocChangeTimer->startTimer (500);\r
 }\r
@@ -217,7 +217,7 @@ void JucerDocument::setInitialSize (int w, int h)
 //==============================================================================\r
 bool JucerDocument::isSnapActive (const bool disableIfCtrlKeyDown) const noexcept\r
 {\r
-    return snapActive != (disableIfCtrlKeyDown && ModifierKeys::getCurrentModifiers().isCtrlDown());\r
+    return snapActive != (disableIfCtrlKeyDown && ModifierKeys::currentModifiers.isCtrlDown());\r
 }\r
 \r
 int JucerDocument::snapPosition (int pos) const noexcept\r
@@ -424,7 +424,7 @@ void JucerDocument::fillInGeneratedCode (GeneratedCode& code) const
 \r
     fillInPaintCode (code);\r
 \r
-    ScopedPointer<XmlElement> e (createXml());\r
+    std::unique_ptr<XmlElement> e (createXml());\r
     jassert (e != nullptr);\r
     code.jucerMetadata = e->createDocument ("", false, false);\r
 \r
@@ -572,15 +572,15 @@ bool JucerDocument::reloadFromDocument()
 {\r
     const String cppContent (cpp->getCodeDocument().getAllContent());\r
 \r
-    ScopedPointer<XmlElement> newXML (pullMetaDataFromCppFile (cppContent));\r
+    std::unique_ptr<XmlElement> newXML (pullMetaDataFromCppFile (cppContent));\r
 \r
     if (newXML == nullptr || ! newXML->hasTagName (jucerCompXmlTag))\r
         return false;\r
 \r
-    if (currentXML != nullptr && currentXML->isEquivalentTo (newXML, true))\r
+    if (currentXML != nullptr && currentXML->isEquivalentTo (newXML.get(), true))\r
         return true;\r
 \r
-    currentXML = newXML;\r
+    currentXML.reset (newXML.release());\r
     stopTimer();\r
 \r
     resources.loadFromCpp (getCppFile(), cppContent);\r
@@ -645,9 +645,13 @@ XmlElement* JucerDocument::pullMetaDataFromCppFile (const String& cpp)
 \r
 bool JucerDocument::isValidJucerCppFile (const File& f)\r
 {\r
-    if (f.hasFileExtension (".cpp"))\r
-        if (ScopedPointer<XmlElement> xml = pullMetaDataFromCppFile (f.loadFileAsString()))\r
+    if (f.hasFileExtension (cppFileExtensions))\r
+    {\r
+        std::unique_ptr<XmlElement> xml (pullMetaDataFromCppFile (f.loadFileAsString()));\r
+\r
+        if (xml != nullptr)\r
             return xml->hasTagName (jucerCompXmlTag);\r
+    }\r
 \r
     return false;\r
 }\r
@@ -656,20 +660,20 @@ static JucerDocument* createDocument (SourceCodeDocument* cpp)
 {\r
     auto& codeDoc = cpp->getCodeDocument();\r
 \r
-    ScopedPointer<XmlElement> xml (JucerDocument::pullMetaDataFromCppFile (codeDoc.getAllContent()));\r
+    std::unique_ptr<XmlElement> xml (JucerDocument::pullMetaDataFromCppFile (codeDoc.getAllContent()));\r
 \r
     if (xml == nullptr || ! xml->hasTagName (JucerDocument::jucerCompXmlTag))\r
         return nullptr;\r
 \r
     const String docType (xml->getStringAttribute ("documentType"));\r
 \r
-    ScopedPointer<JucerDocument> newDoc;\r
+    std::unique_ptr<JucerDocument> newDoc;\r
 \r
     if (docType.equalsIgnoreCase ("Button"))\r
-        newDoc = new ButtonDocument (cpp);\r
+        newDoc.reset (new ButtonDocument (cpp));\r
 \r
     if (docType.equalsIgnoreCase ("Component") || docType.isEmpty())\r
-        newDoc = new ComponentDocument (cpp);\r
+        newDoc.reset (new ComponentDocument (cpp));\r
 \r
     if (newDoc != nullptr && newDoc->reloadFromDocument())\r
         return newDoc.release();\r
@@ -720,7 +724,9 @@ public:
 \r
     Component* createEditor() override\r
     {\r
-        if (ScopedPointer<JucerDocument> jucerDoc = JucerDocument::createForCppFile (getProject(), getFile()))\r
+        std::unique_ptr<JucerDocument> jucerDoc (JucerDocument::createForCppFile (getProject(), getFile()));\r
+\r
+        if (jucerDoc != nullptr)\r
             return new JucerDocumentEditor (jucerDoc.release());\r
 \r
         return SourceCodeDocument::createEditor();\r
@@ -766,7 +772,9 @@ struct NewGUIComponentWizard  : public NewFileWizard::Type
             {\r
                 if (auto* header = dynamic_cast<SourceCodeDocument*> (odm.openFile (nullptr, headerFile)))\r
                 {\r
-                    if (ScopedPointer<JucerDocument> jucerDoc = new ComponentDocument (cpp))\r
+                    std::unique_ptr<JucerDocument> jucerDoc (new ComponentDocument (cpp));\r
+\r
+                    if (jucerDoc != nullptr)\r
                     {\r
                         jucerDoc->setClassName (newFile.getFileNameWithoutExtension());\r
 \r
index 9f12096baebf24191a35103465823f0e1397748c..16146c426d0b8f927f2951ad4c0761c857007cf5 100644 (file)
@@ -168,8 +168,8 @@ private:
     bool snapActive = true, snapShown = true;\r
     float componentOverlayOpacity = 0.33f;\r
     StringArray activeExtraMethods;\r
-    ScopedPointer<XmlElement> currentXML;\r
-    ScopedPointer<Timer> userDocChangeTimer;\r
+    std::unique_ptr<XmlElement> currentXML;\r
+    std::unique_ptr<Timer> userDocChangeTimer;\r
 \r
     void timerCallback() override;\r
     void codeDocumentTextInserted (const String& newText, int insertIndex) override;\r
index 15ce0455fa788ccf527a7d330d39d3caca218fd2..f705823c624783fc57e29ec55cf7b8e2259dc130 100644 (file)
@@ -106,15 +106,15 @@ PaintElement* createElementForXml (const XmlElement* const e, PaintRoutine* cons
 {\r
     jassert (e != nullptr);\r
 \r
-    ScopedPointer<PaintElement> pe;\r
-\r
-    if (e->hasTagName (PaintElementRectangle::getTagName()))                pe = new PaintElementRectangle (owner);\r
-    else if (e->hasTagName (PaintElementRoundedRectangle::getTagName()))    pe = new PaintElementRoundedRectangle (owner);\r
-    else if (e->hasTagName (PaintElementEllipse::getTagName()))             pe = new PaintElementEllipse (owner);\r
-    else if (e->hasTagName (PaintElementImage::getTagName()))               pe = new PaintElementImage (owner);\r
-    else if (e->hasTagName (PaintElementPath::getTagName()))                pe = new PaintElementPath (owner);\r
-    else if (e->hasTagName (PaintElementText::getTagName()))                pe = new PaintElementText (owner);\r
-    else if (e->hasTagName (PaintElementGroup::getTagName()))               pe = new PaintElementGroup (owner);\r
+    std::unique_ptr<PaintElement> pe;\r
+\r
+    if (e->hasTagName (PaintElementRectangle::getTagName()))                pe.reset (new PaintElementRectangle (owner));\r
+    else if (e->hasTagName (PaintElementRoundedRectangle::getTagName()))    pe.reset (new PaintElementRoundedRectangle (owner));\r
+    else if (e->hasTagName (PaintElementEllipse::getTagName()))             pe.reset (new PaintElementEllipse (owner));\r
+    else if (e->hasTagName (PaintElementImage::getTagName()))               pe.reset (new PaintElementImage (owner));\r
+    else if (e->hasTagName (PaintElementPath::getTagName()))                pe.reset (new PaintElementPath (owner));\r
+    else if (e->hasTagName (PaintElementText::getTagName()))                pe.reset (new PaintElementText (owner));\r
+    else if (e->hasTagName (PaintElementGroup::getTagName()))               pe.reset (new PaintElementGroup (owner));\r
 \r
     if (pe != nullptr && pe->loadFromXml (*e))\r
         return pe.release();\r
index 4aeced4e2bcb0c998d9c022828698a22ba6e42cd..f7957da525b136fbbc49cbe6bcfeab79cbcbad4d 100644 (file)
@@ -61,7 +61,7 @@ bool PaintRoutine::perform (UndoableAction* action, const String& actionName)
     if (document != nullptr)\r
         return document->getUndoManager().perform (action, actionName);\r
 \r
-    ScopedPointer<UndoableAction> deleter (action);\r
+    std::unique_ptr<UndoableAction> deleter (action);\r
     action->perform();\r
     return false;\r
 }\r
@@ -114,7 +114,7 @@ public:
 \r
 private:\r
     PaintRoutine& routine;\r
-    ScopedPointer<XmlElement> xml;\r
+    std::unique_ptr<XmlElement> xml;\r
 \r
     void showCorrectTab() const\r
     {\r
@@ -152,8 +152,8 @@ PaintElement* PaintRoutine::addNewElement (PaintElement* e, const int index, con
 {\r
     if (e != nullptr)\r
     {\r
-        ScopedPointer<PaintElement> deleter (e);\r
-        ScopedPointer<XmlElement> xml (e->createXml());\r
+        std::unique_ptr<PaintElement> deleter (e);\r
+        std::unique_ptr<XmlElement> xml (e->createXml());\r
 \r
         e = addElementFromXml (*xml, index, undoable);\r
     }\r
@@ -169,7 +169,7 @@ public:
         : PaintElementUndoableAction <PaintElement> (element),\r
           oldIndex (-1)\r
     {\r
-        xml = element->createXml();\r
+        xml.reset (element->createXml());\r
         oldIndex = routine.indexOfElement (element);\r
     }\r
 \r
@@ -190,7 +190,7 @@ public:
     int getSizeInUnits()    { return 10; }\r
 \r
 private:\r
-    ScopedPointer<XmlElement> xml;\r
+    std::unique_ptr<XmlElement> xml;\r
     int oldIndex;\r
 };\r
 \r
@@ -303,7 +303,7 @@ void PaintRoutine::copySelectedToClipboard()
 void PaintRoutine::paste()\r
 {\r
     XmlDocument clip (SystemClipboard::getTextFromClipboard());\r
-    ScopedPointer<XmlElement> doc (clip.getDocumentElement());\r
+    std::unique_ptr<XmlElement> doc (clip.getDocumentElement());\r
 \r
     if (doc != nullptr && doc->hasTagName (clipboardXmlTag))\r
     {\r
@@ -549,7 +549,7 @@ void PaintRoutine::drawElements (Graphics& g, const Rectangle<int>& relativeTo)
 //==============================================================================\r
 void PaintRoutine::dropImageAt (const File& f, int x, int y)\r
 {\r
-    ScopedPointer<Drawable> d (Drawable::createFromImageFile (f));\r
+    std::unique_ptr<Drawable> d (Drawable::createFromImageFile (f));\r
 \r
     if (d != nullptr)\r
     {\r
index 4ab9d2d8913357ffa4fe5fb6344b94891b86e85c..307c8e79865bad40e64c0b2af1e4d9c63560b21b 100644 (file)
@@ -147,7 +147,7 @@ void LicenseController::startWebviewIfNeeded()
 \r
    #if ! JUCER_ENABLE_GPL_MODE\r
     if (thread == nullptr)\r
-        thread = new LicenseThread (*this, false);\r
+        thread.reset (new LicenseThread (*this, false));\r
    #endif\r
 }\r
 \r
@@ -163,7 +163,7 @@ void LicenseController::logout()
     WebBrowserComponent::clearCookies();\r
    #endif\r
 \r
-    thread = new LicenseThread (*this, false);\r
+    thread.reset (new LicenseThread (*this, false));\r
    #endif\r
 }\r
 \r
@@ -173,7 +173,7 @@ void LicenseController::chooseNewLicense()
 \r
    #if ! JUCER_ENABLE_GPL_MODE\r
     thread.reset();\r
-    thread = new LicenseThread (*this, true);\r
+    thread.reset (new LicenseThread (*this, true));\r
    #endif\r
 }\r
 \r
@@ -293,14 +293,14 @@ LicenseState LicenseController::licenseStateFromOldSettings (XmlElement* license
 \r
 LicenseState LicenseController::licenseStateFromSettings (PropertiesFile& props)\r
 {\r
-    ScopedPointer<XmlElement> licenseXml = props.getXmlValue ("license");\r
+    std::unique_ptr<XmlElement> licenseXml (props.getXmlValue ("license"));\r
 \r
     if (licenseXml != nullptr)\r
     {\r
         // this is here for backwards compatibility with old-style settings files using XML text elements\r
         if (licenseXml->getChildElementAllSubText ("type", {}) != String())\r
         {\r
-            auto stateFromOldSettings = licenseStateFromOldSettings (licenseXml);\r
+            auto stateFromOldSettings = licenseStateFromOldSettings (licenseXml.get());\r
 \r
             licenseStateToSettings (stateFromOldSettings, props);\r
 \r
index b01d9468a3c24b45cc17507f7495c4db4520c4ad..d970d2968bf9c5ce9e14ab73e09dcbc87ac158e3 100644 (file)
@@ -115,7 +115,7 @@ private:
     void queryWebview (const String&, const String&, HashMap<String, String>&);\r
 \r
     //==============================================================================\r
-    ScopedPointer<LicenseThread> thread;\r
+    std::unique_ptr<LicenseThread> thread;\r
     LicenseWebview* licenseWebview = nullptr;\r
    #endif\r
 \r
index 751353c859b65c0f4a943f50f439c7b05755dc9e..3a51bca4b3986e1cb373132ee5678d6ddc487b6a 100644 (file)
@@ -165,9 +165,9 @@ struct LicenseThread : NetWorkerThread
         jassert (stateToUpdate.authToken.isNotEmpty());\r
 \r
         auto accessTokenHeader = "x-access-token: " + stateToUpdate.authToken;\r
+        std::unique_ptr<WebInputStream> shared (getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user"), false));\r
 \r
-        if (ScopedPointer<WebInputStream> shared\r
-              = getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user"), false))\r
+        if (shared != nullptr)\r
         {\r
             const int statusCode = shared->withExtraHeaders (accessTokenHeader).getStatusCode();\r
 \r
@@ -215,8 +215,8 @@ struct LicenseThread : NetWorkerThread
 \r
             if (! selectNewLicense)\r
             {\r
-                ScopedPointer<WebInputStream> shared = getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user/licences?search_internal_id=com.roli.projucer&version=5"),\r
-                                                                                false);\r
+                std::unique_ptr<WebInputStream> shared (getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user/licences?search_internal_id=com.roli.projucer&version=5"),\r
+                                                                                 false));\r
                 if (shared == nullptr)\r
                     break;\r
 \r
@@ -274,8 +274,8 @@ struct LicenseThread : NetWorkerThread
 \r
                 String postData (JSON::toString (var (redeamObject.get())));\r
 \r
-                ScopedPointer<WebInputStream> shared = getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user/products").withPOSTData (postData),\r
-                                                                                true);\r
+                std::unique_ptr<WebInputStream> shared (getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user/products").withPOSTData (postData),\r
+                                                                                 true));\r
                 if (shared == nullptr)\r
                     break;\r
 \r
@@ -306,8 +306,9 @@ struct LicenseThread : NetWorkerThread
                 jsonLicenseRequest->setProperty (licenseTypeIdentifier, "software");\r
 \r
                 String postData (JSON::toString (var (jsonLicenseRequest.get())));\r
-                ScopedPointer<WebInputStream> shared\r
-                    = getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user/products/redeem").withPOSTData (postData), true);\r
+                std::unique_ptr<WebInputStream> shared (getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user/products/redeem")\r
+                                                                                     .withPOSTData (postData),\r
+                                                                                 true));\r
 \r
                 if (shared != nullptr)\r
                 {\r
@@ -390,7 +391,9 @@ struct LicenseThread : NetWorkerThread
 \r
             if (avatarURL.isNotEmpty())\r
             {\r
-                if (ScopedPointer<WebInputStream> shared = getSharedWebInputStream (URL (avatarURL), false))\r
+                std::unique_ptr<WebInputStream> shared (getSharedWebInputStream (URL (avatarURL), false));\r
+\r
+                if (shared != nullptr)\r
                 {\r
                     MemoryBlock mb;\r
                     shared->readIntoMemoryBlock (mb);\r
index fbedec51957733dabc0f57037362433ed9a4c6a3..f5f855641038e1bde7180d5581de1f47572c29f3 100644 (file)
@@ -137,9 +137,8 @@ private:
             }\r
 \r
             const uint32 backgroundColour = 0xff414141;\r
-            ScopedPointer<Drawable> juceLogo\r
-                = Drawable::createFromImageData (BinaryData::jucelogowithtext_svg,\r
-                                                 BinaryData::jucelogowithtext_svgSize);\r
+            std::unique_ptr<Drawable> juceLogo { Drawable::createFromImageData (BinaryData::jucelogowithtext_svg,\r
+                                                                                BinaryData::jucelogowithtext_svgSize) };\r
             IconButton avatarButton;\r
 \r
             JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Header)\r
@@ -270,7 +269,7 @@ private:
 \r
         //==============================================================================\r
         LicenseWebview& parentWindow;\r
-        ScopedPointer<ModalComponentManager::Callback> modalCallback;\r
+        std::unique_ptr<ModalComponentManager::Callback> modalCallback;\r
         Header header;\r
         RedirectWebBrowserComponent webview;\r
         std::function<void (const String&, const HashMap<String, String>&)> pageCallback;\r
index 5b8deb894d82657f4ee545b1e63330513229972c..fd7d4bcd0cb2ef871a6826934edc05f542471068 100644 (file)
@@ -35,7 +35,8 @@
 #include "jucer_ProjectBuildInfo.h"\r
 #include "jucer_ClientServerMessages.h"\r
 #include "jucer_CompileEngineClient.h"\r
-#include "../LiveBuildEngine/jucer_CompileEngineServer.h"\r
+#include "jucer_CompileEngineServer.h"\r
+#include "jucer_CompileEngineSettings.h"\r
 \r
 #ifndef RUN_CLANG_IN_CHILD_PROCESS\r
  #error\r
@@ -213,8 +214,7 @@ public:
 \r
     void restartServer()\r
     {\r
-        server.reset();\r
-        server = new ClientIPC (owner);\r
+        server.reset (new ClientIPC (owner));\r
         sendRebuild();\r
     }\r
 \r
@@ -278,7 +278,7 @@ public:
         return true;\r
     }\r
 \r
-    ScopedPointer<ClientIPC> server;\r
+    std::unique_ptr<ClientIPC> server;\r
 \r
     bool openedOk = false;\r
     bool isRunningApp = false;\r
@@ -422,7 +422,7 @@ private:
     {\r
         auto liveModules = project.getProjectRoot().getChildWithName (Ids::MODULES);\r
 \r
-        ScopedPointer<XmlElement> xml (XmlDocument::parse (project.getFile()));\r
+        std::unique_ptr<XmlElement> xml (XmlDocument::parse (project.getFile()));\r
 \r
         if (xml == nullptr || ! xml->hasTagName (Ids::JUCERPROJECT.toString()))\r
             return false;\r
@@ -516,7 +516,7 @@ CompileEngineChildProcess::~CompileEngineChildProcess()
 void CompileEngineChildProcess::createProcess()\r
 {\r
     jassert (process == nullptr);\r
-    process = new ChildProcess (*this, project);\r
+    process.reset (new ChildProcess (*this, project));\r
 \r
     if (! process->openedOk)\r
         process.reset();\r
@@ -598,7 +598,7 @@ void CompileEngineChildProcess::killApp()
 \r
 void CompileEngineChildProcess::handleAppLaunched()\r
 {\r
-    runningAppProcess = process;\r
+    runningAppProcess.reset (process.release());\r
     runningAppProcess->isRunningApp = true;\r
     createProcess();\r
 }\r
index 0ca0a358976b671431aebe4b39eed76e63570f0a..b05e1a63e4c22f2a9560c7383811c7d996c23da2 100644 (file)
@@ -91,12 +91,12 @@ public:
     void handleRedoInEditor (const String& className);\r
     void handleMissingSystemHeaders();\r
 \r
-    typedef ReferenceCountedObjectPtr<CompileEngineChildProcess> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<CompileEngineChildProcess>;\r
 \r
 private:\r
     //==============================================================================\r
     class ChildProcess;\r
-    ScopedPointer<ChildProcess> process, runningAppProcess;\r
+    std::unique_ptr<ChildProcess> process, runningAppProcess;\r
     ClassDatabase::ClassList lastComponentList;\r
 \r
     struct Editor;\r
index ad2246b5be197f97c037e295a644ce0e07a0dfc3..a1963b4564a1c3ce7e0d22782dfa43b4b1a12bce 100644 (file)
@@ -158,7 +158,7 @@ public:
         setParentProcessID (info[3].getHexValue32());\r
        #endif\r
 \r
-        zombieKiller = new ZombiePatrol (*this);\r
+        zombieKiller.reset (new ZombiePatrol (*this));\r
     }\r
 \r
     ~ServerIPC()\r
@@ -208,7 +208,7 @@ public:
 \r
     CompileEngineDLL dll;\r
     LiveCodeBuilder liveCodeBuilder;\r
-    ScopedPointer<ZombiePatrol> zombieKiller;\r
+    std::unique_ptr<ZombiePatrol> zombieKiller;\r
 };\r
 \r
 //==============================================================================\r
@@ -259,7 +259,7 @@ void* createClangServer (const String& commandLine)
     StringArray info;\r
     info.addTokens (commandLine.fromFirstOccurrenceOf (commandPrefix, false, false), commandTokenSeparator, "");\r
 \r
-    ScopedPointer<ServerIPC> ipc = new ServerIPC (info);\r
+    std::unique_ptr<ServerIPC> ipc (new ServerIPC (info));\r
 \r
     if (ipc->dll.isLoaded())\r
     {\r
index 1374bee87d036ff4a78c24b1d79b2bc0327af9d0..fbb252864c4808c17b6f30b07f5dfeca197c541f 100644 (file)
@@ -98,13 +98,13 @@ private:
         return "WINDOWS";\r
        #elif JUCE_LINUX\r
         return "LINUX";\r
-       #endif\r
-\r
+       #else\r
         // unknown platform?!\r
         jassertfalse;\r
-\r
         return {};\r
+       #endif\r
     }\r
 \r
     //==============================================================================\r
+    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CompileEngineSettings)\r
 };\r
index d54ef86bfafded58b9710701f7ef1df369fa47b7..252855cc9fee241d792cd5050739fe09f9e93903 100644 (file)
@@ -59,7 +59,7 @@ struct DiagnosticMessage
         note = 2\r
     };\r
 \r
-    ScopedPointer<DiagnosticMessage> associatedDiagnostic;\r
+    std::unique_ptr<DiagnosticMessage> associatedDiagnostic;\r
     String message;\r
     String mainFile;\r
     SourceCodeRange range;\r
index 5d9bb6e6f94e9059eb6f8d6ce92869bebe6a6bc5..b3273dee2fb73a150bdf663e9b04906d52114f78 100644 (file)
@@ -88,9 +88,9 @@ Result DownloadCompileEngineThread::download (MemoryBlock& dest)
     StringPairArray responseHeaders;\r
 \r
     URL url = getDownloadUrl();\r
-    ScopedPointer<InputStream> in = url.createInputStream (false, nullptr, nullptr,\r
-                                                           String(), timeoutMs, &responseHeaders,\r
-                                                           &statusCode, 0);\r
+    std::unique_ptr<InputStream> in (url.createInputStream (false, nullptr, nullptr,\r
+                                                            String(), timeoutMs, &responseHeaders,\r
+                                                            &statusCode, 0));\r
 \r
     if (in == nullptr || statusCode != 200)\r
         return Result::fail ("Download error: cannot establish connection");\r
index 9c6cffaf46c35fb02aadd889e89b7c5d4a437378..0174b47547b2a2b926bd68ef6e876fef01de93aa 100644 (file)
@@ -171,7 +171,7 @@ public:
 \r
 private:\r
     Project& project;\r
-    ScopedPointer<ProjectExporter> exporter;\r
+    std::unique_ptr<ProjectExporter> exporter;\r
     ValueTree configListTree;\r
     int exporterIndex;\r
 \r
index fe1a77f10d96336cdb0827bbc31fdf5a48f837a6..e95d978665230fbdda76a4688488987464ba5bd3 100644 (file)
@@ -303,7 +303,7 @@ public:
         if (selectedNodes.size() > 0)\r
         {\r
             auto* tree = getOwnerView();\r
-            ScopedPointer<XmlElement> oldOpenness (tree->getOpennessState (false));\r
+            std::unique_ptr<XmlElement> oldOpenness (tree->getOpennessState (false));\r
 \r
             moveSelectedItemsTo (selectedNodes, insertIndex);\r
 \r
index c4e6064fe233ae0f3d4ad196396f98ac6610422d..3a5b300b112e8b5d8508ed687fc65fc00e09b095 100644 (file)
@@ -69,7 +69,8 @@ class LiveBuildTab    : public Component,
 public:\r
     LiveBuildTab (CompileEngineChildProcess* child, String lastErrorMessage)\r
     {\r
-        addAndMakeVisible (settingsButton = new IconButton ("Settings", &getIcons().settings));\r
+        settingsButton.reset (new IconButton ("Settings", &getIcons().settings));\r
+        addAndMakeVisible (settingsButton.get());\r
         settingsButton->onClick = [this]\r
         {\r
             if (auto* pcc = findParentComponentOfClass<ProjectContentComponent>())\r
@@ -87,16 +88,17 @@ public:
             isEnabled = false;\r
 \r
             errorMessage = getErrorMessage();\r
-            errorMessageLabel = new Label ("Error", errorMessage);\r
+            errorMessageLabel.reset (new Label ("Error", errorMessage));\r
             errorMessageLabel->setJustificationType (Justification::centred);\r
             errorMessageLabel->setFont (Font (12.0f));\r
             errorMessageLabel->setMinimumHorizontalScale (1.0f);\r
 \r
-            addAndMakeVisible (errorMessageLabel);\r
+            addAndMakeVisible (errorMessageLabel.get());\r
 \r
             if (showDownloadButton)\r
             {\r
-                addAndMakeVisible (downloadButton = new TextButton ("Download"));\r
+                downloadButton.reset (new TextButton ("Download"));\r
+                addAndMakeVisible (downloadButton.get());\r
                 downloadButton->onClick = [this] { downloadDLL(); };\r
             }\r
 \r
@@ -110,7 +112,8 @@ public:
                     buttonText = "Re-enable";\r
                 }\r
 \r
-                addAndMakeVisible (enableButton = new TextButton (buttonText));\r
+                enableButton.reset (new TextButton (buttonText));\r
+                addAndMakeVisible (enableButton.get());\r
                 enableButton->onClick = [this]\r
                 {\r
                     if (auto* pcc = findParentComponentOfClass<ProjectContentComponent>())\r
@@ -162,10 +165,10 @@ public:
 private:\r
     OwnedArray<ConcertinaHeader> headers;\r
     ConcertinaPanel concertinaPanel;\r
-    ScopedPointer<IconButton> settingsButton;\r
+    std::unique_ptr<IconButton> settingsButton;\r
 \r
-    ScopedPointer<TextButton> downloadButton, enableButton;\r
-    ScopedPointer<Label> errorMessageLabel;\r
+    std::unique_ptr<TextButton> downloadButton, enableButton;\r
+    std::unique_ptr<Label> errorMessageLabel;\r
     bool showDownloadButton;\r
     bool showEnableButton;\r
 \r
index 16a9ffe7d0bef717ca078eea8bf1c90a6e75ad9d..9d8181ce7005595b6ac683515599569c2369cc09 100644 (file)
@@ -37,7 +37,7 @@ struct ProjectTreeItemBase  : public JucerTreeViewBase,
     {\r
         content->setComponentID (getUniqueName());\r
 \r
-        ScopedPointer<Component> comp (content);\r
+        std::unique_ptr<Component> comp (content);\r
 \r
         if (ProjectContentComponent* pcc = getProjectContentComponent())\r
             pcc->setEditorComponent (comp.release(), nullptr);\r
index c8562efee14b1b2450f3c0ba725029123acf7375..6f463f218974b92678d002f922fb3ba8cca27d0e 100644 (file)
@@ -173,22 +173,25 @@ public:
     {\r
         if (hasAddButton)\r
         {\r
-            addAndMakeVisible (addButton = new IconButton ("Add", &getIcons().plus));\r
+            addButton.reset (new IconButton ("Add", &getIcons().plus));\r
+            addAndMakeVisible (addButton.get());\r
             addButton->onClick = [this] { showAddMenu(); };\r
         }\r
 \r
         if (hasSettingsButton)\r
         {\r
-            addAndMakeVisible (settingsButton = new IconButton ("Settings", &getIcons().settings));\r
+            settingsButton.reset (new IconButton ("Settings", &getIcons().settings));\r
+            addAndMakeVisible (settingsButton.get());\r
             settingsButton->onClick = [this] { showSettings(); };\r
         }\r
 \r
         if (hasFindPanel)\r
         {\r
-            addAndMakeVisible (findPanel = new FindPanel ([this] (const String& filter) { treeToDisplay->rootItem->setSearchFilter (filter); }));\r
+            findPanel.reset (new FindPanel ([this] (const String& filter) { treeToDisplay->rootItem->setSearchFilter (filter); }));\r
+            addAndMakeVisible (findPanel.get());\r
         }\r
 \r
-        addAndMakeVisible (treeToDisplay);\r
+        addAndMakeVisible (treeToDisplay.get());\r
     }\r
 \r
     ~ConcertinaTreeComponent()\r
@@ -224,9 +227,9 @@ public:
     TreePanelBase* getTree() const noexcept    { return treeToDisplay.get(); }\r
 \r
 private:\r
-    ScopedPointer<TreePanelBase> treeToDisplay;\r
-    ScopedPointer<IconButton> addButton, settingsButton;\r
-    ScopedPointer<FindPanel> findPanel;\r
+    std::unique_ptr<TreePanelBase> treeToDisplay;\r
+    std::unique_ptr<IconButton> addButton, settingsButton;\r
+    std::unique_ptr<FindPanel> findPanel;\r
 \r
     void showAddMenu()\r
     {\r
index af0669203343fbdd83a3340a51bc254be4ae2170..3d71f6564ff0caf4a6507d4e6cb9c82e939d79be 100644 (file)
@@ -89,7 +89,7 @@ public:
 \r
     Component* refreshComponentForRow (int rowNumber, bool /*isRowSelected*/, Component* existingComponentToUpdate) override\r
     {\r
-        ScopedPointer<Component> existing (existingComponentToUpdate);\r
+        std::unique_ptr<Component> existing (existingComponentToUpdate);\r
 \r
         if (rowNumber < getNumRows())\r
         {\r
index 1f191496a0daec7aebfe0656b4e3d3c4df8715d5..f3ba6502ac1ae470689769379110d397b47903da 100644 (file)
@@ -43,7 +43,8 @@ HeaderComponent::HeaderComponent()
 \r
     exporterBox.onChange = [this] { updateExporterButton(); };\r
 \r
-    addAndMakeVisible  (juceIcon = new ImageComponent ("icon"));\r
+    juceIcon.reset (new ImageComponent ("icon"));\r
+    addAndMakeVisible (juceIcon.get());\r
     juceIcon->setImage (ImageCache::getFromMemory (BinaryData::juce_icon_png, BinaryData::juce_icon_pngSize),\r
                         RectanglePlacement::centred);\r
 \r
@@ -260,7 +261,8 @@ void HeaderComponent::initialiseButtons() noexcept
 {\r
     auto& icons = getIcons();\r
 \r
-    addAndMakeVisible (projectSettingsButton = new IconButton ("Project Settings", &icons.settings));\r
+    projectSettingsButton.reset (new IconButton ("Project Settings", &icons.settings));\r
+    addAndMakeVisible (projectSettingsButton.get());\r
     projectSettingsButton->onClick = [this]\r
     {\r
         sendProjectButtonAnalyticsEvent ("Project Settings");\r
@@ -269,7 +271,8 @@ void HeaderComponent::initialiseButtons() noexcept
             pcc->showProjectSettings();\r
     };\r
 \r
-    addAndMakeVisible (saveAndOpenInIDEButton = new IconButton ("Save and Open in IDE", nullptr));\r
+    saveAndOpenInIDEButton.reset (new IconButton ("Save and Open in IDE", nullptr));\r
+    addAndMakeVisible (saveAndOpenInIDEButton.get());\r
     saveAndOpenInIDEButton->isIDEButton = true;\r
     saveAndOpenInIDEButton->onClick = [this]\r
     {\r
@@ -279,7 +282,8 @@ void HeaderComponent::initialiseButtons() noexcept
             pcc->openInSelectedIDE (true);\r
     };\r
 \r
-    addAndMakeVisible (userSettingsButton = new IconButton ("User Settings", &icons.user));\r
+    userSettingsButton.reset (new IconButton ("User Settings", &icons.user));\r
+    addAndMakeVisible (userSettingsButton.get());\r
     userSettingsButton->isUserButton = true;\r
     userSettingsButton->onClick = [this]\r
     {\r
@@ -289,7 +293,8 @@ void HeaderComponent::initialiseButtons() noexcept
             showUserSettings();\r
     };\r
 \r
-    addAndMakeVisible (runAppButton = new IconButton ("Run Application", &icons.play));\r
+    runAppButton.reset (new IconButton ("Run Application", &icons.play));\r
+    addAndMakeVisible (runAppButton.get());\r
     runAppButton->onClick = [this]\r
     {\r
         sendProjectButtonAnalyticsEvent ("Run Application");\r
index 7e18ebf74cdb82fa99b8afa8f8065915715a9873..88b1836d12c82ce91facc4d092f6460270f6a7b4 100644 (file)
@@ -104,8 +104,8 @@ private:
     Label configLabel  { "Config Label", "Selected exporter" },\r
     projectNameLabel;\r
 \r
-    ScopedPointer<ImageComponent> juceIcon;\r
-    ScopedPointer<IconButton> projectSettingsButton, saveAndOpenInIDEButton, userSettingsButton, runAppButton;\r
+    std::unique_ptr<ImageComponent> juceIcon;\r
+    std::unique_ptr<IconButton> projectSettingsButton, saveAndOpenInIDEButton, userSettingsButton, runAppButton;\r
 \r
     SafePointer<CallOutBox> userSettingsWindow;\r
 \r
index 1179e1c373c184a02b084d433c87e210317d55c3..6137807dfa6971a1e11bd8215dcf441e197527c9 100644 (file)
@@ -27,6 +27,7 @@
 #include "../../Application/jucer_Headers.h"\r
 #include "jucer_ProjectContentComponent.h"\r
 #include "../../LiveBuildEngine/jucer_DownloadCompileEngineThread.h"\r
+#include "../../LiveBuildEngine/jucer_CompileEngineSettings.h"\r
 \r
 #include "jucer_HeaderComponent.h"\r
 #include "Sidebar/jucer_TabComponents.h"\r
@@ -38,8 +39,8 @@ struct LogoComponent  : public Component
 {\r
     LogoComponent()\r
     {\r
-        ScopedPointer<XmlElement> svg (XmlDocument::parse (BinaryData::background_logo_svg));\r
-        logo = Drawable::createFromSVG (*svg);\r
+        std::unique_ptr<XmlElement> svg (XmlDocument::parse (BinaryData::background_logo_svg));\r
+        logo.reset (Drawable::createFromSVG (*svg));\r
     }\r
 \r
     void paint (Graphics& g) override\r
@@ -62,7 +63,7 @@ struct LogoComponent  : public Component
                 + ProjucerApplication::getApp().getVersionDescription();\r
     }\r
 \r
-    ScopedPointer<Drawable> logo;\r
+    std::unique_ptr<Drawable> logo;\r
 };\r
 \r
 //==============================================================================\r
@@ -71,10 +72,14 @@ ProjectContentComponent::ProjectContentComponent()
     setOpaque (true);\r
     setWantsKeyboardFocus (true);\r
 \r
-    addAndMakeVisible (logo = new LogoComponent());\r
-    addAndMakeVisible (header = new HeaderComponent());\r
+    logo.reset (new LogoComponent());\r
+    addAndMakeVisible (logo.get());\r
 \r
-    addAndMakeVisible (fileNameLabel = new Label());\r
+    header.reset (new HeaderComponent());\r
+    addAndMakeVisible (header.get());\r
+\r
+    fileNameLabel.reset (new Label());\r
+    addAndMakeVisible (fileNameLabel.get());\r
     fileNameLabel->setJustificationType (Justification::centred);\r
 \r
     sidebarSizeConstrainer.setMinimumWidth (200);\r
@@ -265,8 +270,9 @@ void ProjectContentComponent::rebuildProjectTabs()
                                                              .getFloatValue());\r
 \r
         //======================================================================\r
-        addAndMakeVisible (resizerBar = new ResizableEdgeComponent (&sidebarTabs, &sidebarSizeConstrainer,\r
-                                                                    ResizableEdgeComponent::rightEdge));\r
+        resizerBar.reset (new ResizableEdgeComponent (&sidebarTabs, &sidebarSizeConstrainer,\r
+                                                      ResizableEdgeComponent::rightEdge));\r
+        addAndMakeVisible (resizerBar.get());\r
         resizerBar->setAlwaysOnTop (true);\r
 \r
         project->addChangeListener (this);\r
@@ -296,10 +302,10 @@ void ProjectContentComponent::saveOpenDocumentList()
 {\r
     if (project != nullptr)\r
     {\r
-        ScopedPointer<XmlElement> xml (recentDocumentList.createXML());\r
+        std::unique_ptr<XmlElement> xml (recentDocumentList.createXML());\r
 \r
         if (xml != nullptr)\r
-            project->getStoredProperties().setValue ("lastDocs", xml);\r
+            project->getStoredProperties().setValue ("lastDocs", xml.get());\r
     }\r
 }\r
 \r
@@ -307,7 +313,7 @@ void ProjectContentComponent::reloadLastOpenDocuments()
 {\r
     if (project != nullptr)\r
     {\r
-        ScopedPointer<XmlElement> xml (project->getStoredProperties().getXmlValue ("lastDocs"));\r
+        std::unique_ptr<XmlElement> xml (project->getStoredProperties().getXmlValue ("lastDocs"));\r
 \r
         if (xml != nullptr)\r
         {\r
@@ -419,7 +425,7 @@ bool ProjectContentComponent::setEditorComponent (Component* editor,
         {\r
             auto* viewport = new ContentViewport (editor);\r
 \r
-            contentView = viewport;\r
+            contentView.reset (viewport);\r
             currentDocument = nullptr;\r
             fileNameLabel->setVisible (false);\r
 \r
@@ -427,7 +433,7 @@ bool ProjectContentComponent::setEditorComponent (Component* editor,
         }\r
         else\r
         {\r
-            contentView = editor;\r
+            contentView.reset (editor);\r
             currentDocument = doc;\r
             fileNameLabel->setText (doc->getFile().getFileName(), dontSendNotification);\r
             fileNameLabel->setVisible (true);\r
index bdb9502e15821013f0da16d7120ee8f98570150b..758ac33671633b8dca7f3d7d2723061842abbeb4 100644 (file)
@@ -145,17 +145,17 @@ private:
     Project* project = nullptr;\r
     OpenDocumentManager::Document* currentDocument = nullptr;\r
     RecentDocumentList recentDocumentList;\r
-    ScopedPointer<Component> logo, translationTool, contentView, header;\r
+    std::unique_ptr<Component> logo, translationTool, contentView, header;\r
 \r
     TabbedComponent sidebarTabs  { TabbedButtonBar::TabsAtTop };\r
-    ScopedPointer<ResizableEdgeComponent> resizerBar;\r
+    std::unique_ptr<ResizableEdgeComponent> resizerBar;\r
     ComponentBoundsConstrainer sidebarSizeConstrainer;\r
 \r
     BubbleMessageComponent bubbleMessage;\r
     ReferenceCountedObjectPtr<CompileEngineChildProcess> childProcess;\r
     bool isForeground = false;\r
 \r
-    ScopedPointer<Label> fileNameLabel;\r
+    std::unique_ptr<Label> fileNameLabel;\r
 \r
     int lastViewedTab = 0;\r
 \r
index 97c576e6222bb6c7d8ac1a56b178ec91ad294a83..233bc9de183365bed389a4390c1352f80710aee3 100644 (file)
@@ -466,7 +466,7 @@ void LibraryModule::getConfigFlags (Project& project, OwnedArray<Project::Config
 \r
         if (line.startsWith ("/**") && line.containsIgnoreCase ("Config:"))\r
         {\r
-            ScopedPointer<Project::ConfigFlag> config (new Project::ConfigFlag());\r
+            std::unique_ptr<Project::ConfigFlag> config (new Project::ConfigFlag());\r
             config->sourceModuleID = getID();\r
             config->symbol = line.fromFirstOccurrenceOf (":", false, false).trim();\r
 \r
index 62906c718d2370f66db0b8a39c8b9256b8afa8f5..ded2c5f44ac5504ad5276a2a6f6a52a6842c2edc 100644 (file)
@@ -28,6 +28,7 @@
 #include "jucer_Project.h"\r
 #include "../ProjectSaving/jucer_ProjectSaver.h"\r
 #include "../Application/jucer_Application.h"\r
+#include "../LiveBuildEngine/jucer_CompileEngineSettings.h"\r
 \r
 namespace\r
 {\r
@@ -67,6 +68,8 @@ Project::Project (const File& f)
 \r
     projectRoot.addListener (this);\r
 \r
+    compileEngineSettings.reset (new CompileEngineSettings (projectRoot));\r
+\r
     setChangedFlag (false);\r
     modificationTime = getFile().getLastModificationTime();\r
 }\r
@@ -185,6 +188,10 @@ void Project::initialiseProjectValues()
 {\r
     projectNameValue.referTo         (projectRoot, Ids::name,             getUndoManager(), "JUCE Project");\r
     projectUIDValue.referTo          (projectRoot, Ids::ID,               getUndoManager(), createAlphaNumericUID());\r
+\r
+    if (projectUIDValue.isUsingDefault())\r
+        projectUIDValue = projectUIDValue.getDefault();\r
+\r
     projectTypeValue.referTo         (projectRoot, Ids::projectType,      getUndoManager(), ProjectType_GUIApp::getTypeName());\r
     versionValue.referTo             (projectRoot, Ids::version,          getUndoManager(), "1.0.0");\r
     bundleIdentifierValue.referTo    (projectRoot, Ids::bundleIdentifier, getUndoManager(), getDefaultBundleIdentifierString());\r
@@ -227,7 +234,8 @@ void Project::initialiseProjectValues()
 \r
 void Project::initialiseAudioPluginValues()\r
 {\r
-    pluginFormatsValue.referTo               (projectRoot, Ids::pluginFormats,              getUndoManager(), Array<var> (Ids::buildVST.toString(), Ids::buildAU.toString()), ",");\r
+    pluginFormatsValue.referTo               (projectRoot, Ids::pluginFormats,              getUndoManager(),\r
+                                              Array<var> (Ids::buildVST.toString(), Ids::buildAU.toString(), Ids::buildStandalone.toString()), ",");\r
     pluginCharacteristicsValue.referTo       (projectRoot, Ids::pluginCharacteristicsValue, getUndoManager(), Array<var> (), ",");\r
 \r
     pluginNameValue.referTo                  (projectRoot, Ids::pluginName,                 getUndoManager(), getProjectNameString());\r
@@ -380,8 +388,6 @@ void Project::updatePluginCategories()
             pluginAAXCategoryValue = aaxCategory;\r
         else if (getAllAAXCategoryStrings().contains (aaxCategory))\r
             pluginAAXCategoryValue = Array<var> (getAllAAXCategoryVars()[getAllAAXCategoryStrings().indexOf (aaxCategory)]);\r
-        else\r
-            pluginAAXCategoryValue.resetToDefault();\r
     }\r
 \r
     {\r
@@ -391,8 +397,6 @@ void Project::updatePluginCategories()
             pluginRTASCategoryValue = rtasCategory;\r
         else if (getAllRTASCategoryStrings().contains (rtasCategory))\r
             pluginRTASCategoryValue = Array<var> (getAllRTASCategoryVars()[getAllRTASCategoryStrings().indexOf (rtasCategory)]);\r
-        else\r
-            pluginRTASCategoryValue.resetToDefault();\r
     }\r
 \r
     {\r
@@ -547,7 +551,7 @@ static void forgetRecentFile (const File& file)
 //==============================================================================\r
 Result Project::loadDocument (const File& file)\r
 {\r
-    ScopedPointer<XmlElement> xml (XmlDocument::parse (file));\r
+    std::unique_ptr<XmlElement> xml (XmlDocument::parse (file));\r
 \r
     if (xml == nullptr || ! xml->hasTagName (Ids::JUCERPROJECT.toString()))\r
         return Result::fail ("Not a valid Jucer project!");\r
@@ -579,6 +583,8 @@ Result Project::loadDocument (const File& file)
     if (! ProjucerApplication::getApp().isRunningCommandLine)\r
         warnAboutOldProjucerVersion();\r
 \r
+    compileEngineSettings.reset (new CompileEngineSettings (projectRoot));\r
+\r
     return Result::ok();\r
 }\r
 \r
@@ -659,7 +665,7 @@ void Project::moveTemporaryDirectory (const File& newParentDirectory)
 \r
 bool Project::saveProjectRootToFile()\r
 {\r
-    ScopedPointer<XmlElement> xml (projectRoot.createXml());\r
+    std::unique_ptr<XmlElement> xml (projectRoot.createXml());\r
 \r
     if (xml == nullptr)\r
     {\r
@@ -1610,6 +1616,13 @@ static String getVST3CategoryStringFromSelection (Array<var> selected) noexcept
     for (auto& category : selected)\r
         categories.add (category);\r
 \r
+    // "Fx" and "Instrument" should come first and if both are present prioritise "Fx"\r
+    if (categories.contains ("Instrument"))\r
+        categories.move (categories.indexOf ("Instrument"), 0);\r
+\r
+    if (categories.contains ("Fx"))\r
+        categories.move (categories.indexOf ("Fx"), 0);\r
+\r
     return categories.joinIntoString ("|");\r
 }\r
 \r
@@ -1744,9 +1757,9 @@ Array<var> Project::getDefaultVSTCategories() const noexcept
 \r
 StringArray Project::getAllVST3CategoryStrings() noexcept\r
 {\r
-    static StringArray vst3CategoryStrings { "Fx", "Instrument", "Spatial", "Analyzer", "Delay", "Distortion", "EQ", "Filter", "Generator", "Mastering",\r
-                                             "Modulation", "Pitch Shift", "Restoration", "Reverb", "Surround", "Tools", "Network", "Drum", "Sampler",\r
-                                             "Synth", "External", "OnlyRT", "OnlyOfflineProcess", "NoOfflineProcess", "Up-Downmix" };\r
+    static StringArray vst3CategoryStrings { "Fx", "Instrument", "Analyzer", "Delay", "Distortion", "Drum", "Dynamics", "EQ", "External", "Filter",\r
+                                             "Generator", "Mastering", "Modulation", "Mono", "Network", "NoOfflineProcess", "OnlyOfflineProcess", "OnlyRT",\r
+                                             "Pitch Shift", "Restoration", "Reverb", "Sampler", "Spatial", "Stereo", "Surround", "Synth", "Tools", "Up-Downmix" };\r
 \r
     return vst3CategoryStrings;\r
 }\r
@@ -1819,7 +1832,7 @@ Array<var> Project::getDefaultRTASCategories() const noexcept
 EnabledModuleList& Project::getModules()\r
 {\r
     if (enabledModulesList == nullptr)\r
-        enabledModulesList = new EnabledModuleList (*this, projectRoot.getOrCreateChildWithName (Ids::MODULES, nullptr));\r
+        enabledModulesList.reset (new EnabledModuleList (*this, projectRoot.getOrCreateChildWithName (Ids::MODULES, nullptr)));\r
 \r
     return *enabledModulesList;\r
 }\r
@@ -1843,7 +1856,7 @@ ProjectExporter* Project::createExporter (int index)
 \r
 void Project::addNewExporter (const String& exporterName)\r
 {\r
-    ScopedPointer<ProjectExporter> exp (ProjectExporter::createNewExporter (*this, exporterName));\r
+    std::unique_ptr<ProjectExporter> exp (ProjectExporter::createNewExporter (*this, exporterName));\r
 \r
     exp->getTargetLocationValue() = exp->getTargetLocationString()\r
                                        + getUniqueTargetFolderSuffixForExporter (exp->getName(), exp->getTargetLocationString());\r
@@ -1923,7 +1936,7 @@ bool Project::ExporterIterator::next()
     if (++index >= project.getNumExporters())\r
         return false;\r
 \r
-    exporter = project.createExporter (index);\r
+    exporter.reset (project.createExporter (index));\r
 \r
     if (exporter == nullptr)\r
     {\r
index be5230462e2026ab8fdfc48d8fe51222346c9fb0..361f028d8961d6defb49560665a8562c4ce69e71 100644 (file)
 #pragma once\r
 \r
 #include "jucer_ProjectType.h"\r
-#include "../LiveBuildEngine/jucer_CompileEngineSettings.h"\r
 \r
 class ProjectExporter;\r
 class LibraryModule;\r
 class EnabledModuleList;\r
 class ProjectContentComponent;\r
+class CompileEngineSettings;\r
 \r
 //==============================================================================\r
 class Project  : public FileBasedDocument,\r
@@ -319,7 +319,7 @@ public:
         ProjectExporter& operator*() const       { return *exporter; }\r
         ProjectExporter* operator->() const      { return exporter.get(); }\r
 \r
-        ScopedPointer<ProjectExporter> exporter;\r
+        std::unique_ptr<ProjectExporter> exporter;\r
         int index;\r
 \r
     private:\r
@@ -384,7 +384,7 @@ public:
     bool shouldSendGUIBuilderAnalyticsEvent() noexcept;\r
 \r
     //==============================================================================\r
-    CompileEngineSettings& getCompileEngineSettings()    { return compileEngineSettings; }\r
+    CompileEngineSettings& getCompileEngineSettings()    { return *compileEngineSettings; }\r
 \r
 private:\r
     ValueTree projectRoot  { Ids::JUCERPROJECT };\r
@@ -398,7 +398,7 @@ private:
                      pluginAUMainTypeValue, pluginRTASCategoryValue, pluginVSTCategoryValue, pluginVST3CategoryValue, pluginAAXCategoryValue;\r
 \r
     //==============================================================================\r
-    CompileEngineSettings compileEngineSettings  { projectRoot };\r
+    std::unique_ptr<CompileEngineSettings> compileEngineSettings;\r
 \r
     //==============================================================================\r
     bool shouldWriteLegacyPluginFormatSettings = false;\r
@@ -427,7 +427,7 @@ private:
 \r
     //==============================================================================\r
     friend class Item;\r
-    ScopedPointer<EnabledModuleList> enabledModulesList;\r
+    std::unique_ptr<EnabledModuleList> enabledModulesList;\r
     bool isSaving = false;\r
     Time modificationTime;\r
     StringPairArray parsedPreprocessorDefs;\r
index 4fb13afe0fe4c873c1f4f7f71b6331084f75e311..4e75af75d4c3af2092b68c26bfe14706b3c50d02 100644 (file)
@@ -103,7 +103,7 @@ public:
     ValueWithDefault androidJavaLibs, androidRepositories, androidDependencies, androidScreenOrientation, androidActivityClass,\r
                      androidActivitySubClassName, androidActivityBaseClassName, androidManifestCustomXmlElements, androidVersionCode,\r
                      androidMinimumSDK, androidTheme, androidSharedLibraries, androidStaticLibraries, androidExtraAssetsFolder,\r
-                     androidOboeRepositoryPath, androidInternetNeeded, androidMicNeeded, androidBluetoothNeeded, androidExternalReadPermission,\r
+                     androidOboeRepositoryPath, androidInternetNeeded, androidMicNeeded, androidCameraNeeded, androidBluetoothNeeded, androidExternalReadPermission,\r
                      androidExternalWritePermission, androidInAppBillingPermission, androidVibratePermission,androidOtherPermissions,\r
                      androidEnableRemoteNotifications, androidRemoteNotificationsConfigFile, androidEnableContentSharing, androidKeyStore,\r
                      androidKeyStorePass, androidKeyAlias, androidKeyAliasPass, gradleVersion, gradleToolchain, androidPluginVersion, buildToolsVersion;\r
@@ -128,6 +128,7 @@ public:
           androidOboeRepositoryPath            (settings, Ids::androidOboeRepositoryPath,            getUndoManager()),\r
           androidInternetNeeded                (settings, Ids::androidInternetNeeded,                getUndoManager(), true),\r
           androidMicNeeded                     (settings, Ids::microphonePermissionNeeded,           getUndoManager(), false),\r
+          androidCameraNeeded                  (settings, Ids::cameraPermissionNeeded,               getUndoManager(), false),\r
           androidBluetoothNeeded               (settings, Ids::androidBluetoothNeeded,               getUndoManager(), true),\r
           androidExternalReadPermission        (settings, Ids::androidExternalReadNeeded,            getUndoManager(), true),\r
           androidExternalWritePermission       (settings, Ids::androidExternalWriteNeeded,           getUndoManager(), true),\r
@@ -920,6 +921,9 @@ private:
         props.add (new ChoicePropertyComponent (androidMicNeeded, "Audio Input Required"),\r
                    "If enabled, this will set the android.permission.RECORD_AUDIO flag in the manifest.");\r
 \r
+        props.add (new ChoicePropertyComponent (androidCameraNeeded, "Camera Required"),\r
+                   "If enabled, this will set the android.permission.CAMERA flag in the manifest.");\r
+\r
         props.add (new ChoicePropertyComponent (androidBluetoothNeeded, "Bluetooth permissions Required"),\r
                    "If enabled, this will set the android.permission.BLUETOOTH and  android.permission.BLUETOOTH_ADMIN flag in the manifest. This is required for Bluetooth MIDI on Android.");\r
 \r
@@ -1034,25 +1038,92 @@ private:
 \r
         createDirectoryOrThrow (targetFolder);\r
 \r
+        auto activityCode = getActivityCode (javaSourceFolder, className, package);\r
+\r
         auto javaDestFile = targetFolder.getChildFile (className + ".java");\r
+        overwriteFileIfDifferentOrThrow (javaDestFile, activityCode);\r
+    }\r
+\r
+    String getActivityCode (const File& javaSourceFolder, const String& className, const String& package) const\r
+    {\r
+        auto runtimePermissionsCode = getRuntimePermissionsCode (javaSourceFolder, className);\r
+        auto midiCode = getMidiCode (javaSourceFolder, className);\r
+        auto webViewCode = getWebViewCode (javaSourceFolder);\r
+        auto cameraCode = getCameraCode (javaSourceFolder);\r
+\r
+        auto javaSourceFile = javaSourceFolder.getChildFile ("JuceAppActivity.java");\r
+        auto javaSourceLines = StringArray::fromLines (javaSourceFile.loadFileAsString());\r
+\r
+        {\r
+            MemoryOutputStream newFile;\r
+\r
+            for (auto& line : javaSourceLines)\r
+            {\r
+                if (line.contains ("$$JuceAndroidMidiImports$$"))\r
+                    newFile << midiCode.imports;\r
+                else if (line.contains ("$$JuceAndroidMidiCode$$"))\r
+                    newFile << midiCode.main;\r
+                else if (line.contains ("$$JuceAndroidRuntimePermissionsCode$$"))\r
+                    newFile << runtimePermissionsCode;\r
+                else if (line.contains ("$$JuceAndroidWebViewImports$$"))\r
+                    newFile << webViewCode.imports;\r
+                else if (line.contains ("$$JuceAndroidWebViewNativeCode$$"))\r
+                    newFile << webViewCode.native;\r
+                else if (line.contains ("$$JuceAndroidWebViewCode$$"))\r
+                    newFile << webViewCode.main;\r
+                else if (line.contains ("$$JuceAndroidCameraImports$$"))\r
+                    newFile << cameraCode.imports;\r
+                else if (line.contains ("$$JuceAndroidCameraCode$$"))\r
+                    newFile << cameraCode.main;\r
+                else\r
+                    newFile << line.replace ("$$JuceAppActivityBaseClass$$", androidActivityBaseClassName.get().toString())\r
+                                   .replace ("JuceAppActivity", className)\r
+                                   .replace ("package com.juce;", "package " + package + ";") << newLine;\r
+            }\r
+\r
+            javaSourceLines = StringArray::fromLines (newFile.toString());\r
+        }\r
+\r
+        while (javaSourceLines.size() > 2\r
+                && javaSourceLines[javaSourceLines.size() - 1].trim().isEmpty()\r
+                && javaSourceLines[javaSourceLines.size() - 2].trim().isEmpty())\r
+            javaSourceLines.remove (javaSourceLines.size() - 1);\r
+\r
+        return javaSourceLines.joinIntoString (newLine);\r
+    }\r
+\r
+    String getRuntimePermissionsCode (const File& javaSourceFolder, const String& className) const\r
+    {\r
+        if (static_cast<int> (androidMinimumSDK.get()) >= 23)\r
+        {\r
+            auto javaRuntimePermissions = javaSourceFolder.getChildFile ("AndroidRuntimePermissions.java");\r
+            return javaRuntimePermissions.loadFileAsString().replace ("JuceAppActivity", className);\r
+        }\r
+\r
+        return {};\r
+    }\r
 \r
+    struct MidiCode\r
+    {\r
+        String imports;\r
+        String main;\r
+    };\r
 \r
-        String juceMidiCode, juceMidiImports, juceRuntimePermissionsCode;\r
+    MidiCode getMidiCode (const File& javaSourceFolder, const String& className) const\r
+    {\r
+        String juceMidiCode, juceMidiImports;\r
 \r
         juceMidiImports << newLine;\r
 \r
         if (static_cast<int> (androidMinimumSDK.get()) >= 23)\r
         {\r
             auto javaAndroidMidi = javaSourceFolder.getChildFile ("AndroidMidi.java");\r
-            auto javaRuntimePermissions = javaSourceFolder.getChildFile ("AndroidRuntimePermissions.java");\r
 \r
             juceMidiImports << "import android.media.midi.*;" << newLine\r
                             << "import android.bluetooth.*;" << newLine\r
                             << "import android.bluetooth.le.*;" << newLine;\r
 \r
             juceMidiCode = javaAndroidMidi.loadFileAsString().replace ("JuceAppActivity", className);\r
-\r
-            juceRuntimePermissionsCode = javaRuntimePermissions.loadFileAsString().replace ("JuceAppActivity", className);\r
         }\r
         else\r
         {\r
@@ -1061,6 +1132,18 @@ private:
                                            .replace ("JuceAppActivity", className);\r
         }\r
 \r
+        return { juceMidiImports, juceMidiCode };\r
+    }\r
+\r
+    struct WebViewCode\r
+    {\r
+        String imports;\r
+        String native;\r
+        String main;\r
+    };\r
+\r
+    WebViewCode getWebViewCode (const File& javaSourceFolder) const\r
+    {\r
         String juceWebViewImports, juceWebViewCodeNative, juceWebViewCode;\r
 \r
         if (static_cast<int> (androidMinimumSDK.get()) >= 23)\r
@@ -1106,41 +1189,32 @@ private:
             }\r
         }\r
 \r
-        auto javaSourceFile = javaSourceFolder.getChildFile ("JuceAppActivity.java");\r
-        auto javaSourceLines = StringArray::fromLines (javaSourceFile.loadFileAsString());\r
+        return { juceWebViewImports, juceWebViewCodeNative, juceWebViewCode };\r
+    }\r
 \r
-        {\r
-            MemoryOutputStream newFile;\r
+    struct CameraCode\r
+    {\r
+        String imports;\r
+        String main;\r
+    };\r
 \r
-            for (auto& line : javaSourceLines)\r
-            {\r
-                if (line.contains ("$$JuceAndroidMidiImports$$"))\r
-                    newFile << juceMidiImports;\r
-                else if (line.contains ("$$JuceAndroidMidiCode$$"))\r
-                    newFile << juceMidiCode;\r
-                else if (line.contains ("$$JuceAndroidRuntimePermissionsCode$$"))\r
-                    newFile << juceRuntimePermissionsCode;\r
-                else if (line.contains ("$$JuceAndroidWebViewImports$$"))\r
-                    newFile << juceWebViewImports;\r
-                else if (line.contains ("$$JuceAndroidWebViewNativeCode$$"))\r
-                    newFile << juceWebViewCodeNative;\r
-                else if (line.contains ("$$JuceAndroidWebViewCode$$"))\r
-                    newFile << juceWebViewCode;\r
-                else\r
-                    newFile << line.replace ("$$JuceAppActivityBaseClass$$", androidActivityBaseClassName.get().toString())\r
-                                   .replace ("JuceAppActivity", className)\r
-                                   .replace ("package com.juce;", "package " + package + ";") << newLine;\r
-            }\r
+    CameraCode getCameraCode (const File& javaSourceFolder) const\r
+    {\r
+        String juceCameraImports, juceCameraCode;\r
 \r
-            javaSourceLines = StringArray::fromLines (newFile.toString());\r
-        }\r
+        if (static_cast<int> (androidMinimumSDK.get()) >= 21)\r
+            juceCameraImports << "import android.hardware.camera2.*;" << newLine;\r
 \r
-        while (javaSourceLines.size() > 2\r
-                && javaSourceLines[javaSourceLines.size() - 1].trim().isEmpty()\r
-                && javaSourceLines[javaSourceLines.size() - 2].trim().isEmpty())\r
-            javaSourceLines.remove (javaSourceLines.size() - 1);\r
+        auto javaCameraFile = javaSourceFolder.getChildFile ("AndroidCamera.java");\r
+        auto juceCameraCodeAll = javaCameraFile.loadFileAsString();\r
 \r
-        overwriteFileIfDifferentOrThrow (javaDestFile, javaSourceLines.joinIntoString (newLine));\r
+        if (static_cast<int> (androidMinimumSDK.get()) >= 21)\r
+        {\r
+            juceCameraCode << juceCameraCodeAll.fromFirstOccurrenceOf ("$$CameraApi21", false, false)\r
+                                               .upToFirstOccurrenceOf ("CameraApi21$$", false, false);\r
+        }\r
+\r
+        return { juceCameraImports, juceCameraCode };\r
     }\r
 \r
     void copyAdditionalJavaFiles (const File& sourceFolder, const File& targetFolder) const\r
@@ -1332,7 +1406,7 @@ private:
             customStringsXmlContent << cfg.getCustomStringsXml();\r
             customStringsXmlContent << "\n</resources>";\r
 \r
-            ScopedPointer<XmlElement> strings = XmlDocument::parse (customStringsXmlContent);\r
+            std::unique_ptr<XmlElement> strings (XmlDocument::parse (customStringsXmlContent));\r
 \r
             String dir     = cfg.isDebug() ? "debug" : "release";\r
             String subPath = "app/src/" + dir + "/res/values/string.xml";\r
@@ -1343,7 +1417,7 @@ private:
 \r
     void writeAndroidManifest (const File& folder) const\r
     {\r
-        ScopedPointer<XmlElement> manifest (createManifestXML());\r
+        std::unique_ptr<XmlElement> manifest (createManifestXML());\r
 \r
         writeXmlOrThrow (*manifest, folder.getChildFile ("src/main/AndroidManifest.xml"), "utf-8", 100, true);\r
     }\r
@@ -1366,8 +1440,8 @@ private:
 \r
     void writeIcons (const File& folder) const\r
     {\r
-        ScopedPointer<Drawable> bigIcon (getBigIcon());\r
-        ScopedPointer<Drawable> smallIcon (getSmallIcon());\r
+        std::unique_ptr<Drawable> bigIcon (getBigIcon());\r
+        std::unique_ptr<Drawable> smallIcon (getSmallIcon());\r
 \r
         if (bigIcon != nullptr && smallIcon != nullptr)\r
         {\r
@@ -1734,7 +1808,7 @@ private:
 \r
         if (! app->hasAttribute ("android:icon"))\r
         {\r
-            ScopedPointer<Drawable> bigIcon (getBigIcon()), smallIcon (getSmallIcon());\r
+            std::unique_ptr<Drawable> bigIcon (getBigIcon()), smallIcon (getSmallIcon());\r
 \r
             if (bigIcon != nullptr || smallIcon != nullptr)\r
                 app->setAttribute ("android:icon", "@drawable/icon");\r
@@ -1882,6 +1956,9 @@ private:
         if (androidMicNeeded.get())\r
             s.add ("android.permission.RECORD_AUDIO");\r
 \r
+        if (androidCameraNeeded.get())\r
+            s.add ("android.permission.CAMERA");\r
+\r
         if (androidBluetoothNeeded.get())\r
         {\r
             s.add ("android.permission.BLUETOOTH");\r
index be3fc51f611e63dc55337c08e30b0a50ce9f1ba0..a79f4e9d4e354dbf406403e373a754eca25f2530 100644 (file)
   ==============================================================================\r
 */\r
 \r
+#pragma once\r
+\r
 #include "jucer_ProjectExport_CodeBlocks.h"\r
 #include "jucer_ProjectExport_Make.h"\r
 #include "jucer_ProjectExport_Xcode.h"\r
 \r
+//==============================================================================\r
 class CLionProjectExporter  : public ProjectExporter\r
 {\r
 protected:\r
@@ -137,7 +140,7 @@ public:
 \r
         for (auto& exporterName : getExporterNames())\r
         {\r
-            ScopedPointer<ProjectExporter> exporter = createNewExporter (getProject(), exporterName);\r
+            std::unique_ptr<ProjectExporter> exporter (createNewExporter (getProject(), exporterName));\r
 \r
             if (isExporterSupported (*exporter))\r
                 description << exporter->getName() << newLine;\r
@@ -938,7 +941,7 @@ private:
                 {\r
                     auto plistFile = exporter.getTargetFolder().getChildFile (targetAttributes["INFOPLIST_FILE"]);\r
                     XmlDocument infoPlistData (plistFile);\r
-                    ScopedPointer<XmlElement> plist = infoPlistData.getDocumentElement();\r
+                    std::unique_ptr<XmlElement> plist (infoPlistData.getDocumentElement());\r
 \r
                     if (plist != nullptr)\r
                     {\r
index 6449d1cd4400a0c9dd5b6d7210d8befef8ce7840..941fc4b572c5cd005749cd2b10a157948ce3a925 100644 (file)
@@ -135,7 +135,8 @@ public:
     }\r
 \r
     //==============================================================================\r
-    class MSVCBuildConfiguration  : public BuildConfiguration\r
+    class MSVCBuildConfiguration  : public BuildConfiguration,\r
+                                    private Value::Listener\r
     {\r
     public:\r
         MSVCBuildConfiguration (Project& p, const ValueTree& settings, const ProjectExporter& e)\r
@@ -153,14 +154,20 @@ public:
               architectureTypeValue         (config, Ids::winArchitecture,            getUndoManager(), get64BitArchName()),\r
               fastMathValue                 (config, Ids::fastMath,                   getUndoManager()),\r
               debugInformationFormatValue   (config, Ids::debugInformationFormat,     getUndoManager(), isDebug() ? "ProgramDatabase" : "None"),\r
-              pluginBinaryCopyStepValue     (config, Ids::enablePluginBinaryCopyStep, getUndoManager(), false)\r
+              pluginBinaryCopyStepValue     (config, Ids::enablePluginBinaryCopyStep, getUndoManager(), false),\r
+              vstBinaryLocation             (config, Ids::vstBinaryLocation,          getUndoManager()),\r
+              vst3BinaryLocation            (config, Ids::vst3BinaryLocation,         getUndoManager()),\r
+              rtasBinaryLocation            (config, Ids::rtasBinaryLocation,         getUndoManager()),\r
+              aaxBinaryLocation             (config, Ids::aaxBinaryLocation,          getUndoManager())\r
         {\r
             if (! isDebug())\r
                 updateOldLTOSetting();\r
 \r
-            initialisePluginDefaultValues();\r
-\r
+            setPluginBinaryCopyLocationDefaults();\r
             optimisationLevelValue.setDefault (isDebug() ? optimisationOff : optimiseFull);\r
+\r
+            architectureValueToListenTo = architectureTypeValue.getPropertyAsValue();\r
+            architectureValueToListenTo.addListener (this);\r
         }\r
 \r
         //==============================================================================\r
@@ -303,6 +310,8 @@ public:
 \r
         ValueWithDefault vstBinaryLocation, vst3BinaryLocation, rtasBinaryLocation, aaxBinaryLocation;\r
 \r
+        Value architectureValueToListenTo;\r
+\r
         //==============================================================================\r
         void updateOldLTOSetting()\r
         {\r
@@ -341,17 +350,21 @@ public:
 \r
         }\r
 \r
-        void initialisePluginDefaultValues()\r
+        void setPluginBinaryCopyLocationDefaults()\r
         {\r
-            vstBinaryLocation.referTo  (config, Ids::vstBinaryLocation,  getUndoManager(), ((is64Bit() ? "%ProgramW6432%"\r
-                                                                                                       : "%programfiles(x86)%") + String ("\\Steinberg\\Vstplugins")));\r
+            vstBinaryLocation.setDefault  ((is64Bit() ? "%ProgramW6432%" : "%programfiles(x86)%") + String ("\\Steinberg\\Vstplugins"));\r
 \r
             auto prefix = is64Bit() ? "%CommonProgramW6432%"\r
                                     : "%CommonProgramFiles(x86)%";\r
 \r
-            vst3BinaryLocation.referTo (config, Ids::vst3BinaryLocation, getUndoManager(), prefix + String ("\\VST3"));\r
-            rtasBinaryLocation.referTo (config, Ids::rtasBinaryLocation, getUndoManager(), prefix + String ("\\Digidesign\\DAE\\Plug-Ins"));\r
-            aaxBinaryLocation.referTo  (config, Ids::aaxBinaryLocation,  getUndoManager(), prefix + String ("\\Avid\\Audio\\Plug-Ins"));\r
+            vst3BinaryLocation.setDefault (prefix + String ("\\VST3"));\r
+            rtasBinaryLocation.setDefault (prefix + String ("\\Digidesign\\DAE\\Plug-Ins"));\r
+            aaxBinaryLocation.setDefault  (prefix + String ("\\Avid\\Audio\\Plug-Ins"));\r
+        }\r
+\r
+        void valueChanged (Value&) override\r
+        {\r
+            setPluginBinaryCopyLocationDefaults();\r
         }\r
     };\r
 \r
@@ -493,12 +506,15 @@ public:
                         manifest->addTextElement (config.shouldGenerateManifest() ? "true" : "false");\r
                     }\r
 \r
-                    auto librarySearchPaths = getLibrarySearchPaths (config);\r
-                    if (librarySearchPaths.size() > 0)\r
+                    if (type != SharedCodeTarget)\r
                     {\r
-                        auto* libPath = props->createNewChildElement ("LibraryPath");\r
-                        setConditionAttribute (*libPath, config);\r
-                        libPath->addTextElement ("$(LibraryPath);" + librarySearchPaths.joinIntoString (";"));\r
+                        auto librarySearchPaths = getLibrarySearchPaths (config);\r
+                        if (librarySearchPaths.size() > 0)\r
+                        {\r
+                            auto* libPath = props->createNewChildElement ("LibraryPath");\r
+                            setConditionAttribute (*libPath, config);\r
+                            libPath->addTextElement ("$(LibraryPath);" + librarySearchPaths.joinIntoString (";"));\r
+                        }\r
                     }\r
                 }\r
             }\r
@@ -581,11 +597,14 @@ public:
                 }\r
 \r
                 auto externalLibraries = getExternalLibraries (config, getOwner().getExternalLibrariesString());\r
-                auto additionalDependencies = externalLibraries.isNotEmpty() ? getOwner().replacePreprocessorTokens (config, externalLibraries).trim() + ";%(AdditionalDependencies)"\r
-                                                                                   : String();\r
+                auto additionalDependencies = type != SharedCodeTarget && externalLibraries.isNotEmpty()\r
+                                                        ? getOwner().replacePreprocessorTokens (config, externalLibraries).trim() + ";%(AdditionalDependencies)"\r
+                                                        : String();\r
+\r
                 auto librarySearchPaths = config.getLibrarySearchPaths();\r
-                auto additionalLibraryDirs = librarySearchPaths.size() > 0 ? getOwner().replacePreprocessorTokens (config, librarySearchPaths.joinIntoString (";")) + ";%(AdditionalLibraryDirectories)"\r
-                                                                           : String();\r
+                auto additionalLibraryDirs = type != SharedCodeTarget && librarySearchPaths.size() > 0\r
+                                                       ? getOwner().replacePreprocessorTokens (config, librarySearchPaths.joinIntoString (";")) + ";%(AdditionalLibraryDirectories)"\r
+                                                       : String();\r
 \r
                 {\r
                     auto* link = group->createNewChildElement ("Link");\r
@@ -638,6 +657,7 @@ public:
                     bsc->createNewChildElement ("OutputFile")->addTextElement (getOwner().getIntDirFile (config, config.getOutputFilename (".bsc", true)));\r
                 }\r
 \r
+                if (type != SharedCodeTarget)\r
                 {\r
                     auto* lib = group->createNewChildElement ("Lib");\r
 \r
@@ -677,7 +697,7 @@ public:
                          ->addTextElement (postBuild);\r
             }\r
 \r
-            ScopedPointer<XmlElement> otherFilesGroup (new XmlElement ("ItemGroup"));\r
+            std::unique_ptr<XmlElement> otherFilesGroup (new XmlElement ("ItemGroup"));\r
 \r
             {\r
                 auto* cppFiles    = projectXml.createNewChildElement ("ItemGroup");\r
@@ -701,7 +721,7 @@ public:
             if (otherFilesGroup->getFirstChildElement() != nullptr)\r
                 projectXml.addChildElement (otherFilesGroup.release());\r
 \r
-            if (getOwner().hasResourceFile())\r
+            if (type != SharedCodeTarget && getOwner().hasResourceFile())\r
             {\r
                 auto* rcGroup = projectXml.createNewChildElement ("ItemGroup");\r
                 auto* e = rcGroup->createNewChildElement ("ResourceCompile");\r
@@ -872,7 +892,7 @@ public:
             auto* groupsXml  = filterXml.createNewChildElement ("ItemGroup");\r
             auto* cpps       = filterXml.createNewChildElement ("ItemGroup");\r
             auto* headers    = filterXml.createNewChildElement ("ItemGroup");\r
-            ScopedPointer<XmlElement> otherFilesGroup (new XmlElement ("ItemGroup"));\r
+            std::unique_ptr<XmlElement> otherFilesGroup (new XmlElement ("ItemGroup"));\r
 \r
             for (int i = 0; i < getOwner().getAllGroups().size(); ++i)\r
             {\r
@@ -892,7 +912,7 @@ public:
             if (otherFilesGroup->getFirstChildElement() != nullptr)\r
                 filterXml.addChildElement (otherFilesGroup.release());\r
 \r
-            if (getOwner().hasResourceFile())\r
+            if (type != SharedCodeTarget && getOwner().hasResourceFile())\r
             {\r
                 auto* rcGroup = filterXml.createNewChildElement ("ItemGroup");\r
                 auto* e = rcGroup->createNewChildElement ("ResourceCompile");\r
index 822711aa8eb20f666e7d2b70c58561eb631b182b..26f767b161a6ea3b0611f153a49980132c96de89 100644 (file)
@@ -33,7 +33,7 @@ namespace
     const char* const osxVersionDefault         = "10.11";\r
     const char* const iosVersionDefault         = "9.3";\r
 \r
-    const int oldestSDKVersion  = 5;\r
+    const int oldestSDKVersion  = 7;\r
     const int currentSDKVersion = 13;\r
     const int minimumAUv3SDKVersion = 11;\r
 \r
@@ -64,14 +64,18 @@ public:
           extraFrameworksValue                         (settings, Ids::extraFrameworks,                         getUndoManager()),\r
           postbuildCommandValue                        (settings, Ids::postbuildCommand,                        getUndoManager()),\r
           prebuildCommandValue                         (settings, Ids::prebuildCommand,                         getUndoManager()),\r
-          iosAppExtensionDuplicateResourcesFolderValue (settings, Ids::iosAppExtensionDuplicateResourcesFolder, getUndoManager()),\r
+          duplicateAppExResourcesFolderValue           (settings, Ids::duplicateAppExResourcesFolder,           getUndoManager(), true),\r
           iosDeviceFamilyValue                         (settings, Ids::iosDeviceFamily,                         getUndoManager(), "1,2"),\r
           iPhoneScreenOrientationValue                 (settings, Ids::iPhoneScreenOrientation,                 getUndoManager(), "portraitlandscape"),\r
           iPadScreenOrientationValue                   (settings, Ids::iPadScreenOrientation,                   getUndoManager(), "portraitlandscape"),\r
           customXcodeResourceFoldersValue              (settings, Ids::customXcodeResourceFolders,              getUndoManager()),\r
           customXcassetsFolderValue                    (settings, Ids::customXcassetsFolder,                    getUndoManager()),\r
           microphonePermissionNeededValue              (settings, Ids::microphonePermissionNeeded,              getUndoManager()),\r
-          microphonePermissionsTextValue               (settings, Ids::microphonePermissionsText,               getUndoManager(), "This is an audio app which requires audio input. If you do not have a USB audio interface connected it will use the microphone."),\r
+          microphonePermissionsTextValue               (settings, Ids::microphonePermissionsText,               getUndoManager(),\r
+                                                        "This is an audio app which requires audio input. If you do not have a USB audio interface connected it will use the microphone."),\r
+          cameraPermissionNeededValue                  (settings, Ids::cameraPermissionNeeded,                  getUndoManager()),\r
+          cameraPermissionTextValue                    (settings, Ids::cameraPermissionText,                    getUndoManager(),\r
+                                                        "This app requires camera usage to function properly."),\r
           uiFileSharingEnabledValue                    (settings, Ids::UIFileSharingEnabled,                    getUndoManager()),\r
           uiSupportsDocumentBrowserValue               (settings, Ids::UISupportsDocumentBrowser,               getUndoManager()),\r
           uiStatusBarHiddenValue                       (settings, Ids::UIStatusBarHidden,                       getUndoManager()),\r
@@ -110,7 +114,7 @@ public:
     String getPostBuildScript() const                { return postbuildCommandValue.get(); }\r
     String getPreBuildScript() const                 { return prebuildCommandValue.get(); }\r
 \r
-    bool shouldDuplicateResourcesFolderForAppExtension() const { return iosAppExtensionDuplicateResourcesFolderValue.get(); }\r
+    bool shouldDuplicateAppExResourcesFolder() const { return duplicateAppExResourcesFolderValue.get(); }\r
 \r
     String getDeviceFamilyString() const             { return iosDeviceFamilyValue.get(); }\r
 \r
@@ -123,6 +127,9 @@ public:
     bool isMicrophonePermissionEnabled() const         { return microphonePermissionNeededValue.get(); }\r
     String getMicrophonePermissionsTextString() const  { return microphonePermissionsTextValue.get(); }\r
 \r
+    bool isCameraPermissionEnabled() const           { return cameraPermissionNeededValue.get(); }\r
+    String getCameraPermissionTextString() const     { return cameraPermissionTextValue.get(); }\r
+\r
     bool isInAppPurchasesEnabled() const             { return iosInAppPurchasesValue.get(); }\r
     bool isBackgroundAudioEnabled() const            { return iosBackgroundAudioValue.get(); }\r
     bool isBackgroundBleEnabled() const              { return iosBackgroundBleValue.get(); }\r
@@ -195,14 +202,12 @@ public:
                    "This way you can specify them for OS X and iOS separately, and modify the content of the resource folders "\r
                    "without re-saving the Projucer project.");\r
 \r
+        if (getProject().getProjectType().isAudioPlugin())\r
+            props.add (new ChoicePropertyComponent (duplicateAppExResourcesFolderValue, "Add Duplicate Resources Folder to App Extension"),\r
+                       "Disable this to prevent the Projucer from creating a duplicate resources folder for AUv3 app extensions.");\r
+\r
         if (iOS)\r
         {\r
-            if (getProject().getProjectType().isAudioPlugin())\r
-                props.add (new ChoicePropertyComponent (iosAppExtensionDuplicateResourcesFolderValue,\r
-                                                        "Don't Add Resources Folder to App Extension"),\r
-                           "Enable this to prevent the Projucer from creating a resources folder for AUv3 app extensions.");\r
-\r
-\r
             props.add (new ChoicePropertyComponent (iosDeviceFamilyValue, "Device Family",\r
                                                     { "iPhone", "iPad", "Universal" },\r
                                                     { "1",      "2",    "1,2" }),\r
@@ -237,6 +242,14 @@ public:
             props.add (new TextPropertyComponentWithEnablement (microphonePermissionsTextValue, microphonePermissionNeededValue,\r
                                                                 "Microphone Access Text", 1024, false),\r
                        "A short description of why your app requires microphone access.");\r
+\r
+            props.add (new ChoicePropertyComponent (cameraPermissionNeededValue, "Camera Access"),\r
+                       "Enable this to allow your app to use the camera. "\r
+                       "The user of your app will be prompted to grant camera access permissions.");\r
+\r
+            props.add (new TextPropertyComponentWithEnablement (cameraPermissionTextValue, cameraPermissionNeededValue,\r
+                                                                "Camera Access Text", 1024, false),\r
+                       "A short description of why your app requires camera access.");\r
         }\r
         else if (projectType.isGUIApplication())\r
         {\r
@@ -421,7 +434,6 @@ protected:
               osxArchitecture              (config, Ids::osxArchitecture,              getUndoManager(), osxArch_Default),\r
               customXcodeFlags             (config, Ids::customXcodeFlags,             getUndoManager()),\r
               plistPreprocessorDefinitions (config, Ids::plistPreprocessorDefinitions, getUndoManager()),\r
-              cppStandardLibrary           (config, Ids::cppLibType,                   getUndoManager()),\r
               codeSignIdentity             (config, Ids::codeSigningIdentity,          getUndoManager(), iOS ? "iPhone Developer" : "Mac Developer"),\r
               fastMathEnabled              (config, Ids::fastMath,                     getUndoManager()),\r
               stripLocalSymbolsEnabled     (config, Ids::stripLocalSymbols,            getUndoManager()),\r
@@ -487,11 +499,6 @@ protected:
             props.add (new TextPropertyComponent (plistPreprocessorDefinitions, "PList Preprocessor Definitions", 2048, true),\r
                        "Preprocessor definitions used during PList preprocessing (see PList Preprocess).");\r
 \r
-            props.add (new ChoicePropertyComponent (cppStandardLibrary, "C++ Library",\r
-                                                    { "LLVM libc++", "GNU libstdc++" },\r
-                                                    { "libc++",      "libstdc++" }),\r
-                       "The type of C++ std lib that will be linked.");\r
-\r
             props.add (new TextPropertyComponent (codeSignIdentity, "Code-Signing Identity", 1024, false),\r
                        "The name of a code-signing identity for Xcode to apply.");\r
 \r
@@ -514,8 +521,6 @@ protected:
 \r
         bool isFastMathEnabled() const                          { return fastMathEnabled.get(); }\r
 \r
-        String getCPPStandardLibraryString() const              { return cppStandardLibrary.get(); }\r
-\r
         bool isStripLocalSymbolsEnabled() const                 { return stripLocalSymbolsEnabled.get(); }\r
 \r
         String getCustomXcodeFlagsString() const                { return customXcodeFlags.get(); }\r
@@ -540,7 +545,7 @@ protected:
         bool iOS;\r
 \r
         ValueWithDefault osxSDKVersion, osxDeploymentTarget, iosDeploymentTarget, osxArchitecture,\r
-                         customXcodeFlags, plistPreprocessorDefinitions, cppStandardLibrary, codeSignIdentity,\r
+                         customXcodeFlags, plistPreprocessorDefinitions, codeSignIdentity,\r
                          fastMathEnabled, stripLocalSymbolsEnabled, pluginBinaryCopyStepEnabled,\r
                          vstBinaryLocation, vst3BinaryLocation, auBinaryLocation, rtasBinaryLocation, aaxBinaryLocation;\r
 \r
@@ -1129,8 +1134,7 @@ public:
                                                                                               : "c++") + cppStandard).quoted());\r
             }\r
 \r
-            if (config.getCPPStandardLibraryString().isNotEmpty())\r
-                s.set ("CLANG_CXX_LIBRARY", config.getCPPStandardLibraryString().quoted());\r
+            s.set ("CLANG_CXX_LIBRARY", "\"libc++\"");\r
 \r
             s.set ("COMBINE_HIDPI_IMAGES", "YES");\r
 \r
@@ -1277,10 +1281,10 @@ public:
             if (! shouldCreatePList())\r
                 return;\r
 \r
-            ScopedPointer<XmlElement> plist (XmlDocument::parse (owner.getPListToMergeString()));\r
+            std::unique_ptr<XmlElement> plist (XmlDocument::parse (owner.getPListToMergeString()));\r
 \r
             if (plist == nullptr || ! plist->hasTagName ("plist"))\r
-                plist = new XmlElement ("plist");\r
+                plist.reset (new XmlElement ("plist"));\r
 \r
             auto* dict = plist->getChildByName ("dict");\r
 \r
@@ -1290,9 +1294,13 @@ public:
             if (owner.iOS)\r
             {\r
                 addPlistDictionaryKeyBool (dict, "LSRequiresIPhoneOS", true);\r
+\r
                 if (owner.isMicrophonePermissionEnabled())\r
                     addPlistDictionaryKey (dict, "NSMicrophoneUsageDescription", owner.getMicrophonePermissionsTextString());\r
 \r
+                if (owner.isCameraPermissionEnabled())\r
+                    addPlistDictionaryKey (dict, "NSCameraUsageDescription", owner.getCameraPermissionTextString());\r
+\r
                 if (type != AudioUnitv3PlugIn)\r
                     addPlistDictionaryKeyBool (dict, "UIViewControllerBasedStatusBarAppearance", false);\r
             }\r
@@ -1577,8 +1585,8 @@ public:
                     = RelativePath (owner.getAAXPathValue().toString(), RelativePath::projectFolder)\r
                         .getChildFile ("Libs");\r
 \r
-                String libraryPath (config.isDebug() ? "Debug/libAAXLibrary" : "Release/libAAXLibrary");\r
-                libraryPath += (isUsingClangCppLibrary (config) ? "_libcpp.a" : ".a");\r
+                String libraryPath (config.isDebug() ? "Debug" : "Release");\r
+                libraryPath += "/libAAXLibrary_libcpp.a";\r
 \r
                 extraLibs.add   (aaxLibsFolder.getChildFile (libraryPath));\r
             }\r
@@ -1639,25 +1647,6 @@ public:
             return targetExtraSearchPaths;\r
         }\r
 \r
-        bool isUsingClangCppLibrary (const BuildConfiguration& config) const\r
-        {\r
-            if (auto xcodeConfig = dynamic_cast<const XcodeBuildConfiguration*> (&config))\r
-            {\r
-                auto configValue = xcodeConfig->getCPPStandardLibraryString();\r
-\r
-                if (configValue.isNotEmpty())\r
-                    return (configValue == "libc++");\r
-\r
-                auto minorOSXDeploymentTarget = getOSXDeploymentTarget (*xcodeConfig)\r
-                                               .fromLastOccurrenceOf (".", false, false)\r
-                                               .getIntValue();\r
-\r
-                return (minorOSXDeploymentTarget > 8);\r
-            }\r
-\r
-            return false;\r
-        }\r
-\r
         String getOSXDeploymentTarget (const XcodeBuildConfiguration& config, String* sdkRoot = nullptr) const\r
         {\r
             auto sdk = config.getOSXSDKVersionString();\r
@@ -1710,8 +1699,9 @@ private:
     const bool iOS;\r
 \r
     ValueWithDefault customPListValue, pListPrefixHeaderValue, pListPreprocessValue, extraFrameworksValue, postbuildCommandValue,\r
-                     prebuildCommandValue, iosAppExtensionDuplicateResourcesFolderValue, iosDeviceFamilyValue, iPhoneScreenOrientationValue,\r
-                     iPadScreenOrientationValue, customXcodeResourceFoldersValue, customXcassetsFolderValue, microphonePermissionNeededValue, microphonePermissionsTextValue,\r
+                     prebuildCommandValue, duplicateAppExResourcesFolderValue, iosDeviceFamilyValue, iPhoneScreenOrientationValue,\r
+                     iPadScreenOrientationValue, customXcodeResourceFoldersValue, customXcassetsFolderValue,\r
+                     microphonePermissionNeededValue, microphonePermissionsTextValue, cameraPermissionNeededValue, cameraPermissionTextValue,\r
                      uiFileSharingEnabledValue, uiSupportsDocumentBrowserValue, uiStatusBarHiddenValue, documentExtensionsValue, iosInAppPurchasesValue,\r
                      iosBackgroundAudioValue, iosBackgroundBleValue, iosPushNotificationsValue, iosAppGroupsValue, iCloudPermissionsValue,\r
                      iosDevelopmentTeamIDValue, iosAppGroupsIDValue, keepCustomXcodeSchemesValue, useHeaderMapValue;\r
@@ -1908,8 +1898,7 @@ private:
 \r
             if (target->type != XcodeTarget::AggregateTarget)\r
             {\r
-                auto skipAUv3 = (target->type == XcodeTarget::AudioUnitv3PlugIn\r
-                                 && ! shouldDuplicateResourcesFolderForAppExtension());\r
+                auto skipAUv3 = (target->type == XcodeTarget::AudioUnitv3PlugIn && ! shouldDuplicateAppExResourcesFolder());\r
 \r
                 if (! projectType.isStaticLibrary() && target->type != XcodeTarget::SharedCodeTarget && ! skipAUv3)\r
                     target->addBuildPhase ("PBXResourcesBuildPhase", resourceIDs);\r
@@ -2136,11 +2125,13 @@ private:
 \r
     void getIconImages (OwnedArray<Drawable>& images) const\r
     {\r
-        ScopedPointer<Drawable> bigIcon (getBigIcon());\r
+        std::unique_ptr<Drawable> bigIcon (getBigIcon());\r
+\r
         if (bigIcon != nullptr)\r
             images.add (bigIcon.release());\r
 \r
-        ScopedPointer<Drawable> smallIcon (getSmallIcon());\r
+        std::unique_ptr<Drawable> smallIcon (getSmallIcon());\r
+\r
         if (smallIcon != nullptr)\r
             images.add (smallIcon.release());\r
     }\r
@@ -2327,6 +2318,9 @@ private:
             if (iOS && isPushNotificationsEnabled())\r
                 xcodeFrameworks.addIfNotAlreadyThere ("UserNotifications");\r
 \r
+            if (isiOS() && project.getConfigFlag ("JUCE_USE_CAMERA").get())\r
+                xcodeFrameworks.addIfNotAlreadyThere ("ImageIO");\r
+\r
             xcodeFrameworks.addTokens (getExtraFrameworksString(), ",;", "\"'");\r
             xcodeFrameworks.trim();\r
 \r
@@ -2486,14 +2480,14 @@ private:
     {\r
         auto fileRefID = createFileRefID (pathString);\r
 \r
-        ScopedPointer<ValueTree> v (new ValueTree (fileRefID));\r
+        std::unique_ptr<ValueTree> v (new ValueTree (fileRefID));\r
         v->setProperty ("isa", "PBXFileReference", nullptr);\r
         v->setProperty ("lastKnownFileType", fileType, nullptr);\r
         v->setProperty (Ids::name, pathString.fromLastOccurrenceOf ("/", false, false), nullptr);\r
         v->setProperty ("path", pathString, nullptr);\r
         v->setProperty ("sourceTree", sourceTree, nullptr);\r
 \r
-        auto existing = pbxFileReferences.indexOfSorted (*this, v);\r
+        auto existing = pbxFileReferences.indexOfSorted (*this, v.get());\r
 \r
         if (existing >= 0)\r
         {\r
@@ -2724,7 +2718,9 @@ private:
     String addFramework (const String& frameworkName) const\r
     {\r
         auto path = frameworkName;\r
-        if (! File::isAbsolutePath (path))\r
+        auto isRelativePath = path.startsWith ("../");\r
+\r
+        if (! File::isAbsolutePath (path) && ! isRelativePath)\r
             path = "System/Library/Frameworks/" + path;\r
 \r
         if (! path.endsWithIgnoreCase (".framework"))\r
@@ -2732,7 +2728,7 @@ private:
 \r
         auto fileRefID = createFileRefID (path);\r
 \r
-        addFileReference ((File::isAbsolutePath (frameworkName) ? "" : "${SDKROOT}/") + path);\r
+        addFileReference (((File::isAbsolutePath (frameworkName) || isRelativePath) ? "" : "${SDKROOT}/") + path);\r
         frameworkFileIDs.add (fileRefID);\r
 \r
         return addBuildFile (path, fileRefID, false, false);\r
@@ -2878,7 +2874,7 @@ private:
 \r
     bool xcschemeManagementPlistMatchesTargets (const File& plist) const\r
     {\r
-        ScopedPointer<XmlElement> xml (XmlDocument::parse (plist));\r
+        std::unique_ptr<XmlElement> xml (XmlDocument::parse (plist));\r
 \r
         if (xml != nullptr)\r
             if (auto* dict = xml->getChildByName ("dict"))\r
@@ -2952,7 +2948,7 @@ private:
     {\r
         String attributes;\r
 \r
-        attributes << "{ LastUpgradeCheck = 0830; "\r
+        attributes << "{ LastUpgradeCheck = 0930; "\r
                    << "ORGANIZATIONNAME = " << getProject().getCompanyNameString().quoted()\r
                    <<"; ";\r
 \r
index d4656f1ab0bec1acec6dfb0ea4aab2eb14d5df9b..b0b07b98f400fc93a3859e801d2cd719bbcad218 100644 (file)
@@ -786,21 +786,21 @@ Image ProjectExporter::getBestIconForSize (int size, bool returnNullIfNothingBig
 {\r
     Drawable* im = nullptr;\r
 \r
-    ScopedPointer<Drawable> im1 (getSmallIcon());\r
-    ScopedPointer<Drawable> im2 (getBigIcon());\r
+    std::unique_ptr<Drawable> im1 (getSmallIcon());\r
+    std::unique_ptr<Drawable> im2 (getBigIcon());\r
 \r
     if (im1 != nullptr && im2 != nullptr)\r
     {\r
         if (im1->getWidth() >= size && im2->getWidth() >= size)\r
-            im = im1->getWidth() < im2->getWidth() ? im1 : im2;\r
+            im = im1->getWidth() < im2->getWidth() ? im1.get() : im2.get();\r
         else if (im1->getWidth() >= size)\r
-            im = im1;\r
+            im = im1.get();\r
         else if (im2->getWidth() >= size)\r
-            im = im2;\r
+            im = im2.get();\r
     }\r
     else\r
     {\r
-        im = im1 != nullptr ? im1 : im2;\r
+        im = im1 != nullptr ? im1.get() : im2.get();\r
     }\r
 \r
     if (im == nullptr)\r
@@ -920,21 +920,21 @@ void ProjectExporter::BuildConfiguration::createPropertyEditors (PropertyListBui
         props.add (new TextPropertyComponent (configNameValue, "Name", 96, false),\r
                    "The name of this configuration.");\r
 \r
-    props.add (new ChoicePropertyComponent (isDebugValue, "Debug mode"),\r
+    props.add (new ChoicePropertyComponent (isDebugValue, "Debug Mode"),\r
                "If enabled, this means that the configuration should be built with debug symbols.");\r
 \r
-    props.add (new TextPropertyComponent (targetNameValue, "Binary name", 256, false),\r
+    props.add (new TextPropertyComponent (targetNameValue, "Binary Name", 256, false),\r
                "The filename to use for the destination binary executable file. If you don't add a suffix to this name, "\r
                "a suitable platform-specific suffix will be added automatically.");\r
 \r
-    props.add (new TextPropertyComponent (targetBinaryPathValue, "Binary location", 1024, false),\r
+    props.add (new TextPropertyComponent (targetBinaryPathValue, "Binary Location", 1024, false),\r
                "The folder in which the finished binary should be placed. Leave this blank to cause the binary to be placed "\r
                "in its default location in the build folder.");\r
 \r
-    props.addSearchPathProperty (headerSearchPathValue, "Header search paths", "Extra header search paths.");\r
-    props.addSearchPathProperty (librarySearchPathValue, "Extra library search paths", "Extra library search paths.");\r
+    props.addSearchPathProperty (headerSearchPathValue, "Header Search Paths", "Extra header search paths.");\r
+    props.addSearchPathProperty (librarySearchPathValue, "Extra Library Search Paths", "Extra library search paths.");\r
 \r
-    props.add (new TextPropertyComponent (ppDefinesValue, "Preprocessor definitions", 32768, true),\r
+    props.add (new TextPropertyComponent (ppDefinesValue, "Preprocessor Definitions", 32768, true),\r
                "Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace, commas, or "\r
                "new-lines to separate the items - to include a space or comma in a definition, precede it with a backslash.");\r
 \r
index c8332d4837bf5eb95c43b6112ad5fc3993a0109f..07cec42835866cc0807df494af5d65eb1d1cb02d 100644 (file)
@@ -50,7 +50,7 @@ public:
             Image image (Image::ARGB, 200, 200, true);\r
             Graphics g (image);\r
 \r
-            ScopedPointer<Drawable> svgDrawable (Drawable::createFromImageData (iconData, (size_t) iconDataSize));\r
+            std::unique_ptr<Drawable> svgDrawable (Drawable::createFromImageData (iconData, (size_t) iconDataSize));\r
 \r
             svgDrawable->drawWithin (g, image.getBounds().toFloat(), RectanglePlacement::fillDestination, 1.0f);\r
 \r
@@ -234,7 +234,7 @@ public:
         BuildConfiguration (Project& project, const ValueTree& configNode, const ProjectExporter&);\r
         ~BuildConfiguration();\r
 \r
-        typedef ReferenceCountedObjectPtr<BuildConfiguration> Ptr;\r
+        using Ptr = ReferenceCountedObjectPtr<BuildConfiguration>;\r
 \r
         //==============================================================================\r
         virtual void createConfigProperties (PropertyListBuilder&) = 0;\r
index d5075906a8febe8404f2f1b2900c84b8377c161a..4d8d9a483014886694e1208a07d60cfef3492458 100644 (file)
@@ -191,9 +191,6 @@ void ProjectSaver::writeProjects (const OwnedArray<LibraryModule>& modules, cons
                     for (auto& module: modules)\r
                         module->addSettingsForModuleToExporter (*exporter, *this);\r
 \r
-                    if (project.getProjectType().isAudioPlugin())\r
-                        writePluginCharacteristicsFile();\r
-\r
                     generatedFilesGroup.sortAlphabetically (true, true);\r
                     exporter->getAllGroups().add (generatedFilesGroup);\r
                 }\r
index 3f5b73174bab583a00c1c53e597a415bc37e7d55..7a3a2a4b53eea187f73b5132d1a967e602a031cc 100644 (file)
@@ -93,12 +93,14 @@ public:
 \r
             auto projectRootHash = project.getProjectRoot().toXmlString().hashCode();\r
 \r
+            if (project.getProjectType().isAudioPlugin())\r
+                writePluginCharacteristicsFile();\r
+\r
             writeAppConfigFile (modules, appConfigUserContent);\r
             writeBinaryDataFiles();\r
             writeAppHeader (modules);\r
             writeModuleCppWrappers (modules);\r
             writeProjects (modules, specifiedExporterToSave, ! showProgressBox);\r
-            writeAppConfigFile (modules, appConfigUserContent); // (this is repeated in case the projects added anything to it)\r
 \r
             // if the project root has changed after writing the other files then re-save it\r
             if (project.getProjectRoot().toXmlString().hashCode() != projectRootHash)\r
@@ -147,17 +149,14 @@ public:
 \r
         if (errors.size() == 0)\r
         {\r
+            if (project.getProjectType().isAudioPlugin())\r
+                writePluginCharacteristicsFile();\r
+\r
             writeAppConfigFile (modules, loadUserContentFromAppConfig());\r
             writeBinaryDataFiles();\r
             writeAppHeader (modules);\r
             writeModuleCppWrappers (modules);\r
 \r
-            if (project.getProjectType().isAudioPlugin())\r
-            {\r
-                writePluginCharacteristicsFile();\r
-                writeAppConfigFile (modules, loadUserContentFromAppConfig());\r
-            }\r
-\r
             return Result::ok();\r
         }\r
 \r
@@ -315,7 +314,7 @@ private:
 \r
     void writeMainProjectFile()\r
     {\r
-        ScopedPointer<XmlElement> xml (project.getProjectRoot().createXml());\r
+        std::unique_ptr<XmlElement> xml (project.getProjectRoot().createXml());\r
         jassert (xml != nullptr);\r
 \r
         if (xml != nullptr)\r
@@ -699,13 +698,13 @@ private:
 \r
         JobStatus runJob() override\r
         {\r
-            owner.saveExporter (exporter, modules);\r
+            owner.saveExporter (exporter.get(), modules);\r
             return jobHasFinished;\r
         }\r
 \r
     private:\r
         ProjectSaver& owner;\r
-        ScopedPointer<ProjectExporter> exporter;\r
+        std::unique_ptr<ProjectExporter> exporter;\r
         const OwnedArray<LibraryModule>& modules;\r
 \r
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ExporterJob)\r
index b4d52dfccd15f6cf0d71cd1bd7ab8d39bfc16603..1dcd54e9025eccd88b1b1e870552697399a37c40 100644 (file)
@@ -153,11 +153,11 @@ Result ResourceFile::writeHeader (MemoryOutputStream& header)
            << newLine\r
            << "    // If you provide the name of one of the binary resource variables above, this function will"             << newLine\r
            << "    // return the corresponding data and its size (or a null pointer if the name isn't found)."               << newLine\r
-           << "    const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) noexcept;"              << newLine\r
+           << "    const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes);"                       << newLine\r
            << newLine\r
            << "    // If you provide the name of one of the binary resource variables above, this function will"             << newLine\r
            << "    // return the corresponding original, non-mangled filename (or a null pointer if the name isn't found)."  << newLine\r
-           << "    const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept;"                    << newLine\r
+           << "    const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8);"                             << newLine\r
            << "}" << newLine;\r
 \r
     return Result::ok();\r
@@ -222,7 +222,7 @@ Result ResourceFile::writeCpp (MemoryOutputStream& cpp, const File& headerFile,
 \r
         cpp << newLine\r
             << newLine\r
-            << "const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) noexcept" << newLine\r
+            << "const char* getNamedResource (const char* resourceNameUTF8, int& numBytes)" << newLine\r
             << "{" << newLine;\r
 \r
         StringArray returnCodes;\r
@@ -255,7 +255,7 @@ Result ResourceFile::writeCpp (MemoryOutputStream& cpp, const File& headerFile,
 \r
         cpp << "};" << newLine << newLine;\r
 \r
-        cpp << "const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept"                << newLine\r
+        cpp << "const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8)"                         << newLine\r
             << "{"                                                                                                   << newLine\r
             << "    for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i)" << newLine\r
             << "    {"                                                                                               << newLine\r
index 465e4fe9ca5ac4d6c20300fee1b1c4eddb5018e3..d195a7f4a2b7a77ef05acb53fa56703e6d351062 100644 (file)
@@ -68,7 +68,8 @@ void AppearanceSettings::writeDefaultSchemeFile (const String& xmlString, const
 \r
     AppearanceSettings settings (false);\r
 \r
-    ScopedPointer<XmlElement> xml (XmlDocument::parse (xmlString));\r
+    std::unique_ptr<XmlElement> xml (XmlDocument::parse (xmlString));\r
+\r
     if (xml != nullptr)\r
         settings.readFromXML (*xml);\r
 \r
@@ -131,13 +132,13 @@ bool AppearanceSettings::readFromXML (const XmlElement& xml)
 \r
 bool AppearanceSettings::readFromFile (const File& file)\r
 {\r
-    const ScopedPointer<XmlElement> xml (XmlDocument::parse (file));\r
+    const std::unique_ptr<XmlElement> xml (XmlDocument::parse (file));\r
     return xml != nullptr && readFromXML (*xml);\r
 }\r
 \r
 bool AppearanceSettings::writeToFile (const File& file) const\r
 {\r
-    const ScopedPointer<XmlElement> xml (settings.createXml());\r
+    const std::unique_ptr<XmlElement> xml (settings.createXml());\r
     return xml != nullptr && xml->writeToFile (file, String());\r
 }\r
 \r
index 542e8aa6a48ca3ed8cb8d3724a3e46f673020b3e..10744c9ae23f2ae04222d72cbb71198791b5b786 100644 (file)
@@ -111,10 +111,10 @@ void StoredSettings::updateKeyMappings()
 \r
     if (auto* commandManager = ProjucerApplication::getApp().commandManager.get())\r
     {\r
-        const ScopedPointer<XmlElement> keys (commandManager->getKeyMappings()->createXml (true));\r
+        const std::unique_ptr<XmlElement> keys (commandManager->getKeyMappings()->createXml (true));\r
 \r
         if (keys != nullptr)\r
-            getGlobalProperties().setValue ("keyMappings", keys);\r
+            getGlobalProperties().setValue ("keyMappings", keys.get());\r
     }\r
 }\r
 \r
@@ -132,11 +132,13 @@ void StoredSettings::reload()
     propertyFiles.clear();\r
     propertyFiles.add (createPropsFile ("Projucer", false));\r
 \r
-    ScopedPointer<XmlElement> projectDefaultsXml (propertyFiles.getFirst()->getXmlValue ("PROJECT_DEFAULT_SETTINGS"));\r
+    std::unique_ptr<XmlElement> projectDefaultsXml (propertyFiles.getFirst()->getXmlValue ("PROJECT_DEFAULT_SETTINGS"));\r
+\r
     if (projectDefaultsXml != nullptr)\r
         projectDefaults = ValueTree::fromXml (*projectDefaultsXml);\r
 \r
-    ScopedPointer<XmlElement> fallbackPathsXml (propertyFiles.getFirst()->getXmlValue ("FALLBACK_PATHS"));\r
+    std::unique_ptr<XmlElement> fallbackPathsXml (propertyFiles.getFirst()->getXmlValue ("FALLBACK_PATHS"));\r
+\r
     if (fallbackPathsXml != nullptr)\r
         fallbackPaths = ValueTree::fromXml (*fallbackPathsXml);\r
 \r
index af34a63084df678e96e345de6038166464c5d493..26435b858bac4b0bca6a6e953975a6a57b61ac74 100644 (file)
@@ -83,8 +83,8 @@ private:
 \r
     void changed (bool isProjectDefaults)\r
     {\r
-        ScopedPointer<XmlElement> data (isProjectDefaults ? projectDefaults.createXml()\r
-                                                          : fallbackPaths.createXml());\r
+        std::unique_ptr<XmlElement> data (isProjectDefaults ? projectDefaults.createXml()\r
+                                                            : fallbackPaths.createXml());\r
 \r
         propertyFiles.getUnchecked (0)->setValue (isProjectDefaults ? "PROJECT_DEFAULT_SETTINGS"\r
                                                                     : "FALLBACK_PATHS",\r
index 4801081075c0e34324762521b32b44bc668742c4..7258b3538225501f8039fc8ac88ebc96c86efff6 100644 (file)
@@ -64,7 +64,7 @@ namespace FileHelpers
 \r
     int64 calculateFileHashCode (const File& file)\r
     {\r
-        ScopedPointer<FileInputStream> stream (file.createInputStream());\r
+        std::unique_ptr<FileInputStream> stream (file.createInputStream());\r
         return stream != nullptr ? calculateStreamHashCode (*stream) : 0;\r
     }\r
 \r
index 1a377cf9bde87f4fc36262eda691ea19f9b1da2a..bc8ee3ec1b26e6f0a6bbed89bca5c12d51cea250 100644 (file)
 \r
 #include "../../Application/jucer_Headers.h"\r
 \r
+#ifdef BUILDING_JUCE_COMPILEENGINE\r
+ const char* getPreferredLinefeed() { return "\r\n"; }\r
+#endif\r
+\r
 //==============================================================================\r
 String joinLinesIntoSourceFile (StringArray& lines)\r
 {\r
index 6ae0c3ad89c44da36722eb4e8c2a7ab11c637d5b..7b66a4695eb833e32f7fb6dc9402c9e619bb3fd7 100644 (file)
@@ -178,6 +178,8 @@ namespace Ids
     DECLARE_ID (overwriteOnSave);\r
     DECLARE_ID (microphonePermissionNeeded);\r
     DECLARE_ID (microphonePermissionsText);\r
+    DECLARE_ID (cameraPermissionNeeded);\r
+    DECLARE_ID (cameraPermissionText);\r
     DECLARE_ID (androidJavaLibs);\r
     DECLARE_ID (androidRepositories);\r
     DECLARE_ID (androidDependencies);\r
@@ -227,7 +229,7 @@ namespace Ids
     DECLARE_ID (iCloudPermissions);\r
     DECLARE_ID (iosDevelopmentTeamID);\r
     DECLARE_ID (iosAppGroupsId);\r
-    DECLARE_ID (iosAppExtensionDuplicateResourcesFolder);\r
+    DECLARE_ID (duplicateAppExResourcesFolder);\r
     DECLARE_ID (buildToolsVersion);\r
     DECLARE_ID (gradleVersion);\r
     const Identifier androidPluginVersion ("gradleWrapperVersion"); // old name is very confusing, but we need to remain backward compatible\r
index 7256548a3f2f82ff3d421e75639d694852f089a6..0424f5ffd03c074a86066df78ab51916a92ac84c 100644 (file)
@@ -112,8 +112,11 @@ PIPGenerator::PIPGenerator (const File& pip, const File& output)
         isTemp = true;\r
     }\r
 \r
+    auto isClipboard = (pip.getParentDirectory().getFileName() == "Clipboard"\r
+                        && pip.getParentDirectory().getParentDirectory().getFileName() == "PIPs");\r
+\r
     outputDirectory = outputDirectory.getChildFile (metadata[Ids::name].toString());\r
-    useLocalCopy = metadata[Ids::useLocalCopy].toString().isNotEmpty();\r
+    useLocalCopy = metadata[Ids::useLocalCopy].toString().isNotEmpty() || isClipboard;\r
 }\r
 \r
 //==============================================================================\r
@@ -135,7 +138,7 @@ Result PIPGenerator::createJucerFile()
 \r
     auto outputFile = outputDirectory.getChildFile (metadata[Ids::name].toString() + ".jucer");\r
 \r
-    ScopedPointer<XmlElement> xml = root.createXml();\r
+    std::unique_ptr<XmlElement> xml (root.createXml());\r
 \r
     if (xml->writeToFile (outputFile, {}))\r
         return Result::ok();\r
@@ -310,7 +313,7 @@ ValueTree PIPGenerator::createExporterChild (const String& exporterName)
 \r
     exporter.setProperty (Ids::targetFolder, "Builds/" + ProjectExporter::getTargetFolderForExporter (exporterName), nullptr);\r
 \r
-    if (isMobileExporter (exporterName))\r
+    if (isMobileExporter (exporterName) || (metadata[Ids::name] == "AUv3SynthPlugin" && exporterName == "XCODE_MAC"))\r
     {\r
         auto juceDir = getAppSettings().getStoredPath (Ids::jucePath).toString();\r
 \r
@@ -318,8 +321,8 @@ ValueTree PIPGenerator::createExporterChild (const String& exporterName)
         {\r
             auto assetsDirectoryPath = File (juceDir).getChildFile ("examples").getChildFile ("Assets").getFullPathName();\r
 \r
-            exporter.setProperty (exporterName == "XCODE_IPHONE" ? Ids::customXcodeResourceFolders\r
-                                                                 : Ids::androidExtraAssetsFolder,\r
+            exporter.setProperty (exporterName == "ANDROIDSTUDIO" ? Ids::androidExtraAssetsFolder\r
+                                                                  : Ids::customXcodeResourceFolders,\r
                                   assetsDirectoryPath, nullptr);\r
         }\r
         else\r
@@ -458,13 +461,13 @@ Result PIPGenerator::setProjectSettings (ValueTree& jucerTree)
         jucerTree.setProperty (Ids::projectType, "audioplug", nullptr);\r
         jucerTree.setProperty (Ids::pluginManufacturer, metadata[Ids::vendor], nullptr);\r
 \r
-        jucerTree.setProperty (Ids::buildVST,        true, nullptr);\r
-        jucerTree.setProperty (Ids::buildVST3,       false, nullptr);\r
-        jucerTree.setProperty (Ids::buildAU,         true, nullptr);\r
-        jucerTree.setProperty (Ids::buildAUv3,       false, nullptr);\r
-        jucerTree.setProperty (Ids::buildRTAS,       false, nullptr);\r
-        jucerTree.setProperty (Ids::buildAAX,        false, nullptr);\r
-        jucerTree.setProperty (Ids::buildStandalone, true,  nullptr);\r
+        StringArray pluginFormatsToBuild (Ids::buildVST.toString(), Ids::buildAU.toString(), Ids::buildStandalone.toString());\r
+        pluginFormatsToBuild.addArray (getExtraPluginFormatsToBuild());\r
+\r
+        jucerTree.setProperty (Ids::pluginFormats, pluginFormatsToBuild.joinIntoString (","), nullptr);\r
+\r
+        if (! getPluginCharacteristics().isEmpty())\r
+            jucerTree.setProperty (Ids::pluginCharacteristicsValue, getPluginCharacteristics().joinIntoString (","), nullptr);\r
     }\r
 \r
     return Result::ok();\r
@@ -511,8 +514,8 @@ String PIPGenerator::getMainFileTextForType()
         mainTemplate = mainTemplate.replace ("%%project_name%%",    metadata[Ids::name].toString());\r
         mainTemplate = mainTemplate.replace ("%%project_version%%", metadata[Ids::version].toString());\r
 \r
-        return ensureCorrectWhitespace (mainTemplate.replace ("%%startup%%", "mainWindow = new MainWindow (" + metadata[Ids::name].toString().quoted()\r
-                                                            + ", new " + metadata[Ids::mainClass].toString() + "(), *this);")\r
+        return ensureCorrectWhitespace (mainTemplate.replace ("%%startup%%", "mainWindow.reset (new MainWindow (" + metadata[Ids::name].toString().quoted()\r
+                                                            + ", new " + metadata[Ids::mainClass].toString() + "(), *this));")\r
                                                     .replace ("%%shutdown%%", "mainWindow = nullptr;"));\r
     }\r
     else if (type == "AudioProcessor")\r
@@ -563,3 +566,32 @@ bool PIPGenerator::copyRelativeFileToLocalSourceDirectory (const File& fileToCop
     return fileToCopy.copyFileTo (outputDirectory.getChildFile ("Source")\r
                                                  .getChildFile (fileToCopy.getFileName()));\r
 }\r
+\r
+StringArray PIPGenerator::getExtraPluginFormatsToBuild() const\r
+{\r
+    auto name = metadata[Ids::name].toString();\r
+\r
+    if (name == "AUv3SynthPlugin" || name == "AudioPluginDemo")\r
+        return { Ids::buildAUv3.toString() };\r
+    else if (name == "InterAppAudioEffectPlugin")\r
+        return { Ids::enableIAA.toString() };\r
+\r
+    return {};\r
+}\r
+\r
+StringArray PIPGenerator::getPluginCharacteristics() const\r
+{\r
+    auto name = metadata[Ids::name].toString();\r
+\r
+    if (name == "AudioPluginDemo")\r
+        return { Ids::pluginWantsMidiIn.toString(),\r
+                 Ids::pluginProducesMidiOut.toString(),\r
+                 Ids::pluginEditorRequiresKeys.toString() };\r
+    else if (name == "AUv3SynthPlugin" || name == "MultiOutSynthPlugin")\r
+        return { Ids::pluginWantsMidiIn.toString(),\r
+                 Ids::pluginIsSynth.toString() };\r
+    else if (name == "ArpeggiatorPlugin")\r
+        return { Ids::pluginIsMidiEffectPlugin.toString() };\r
+\r
+    return {};\r
+}\r
index 083da2df4280176fafd100c9159e04354b7c03f7..2502ff853659cd85da2d1a706793d110c5efb4ba 100644 (file)
@@ -74,6 +74,9 @@ private:
     Array<File> replaceRelativeIncludesAndGetFilesToMove();\r
     bool copyRelativeFileToLocalSourceDirectory (const File&) const noexcept;\r
 \r
+    StringArray getExtraPluginFormatsToBuild() const;\r
+    StringArray getPluginCharacteristics() const;\r
+\r
     //==============================================================================\r
     File pipFile, outputDirectory;\r
     var metadata;\r
index cc88f400c9eb52f1c518dc897a46ffb057979bbe..34c14634d2ac852b29ae28bf45aded53c321cf5d 100644 (file)
@@ -1529,7 +1529,7 @@ const uint8 clion[] = { 110,109,0,0,0,0,0,0,0,0,98,0,0,0,0,170,170,38,67,0,0,0,0
     XmlElement* path = svg.createNewChildElement ("path");\r
     path->setAttribute ("d", pathString);\r
 \r
-    ScopedPointer<Drawable> d (Drawable::createFromSVG (svg));\r
+    std::unique_ptr<Drawable> d (Drawable::createFromSVG (svg));\r
     DrawablePath* dp = dynamic_cast<DrawablePath*> (d->getChildComponent(0));\r
     jassert (dp != nullptr);\r
     Path p (dp->getPath());\r
index cb8194e183bc876908abd6fc8d8d6dd11e5a626f..71fc687ac1d8a2103cd8a8efc41c6cab4c3a4762 100644 (file)
 //==============================================================================\r
 void TreePanelBase::setRoot (JucerTreeViewBase* root)\r
 {\r
-    rootItem = root;\r
+    rootItem.reset (root);\r
     tree.setRootItem (root);\r
     tree.getRootItem()->setOpen (true);\r
 \r
     if (project != nullptr)\r
     {\r
-        const ScopedPointer<XmlElement> treeOpenness (project->getStoredProperties()\r
+        const std::unique_ptr<XmlElement> treeOpenness (project->getStoredProperties()\r
                                                           .getXmlValue (opennessStateKey));\r
         if (treeOpenness != nullptr)\r
         {\r
@@ -54,7 +54,7 @@ void TreePanelBase::saveOpenness()
 {\r
     if (project != nullptr)\r
     {\r
-        ScopedPointer<XmlElement> opennessState (tree.getOpennessState (true));\r
+        std::unique_ptr<XmlElement> opennessState (tree.getOpennessState (true));\r
 \r
         if (opennessState != nullptr)\r
             project->getStoredProperties().setValue (opennessStateKey, opennessState.get());\r
@@ -243,7 +243,7 @@ void JucerTreeViewBase::itemSelectionChanged (bool isNowSelected)
 {\r
     if (isNowSelected)\r
     {\r
-        delayedSelectionTimer = new ItemSelectionTimer (*this);\r
+        delayedSelectionTimer.reset (new ItemSelectionTimer (*this));\r
         delayedSelectionTimer->startTimer (getMillisecsAllowedForDragGesture());\r
     }\r
     else\r
index 07bbc5678fd2b8114b6596f1c1b300bdb63671a2..f49e057cdbe8171b345ecdfe86df93a70032e55d 100644 (file)
@@ -109,7 +109,7 @@ protected:
 private:\r
     class ItemSelectionTimer;\r
     friend class ItemSelectionTimer;\r
-    ScopedPointer<Timer> delayedSelectionTimer;\r
+    std::unique_ptr<Timer> delayedSelectionTimer;\r
 \r
     void invokeShowDocument();\r
 \r
@@ -195,7 +195,7 @@ public:
 \r
     const Project* project;\r
     TreeView tree;\r
-    ScopedPointer<JucerTreeViewBase> rootItem;\r
+    std::unique_ptr<JucerTreeViewBase> rootItem;\r
 \r
 private:\r
     String opennessStateKey, emptyTreeMessage;\r
index 1c0a35b5dacdf3522bdcabe31fe2de367c010d89..2aeebece1d6318e63e6a2a7079c26786b47de685 100644 (file)
@@ -161,7 +161,8 @@ void ProjucerLookAndFeel::drawToggleButton (Graphics& g, ToggleButton& button, b
         g.setOpacity (0.5f);\r
 \r
     bool isTextEmpty = button.getButtonText().isEmpty();\r
-    bool isPropertyComponentChild = (dynamic_cast<BooleanPropertyComponent*> (button.getParentComponent()) != nullptr);\r
+    bool isPropertyComponentChild = (dynamic_cast<BooleanPropertyComponent*> (button.getParentComponent()) != nullptr\r
+                                     || dynamic_cast<MultiChoicePropertyComponent*> (button.getParentComponent()) != nullptr);\r
 \r
     auto bounds = button.getLocalBounds();\r
 \r
index 6cc1a1600e3dff141dbb89a11ea1a5003efb2082..b908604a53e18bc70fd1b9146e7c9cfd8b4df00e 100644 (file)
@@ -78,7 +78,8 @@ void SlidingPanelComponent::addTab (const String& tabName,
     PageInfo* page = new PageInfo();\r
     pages.insert (insertIndex, page);\r
     page->content = contentComponent;\r
-    addAndMakeVisible (page->dotButton = new DotButton (*this, pages.indexOf (page)));\r
+    page->dotButton.reset (new DotButton (*this, pages.indexOf (page)));\r
+    addAndMakeVisible (page->dotButton.get());\r
     page->name = tabName;\r
     page->shouldDelete = deleteComponentWhenNotNeeded;\r
 \r
index 4c10a74d1d0762ccd3ebc90cf8e5bb38ae89b514..63edb8c8152f4a749f1e767f4203f2749404f2b3 100644 (file)
@@ -67,7 +67,7 @@ private:
         ~PageInfo();\r
 \r
         Component::SafePointer<Component> content;\r
-        ScopedPointer<DotButton> dotButton;\r
+        std::unique_ptr<DotButton> dotButton;\r
         String name;\r
         bool shouldDelete;\r
     };\r
index 536b11376b69544097c1f31252a203bd1823fac3..3da9ea633bc672816697bfc272c01df78d6033cb 100644 (file)
@@ -47,7 +47,8 @@ public:
 \r
         auto standardFont = Font (16.0f);\r
 \r
-        addAndMakeVisible (loggedInUsernameLabel = new Label ("Username Label"));\r
+        loggedInUsernameLabel.reset (new Label ("Username Label"));\r
+        addAndMakeVisible (loggedInUsernameLabel.get());\r
 \r
         loggedInUsernameLabel->setFont (standardFont);\r
         loggedInUsernameLabel->setJustificationType (Justification::centred);\r
@@ -57,13 +58,15 @@ public:
         loggedInUsernameLabel->setText ("GPL Mode: Re-compile with JUCER_ENABLE_GPL_MODE=0 to enable login!",\r
                                         NotificationType::dontSendNotification);\r
        #else\r
-        addAndMakeVisible (licenseTypeLabel = new Label ("License Type Label"));\r
+        licenseTypeLabel.reset (new Label ("License Type Label"));\r
+        addAndMakeVisible (licenseTypeLabel.get());\r
 \r
         licenseTypeLabel->setFont (standardFont);\r
         licenseTypeLabel->setJustificationType (Justification::centred);\r
         licenseTypeLabel->setMinimumHorizontalScale (1.0f);\r
 \r
-        addAndMakeVisible (logoutButton = new TextButton (isInsideWebview ? "Select different account..." : "Logout"));\r
+        logoutButton.reset (new TextButton (isInsideWebview ? "Select different account..." : "Logout"));\r
+        addAndMakeVisible (logoutButton.get());\r
         logoutButton->setColour (TextButton::buttonColourId, findColour (secondaryButtonBackgroundColourId));\r
 \r
         logoutButton->onClick = [this]\r
@@ -74,7 +77,8 @@ public:
 \r
         if (! isInsideWebview)\r
         {\r
-            addAndMakeVisible (switchLicenseButton = new TextButton ("Switch License"));\r
+            switchLicenseButton.reset (new TextButton ("Switch License"));\r
+            addAndMakeVisible (switchLicenseButton.get());\r
             switchLicenseButton->onClick = [this]\r
             {\r
                 dismissCalloutBox();\r
@@ -144,11 +148,11 @@ private:
    #endif\r
 \r
     //==============================================================================\r
-    ScopedPointer<Label> loggedInUsernameLabel;\r
+    std::unique_ptr<Label> loggedInUsernameLabel;\r
 \r
    #if ! JUCER_ENABLE_GPL_MODE\r
-    ScopedPointer<Label> licenseTypeLabel;\r
-    ScopedPointer<TextButton> logoutButton, switchLicenseButton;\r
+    std::unique_ptr<Label> licenseTypeLabel;\r
+    std::unique_ptr<TextButton> logoutButton, switchLicenseButton;\r
     bool hasLicenseType = false;\r
     bool isInsideWebview;\r
    #endif\r
index b082483cd2ff85d7fc441a705adfd29a3b4b00e6..7db905a7202454692b00087a02eb4dd0967bb531 100644 (file)
@@ -129,7 +129,7 @@ struct NewProjectWizard
         projectFile = targetFolder.getChildFile (File::createLegalFileName (appTitle))\r
                                   .withFileExtension (Project::projectFileExtension);\r
 \r
-        ScopedPointer<Project> project (new Project (projectFile));\r
+        std::unique_ptr<Project> project (new Project (projectFile));\r
 \r
         if (failedFiles.size() == 0)\r
         {\r
index 25e5ce3f557534d414fd057d546a4a27e791b39f..4ef0c600186854e7e1c792af777b0212121c0550 100644 (file)
@@ -54,19 +54,19 @@ struct NewProjectWizardClasses
         return 9;\r
     }\r
 \r
-    static ScopedPointer<NewProjectWizard> createWizardType (int index)\r
+    static std::unique_ptr<NewProjectWizard> createWizardType (int index)\r
     {\r
         switch (index)\r
         {\r
-            case 0:     return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::GUIAppWizard());\r
-            case 1:     return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::AnimatedAppWizard());\r
-            case 2:     return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::OpenGLAppWizard());\r
-            case 3:     return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::ConsoleAppWizard());\r
-            case 4:     return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::AudioAppWizard());\r
-            case 5:     return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::AudioPluginAppWizard());\r
-            case 6:     return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::StaticLibraryWizard());\r
-            case 7:     return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::DynamicLibraryWizard());\r
-            case 8:     return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::BlankAppWizard());\r
+            case 0:     return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::GUIAppWizard());\r
+            case 1:     return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::AnimatedAppWizard());\r
+            case 2:     return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::OpenGLAppWizard());\r
+            case 3:     return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::ConsoleAppWizard());\r
+            case 4:     return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::AudioAppWizard());\r
+            case 5:     return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::AudioPluginAppWizard());\r
+            case 6:     return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::StaticLibraryWizard());\r
+            case 7:     return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::DynamicLibraryWizard());\r
+            case 8:     return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::BlankAppWizard());\r
             default:    jassertfalse; break;\r
         }\r
 \r
index 07b4003237b27b7666c548b1d9cd5d98688d9f4c..d002fd84b710246d4418ba1b94c200cd3269c593 100644 (file)
@@ -390,7 +390,9 @@ public:
         auto* mw = Component::findParentComponentOfClass<MainWindow>();\r
         jassert (mw != nullptr);\r
 \r
-        if (ScopedPointer<NewProjectWizardClasses::NewProjectWizard> wizard = createWizard())\r
+        std::unique_ptr<NewProjectWizardClasses::NewProjectWizard> wizard = createWizard();\r
+\r
+        if (wizard != nullptr)\r
         {\r
             Result result (wizard->processResultsFromSetupItems (*this));\r
 \r
@@ -421,10 +423,11 @@ public:
             }\r
 \r
             auto projectDir = fileBrowser.getSelectedFile (0);\r
+            std::unique_ptr<Project> project (wizard->runWizard (*this, projectName.getText(),\r
+                                                               projectDir,\r
+                                                               modulesPathBox.isUsingGlobalPaths));\r
 \r
-            if (ScopedPointer<Project> project = wizard->runWizard (*this, projectName.getText(),\r
-                                                                    projectDir,\r
-                                                                    modulesPathBox.isUsingGlobalPaths))\r
+            if (project != nullptr)\r
             {\r
                 mw->setProject (project.release());\r
                 getAppSettings().lastWizardFolder = projectDir.getParentDirectory();\r
@@ -436,7 +439,9 @@ public:
     {\r
         StringArray items;\r
 \r
-        if (ScopedPointer<NewProjectWizardClasses::NewProjectWizard> wizard = createWizard())\r
+        std::unique_ptr<NewProjectWizardClasses::NewProjectWizard> wizard = createWizard();\r
+\r
+        if (wizard != nullptr)\r
             items = wizard->getFileCreationOptions();\r
 \r
         filesToCreate.clear();\r
@@ -481,7 +486,7 @@ private:
     TextButton cancelButton { TRANS("Cancel") };\r
     ModulesFolderPathBox modulesPathBox;\r
 \r
-    ScopedPointer<NewProjectWizardClasses::NewProjectWizard> createWizard()\r
+    std::unique_ptr<NewProjectWizardClasses::NewProjectWizard> createWizard()\r
     {\r
         return createWizardType (projectType.getSelectedItemIndex());\r
     }\r
index 75ee38e0fa6c0a2998bd7472dfa7a593e5e12bdb..1a94c1433502bfbeed3b9988ffc9503e1387e25b 100644 (file)
@@ -59,7 +59,6 @@ struct AudioPluginAppWizard   : public NewProjectWizard
         File editorHFile   = editorCppFile.withFileExtension (".h");\r
 \r
         project.setProjectType (ProjectType_AudioPlugin::getTypeName());\r
-        project.getProjectValue (Ids::buildStandalone) = true;\r
 \r
         setExecutableNameForAllTargets (project, File::createLegalFileName (appTitle));\r
 \r
index f6fddc6db9c38195a49e1a7971f81e516a1ac1d2..f7e1d174ebdec07b510763bcaab27943c27564dc 100644 (file)
@@ -39,16 +39,16 @@ public:
        : DrawableButton (buttonName, buttonStyle)\r
     {\r
         // svg for thumbnail icon\r
-        ScopedPointer<XmlElement> svg (XmlDocument::parse (thumbSvg));\r
+        std::unique_ptr<XmlElement> svg (XmlDocument::parse (thumbSvg));\r
         jassert (svg != nullptr);\r
 \r
-        thumb = Drawable::createFromSVG (*svg);\r
+        thumb.reset (Drawable::createFromSVG (*svg));\r
 \r
         // svg for thumbnail background highlight\r
-        ScopedPointer<XmlElement> backSvg (XmlDocument::parse (BinaryData::wizard_Highlight_svg));\r
+        std::unique_ptr<XmlElement> backSvg (XmlDocument::parse (BinaryData::wizard_Highlight_svg));\r
         jassert (backSvg != nullptr);\r
 \r
-        hoverBackground = Drawable::createFromSVG (*backSvg);\r
+        hoverBackground.reset (Drawable::createFromSVG (*backSvg));\r
 \r
         name = buttonName;\r
 \r
@@ -129,7 +129,7 @@ private:
         Analytics::getInstance()->logEvent ("Start Page Button", data, ProjucerAnalyticsEvent::startPageEvent);\r
     }\r
 \r
-    ScopedPointer<Drawable> thumb, hoverBackground;\r
+    std::unique_ptr<Drawable> thumb, hoverBackground;\r
     String name, description;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TemplateOptionButton)\r
index 508e24c1f1fe40e89d83c92e769b45f29e292a71..25eacd702bd78e5141b76b6aa3d554f9345775b8 100644 (file)
                                        6D697538ADDCFBB6C79AC6C6, ); name = Source; sourceTree = "<group>"; };
                A81C9C5D3696F83D5E8CFE11 = {isa = XCBuildConfiguration; buildSettings = {
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                USE_HEADERMAP = NO; }; name = Debug; };
                962CC7E0A536C3F56DBE1F8F = {isa = XCBuildConfiguration; buildSettings = {
                                CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+                               CLANG_CXX_LIBRARY = "libc++";
                                CLANG_LINK_OBJC_RUNTIME = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
                                        DD4C62A6EA1FD3497B42CDB0,
                                        E8585DDC9F9A0EE2FB82FA52,
                                        136E27FD16209F9868093A6C, ); buildRules = ( ); dependencies = (  ); name = "UnitTestRunner - ConsoleApp"; productName = UnitTestRunner; productReference = 080EAB9CF5AB2BD6B2BBB173; productType = "com.apple.product-type.tool"; };
-               E1E93F2B4B2D17E011395520 = {isa = PBXProject; buildConfigurationList = 18FC121B1014F7999CD135D3; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 99F3717D3FEAFDCA3C22E868; projectDirPath = ""; projectRoot = ""; targets = (B0D62ED1051EE9DFD49F6321); };
+               E1E93F2B4B2D17E011395520 = {isa = PBXProject; buildConfigurationList = 18FC121B1014F7999CD135D3; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 99F3717D3FEAFDCA3C22E868; projectDirPath = ""; projectRoot = ""; targets = (B0D62ED1051EE9DFD49F6321); };
        };
        rootObject = E1E93F2B4B2D17E011395520;
 }
index b59b8279377989c335688f14b9d0f177aa1afcca..c75113679bf0c696c98cc40b494a9a16395b7b19 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_product_unlocking\juce_product_unlocking.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
index 47e017ffddf19f8fa991fdc90ab507c4a906923d..d8d4e2f08762f6936e299034b1d2100fc3de2cfe 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">\r
       <Filter>JUCE Modules\juce_dsp\containers</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h">\r
+      <Filter>JUCE Modules\juce_dsp\containers</Filter>\r
+    </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h">\r
       <Filter>JUCE Modules\juce_dsp\filter_design</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+      <Filter>JUCE Modules\juce_video\native</Filter>\r
+    </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
index d15076fc5fbdd113a86164c0f8cf76c76f3a0a3b..059f7a28f81a199eb2d8e10208955c638dbc4bd2 100644 (file)
  //#define JUCE_PLUGINHOST_AU 0\r
 #endif\r
 \r
+#ifndef    JUCE_PLUGINHOST_LADSPA\r
+ //#define JUCE_PLUGINHOST_LADSPA 0\r
+#endif\r
+\r
 //==============================================================================\r
 // juce_audio_utils flags:\r
 \r
index 92109b0740684ac934a840a191129945b640312a..97696d4e20c2a7c1c3b42d65ac3c36d9ea6236ee 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <ExcludedFromBuild>true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <ExcludedFromBuild>true</ExcludedFromBuild>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_opengl\juce_opengl.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
index 898a4b47899dad3c9f481148a3807098758227a6..f8c344750309dfacc5c71c7a2621fd25504939e9 100644 (file)
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+      <Filter>JUCE Modules\juce_core\containers</Filter>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
       <Filter>JUCE Modules\juce_core\containers</Filter>\r
     </ClCompile>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+      <Filter>JUCE Modules\juce_video\native</Filter>\r
+    </ClInclude>\r
     <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
       <Filter>JUCE Modules\juce_video\native</Filter>\r
     </ClInclude>\r
index de3a1d428cde8e4642ac81c3dfab9bc2fac9f9d1..8510bde8705f0c2a116b75e66ec3b7c2f3fb674c 100644 (file)
  //#define JUCE_PLUGINHOST_AU 0\r
 #endif\r
 \r
+#ifndef    JUCE_PLUGINHOST_LADSPA\r
+ //#define JUCE_PLUGINHOST_LADSPA 0\r
+#endif\r
+\r
 //==============================================================================\r
 // juce_audio_utils flags:\r
 \r
index 55b3b27504eeaef748d4e6884ac844a65fb85383..adac1845b1bcec003d8df9269234d5e01a5625a6 100644 (file)
@@ -48,4 +48,7 @@
     <MODULES id="juce_video" showAllCode="1" useLocalCopy="0"/>\r
   </MODULES>\r
   <JUCEOPTIONS/>\r
+  <LIVE_SETTINGS>\r
+    <OSX/>\r
+  </LIVE_SETTINGS>\r
 </JUCERPROJECT>\r
index 14027d3501193e45cb841dae57411d25b05f94c5..ec53fabb0d0c35e0498506758883ff09cde3b943 100644 (file)
@@ -89,20 +89,24 @@ void ThreadedAnalyticsDestination::EventDispatcher::run()
 \r
     while (! threadShouldExit())\r
     {\r
-        auto eventsToSendCapacity = maxBatchSize - eventsToSend.size();\r
-\r
-        if (eventsToSendCapacity > 0)\r
         {\r
-            const ScopedLock lock (queueAccess);\r
-\r
-            const auto numEventsInQueue = (int) eventQueue.size();\r
+            const auto numEventsInBatch = eventsToSend.size();\r
+            const auto freeBatchCapacity = maxBatchSize - numEventsInBatch;\r
 \r
-            if (numEventsInQueue > 0)\r
+            if (freeBatchCapacity > 0)\r
             {\r
-                const auto numEventsToAdd = jmin (eventsToSendCapacity, numEventsInQueue);\r
+                const auto numNewEvents = (int) eventQueue.size() - numEventsInBatch;\r
+\r
+                if (numNewEvents > 0)\r
+                {\r
+                    const ScopedLock lock (queueAccess);\r
+\r
+                    const auto numEventsToAdd = jmin (numNewEvents, freeBatchCapacity);\r
+                    const auto newBatchSize = numEventsInBatch + numEventsToAdd;\r
 \r
-                for (size_t i = 0; i < (size_t) numEventsToAdd; ++i)\r
-                    eventsToSend.add (eventQueue[i]);\r
+                    for (auto i = numEventsInBatch; i < newBatchSize; ++i)\r
+                        eventsToSend.add (eventQueue[(size_t) i]);\r
+                }\r
             }\r
         }\r
 \r
index 6bc6b3d0a0199bf2a1f441ff7d45bdefd95e7ada..546a3f096c238071231b5a174495ce006d6b949a 100644 (file)
@@ -35,7 +35,7 @@
 \r
   ID:               juce_analytics\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE analytics classes\r
   description:      Classes to collect analytics and send to destinations\r
   website:          http://www.juce.com/juce\r
index e8fc19fb7d36647f3497d24e7fc490b56c567797..4b7b4683a957400cd09bd0553fde6a2cd2692e3e 100644 (file)
@@ -514,8 +514,8 @@ public:
             }\r
 \r
             // convert data from the source to dest format..\r
-            ScopedPointer<AudioData::Converter> conv (new AudioData::ConverterInstance <AudioData::Pointer<F1, E1, AudioData::NonInterleaved, AudioData::Const>,\r
-                                                                                        AudioData::Pointer<F2, E2, AudioData::NonInterleaved, AudioData::NonConst>>());\r
+            std::unique_ptr<AudioData::Converter> conv (new AudioData::ConverterInstance <AudioData::Pointer<F1, E1, AudioData::NonInterleaved, AudioData::Const>,\r
+                                                                                          AudioData::Pointer<F2, E2, AudioData::NonInterleaved, AudioData::NonConst>>());\r
             conv->convertSamples (inPlace ? reversed : converted, original, numSamples);\r
 \r
             // ..and back again..\r
index ddf53198d6d265c6f7171462c5e46d9ac183093a..45c6c3099fbfd5a138f2e4a372928410dc574684 100644 (file)
@@ -308,7 +308,7 @@ public:
     class NonConst\r
     {\r
     public:\r
-        typedef void VoidType;\r
+        using VoidType = void;\r
         static inline void* toVoidPtr (VoidType* v) noexcept { return v; }\r
         enum { isConst = 0 };\r
     };\r
@@ -316,7 +316,7 @@ public:
     class Const\r
     {\r
     public:\r
-        typedef const void VoidType;\r
+        using VoidType = const void;\r
         static inline void* toVoidPtr (VoidType* v) noexcept { return const_cast<void*> (v); }\r
         enum { isConst = 1 };\r
     };\r
index 8ad74ea896e3e687c021ba36843ff3aff95a5371..1c2ce7f8b98a84f42da761b590c8b9235c9b2054 100644 (file)
@@ -1062,7 +1062,7 @@ public:
 \r
     //==============================================================================\r
     /** This allows templated code that takes an AudioBuffer to access its sample type. */\r
-    typedef Type SampleType;\r
+    using SampleType = Type;\r
 \r
 private:\r
     //==============================================================================\r
@@ -1125,12 +1125,12 @@ private:
 /**\r
     A multi-channel buffer of 32-bit floating point audio samples.\r
 \r
-    This typedef is here for backwards compatibility with the older AudioSampleBuffer\r
+    This type is here for backwards compatibility with the older AudioSampleBuffer\r
     class, which was fixed for 32-bit data, but is otherwise the same as the new\r
     templated AudioBuffer class.\r
 \r
     @see AudioBuffer\r
 */\r
-typedef AudioBuffer<float> AudioSampleBuffer;\r
+using AudioSampleBuffer = AudioBuffer<float>;\r
 \r
 } // namespace juce\r
index 4dc3a86d85901f70ad63bbe0e6e9a68fd150f691..4dc44c1b6496f810ed68de636bdfcb0dd76950e1 100644 (file)
@@ -37,9 +37,9 @@ namespace FloatVectorHelpers
 \r
     struct BasicOps32\r
     {\r
-        typedef float Type;\r
-        typedef __m128 ParallelType;\r
-        typedef __m128 IntegerType;\r
+        using Type = float;\r
+        using ParallelType = __m128;\r
+        using IntegerType  = __m128;\r
         enum { numParallel = 4 };\r
 \r
         // Integer and parallel types are the same for SSE. On neon they have different types\r
@@ -69,9 +69,9 @@ namespace FloatVectorHelpers
 \r
     struct BasicOps64\r
     {\r
-        typedef double Type;\r
-        typedef __m128d ParallelType;\r
-        typedef __m128d IntegerType;\r
+        using Type = double;\r
+        using ParallelType = __m128d;\r
+        using IntegerType  = __m128d;\r
         enum { numParallel = 2 };\r
 \r
         // Integer and parallel types are the same for SSE. On neon they have different types\r
@@ -102,7 +102,7 @@ namespace FloatVectorHelpers
 \r
 \r
     #define JUCE_BEGIN_VEC_OP \\r
-        typedef FloatVectorHelpers::ModeType<sizeof(*dest)>::Mode Mode; \\r
+        using Mode = FloatVectorHelpers::ModeType<sizeof(*dest)>::Mode; \\r
         { \\r
             const int numLongOps = num / Mode::numParallel;\r
 \r
@@ -202,9 +202,9 @@ namespace FloatVectorHelpers
 \r
     struct BasicOps32\r
     {\r
-        typedef float Type;\r
-        typedef float32x4_t ParallelType;\r
-        typedef uint32x4_t IntegerType;\r
+        using Type = float;\r
+        using ParallelType = float32x4_t;\r
+        using IntegerType = uint32x4_t;\r
         union signMaskUnion { ParallelType f; IntegerType i; };\r
         enum { numParallel = 4 };\r
 \r
@@ -234,9 +234,9 @@ namespace FloatVectorHelpers
 \r
     struct BasicOps64\r
     {\r
-        typedef double Type;\r
-        typedef double ParallelType;\r
-        typedef uint64 IntegerType;\r
+        using Type = double;\r
+        using ParallelType = double;\r
+        using IntegerType = uint64;\r
         union signMaskUnion { ParallelType f; IntegerType i; };\r
         enum { numParallel = 1 };\r
 \r
@@ -265,7 +265,7 @@ namespace FloatVectorHelpers
     };\r
 \r
     #define JUCE_BEGIN_VEC_OP \\r
-        typedef FloatVectorHelpers::ModeType<sizeof(*dest)>::Mode Mode; \\r
+        using Mode = FloatVectorHelpers::ModeType<sizeof(*dest)>::Mode; \\r
         if (Mode::numParallel > 1) \\r
         { \\r
             const int numLongOps = num / Mode::numParallel;\r
@@ -353,14 +353,14 @@ namespace FloatVectorHelpers
     union signMask64 { double d; uint64 i; };\r
 \r
    #if JUCE_USE_SSE_INTRINSICS || JUCE_USE_ARM_NEON\r
-    template<int typeSize> struct ModeType    { typedef BasicOps32 Mode; };\r
-    template<>             struct ModeType<8> { typedef BasicOps64 Mode; };\r
+    template<int typeSize> struct ModeType    { using Mode = BasicOps32; };\r
+    template<>             struct ModeType<8> { using Mode = BasicOps64; };\r
 \r
     template <typename Mode>\r
     struct MinMax\r
     {\r
-        typedef typename Mode::Type Type;\r
-        typedef typename Mode::ParallelType ParallelType;\r
+        using Type = typename Mode::Type;\r
+        using ParallelType = typename Mode::ParallelType;\r
 \r
         static Type findMinOrMax (const Type* src, int num, const bool isMinimum) noexcept\r
         {\r
index f86e1255228c6671f63ef4497fe3db2b182a3da2..3662bc3604a3c6fa98486d5e02a10ed002c1f579 100644 (file)
@@ -31,7 +31,7 @@
 \r
   ID:               juce_audio_basics\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE audio and MIDI data classes\r
   description:      Classes for audio buffer manipulation, midi message handling, synthesis, etc.\r
   website:          http://www.juce.com/juce\r
index b730f4218ad509c7a544aeff5e80800f08f28f79..b2f2cb6a6d98510212d76e710f31bf440f78e1f2 100644 (file)
@@ -2062,7 +2062,8 @@ private:
     class UnitTestInstrument : public MPEInstrument,\r
                                private MPEInstrument::Listener\r
     {\r
-        typedef MPEInstrument Base;\r
+        using Base = MPEInstrument;\r
+\r
     public:\r
         UnitTestInstrument()\r
             : noteOnCallCounter (0),  noteOffCallCounter (0), pitchbendCallCounter (0),\r
@@ -2150,7 +2151,7 @@ private:
 \r
         bool lastSustainPedalValueReceived, lastSostenutoPedalValueReceived;\r
         MPEValue lastMPEValueReceived;\r
-        ScopedPointer<MPENote> lastNoteFinished;\r
+        std::unique_ptr<MPENote> lastNoteFinished;\r
 \r
     private:\r
         //==============================================================================\r
index c11c11d0f27027551230afa8ea527bde79acda03..ca4c026e9e0f864025d7a15ee127b470f7effa20 100644 (file)
@@ -165,7 +165,7 @@ public:
     void setLegacyModePitchbendRange (int pitchbendRange);\r
 \r
     //==============================================================================\r
-    typedef MPEInstrument::TrackingMode TrackingMode;\r
+    using TrackingMode = MPEInstrument::TrackingMode;\r
 \r
     /** Set the MPE tracking mode for the pressure dimension. */\r
     void setPressureTrackingMode (TrackingMode modeToUse);\r
@@ -195,7 +195,7 @@ protected:
 protected:\r
     //==============================================================================\r
     /** @internal */\r
-    ScopedPointer<MPEInstrument> instrument;\r
+    std::unique_ptr<MPEInstrument> instrument;\r
 \r
 private:\r
     //==============================================================================\r
index 4bb656c5dfff7cf53b2127b207ca0c7e1cd7663b..7cbfd2b1214cceed5940b333aec01e09aabc3c15 100644 (file)
@@ -73,7 +73,7 @@ public:
 \r
 private:\r
     bool isLegacy = false;\r
-    ScopedPointer<MPEZoneLayout::Zone> zone;\r
+    std::unique_ptr<MPEZoneLayout::Zone> zone;\r
     int channelIncrement, numChannels, firstChannel, lastChannel, midiChannelLastAssigned;\r
 \r
     //==============================================================================\r
index ae33bea0db42c3256631b16916a7aec2743f7fac..740d7ba862bbf5ded64203b4a0f22efa9978e102 100644 (file)
@@ -25,20 +25,14 @@ namespace juce
 \r
 BufferingAudioSource::BufferingAudioSource (PositionableAudioSource* s,\r
                                             TimeSliceThread& thread,\r
-                                            const bool deleteSourceWhenDeleted,\r
-                                            const int bufferSizeSamples,\r
-                                            const int numChannels,\r
+                                            bool deleteSourceWhenDeleted,\r
+                                            int bufferSizeSamples,\r
+                                            int numChannels,\r
                                             bool prefillBufferOnPrepareToPlay)\r
     : source (s, deleteSourceWhenDeleted),\r
       backgroundThread (thread),\r
       numberOfSamplesToBuffer (jmax (1024, bufferSizeSamples)),\r
       numberOfChannels (numChannels),\r
-      bufferValidStart (0),\r
-      bufferValidEnd (0),\r
-      nextPlayPos (0),\r
-      sampleRate (0),\r
-      wasSourceLooping (false),\r
-      isPrepared (false),\r
       prefillBuffer (prefillBufferOnPrepareToPlay)\r
 {\r
     jassert (source != nullptr);\r
@@ -55,7 +49,7 @@ BufferingAudioSource::~BufferingAudioSource()
 //==============================================================================\r
 void BufferingAudioSource::prepareToPlay (int samplesPerBlockExpected, double newSampleRate)\r
 {\r
-    const int bufferSizeNeeded = jmax (samplesPerBlockExpected * 2, numberOfSamplesToBuffer);\r
+    auto bufferSizeNeeded = jmax (samplesPerBlockExpected * 2, numberOfSamplesToBuffer);\r
 \r
     if (newSampleRate != sampleRate\r
          || bufferSizeNeeded != buffer.getNumSamples()\r
@@ -104,8 +98,12 @@ void BufferingAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& info
 {\r
     const ScopedLock sl (bufferStartPosLock);\r
 \r
-    const int validStart = (int) (jlimit (bufferValidStart, bufferValidEnd, nextPlayPos) - nextPlayPos);\r
-    const int validEnd   = (int) (jlimit (bufferValidStart, bufferValidEnd, nextPlayPos + info.numSamples) - nextPlayPos);\r
+    auto start = bufferValidStart.load();\r
+    auto end   = bufferValidEnd.load();\r
+    auto pos   = nextPlayPos.load();\r
+\r
+    auto validStart = (int) (jlimit (start, end, pos) - pos);\r
+    auto validEnd   = (int) (jlimit (start, end, pos + info.numSamples) - pos);\r
 \r
     if (validStart == validEnd)\r
     {\r
@@ -126,8 +124,8 @@ void BufferingAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& info
             for (int chan = jmin (numberOfChannels, info.buffer->getNumChannels()); --chan >= 0;)\r
             {\r
                 jassert (buffer.getNumSamples() > 0);\r
-                const int startBufferIndex = (int) ((validStart + nextPlayPos) % buffer.getNumSamples());\r
-                const int endBufferIndex   = (int) ((validEnd + nextPlayPos)   % buffer.getNumSamples());\r
+                auto startBufferIndex = (int) ((validStart + nextPlayPos) % buffer.getNumSamples());\r
+                auto endBufferIndex   = (int) ((validEnd + nextPlayPos)   % buffer.getNumSamples());\r
 \r
                 if (startBufferIndex < endBufferIndex)\r
                 {\r
@@ -138,7 +136,7 @@ void BufferingAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& info
                 }\r
                 else\r
                 {\r
-                    const int initialSize = buffer.getNumSamples() - startBufferIndex;\r
+                    auto initialSize = buffer.getNumSamples() - startBufferIndex;\r
 \r
                     info.buffer->copyFrom (chan, info.startSample + validStart,\r
                                            buffer,\r
@@ -157,7 +155,7 @@ void BufferingAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& info
     }\r
 }\r
 \r
-bool BufferingAudioSource::waitForNextAudioBlockReady (const AudioSourceChannelInfo& info, const uint32 timeout)\r
+bool BufferingAudioSource::waitForNextAudioBlockReady (const AudioSourceChannelInfo& info, uint32 timeout)\r
 {\r
     if (!source || source->getTotalLength() <= 0)\r
         return false;\r
@@ -168,26 +166,28 @@ bool BufferingAudioSource::waitForNextAudioBlockReady (const AudioSourceChannelI
     if (! isLooping() && nextPlayPos > getTotalLength())\r
         return true;\r
 \r
-    uint32 now = Time::getMillisecondCounter();\r
-    const uint32 startTime = now;\r
+    auto now = Time::getMillisecondCounter();\r
+    auto startTime = now;\r
 \r
-    uint32 elapsed = (now >= startTime ? now - startTime\r
-                                       : (std::numeric_limits<uint32>::max() - startTime) + now);\r
+    auto elapsed = (now >= startTime ? now - startTime\r
+                                     : (std::numeric_limits<uint32>::max() - startTime) + now);\r
 \r
     while (elapsed <= timeout)\r
     {\r
         {\r
             const ScopedLock sl (bufferStartPosLock);\r
 \r
-            const int validStart = static_cast<int> (jlimit (bufferValidStart, bufferValidEnd, nextPlayPos) - nextPlayPos);\r
-            const int validEnd   = static_cast<int> (jlimit (bufferValidStart, bufferValidEnd, nextPlayPos + info.numSamples) - nextPlayPos);\r
+            auto start = bufferValidStart.load();\r
+            auto end   = bufferValidEnd.load();\r
+            auto pos   = nextPlayPos.load();\r
+\r
+            auto validStart = static_cast<int> (jlimit (start, end, pos) - pos);\r
+            auto validEnd   = static_cast<int> (jlimit (start, end, pos + info.numSamples) - pos);\r
 \r
             if (validStart <= 0 && validStart < validEnd && validEnd >= info.numSamples)\r
                 return true;\r
         }\r
 \r
-\r
-\r
         if (elapsed < timeout  && (! bufferReadyEvent.wait (static_cast<int> (timeout - elapsed))))\r
             return false;\r
 \r
@@ -202,9 +202,11 @@ bool BufferingAudioSource::waitForNextAudioBlockReady (const AudioSourceChannelI
 int64 BufferingAudioSource::getNextReadPosition() const\r
 {\r
     jassert (source->getTotalLength() > 0);\r
+    auto pos = nextPlayPos.load();\r
+\r
     return (source->isLooping() && nextPlayPos > 0)\r
-                    ? nextPlayPos % source->getTotalLength()\r
-                    : nextPlayPos;\r
+                    ? pos % source->getTotalLength()\r
+                    : pos;\r
 }\r
 \r
 void BufferingAudioSource::setNextReadPosition (int64 newPosition)\r
@@ -229,7 +231,7 @@ bool BufferingAudioSource::readNextBufferChunk()
             bufferValidEnd = 0;\r
         }\r
 \r
-        newBVS = jmax ((int64) 0, nextPlayPos);\r
+        newBVS = jmax ((int64) 0, nextPlayPos.load());\r
         newBVE = newBVS + buffer.getNumSamples() - 4;\r
         sectionToReadStart = 0;\r
         sectionToReadEnd = 0;\r
@@ -255,7 +257,7 @@ bool BufferingAudioSource::readNextBufferChunk()
             sectionToReadEnd = newBVE;\r
 \r
             bufferValidStart = newBVS;\r
-            bufferValidEnd = jmin (bufferValidEnd, newBVE);\r
+            bufferValidEnd = jmin (bufferValidEnd.load(), newBVE);\r
         }\r
     }\r
 \r
@@ -263,8 +265,8 @@ bool BufferingAudioSource::readNextBufferChunk()
         return false;\r
 \r
     jassert (buffer.getNumSamples() > 0);\r
-    const int bufferIndexStart = (int) (sectionToReadStart % buffer.getNumSamples());\r
-    const int bufferIndexEnd   = (int) (sectionToReadEnd   % buffer.getNumSamples());\r
+    auto bufferIndexStart = (int) (sectionToReadStart % buffer.getNumSamples());\r
+    auto bufferIndexEnd   = (int) (sectionToReadEnd   % buffer.getNumSamples());\r
 \r
     if (bufferIndexStart < bufferIndexEnd)\r
     {\r
@@ -274,7 +276,7 @@ bool BufferingAudioSource::readNextBufferChunk()
     }\r
     else\r
     {\r
-        const int initialSize = buffer.getNumSamples() - bufferIndexStart;\r
+        auto initialSize = buffer.getNumSamples() - bufferIndexStart;\r
 \r
         readBufferSection (sectionToReadStart,\r
                            initialSize,\r
@@ -293,11 +295,10 @@ bool BufferingAudioSource::readNextBufferChunk()
     }\r
 \r
     bufferReadyEvent.signal();\r
-\r
     return true;\r
 }\r
 \r
-void BufferingAudioSource::readBufferSection (const int64 start, const int length, const int bufferOffset)\r
+void BufferingAudioSource::readBufferSection (int64 start, int length, int bufferOffset)\r
 {\r
     if (source->getNextReadPosition() != start)\r
         source->setNextReadPosition (start);\r
index bf272969fdc71b1d8afd10979ed92d3c9d4e1c09..bc6f5abe9ddbd1d7aa09463827f047db301b7358 100644 (file)
@@ -105,9 +105,9 @@ private:
     AudioBuffer<float> buffer;\r
     CriticalSection bufferStartPosLock;\r
     WaitableEvent bufferReadyEvent;\r
-    int64 volatile bufferValidStart, bufferValidEnd, nextPlayPos;\r
-    double volatile sampleRate;\r
-    bool wasSourceLooping, isPrepared, prefillBuffer;\r
+    std::atomic<int64> bufferValidStart { 0 }, bufferValidEnd { 0 }, nextPlayPos { 0 };\r
+    double sampleRate = 0;\r
+    bool wasSourceLooping = false, isPrepared = false, prefillBuffer;\r
 \r
     bool readNextBufferChunk();\r
     void readBufferSection (int64 start, int length, int bufferOffset);\r
index ed2918e4213f2db6e1844f016fa7e49b77bbe4e8..96d9fe8ab7fc532592f2e5112d9d4611d4c6bda4 100644 (file)
@@ -61,7 +61,7 @@ void MixerAudioSource::removeInputSource (AudioSource* const input)
 {\r
     if (input != nullptr)\r
     {\r
-        ScopedPointer<AudioSource> toDelete;\r
+        std::unique_ptr<AudioSource> toDelete;\r
 \r
         {\r
             const ScopedLock sl (lock);\r
index ddddb546e017d12408210fb0a437e1ecad0ca8b2..99fc422dbd09f21d12b5c9d9a6e6004e29a351bd 100644 (file)
@@ -66,7 +66,7 @@ private:
     CriticalSection lock;\r
     OptionalScopedPointer<AudioSource> input;\r
     Reverb reverb;\r
-    volatile bool bypass;\r
+    std::atomic<bool> bypass;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ReverbAudioSource)\r
 };\r
index c056896e748ee5ec5fa0c7472da8ea9e031dc641..3215d1000222a67cd0b545d8f897fe2f7c46626a 100644 (file)
@@ -64,7 +64,7 @@ public:
     virtual bool appliesToChannel (int midiChannel) = 0;\r
 \r
     /** The class is reference-counted, so this is a handy pointer class for it. */\r
-    typedef ReferenceCountedObjectPtr<SynthesiserSound> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<SynthesiserSound>;\r
 \r
 \r
 private:\r
index 4685e43509a11d73a79620d7fac779327643d0c6..e2fb0b41a6d09f17a569c34106459ec3245fcaef 100644 (file)
@@ -722,7 +722,7 @@ void AudioDeviceManager::audioDeviceIOCallbackInt (const float** inputChannelDat
         cpuUsageMs += filterAmount * (msTaken - cpuUsageMs);\r
 \r
         if (msTaken > msPerBlock)\r
-            xruns++;\r
+            ++xruns;\r
     }\r
     else\r
     {\r
@@ -960,7 +960,7 @@ double AudioDeviceManager::LevelMeter::getCurrentLevel() const noexcept
 void AudioDeviceManager::playTestSound()\r
 {\r
     { // cunningly nested to swap, unlock and delete in that order.\r
-        ScopedPointer<AudioBuffer<float>> oldSound;\r
+        std::unique_ptr<AudioBuffer<float>> oldSound;\r
 \r
         {\r
             const ScopedLock sl (audioCallbackLock);\r
@@ -996,7 +996,7 @@ void AudioDeviceManager::playTestSound()
 int AudioDeviceManager::getXRunCount() const noexcept\r
 {\r
     auto deviceXRuns = (currentAudioDevice != nullptr ? currentAudioDevice->getXRunCount() : -1);\r
-    return (deviceXRuns >= 0 ? deviceXRuns : xruns);\r
+    return jmax (0, deviceXRuns) + xruns;\r
 }\r
 \r
 } // namespace juce\r
index ca735e7d0fcd5bb8a1ee07cadc81c04d719ed275..adbfa99fdb372ed024a373ba60408529ddab039d 100644 (file)
@@ -416,12 +416,11 @@ public:
     */\r
     struct LevelMeter    : public ReferenceCountedObject\r
     {\r
-        typedef ReferenceCountedObjectPtr<LevelMeter> Ptr;\r
-\r
         LevelMeter() noexcept;\r
-\r
         double getCurrentLevel() const noexcept;\r
 \r
+        using Ptr = ReferenceCountedObjectPtr<LevelMeter>;\r
+\r
     private:\r
         friend class AudioDeviceManager;\r
 \r
@@ -471,12 +470,12 @@ private:
     OwnedArray<AudioDeviceSetup> lastDeviceTypeConfigs;\r
 \r
     AudioDeviceSetup currentSetup;\r
-    ScopedPointer<AudioIODevice> currentAudioDevice;\r
+    std::unique_ptr<AudioIODevice> currentAudioDevice;\r
     Array<AudioIODeviceCallback*> callbacks;\r
     int numInputChansNeeded = 0, numOutputChansNeeded = 2;\r
     String currentDeviceType;\r
     BigInteger inputChannels, outputChannels;\r
-    ScopedPointer<XmlElement> lastExplicitSettings;\r
+    std::unique_ptr<XmlElement> lastExplicitSettings;\r
     mutable bool listNeedsScanning = true;\r
     AudioBuffer<float> tempBuffer;\r
 \r
@@ -491,10 +490,10 @@ private:
     Array<MidiCallbackInfo> midiCallbacks;\r
 \r
     String defaultMidiOutputName;\r
-    ScopedPointer<MidiOutput> defaultMidiOutput;\r
+    std::unique_ptr<MidiOutput> defaultMidiOutput;\r
     CriticalSection audioCallbackLock, midiCallbackLock;\r
 \r
-    ScopedPointer<AudioBuffer<float>> testSound;\r
+    std::unique_ptr<AudioBuffer<float>> testSound;\r
     int testSoundPosition = 0;\r
 \r
     double cpuUsageMs = 0, timeToCpuScale = 0, msPerBlock = 0;\r
@@ -507,7 +506,7 @@ private:
     class CallbackHandler;\r
     friend class CallbackHandler;\r
     friend struct ContainerDeletePolicy<CallbackHandler>;\r
-    ScopedPointer<CallbackHandler> callbackHandler;\r
+    std::unique_ptr<CallbackHandler> callbackHandler;\r
 \r
     void audioDeviceIOCallbackInt (const float** inputChannelData, int totalNumInputChannels,\r
                                    float** outputChannelData, int totalNumOutputChannels, int numSamples);\r
index 611f653978ac379279a9929c878197c20c4fdcf3..1ab48aa5a81c07aa3592fabbcef37e907dccbbe0 100644 (file)
@@ -31,7 +31,7 @@
 \r
   ID:               juce_audio_devices\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE audio and MIDI I/O device classes\r
   description:      Classes to play and record from audio and MIDI I/O devices\r
   website:          http://www.juce.com/juce\r
index 36b7cf6409a8a321ab0a426bc31dbb440a10d322..98fdd6cd12bab4bf4d28efc027e5c63a0a08e94f 100644 (file)
@@ -25,7 +25,7 @@ namespace juce
 \r
 struct MidiOutput::PendingMessage\r
 {\r
-    PendingMessage (const void* const data, const int len, const double timeStamp)\r
+    PendingMessage (const void* data, int len, double timeStamp)\r
         : message (data, len, timeStamp)\r
     {}\r
 \r
@@ -33,11 +33,8 @@ struct MidiOutput::PendingMessage
     PendingMessage* next;\r
 };\r
 \r
-MidiOutput::MidiOutput (const String& midiName)\r
-    : Thread ("midi out"),\r
-      internal (nullptr),\r
-      firstMessage (nullptr),\r
-      name (midiName)\r
+MidiOutput::MidiOutput (const String& deviceName)\r
+    : Thread ("midi out"), name (deviceName)\r
 {\r
 }\r
 \r
@@ -52,7 +49,7 @@ void MidiOutput::sendBlockOfMessagesNow (const MidiBuffer& buffer)
 }\r
 \r
 void MidiOutput::sendBlockOfMessages (const MidiBuffer& buffer,\r
-                                      const double millisecondCounterToStartAt,\r
+                                      double millisecondCounterToStartAt,\r
                                       double samplesPerSecondForBuffer)\r
 {\r
     // You've got to call startBackgroundThread() for this to actually work..\r
@@ -61,18 +58,15 @@ void MidiOutput::sendBlockOfMessages (const MidiBuffer& buffer,
     // this needs to be a value in the future - RTFM for this method!\r
     jassert (millisecondCounterToStartAt > 0);\r
 \r
-    const double timeScaleFactor = 1000.0 / samplesPerSecondForBuffer;\r
-\r
-    MidiBuffer::Iterator i (buffer);\r
+    auto timeScaleFactor = 1000.0 / samplesPerSecondForBuffer;\r
 \r
     const uint8* data;\r
     int len, time;\r
 \r
-    while (i.getNextEvent (data, len, time))\r
+    for (MidiBuffer::Iterator i (buffer); i.getNextEvent (data, len, time);)\r
     {\r
-        const double eventTime = millisecondCounterToStartAt + timeScaleFactor * time;\r
-\r
-        PendingMessage* const m = new PendingMessage (data, len, eventTime);\r
+        auto eventTime = millisecondCounterToStartAt + timeScaleFactor * time;\r
+        auto* m = new PendingMessage (data, len, eventTime);\r
 \r
         const ScopedLock sl (lock);\r
 \r
@@ -83,7 +77,7 @@ void MidiOutput::sendBlockOfMessages (const MidiBuffer& buffer,
         }\r
         else\r
         {\r
-            PendingMessage* mm = firstMessage;\r
+            auto* mm = firstMessage;\r
 \r
             while (mm->next != nullptr && mm->next->message.getTimeStamp() <= eventTime)\r
                 mm = mm->next;\r
@@ -102,7 +96,7 @@ void MidiOutput::clearAllPendingMessages()
 \r
     while (firstMessage != nullptr)\r
     {\r
-        PendingMessage* const m = firstMessage;\r
+        auto* m = firstMessage;\r
         firstMessage = firstMessage->next;\r
         delete m;\r
     }\r
@@ -150,7 +144,7 @@ void MidiOutput::run()
 \r
         if (message != nullptr)\r
         {\r
-            const ScopedPointer<PendingMessage> messageDeleter (message);\r
+            std::unique_ptr<PendingMessage> messageDeleter (message);\r
 \r
             if (eventTime > now)\r
             {\r
index 3a102990b13f9caebb9c681fce755cfe6898b39f..5c8e621416eb29de9a12b913496d9e3d161833e9 100644 (file)
@@ -133,7 +133,7 @@ private:
     void* internal = nullptr;\r
     CriticalSection lock;\r
     struct PendingMessage;\r
-    PendingMessage* firstMessage;\r
+    PendingMessage* firstMessage = nullptr;\r
     String name;\r
 \r
     MidiOutput (const String& midiName); // These objects are created with the openDevice() method.\r
index 40a9725b8a80e070fedb5839b404862d6a573bd3..7a58d65bf709140cb6b2a4b9a455280bed93058b 100644 (file)
@@ -462,12 +462,12 @@ public:
     AudioIODevice* createDevice (const String& outputDeviceName,\r
                                  const String& inputDeviceName)\r
     {\r
-        ScopedPointer<AndroidAudioIODevice> dev;\r
+        std::unique_ptr<AndroidAudioIODevice> dev;\r
 \r
         if (outputDeviceName.isNotEmpty() || inputDeviceName.isNotEmpty())\r
         {\r
-            dev = new AndroidAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName\r
-                                                                          : inputDeviceName);\r
+            dev.reset (new AndroidAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName\r
+                                                                               : inputDeviceName));\r
 \r
             if (dev->getCurrentSampleRate() <= 0 || dev->getDefaultBufferSize() <= 0)\r
                 dev = nullptr;\r
index 6b7508969d8cc5e0e8e0e0e69698069df3d03f6d..a178abf01fa05974e7ed7fe3a8ad778912fc25b3 100644 (file)
@@ -202,7 +202,7 @@ public:
     {\r
         if (jobject dm = deviceManager.get())\r
         {\r
-            ScopedPointer<AndroidMidiInput> androidMidiInput (new AndroidMidiInput (juceMidiInput, idx, callback, dm));\r
+            std::unique_ptr<AndroidMidiInput> androidMidiInput (new AndroidMidiInput (juceMidiInput, idx, callback, dm));\r
 \r
             if (androidMidiInput->isOpen())\r
                 return androidMidiInput.release();\r
@@ -221,22 +221,6 @@ public:
     }\r
 \r
 private:\r
-    static StringArray javaStringArrayToJuce (jobjectArray jStrings)\r
-    {\r
-        StringArray retval;\r
-\r
-        JNIEnv* env = getEnv();\r
-        const int count = env->GetArrayLength (jStrings);\r
-\r
-        for (int i = 0; i < count; ++i)\r
-        {\r
-            LocalRef<jstring> string ((jstring) env->GetObjectArrayElement (jStrings, i));\r
-            retval.add (juceString (string));\r
-        }\r
-\r
-        return retval;\r
-    }\r
-\r
     GlobalRef deviceManager;\r
 };\r
 \r
@@ -327,7 +311,7 @@ MidiInput* MidiInput::openDevice (int index, juce::MidiInputCallback* callback)
 \r
     AndroidMidiDeviceManager manager;\r
 \r
-    String midiInputName = manager.getInputPortNameForJuceIndex (index);\r
+    String midiInputName (manager.getInputPortNameForJuceIndex (index));\r
 \r
     if (midiInputName.isEmpty())\r
     {\r
@@ -336,9 +320,9 @@ MidiInput* MidiInput::openDevice (int index, juce::MidiInputCallback* callback)
         return nullptr;\r
     }\r
 \r
-    ScopedPointer<MidiInput> midiInput (new MidiInput (midiInputName));\r
+    std::unique_ptr<MidiInput> midiInput (new MidiInput (midiInputName));\r
 \r
-    midiInput->internal = manager.openMidiInputPortWithIndex (index, midiInput, callback);\r
+    midiInput->internal = manager.openMidiInputPortWithIndex (index, midiInput.get(), callback);\r
 \r
     return midiInput->internal != nullptr ? midiInput.release()\r
                                           : nullptr;\r
index c242495a26ae148e2c7d2111a74141e77190d5ea..09f3530eb8ff0d5d6cbf49edf28a24d76f67b221 100644 (file)
@@ -48,8 +48,8 @@ struct OboeAudioIODeviceBufferHelpers<int16>
     {\r
         for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
         {\r
-            typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst> DstSampleType;\r
-            typedef AudioData::Pointer<AudioData::Int16,   AudioData::NativeEndian, AudioData::Interleaved,    AudioData::Const>    SrcSampleType;\r
+            using DstSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>;\r
+            using SrcSampleType = AudioData::Pointer<AudioData::Int16,   AudioData::NativeEndian, AudioData::Interleaved,    AudioData::Const>;\r
 \r
             DstSampleType dstData (audioBuffer.getWritePointer (i));\r
             SrcSampleType srcData (srcInterleaved + i, audioBuffer.getNumChannels());\r
@@ -61,8 +61,8 @@ struct OboeAudioIODeviceBufferHelpers<int16>
     {\r
         for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
         {\r
-            typedef AudioData::Pointer<AudioData::Int16,   AudioData::NativeEndian, AudioData::Interleaved,    AudioData::NonConst> DstSampleType;\r
-            typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>    SrcSampleType;\r
+            using DstSampleType = AudioData::Pointer<AudioData::Int16,   AudioData::NativeEndian, AudioData::Interleaved,    AudioData::NonConst>;\r
+            using SrcSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>;\r
 \r
             DstSampleType dstData (dstInterleaved + i, audioBuffer.getNumChannels());\r
             SrcSampleType srcData (audioBuffer.getReadPointer (i));\r
@@ -95,8 +95,8 @@ struct OboeAudioIODeviceBufferHelpers<float>
 \r
         for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
         {\r
-            typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst> DstSampleType;\r
-            typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::Interleaved,    AudioData::Const>    SrcSampleType;\r
+            using DstSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>;\r
+            using SrcSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::Interleaved,    AudioData::Const>;\r
 \r
             DstSampleType dstData (audioBuffer.getWritePointer (i));\r
             SrcSampleType srcData (srcInterleaved + i, audioBuffer.getNumChannels());\r
@@ -115,8 +115,8 @@ struct OboeAudioIODeviceBufferHelpers<float>
 \r
         for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
         {\r
-            typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::Interleaved,    AudioData::NonConst> DstSampleType;\r
-            typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>    SrcSampleType;\r
+            using DstSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::Interleaved,    AudioData::NonConst>;\r
+            using SrcSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>;\r
 \r
             DstSampleType dstData (dstInterleaved + i, audioBuffer.getNumChannels());\r
             SrcSampleType srcData (audioBuffer.getReadPointer (i));\r
index 23441cf8ea3e63d05237af6a801d1a10d1f0fbae..fa610109b8201f0f9a516875ecb1d1b4ecfd5332 100644 (file)
@@ -87,7 +87,7 @@ public:
 private:\r
 \r
     //==============================================================================\r
-    struct ControlBlock : ReferenceCountedObject { ScopedPointer<const SLObjectItf_* const> ptr; ControlBlock() {} ControlBlock (SLObjectItf o) : ptr (o) {} };\r
+    struct ControlBlock : ReferenceCountedObject { std::unique_ptr<const SLObjectItf_* const> ptr; ControlBlock() {} ControlBlock (SLObjectItf o) : ptr (o) {} };\r
     ReferenceCountedObjectPtr<ControlBlock> cb;\r
 };\r
 \r
@@ -172,8 +172,8 @@ struct BufferHelpers<int16>
     {\r
         for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
         {\r
-            typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst> DstSampleType;\r
-            typedef AudioData::Pointer<AudioData::Int16,   AudioData::LittleEndian, AudioData::Interleaved,    AudioData::Const>    SrcSampleType;\r
+            using DstSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>;\r
+            using SrcSampleType = AudioData::Pointer<AudioData::Int16,   AudioData::LittleEndian, AudioData::Interleaved,    AudioData::Const>;\r
 \r
             DstSampleType dstData (audioBuffer.getWritePointer (i));\r
             SrcSampleType srcData (srcInterleaved + i, audioBuffer.getNumChannels());\r
@@ -185,8 +185,8 @@ struct BufferHelpers<int16>
     {\r
         for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
         {\r
-            typedef AudioData::Pointer<AudioData::Int16,   AudioData::LittleEndian, AudioData::Interleaved, AudioData::NonConst> DstSampleType;\r
-            typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const> SrcSampleType;\r
+            using DstSampleType = AudioData::Pointer<AudioData::Int16,   AudioData::LittleEndian, AudioData::Interleaved, AudioData::NonConst>;\r
+            using SrcSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>;\r
 \r
             DstSampleType dstData (dstInterleaved + i, audioBuffer.getNumChannels());\r
             SrcSampleType srcData (audioBuffer.getReadPointer (i));\r
@@ -231,8 +231,8 @@ struct BufferHelpers<float>
 \r
         for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
         {\r
-            typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst> DstSampleType;\r
-            typedef AudioData::Pointer<AudioData::Float32, AudioData::LittleEndian, AudioData::Interleaved,    AudioData::Const>    SrcSampleType;\r
+            using DstSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>;\r
+            using SrcSampleType = AudioData::Pointer<AudioData::Float32, AudioData::LittleEndian, AudioData::Interleaved,    AudioData::Const>;\r
 \r
             DstSampleType dstData (audioBuffer.getWritePointer (i));\r
             SrcSampleType srcData (srcInterleaved + i, audioBuffer.getNumChannels());\r
@@ -250,8 +250,8 @@ struct BufferHelpers<float>
 \r
         for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
         {\r
-            typedef AudioData::Pointer<AudioData::Float32, AudioData::LittleEndian, AudioData::Interleaved,    AudioData::NonConst> DstSampleType;\r
-            typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>    SrcSampleType;\r
+            using DstSampleType = AudioData::Pointer<AudioData::Float32, AudioData::LittleEndian, AudioData::Interleaved,    AudioData::NonConst>;\r
+            using SrcSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>;\r
 \r
             DstSampleType dstData (dstInterleaved + i, audioBuffer.getNumChannels());\r
             SrcSampleType srcData (audioBuffer.getReadPointer (i));\r
@@ -383,7 +383,7 @@ public:
     template <typename T>\r
     struct OpenSLQueueRunnerPlayer      : OpenSLQueueRunner<T, OpenSLQueueRunnerPlayer<T>, SLPlayItf_>\r
     {\r
-        typedef OpenSLQueueRunner<T, OpenSLQueueRunnerPlayer<T>, SLPlayItf_> Base;\r
+        using Base = OpenSLQueueRunner<T, OpenSLQueueRunnerPlayer<T>, SLPlayItf_>;\r
 \r
         enum { isPlayer = 1 };\r
 \r
@@ -425,7 +425,7 @@ public:
     template <typename T>\r
     struct OpenSLQueueRunnerRecorder      : OpenSLQueueRunner<T, OpenSLQueueRunnerRecorder<T>, SLRecordItf_>\r
     {\r
-        typedef OpenSLQueueRunner<T, OpenSLQueueRunnerRecorder<T>, SLRecordItf_> Base;\r
+        using Base = OpenSLQueueRunner<T, OpenSLQueueRunnerRecorder<T>, SLRecordItf_>;\r
 \r
         enum { isPlayer = 0 };\r
 \r
@@ -586,7 +586,7 @@ public:
                                       int numBuffersToUse);\r
 \r
         //==============================================================================\r
-        typedef SLresult (*CreateEngineFunc)(SLObjectItf*,SLuint32,const SLEngineOption*,SLuint32,const SLInterfaceID*,const SLboolean*);\r
+        typedef SLresult (*CreateEngineFunc)(SLObjectItf*, SLuint32, const SLEngineOption*, SLuint32, const SLInterfaceID*, const SLboolean*);\r
 \r
         //==============================================================================\r
         int inputChannels, outputChannels;\r
@@ -617,7 +617,7 @@ public:
             {\r
                 if (inputChannels > 0)\r
                 {\r
-                    recorder = new OpenSLQueueRunnerRecorder<T>(*this, inputChannels);\r
+                    recorder.reset (new OpenSLQueueRunnerRecorder<T> (*this, inputChannels));\r
 \r
                     if (! recorder->init())\r
                     {\r
@@ -628,7 +628,7 @@ public:
 \r
                 if (outputChannels > 0)\r
                 {\r
-                    player = new OpenSLQueueRunnerPlayer<T>(*this, outputChannels);\r
+                    player.reset (new OpenSLQueueRunnerPlayer<T> (*this, outputChannels));\r
 \r
                     if (! player->init())\r
                     {\r
@@ -755,8 +755,8 @@ public:
         }\r
 \r
         //==============================================================================\r
-        ScopedPointer<OpenSLQueueRunnerPlayer<T>> player;\r
-        ScopedPointer<OpenSLQueueRunnerRecorder<T>> recorder;\r
+        std::unique_ptr<OpenSLQueueRunnerPlayer<T>> player;\r
+        std::unique_ptr<OpenSLQueueRunnerRecorder<T>> recorder;\r
         Atomic<int> guard;\r
         jmethodID getUnderrunCount = 0;\r
     };\r
@@ -876,8 +876,8 @@ public:
             lastError = "Error opening OpenSL input device: the app was not granted android.permission.RECORD_AUDIO";\r
         }\r
 \r
-        session = OpenSLSession::create (slLibrary, numInputChannels, numOutputChannels,\r
-                                         sampleRate, actualBufferSize, audioBuffersToEnqueue);\r
+        session.reset (OpenSLSession::create (slLibrary, numInputChannels, numOutputChannels,\r
+                                              sampleRate, actualBufferSize, audioBuffersToEnqueue));\r
         if (session != nullptr)\r
             session->setAudioPreprocessingEnabled (audioProcessingEnabled);\r
         else\r
@@ -888,8 +888,8 @@ public:
                 activeInputChans = BigInteger(0);\r
                 numInputChannels = 0;\r
 \r
-                session = OpenSLSession::create(slLibrary, numInputChannels, numOutputChannels,\r
-                                                sampleRate, actualBufferSize, audioBuffersToEnqueue);\r
+                session.reset (OpenSLSession::create (slLibrary, numInputChannels, numOutputChannels,\r
+                                                      sampleRate, actualBufferSize, audioBuffersToEnqueue));\r
             }\r
         }\r
 \r
@@ -1008,7 +1008,7 @@ private:
     BigInteger activeOutputChans, activeInputChans;\r
     AudioIODeviceCallback* callback;\r
 \r
-    ScopedPointer<OpenSLSession> session;\r
+    std::unique_ptr<OpenSLSession> session;\r
 \r
     enum\r
     {\r
@@ -1122,14 +1122,14 @@ OpenSLAudioIODevice::OpenSLSession* OpenSLAudioIODevice::OpenSLSession::create (
                                                                                 double samleRateToUse, int bufferSizeToUse,\r
                                                                                 int numBuffersToUse)\r
 {\r
-    ScopedPointer<OpenSLSession> retval;\r
+    std::unique_ptr<OpenSLSession> retval;\r
     auto sdkVersion = getEnv()->GetStaticIntField (AndroidBuildVersion, AndroidBuildVersion.SDK_INT);\r
 \r
     // SDK versions 21 and higher should natively support floating point...\r
     if (sdkVersion >= 21)\r
     {\r
-        retval = new OpenSLSessionT<float> (slLibrary, numInputChannels, numOutputChannels, samleRateToUse,\r
-                                            bufferSizeToUse, numBuffersToUse);\r
+        retval.reset (new OpenSLSessionT<float> (slLibrary, numInputChannels, numOutputChannels, samleRateToUse,\r
+                                                 bufferSizeToUse, numBuffersToUse));\r
 \r
         // ...however, some devices lie so re-try without floating point\r
         if (retval != nullptr && (! retval->openedOK()))\r
@@ -1138,8 +1138,8 @@ OpenSLAudioIODevice::OpenSLSession* OpenSLAudioIODevice::OpenSLSession::create (
 \r
     if (retval == nullptr)\r
     {\r
-        retval = new OpenSLSessionT<int16> (slLibrary, numInputChannels, numOutputChannels, samleRateToUse,\r
-                                            bufferSizeToUse, numBuffersToUse);\r
+        retval.reset (new OpenSLSessionT<int16> (slLibrary, numInputChannels, numOutputChannels, samleRateToUse,\r
+                                                 bufferSizeToUse, numBuffersToUse));\r
 \r
         if (retval != nullptr && (! retval->openedOK()))\r
             retval = nullptr;\r
@@ -1165,11 +1165,11 @@ public:
     AudioIODevice* createDevice (const String& outputDeviceName,\r
                                  const String& inputDeviceName) override\r
     {\r
-        ScopedPointer<OpenSLAudioIODevice> dev;\r
+        std::unique_ptr<OpenSLAudioIODevice> dev;\r
 \r
         if (outputDeviceName.isNotEmpty() || inputDeviceName.isNotEmpty())\r
-            dev = new OpenSLAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName\r
-                                                                         : inputDeviceName);\r
+            dev.reset (new OpenSLAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName\r
+                                                                              : inputDeviceName));\r
 \r
         return dev.release();\r
     }\r
@@ -1363,7 +1363,7 @@ private:
 \r
 pthread_t juce_createRealtimeAudioThread (void* (*entry) (void*), void* userPtr)\r
 {\r
-    ScopedPointer<SLRealtimeThread> thread (new SLRealtimeThread);\r
+    std::unique_ptr<SLRealtimeThread> thread (new SLRealtimeThread);\r
 \r
     if (! thread->isOK())\r
         return 0;\r
index e5d105ade2a400d99eb6de4c234f583da2a0115e..23d8d4ffb0c65c7ae786a249164db520c2018c77 100644 (file)
@@ -969,6 +969,18 @@ struct iOSAudioIODevice::Pimpl      : public AudioPlayHead,
                                             dispatchAudioUnitPropertyChange,\r
                                             this);\r
         jassert (err == noErr);\r
+\r
+        AudioOutputUnitMIDICallbacks midiCallbacks;\r
+        midiCallbacks.userData = this;\r
+        midiCallbacks.MIDIEventProc = midiEventCallback;\r
+        midiCallbacks.MIDISysExProc = midiSysExCallback;\r
+        err = AudioUnitSetProperty (audioUnit,\r
+                                    kAudioOutputUnitProperty_MIDICallbacks,\r
+                                    kAudioUnitScope_Global,\r
+                                    0,\r
+                                    &midiCallbacks,\r
+                                    sizeof (midiCallbacks));\r
+        jassert (err == noErr);\r
        #endif\r
 \r
         if (channelData.areInputChannelsAvailable())\r
@@ -1125,10 +1137,9 @@ struct iOSAudioIODevice::Pimpl      : public AudioPlayHead,
         static_cast<Pimpl*> (data)->handleAudioUnitPropertyChange (unit, propertyID, scope, element);\r
     }\r
 \r
-    void handleMidiMessage (MidiMessage msg)\r
+    static double getTimestampForMIDI()\r
     {\r
-        if (messageCollector != nullptr)\r
-            messageCollector->addMessageToQueue (msg);\r
+        return Time::getMillisecondCounter() / 1000.0;\r
     }\r
 \r
     static void midiEventCallback (void *client, UInt32 status, UInt32 data1, UInt32 data2, UInt32)\r
@@ -1136,7 +1147,18 @@ struct iOSAudioIODevice::Pimpl      : public AudioPlayHead,
         return static_cast<Pimpl*> (client)->handleMidiMessage (MidiMessage ((int) status,\r
                                                                              (int) data1,\r
                                                                              (int) data2,\r
-                                                                             Time::getMillisecondCounter() / 1000.0));\r
+                                                                             getTimestampForMIDI()));\r
+    }\r
+\r
+    static void midiSysExCallback (void *client, const UInt8 *data, UInt32 length)\r
+    {\r
+        return static_cast<Pimpl*> (client)->handleMidiMessage (MidiMessage (data, (int) length, getTimestampForMIDI()));\r
+    }\r
+\r
+    void handleMidiMessage (MidiMessage msg)\r
+    {\r
+        if (messageCollector != nullptr)\r
+            messageCollector->addMessageToQueue (msg);\r
     }\r
 \r
     struct IOChannelData\r
@@ -1231,8 +1253,8 @@ struct iOSAudioIODevice::Pimpl      : public AudioPlayHead,
         void reconfigure (const BigInteger requiredInputChannels,\r
                           const BigInteger requiredOutputChannels)\r
         {\r
-            inputs  = new IOChannelConfig (true,  requiredInputChannels);\r
-            outputs = new IOChannelConfig (false, requiredOutputChannels);\r
+            inputs .reset (new IOChannelConfig (true,  requiredInputChannels));\r
+            outputs.reset (new IOChannelConfig (false, requiredOutputChannels));\r
 \r
             audioData.setSize (inputs->numActiveChannels + outputs->numActiveChannels,\r
                                audioData.getNumSamples());\r
@@ -1253,8 +1275,8 @@ struct iOSAudioIODevice::Pimpl      : public AudioPlayHead,
             return inputs->areChannelsAccessible && inputs->numActiveChannels > 0;\r
         }\r
 \r
-        ScopedPointer<IOChannelConfig> inputs;\r
-        ScopedPointer<IOChannelConfig> outputs;\r
+        std::unique_ptr<IOChannelConfig> inputs;\r
+        std::unique_ptr<IOChannelConfig> outputs;\r
 \r
         AudioBuffer<float> audioData { 0, 0 };\r
     };\r
@@ -1350,7 +1372,7 @@ int iOSAudioIODevice::getOutputLatencyInSamples()                   { return rou
 int iOSAudioIODevice::getXRunCount() const noexcept                 { return pimpl->xrun; }\r
 \r
 void iOSAudioIODevice::setMidiMessageCollector (MidiMessageCollector* collector) { pimpl->messageCollector = collector; }\r
-AudioPlayHead* iOSAudioIODevice::getAudioPlayHead() const           { return pimpl; }\r
+AudioPlayHead* iOSAudioIODevice::getAudioPlayHead() const           { return pimpl.get(); }\r
 \r
 bool iOSAudioIODevice::isInterAppAudioConnected() const             { return pimpl->interAppAudioConnected; }\r
 #if JUCE_MODULE_AVAILABLE_juce_graphics\r
index 8f50e9e36331da8eb32d7c0153bb96c7d4c86568..e3f86943daad8123267439c6a256ae00e924c0a8 100644 (file)
@@ -85,7 +85,7 @@ private:
 \r
     struct Pimpl;\r
     friend struct Pimpl;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     JUCE_DECLARE_NON_COPYABLE (iOSAudioIODevice)\r
 };\r
index 3b9a11a10de182bc83287c8f11fc7776b18e5fb8..b971afc725ab4905558a90aceac0d105745e8c11 100644 (file)
@@ -58,7 +58,7 @@ static void getDeviceSampleRates (snd_pcm_t* handle, Array<double>& rates)
     for (int i = 0; ratesToTry[i] != 0; ++i)\r
     {\r
         if (snd_pcm_hw_params_any (handle, hwParams) >= 0\r
-            && snd_pcm_hw_params_test_rate (handle, hwParams, (unsigned int) ratesToTry[i], 0) == 0)\r
+             && snd_pcm_hw_params_test_rate (handle, hwParams, (unsigned int) ratesToTry[i], 0) == 0)\r
         {\r
             rates.addIfNotAlreadyThere ((double) ratesToTry[i]);\r
         }\r
@@ -240,12 +240,12 @@ public:
                 const int type = formatsToTry [i + 1];\r
                 bitDepth = type & 255;\r
 \r
-                converter = createConverter (isInput, bitDepth,\r
-                                             (type & isFloatBit) != 0,\r
-                                             (type & isLittleEndianBit) != 0,\r
-                                             (type & onlyUseLower24Bits) != 0,\r
-                                             numChannels,\r
-                                             isInterleaved);\r
+                converter.reset (createConverter (isInput, bitDepth,\r
+                                                  (type & isFloatBit) != 0,\r
+                                                  (type & isLittleEndianBit) != 0,\r
+                                                  (type & onlyUseLower24Bits) != 0,\r
+                                                  numChannels,\r
+                                                  isInterleaved));\r
                 break;\r
             }\r
         }\r
@@ -358,7 +358,7 @@ public:
             scratch.ensureSize ((size_t) ((int) sizeof (float) * numSamples * numChannelsRunning), false);\r
             scratch.fillWith (0); // (not clearing this data causes warnings in valgrind)\r
 \r
-            snd_pcm_sframes_t num = snd_pcm_readi (handle, scratch.getData(), (snd_pcm_uframes_t) numSamples);\r
+            auto num = snd_pcm_readi (handle, scratch.getData(), (snd_pcm_uframes_t) numSamples);\r
 \r
             if (num < 0)\r
             {\r
@@ -378,7 +378,7 @@ public:
         }\r
         else\r
         {\r
-            snd_pcm_sframes_t num = snd_pcm_readn (handle, (void**) data, (snd_pcm_uframes_t) numSamples);\r
+            auto num = snd_pcm_readn (handle, (void**) data, (snd_pcm_uframes_t) numSamples);\r
 \r
             if (num < 0)\r
             {\r
@@ -411,7 +411,7 @@ private:
     const bool isInput;\r
     bool isInterleaved;\r
     MemoryBlock scratch;\r
-    ScopedPointer<AudioData::Converter> converter;\r
+    std::unique_ptr<AudioData::Converter> converter;\r
 \r
     //==============================================================================\r
     template <class SampleType>\r
@@ -431,7 +431,7 @@ private:
         {\r
             if (forInput)\r
             {\r
-                typedef AudioData::Pointer <AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst> DestType;\r
+                using DestType = AudioData::Pointer <AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>;\r
 \r
                 if (isLittleEndian)\r
                     return new AudioData::ConverterInstance <AudioData::Pointer <SampleType, AudioData::LittleEndian, InterleavedType, AudioData::Const>, DestType> (numInterleavedChannels, 1);\r
@@ -439,7 +439,7 @@ private:
                 return new AudioData::ConverterInstance <AudioData::Pointer <SampleType, AudioData::BigEndian, InterleavedType, AudioData::Const>, DestType> (numInterleavedChannels, 1);\r
             }\r
 \r
-            typedef AudioData::Pointer <AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const> SourceType;\r
+            using SourceType = AudioData::Pointer <AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>;\r
 \r
             if (isLittleEndian)\r
                 return new AudioData::ConverterInstance <SourceType, AudioData::Pointer <SampleType, AudioData::LittleEndian, InterleavedType, AudioData::NonConst>> (1, numInterleavedChannels);\r
@@ -488,17 +488,8 @@ class ALSAThread  : public Thread
 public:\r
     ALSAThread (const String& inputDeviceID, const String& outputDeviceID)\r
         : Thread ("JUCE ALSA"),\r
-          sampleRate (0),\r
-          bufferSize (0),\r
-          outputLatency (0),\r
-          inputLatency (0),\r
-          callback (0),\r
           inputId (inputDeviceID),\r
-          outputId (outputDeviceID),\r
-          numCallbacks (0),\r
-          audioIoInProgress (false),\r
-          inputChannelBuffer (1, 1),\r
-          outputChannelBuffer (1, 1)\r
+          outputId (outputDeviceID)\r
     {\r
         initialiseRatesAndChannels();\r
     }\r
@@ -510,8 +501,8 @@ public:
 \r
     void open (BigInteger inputChannels,\r
                BigInteger outputChannels,\r
-               const double newSampleRate,\r
-               const int newBufferSize)\r
+               double newSampleRate,\r
+               int newBufferSize)\r
     {\r
         close();\r
 \r
@@ -549,6 +540,35 @@ public:
         outputChannelDataForCallback.clear();\r
         currentOutputChans.clear();\r
 \r
+        // Note that the input device is opened before an output, because we've heard\r
+        // of drivers where doing it in the reverse order mysteriously fails.. If this\r
+        // order also causes problems, let us know and we'll see if we can find a compromise!\r
+\r
+        if (inputChannelDataForCallback.size() > 0 && inputId.isNotEmpty())\r
+        {\r
+            inputDevice.reset (new ALSADevice (inputId, true));\r
+\r
+            if (inputDevice->error.isNotEmpty())\r
+            {\r
+                error = inputDevice->error;\r
+                inputDevice.reset();\r
+                return;\r
+            }\r
+\r
+            ensureMinimumNumBitsSet (currentInputChans, (int) minChansIn);\r
+\r
+            if (! inputDevice->setParameters ((unsigned int) sampleRate,\r
+                                              jlimit ((int) minChansIn, (int) maxChansIn, currentInputChans.getHighestBit() + 1),\r
+                                              bufferSize))\r
+            {\r
+                error = inputDevice->error;\r
+                inputDevice.reset();\r
+                return;\r
+            }\r
+\r
+            inputLatency = inputDevice->latency;\r
+        }\r
+\r
         if (outputChannels.getHighestBit() >= 0)\r
         {\r
             for (int i = 0; i < maxOutputsRequested; ++i)\r
@@ -563,12 +583,12 @@ public:
 \r
         if (outputChannelDataForCallback.size() > 0 && outputId.isNotEmpty())\r
         {\r
-            outputDevice = new ALSADevice (outputId, false);\r
+            outputDevice.reset (new ALSADevice (outputId, false));\r
 \r
             if (outputDevice->error.isNotEmpty())\r
             {\r
                 error = outputDevice->error;\r
-                outputDevice = nullptr;\r
+                outputDevice.reset();\r
                 return;\r
             }\r
 \r
@@ -578,38 +598,13 @@ public:
                                                bufferSize))\r
             {\r
                 error = outputDevice->error;\r
-                outputDevice = nullptr;\r
+                outputDevice.reset();\r
                 return;\r
             }\r
 \r
             outputLatency = outputDevice->latency;\r
         }\r
 \r
-        if (inputChannelDataForCallback.size() > 0 && inputId.isNotEmpty())\r
-        {\r
-            inputDevice = new ALSADevice (inputId, true);\r
-\r
-            if (inputDevice->error.isNotEmpty())\r
-            {\r
-                error = inputDevice->error;\r
-                inputDevice = nullptr;\r
-                return;\r
-            }\r
-\r
-            ensureMinimumNumBitsSet (currentInputChans, (int) minChansIn);\r
-\r
-            if (! inputDevice->setParameters ((unsigned int) sampleRate,\r
-                                              jlimit ((int) minChansIn, (int) maxChansIn, currentInputChans.getHighestBit() + 1),\r
-                                              bufferSize))\r
-            {\r
-                error = inputDevice->error;\r
-                inputDevice = nullptr;\r
-                return;\r
-            }\r
-\r
-            inputLatency = inputDevice->latency;\r
-        }\r
-\r
         if (outputDevice == nullptr && inputDevice == nullptr)\r
         {\r
             error = "no channels";\r
@@ -664,8 +659,8 @@ public:
 \r
         stopThread (6000);\r
 \r
-        inputDevice = nullptr;\r
-        outputDevice = nullptr;\r
+        inputDevice.reset();\r
+        outputDevice.reset();\r
 \r
         inputChannelBuffer.setSize (1, 1);\r
         outputChannelBuffer.setSize (1, 1);\r
@@ -692,7 +687,7 @@ public:
                     if (threadShouldExit())\r
                         break;\r
 \r
-                    snd_pcm_sframes_t avail = snd_pcm_avail_update (inputDevice->handle);\r
+                    auto avail = snd_pcm_avail_update (inputDevice->handle);\r
 \r
                     if (avail < 0)\r
                         JUCE_ALSA_FAILED (snd_pcm_recover (inputDevice->handle, (int) avail, 0));\r
@@ -738,7 +733,7 @@ public:
                 if (threadShouldExit())\r
                     break;\r
 \r
-                snd_pcm_sframes_t avail = snd_pcm_avail_update (outputDevice->handle);\r
+                auto avail = snd_pcm_avail_update (outputDevice->handle);\r
 \r
                 if (avail < 0)\r
                     JUCE_ALSA_FAILED (snd_pcm_recover (outputDevice->handle, (int) avail, 0));\r
@@ -784,20 +779,20 @@ public:
 \r
     //==============================================================================\r
     String error;\r
-    double sampleRate;\r
-    int bufferSize, outputLatency, inputLatency;\r
+    double sampleRate = 0;\r
+    int bufferSize = 0, outputLatency = 0, inputLatency = 0;\r
     BigInteger currentInputChans, currentOutputChans;\r
 \r
     Array<double> sampleRates;\r
     StringArray channelNamesOut, channelNamesIn;\r
-    AudioIODeviceCallback* callback;\r
+    AudioIODeviceCallback* callback = nullptr;\r
 \r
 private:\r
     //==============================================================================\r
     const String inputId, outputId;\r
-    ScopedPointer<ALSADevice> outputDevice, inputDevice;\r
-    int numCallbacks;\r
-    bool audioIoInProgress;\r
+    std::unique_ptr<ALSADevice> outputDevice, inputDevice;\r
+    int numCallbacks = 0;\r
+    bool audioIoInProgress = false;\r
 \r
     CriticalSection callbackLock;\r
 \r
@@ -805,8 +800,8 @@ private:
     Array<const float*> inputChannelDataForCallback;\r
     Array<float*> outputChannelDataForCallback;\r
 \r
-    unsigned int minChansOut, maxChansOut;\r
-    unsigned int minChansIn, maxChansIn;\r
+    unsigned int minChansOut = 0, maxChansOut = 0;\r
+    unsigned int minChansIn = 0, maxChansIn = 0;\r
 \r
     bool failed (const int errorNum)\r
     {\r
@@ -854,8 +849,6 @@ public:
         : AudioIODevice (deviceName, deviceTypeName),\r
           inputId (inputDeviceID),\r
           outputId (outputDeviceID),\r
-          isOpen_ (false),\r
-          isStarted (false),\r
           internal (inputDeviceID, outputDeviceID)\r
     {\r
     }\r
@@ -958,7 +951,7 @@ public:
 \r
     void stop() override\r
     {\r
-        AudioIODeviceCallback* const oldCallback = internal.callback;\r
+        auto oldCallback = internal.callback;\r
 \r
         start (nullptr);\r
 \r
@@ -969,7 +962,7 @@ public:
     String inputId, outputId;\r
 \r
 private:\r
-    bool isOpen_, isStarted;\r
+    bool isOpen_ = false, isStarted = false;\r
     ALSAThread internal;\r
 };\r
 \r
@@ -1030,7 +1023,7 @@ public:
     {\r
         jassert (hasScanned); // need to call scanForDevices() before doing this\r
 \r
-        const int idx = (forInput ? inputIds : outputIds).indexOf ("default");\r
+        auto idx = (forInput ? inputIds : outputIds).indexOf ("default");\r
         return idx >= 0 ? idx : 0;\r
     }\r
 \r
@@ -1052,8 +1045,8 @@ public:
     {\r
         jassert (hasScanned); // need to call scanForDevices() before doing this\r
 \r
-        const int inputIndex = inputNames.indexOf (inputDeviceName);\r
-        const int outputIndex = outputNames.indexOf (outputDeviceName);\r
+        auto inputIndex = inputNames.indexOf (inputDeviceName);\r
+        auto outputIndex = outputNames.indexOf (outputDeviceName);\r
 \r
         String deviceName (outputIndex >= 0 ? outputDeviceName\r
                                             : inputDeviceName);\r
@@ -1069,7 +1062,8 @@ public:
 private:\r
     //==============================================================================\r
     StringArray inputNames, outputNames, inputIds, outputIds;\r
-    bool hasScanned = false, listOnlySoundcards;\r
+    bool hasScanned = false;\r
+    const bool listOnlySoundcards;\r
 \r
     bool testDevice (const String& id, const String& outputName, const String& inputName)\r
     {\r
@@ -1264,7 +1258,7 @@ private:
             testDevice ("pulse", "Pulseaudio output", "Pulseaudio input");\r
 \r
         // make sure the default device is listed first, and followed by the pulse device (if present)\r
-        int idx = outputIds.indexOf ("pulse");\r
+        auto idx = outputIds.indexOf ("pulse");\r
         outputIds.move (idx, 0);\r
         outputNames.move (idx, 0);\r
 \r
@@ -1283,8 +1277,8 @@ private:
 \r
     static String hintToString (const void* hints, const char* type)\r
     {\r
-        char* const hint = snd_device_name_get_hint (hints, type);\r
-        const String s (String::fromUTF8 (hint));\r
+        char* hint = snd_device_name_get_hint (hints, type);\r
+        auto s = String::fromUTF8 (hint);\r
         ::free (hint);\r
         return s;\r
     }\r
index eeecf9cecf657890399e82d489a0bbad40156d8e..289bb414da77b5edd77419c240e9907f4082eb8f 100644 (file)
@@ -35,24 +35,17 @@ namespace
 {\r
 \r
 //==============================================================================\r
-class AlsaClient : public ReferenceCountedObject\r
+class AlsaClient  : public ReferenceCountedObject\r
 {\r
 public:\r
-    typedef ReferenceCountedObjectPtr<AlsaClient> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<AlsaClient>;\r
 \r
     //==============================================================================\r
     // represents an input or output port of the supplied AlsaClient\r
-    class Port\r
+    struct Port\r
     {\r
-    public:\r
         Port (AlsaClient& c, bool forInput) noexcept\r
-            : portId (-1),\r
-              callbackEnabled (false),\r
-              client (c),\r
-              isInput (forInput),\r
-              callback (nullptr),\r
-              maxEventSize (4 * 1024),\r
-              midiInput (nullptr)\r
+            : client (c), isInput (forInput)\r
         {}\r
 \r
         ~Port()\r
@@ -81,10 +74,9 @@ public:
             return client.get() != nullptr && portId >= 0;\r
         }\r
 \r
-        void setupInput(MidiInput* input, MidiInputCallback* cb)\r
+        void setupInput (MidiInput* input, MidiInputCallback* cb)\r
         {\r
-            jassert (cb && input);\r
-\r
+            jassert (cb != nullptr && input != nullptr);\r
             callback = cb;\r
             midiInput = input;\r
         }\r
@@ -92,7 +84,6 @@ public:
         void setupOutput()\r
         {\r
             jassert (! isInput);\r
-\r
             snd_midi_event_new ((size_t) maxEventSize, &midiParser);\r
         }\r
 \r
@@ -121,15 +112,15 @@ public:
             snd_seq_event_t event;\r
             snd_seq_ev_clear (&event);\r
 \r
-            long numBytes = (long) message.getRawDataSize();\r
+            auto numBytes = (long) message.getRawDataSize();\r
             const uint8* data = message.getRawData();\r
 \r
-            snd_seq_t* seqHandle = client.get();\r
+            auto* seqHandle = client.get();\r
             bool success = true;\r
 \r
             while (numBytes > 0)\r
             {\r
-                const long numSent = snd_midi_event_encode (midiParser, data, numBytes, &event);\r
+                auto numSent = snd_midi_event_encode (midiParser, data, numBytes, &event);\r
 \r
                 if (numSent <= 0)\r
                 {\r
@@ -161,22 +152,9 @@ public:
             return portId != -1 && portId == lhs.portId;\r
         }\r
 \r
-        int portId;\r
-        bool callbackEnabled;\r
-\r
-    private:\r
-        friend class AlsaClient;\r
-\r
-        AlsaClient& client;\r
-        bool isInput;\r
-        MidiInputCallback* callback;\r
-        snd_midi_event_t* midiParser;\r
-        int maxEventSize;\r
-        MidiInput* midiInput;\r
-\r
         void createPort (const String& name, bool enableSubscription)\r
         {\r
-            if (snd_seq_t* seqHandle = client.get())\r
+            if (auto* seqHandle = client.get())\r
             {\r
                 const unsigned int caps =\r
                     isInput\r
@@ -197,6 +175,15 @@ public:
         {\r
             callback->handlePartialSysexMessage (midiInput, messageData, numBytesSoFar, timeStamp);\r
         }\r
+\r
+        AlsaClient& client;\r
+        MidiInputCallback* callback = nullptr;\r
+        snd_midi_event_t* midiParser = nullptr;\r
+        MidiInput* midiInput = nullptr;\r
+        int maxEventSize = 4096;\r
+        int portId = -1;\r
+        bool callbackEnabled = false;\r
+        bool isInput = false;\r
     };\r
 \r
     static Ptr getInstance()\r
@@ -210,23 +197,23 @@ public:
     void registerCallback()\r
     {\r
         if (inputThread == nullptr)\r
-            inputThread = new MidiInputThread (*this);\r
+            inputThread.reset (new MidiInputThread (*this));\r
 \r
-        if (++activeCallbacks - 1 == 0)\r
+        if (++activeCallbacks == 1)\r
             inputThread->startThread();\r
     }\r
 \r
     void unregisterCallback()\r
     {\r
         jassert (activeCallbacks.get() > 0);\r
+\r
         if (--activeCallbacks == 0 && inputThread->isThreadRunning())\r
             inputThread->signalThreadShouldExit();\r
     }\r
 \r
     void handleIncomingMidiMessage (snd_seq_event* event, const MidiMessage& message)\r
     {\r
-        if (event->dest.port < ports.size()\r
-            && ports[event->dest.port]->callbackEnabled)\r
+        if (event->dest.port < ports.size() && ports[event->dest.port]->callbackEnabled)\r
             ports[event->dest.port]->handleIncomingMidiMessage (message);\r
     }\r
 \r
@@ -242,7 +229,7 @@ public:
 \r
     Port* createPort (const String& name, bool forInput, bool enableSubscription)\r
     {\r
-        Port* port = new Port (*this, forInput);\r
+        auto port = new Port (*this, forInput);\r
         port->createPort (name, enableSubscription);\r
         ports.set (port->portId, port);\r
         incReferenceCount();\r
@@ -256,8 +243,8 @@ public:
     }\r
 \r
 private:\r
-    snd_seq_t* handle;\r
-    int clientId;\r
+    snd_seq_t* handle = nullptr;\r
+    int clientId = 0;\r
     OwnedArray<Port> ports;\r
     Atomic<int> activeCallbacks;\r
     CriticalSection callbackLock;\r
@@ -269,8 +256,6 @@ private:
     friend struct ContainerDeletePolicy<AlsaClient>;\r
 \r
     AlsaClient()\r
-        : handle (nullptr),\r
-          inputThread (nullptr)\r
     {\r
         jassert (instance == nullptr);\r
 \r
@@ -303,7 +288,7 @@ private:
     {\r
     public:\r
         MidiInputThread (AlsaClient& c)\r
-            : Thread ("JUCE MIDI Input"), client (c), concatenator (2048)\r
+            : Thread ("JUCE MIDI Input"), client (c)\r
         {\r
             jassert (client.get() != nullptr);\r
         }\r
@@ -358,10 +343,10 @@ private:
 \r
     private:\r
         AlsaClient& client;\r
-        MidiDataConcatenator concatenator;\r
+        MidiDataConcatenator concatenator { 2048 };\r
     };\r
 \r
-    ScopedPointer<MidiInputThread> inputThread;\r
+    std::unique_ptr<MidiInputThread> inputThread;\r
 };\r
 \r
 AlsaClient* AlsaClient::instance = nullptr;\r
@@ -369,9 +354,9 @@ AlsaClient* AlsaClient::instance = nullptr;
 //==============================================================================\r
 static AlsaClient::Port* iterateMidiClient (const AlsaClient::Ptr& client,\r
                                             snd_seq_client_info_t* clientInfo,\r
-                                            const bool forInput,\r
+                                            bool forInput,\r
                                             StringArray& deviceNamesFound,\r
-                                            const int deviceIndexToOpen)\r
+                                            int deviceIndexToOpen)\r
 {\r
     AlsaClient::Port* port = nullptr;\r
 \r
@@ -380,8 +365,8 @@ static AlsaClient::Port* iterateMidiClient (const AlsaClient::Ptr& client,
 \r
     snd_seq_port_info_alloca (&portInfo);\r
     jassert (portInfo);\r
-    int numPorts = snd_seq_client_info_get_num_ports (clientInfo);\r
-    const int sourceClient = snd_seq_client_info_get_client (clientInfo);\r
+    auto numPorts = snd_seq_client_info_get_num_ports (clientInfo);\r
+    auto sourceClient = snd_seq_client_info_get_client (clientInfo);\r
 \r
     snd_seq_port_info_set_client (portInfo, sourceClient);\r
     snd_seq_port_info_set_port (portInfo, -1);\r
@@ -392,13 +377,14 @@ static AlsaClient::Port* iterateMidiClient (const AlsaClient::Ptr& client,
             && (snd_seq_port_info_get_capability (portInfo)\r
                 & (forInput ? SND_SEQ_PORT_CAP_SUBS_READ : SND_SEQ_PORT_CAP_SUBS_WRITE)) != 0)\r
         {\r
-            const String portName = snd_seq_port_info_get_name(portInfo);\r
+            String portName = snd_seq_port_info_get_name(portInfo);\r
 \r
             deviceNamesFound.add (portName);\r
 \r
             if (deviceNamesFound.size() == deviceIndexToOpen + 1)\r
             {\r
-                const int sourcePort = snd_seq_port_info_get_port (portInfo);\r
+                auto sourcePort = snd_seq_port_info_get_port (portInfo);\r
+\r
                 if (sourcePort != -1)\r
                 {\r
                     port = client->createPort (portName, forInput, false);\r
@@ -413,37 +399,39 @@ static AlsaClient::Port* iterateMidiClient (const AlsaClient::Ptr& client,
     return port;\r
 }\r
 \r
-static AlsaClient::Port* iterateMidiDevices (const bool forInput,\r
+static AlsaClient::Port* iterateMidiDevices (bool forInput,\r
                                              StringArray& deviceNamesFound,\r
-                                             const int deviceIndexToOpen)\r
+                                             int deviceIndexToOpen)\r
 {\r
     AlsaClient::Port* port = nullptr;\r
-    const AlsaClient::Ptr client (AlsaClient::getInstance());\r
+    auto client = AlsaClient::getInstance();\r
 \r
-    if (snd_seq_t* const seqHandle = client->get())\r
+    if (auto* seqHandle = client->get())\r
     {\r
         snd_seq_system_info_t* systemInfo = nullptr;\r
         snd_seq_client_info_t* clientInfo = nullptr;\r
 \r
         snd_seq_system_info_alloca (&systemInfo);\r
-        jassert(systemInfo);\r
+        jassert (systemInfo != nullptr);\r
+\r
         if (snd_seq_system_info (seqHandle, systemInfo) == 0)\r
         {\r
             snd_seq_client_info_alloca (&clientInfo);\r
-            jassert(clientInfo);\r
-            int numClients = snd_seq_system_info_get_cur_clients (systemInfo);\r
+            jassert (clientInfo != nullptr);\r
+\r
+            auto numClients = snd_seq_system_info_get_cur_clients (systemInfo);\r
 \r
             while (--numClients >= 0)\r
             {\r
                 if (snd_seq_query_next_client (seqHandle, clientInfo) == 0)\r
                 {\r
-                    const int sourceClient = snd_seq_client_info_get_client (clientInfo);\r
-                    if (sourceClient != client->getId()\r
-                        && sourceClient != SND_SEQ_CLIENT_SYSTEM)\r
+                    auto sourceClient = snd_seq_client_info_get_client (clientInfo);\r
+\r
+                    if (sourceClient != client->getId() && sourceClient != SND_SEQ_CLIENT_SYSTEM)\r
                     {\r
                         port = iterateMidiClient (client, clientInfo, forInput,\r
                                                   deviceNamesFound, deviceIndexToOpen);\r
-                        if (port)\r
+                        if (port != nullptr)\r
                             break;\r
                     }\r
                 }\r
@@ -475,7 +463,7 @@ MidiOutput* MidiOutput::openDevice (int deviceIndex)
     MidiOutput* newDevice = nullptr;\r
 \r
     StringArray devices;\r
-    AlsaClient::Port* port = iterateMidiDevices (false, devices, deviceIndex);\r
+    auto* port = iterateMidiDevices (false, devices, deviceIndex);\r
 \r
     if (port == nullptr)\r
         return nullptr;\r
@@ -492,12 +480,9 @@ MidiOutput* MidiOutput::openDevice (int deviceIndex)
 MidiOutput* MidiOutput::createNewDevice (const String& deviceName)\r
 {\r
     MidiOutput* newDevice = nullptr;\r
-\r
-    const AlsaClient::Ptr client (AlsaClient::getInstance());\r
-\r
-    AlsaClient::Port* port = client->createPort (deviceName, false, true);\r
-\r
-    jassert (port->isValid());\r
+    auto client = AlsaClient::getInstance();\r
+    auto* port = client->createPort (deviceName, false, true);\r
+    jassert (port != nullptr && port->isValid());\r
 \r
     newDevice = new MidiOutput (deviceName);\r
     port->setupOutput();\r
@@ -509,9 +494,7 @@ MidiOutput* MidiOutput::createNewDevice (const String& deviceName)
 MidiOutput::~MidiOutput()\r
 {\r
     stopBackgroundThread();\r
-\r
-    AlsaClient::Ptr client (AlsaClient::getInstance());\r
-    client->deletePort (static_cast<AlsaClient::Port*> (internal));\r
+    AlsaClient::getInstance()->deletePort (static_cast<AlsaClient::Port*> (internal));\r
 }\r
 \r
 void MidiOutput::sendMessageNow (const MidiMessage& message)\r
@@ -528,8 +511,7 @@ MidiInput::MidiInput (const String& nm)
 MidiInput::~MidiInput()\r
 {\r
     stop();\r
-    AlsaClient::Ptr client (AlsaClient::getInstance());\r
-    client->deletePort (static_cast<AlsaClient::Port*> (internal));\r
+    AlsaClient::getInstance()->deletePort (static_cast<AlsaClient::Port*> (internal));\r
 }\r
 \r
 void MidiInput::start()\r
@@ -559,7 +541,7 @@ MidiInput* MidiInput::openDevice (int deviceIndex, MidiInputCallback* callback)
     MidiInput* newDevice = nullptr;\r
 \r
     StringArray devices;\r
-    AlsaClient::Port* port = iterateMidiDevices (true, devices, deviceIndex);\r
+    auto* port = iterateMidiDevices (true, devices, deviceIndex);\r
 \r
     if (port == nullptr)\r
         return nullptr;\r
@@ -577,9 +559,8 @@ MidiInput* MidiInput::createNewDevice (const String& deviceName, MidiInputCallba
 {\r
     MidiInput* newDevice = nullptr;\r
 \r
-    AlsaClient::Ptr client (AlsaClient::getInstance());\r
-\r
-    AlsaClient::Port* port = client->createPort (deviceName, true, true);\r
+    auto client = AlsaClient::getInstance();\r
+    auto* port = client->createPort (deviceName, true, true);\r
 \r
     jassert (port->isValid());\r
 \r
index acb6d13c8693231684668694f9e29dcb441d5a02..e08b170b901d29bd96be77e44674d0f04b6f2c90 100644 (file)
@@ -1145,7 +1145,7 @@ public:
     int inputIndex, outputIndex;\r
 \r
 private:\r
-    ScopedPointer<CoreAudioInternal> internal;\r
+    std::unique_ptr<CoreAudioInternal> internal;\r
     bool isOpen_, isStarted;\r
     String lastError;\r
     AudioIODeviceCallback* previousCallback = nullptr;\r
@@ -1972,7 +1972,7 @@ private:
         void audioDeviceError (const String& errorMessage) override   { owner.handleAudioDeviceError (errorMessage); }\r
 \r
         AudioIODeviceCombiner& owner;\r
-        ScopedPointer<CoreAudioIODevice> device;\r
+        std::unique_ptr<CoreAudioIODevice> device;\r
         int inputIndex = 0, numInputChans = 0, outputIndex = 0, numOutputChans = 0;\r
         bool useInputs = false, useOutputs = false;\r
         AbstractFifo inputFifo { 32 }, outputFifo { 32 };\r
@@ -2157,7 +2157,7 @@ public:
         if (inputDeviceID == outputDeviceID)\r
             return new CoreAudioIODevice (*this, combinedName, inputDeviceID, inputIndex, outputDeviceID, outputIndex);\r
 \r
-        ScopedPointer<CoreAudioIODevice> in, out;\r
+        std::unique_ptr<CoreAudioIODevice> in, out;\r
 \r
         if (inputDeviceID != 0)\r
             in.reset (new CoreAudioIODevice (*this, inputDeviceName, inputDeviceID, inputIndex, 0, -1));\r
@@ -2168,7 +2168,7 @@ public:
         if (in == nullptr)   return out.release();\r
         if (out == nullptr)  return in.release();\r
 \r
-        ScopedPointer<AudioIODeviceCombiner> combo (new AudioIODeviceCombiner (combinedName, *this));\r
+        std::unique_ptr<AudioIODeviceCombiner> combo (new AudioIODeviceCombiner (combinedName, *this));\r
         combo->addDevice (in.release(),  true, false);\r
         combo->addDevice (out.release(), false, true);\r
         return combo.release();\r
index a0c7ea7fe661b6b1ac733ac1c7bec30afeff020d..f285b0c2a6ae881bea18c409c7c97374eae553f2 100644 (file)
@@ -29,7 +29,7 @@ namespace juce
 \r
 namespace CoreMidiHelpers\r
 {\r
-    static bool checkError (const OSStatus err, const int lineNum)\r
+    static bool checkError (OSStatus err, int lineNum)\r
     {\r
         if (err == noErr)\r
             return true;\r
@@ -48,10 +48,10 @@ namespace CoreMidiHelpers
     //==============================================================================\r
     struct ScopedCFString\r
     {\r
-        ScopedCFString() noexcept : cfString (nullptr) {}\r
+        ScopedCFString() noexcept {}\r
         ~ScopedCFString() noexcept  { if (cfString != nullptr) CFRelease (cfString); }\r
 \r
-        CFStringRef cfString;\r
+        CFStringRef cfString = {};\r
     };\r
 \r
     static String getMidiObjectName (MIDIObjectRef entity)\r
@@ -87,7 +87,7 @@ namespace CoreMidiHelpers
 \r
     static String getEndpointName (MIDIEndpointRef endpoint, bool isExternal)\r
     {\r
-        String result (getMidiObjectName (endpoint));\r
+        auto result = getMidiObjectName (endpoint);\r
 \r
         MIDIEntityRef entity = 0;  // NB: don't attempt to use nullptr for refs - it fails in some types of build.\r
         MIDIEndpointGetEntity (endpoint, &entity);\r
@@ -104,7 +104,7 @@ namespace CoreMidiHelpers
 \r
         if (device != 0)\r
         {\r
-            const String deviceName (getMidiObjectName (device));\r
+            auto deviceName = getMidiObjectName (device);\r
 \r
             if (deviceName.isNotEmpty())\r
             {\r
@@ -141,14 +141,14 @@ namespace CoreMidiHelpers
 \r
             if (numConnections > 0)\r
             {\r
-                const SInt32* pid = reinterpret_cast<const SInt32*> (CFDataGetBytePtr (connections));\r
+                auto pid = reinterpret_cast<const SInt32*> (CFDataGetBytePtr (connections));\r
 \r
                 for (int i = 0; i < numConnections; ++i, ++pid)\r
                 {\r
-                    MIDIUniqueID uid = (MIDIUniqueID) ByteOrder::swapIfLittleEndian ((uint32) *pid);\r
+                    auto uid = (MIDIUniqueID) ByteOrder::swapIfLittleEndian ((uint32) *pid);\r
                     MIDIObjectRef connObject;\r
                     MIDIObjectType connObjectType;\r
-                    OSStatus err = MIDIObjectFindByUniqueID (uid, &connObject, &connObjectType);\r
+                    auto err = MIDIObjectFindByUniqueID (uid, &connObject, &connObjectType);\r
 \r
                     if (err == noErr)\r
                     {\r
@@ -192,11 +192,12 @@ namespace CoreMidiHelpers
        #if defined (JucePlugin_CFBundleIdentifier)\r
         portUniqueId = JUCE_STRINGIFY (JucePlugin_CFBundleIdentifier);\r
        #else\r
-        File appBundle (File::getSpecialLocation (File::currentApplicationFile));\r
-        CFURLRef bundleURL = CFURLCreateWithFileSystemPath (kCFAllocatorDefault, appBundle.getFullPathName().toCFString(), kCFURLPOSIXPathStyle, true);\r
-        if (bundleURL != nullptr)\r
+        auto appBundle = File::getSpecialLocation (File::currentApplicationFile);\r
+\r
+        if (auto bundleURL = CFURLCreateWithFileSystemPath (kCFAllocatorDefault, appBundle.getFullPathName().toCFString(),\r
+                                                            kCFURLPOSIXPathStyle, true))\r
         {\r
-            CFBundleRef bundleRef = CFBundleCreate (kCFAllocatorDefault, bundleURL);\r
+            auto bundleRef = CFBundleCreate (kCFAllocatorDefault, bundleURL);\r
             CFRelease (bundleURL);\r
 \r
             if (bundleRef != nullptr)\r
@@ -211,31 +212,30 @@ namespace CoreMidiHelpers
 \r
         if (portUniqueId.isNotEmpty())\r
         {\r
-            portUniqueId += (String ("." + portName + String (isInput ? ".input" : ".output")));\r
+            portUniqueId += "." + portName + (isInput ? ".input" : ".output");\r
 \r
             CHECK_ERROR (MIDIObjectSetStringProperty (device, kMIDIPropertyUniqueID, portUniqueId.toCFString()));\r
         }\r
     }\r
 \r
-    static StringArray findDevices (const bool forInput)\r
+    static StringArray findDevices (bool forInput)\r
     {\r
         // It seems that OSX can be a bit picky about the thread that's first used to\r
         // search for devices. It's safest to use the message thread for calling this.\r
         jassert (MessageManager::getInstance()->isThisTheMessageThread());\r
 \r
+        StringArray s;\r
         enableSimulatorMidiSession();\r
 \r
-        const ItemCount num = forInput ? MIDIGetNumberOfSources()\r
-                                       : MIDIGetNumberOfDestinations();\r
-        StringArray s;\r
+        auto num = forInput ? MIDIGetNumberOfSources()\r
+                            : MIDIGetNumberOfDestinations();\r
 \r
         for (ItemCount i = 0; i < num; ++i)\r
         {\r
-            MIDIEndpointRef dest = forInput ? MIDIGetSource (i)\r
-                                            : MIDIGetDestination (i);\r
             String name;\r
 \r
-            if (dest != 0)\r
+            if (auto dest = forInput ? MIDIGetSource (i)\r
+                                     : MIDIGetDestination (i))\r
                 name = getConnectedEndpointName (dest);\r
 \r
             if (name.isEmpty())\r
@@ -298,7 +298,7 @@ namespace CoreMidiHelpers
                 MIDIEndpointDispose (endPoint);\r
         }\r
 \r
-        void send (const MIDIPacketList* const packets) noexcept\r
+        void send (const MIDIPacketList* packets) noexcept\r
         {\r
             if (port != 0)\r
                 MIDISend (port, endPoint, packets);\r
@@ -311,16 +311,13 @@ namespace CoreMidiHelpers
     };\r
 \r
     //==============================================================================\r
-    class MidiPortAndCallback;\r
+    struct MidiPortAndCallback;\r
     CriticalSection callbackLock;\r
     Array<MidiPortAndCallback*> activeCallbacks;\r
 \r
-    class MidiPortAndCallback\r
+    struct MidiPortAndCallback\r
     {\r
-    public:\r
-        MidiPortAndCallback (MidiInputCallback& cb)  : callback (cb)\r
-        {\r
-        }\r
+        MidiPortAndCallback (MidiInputCallback& cb)  : callback (cb) {}\r
 \r
         ~MidiPortAndCallback()\r
         {\r
@@ -335,7 +332,7 @@ namespace CoreMidiHelpers
                 CHECK_ERROR (MIDIPortDisconnectSource (portAndEndpoint->port, portAndEndpoint->endPoint));\r
         }\r
 \r
-        void handlePackets (const MIDIPacketList* const pktlist)\r
+        void handlePackets (const MIDIPacketList* pktlist)\r
         {\r
             auto time = Time::getMillisecondCounterHiRes() * 0.001;\r
 \r
@@ -356,8 +353,8 @@ namespace CoreMidiHelpers
         }\r
 \r
         MidiInput* input = nullptr;\r
-        ScopedPointer<MidiPortAndEndpoint> portAndEndpoint;\r
-        volatile bool active = false;\r
+        std::unique_ptr<MidiPortAndEndpoint> portAndEndpoint;\r
+        std::atomic<bool> active { false };\r
 \r
     private:\r
         MidiInputCallback& callback;\r
@@ -380,15 +377,15 @@ MidiOutput* MidiOutput::openDevice (int index)
 \r
     if (isPositiveAndBelow (index, MIDIGetNumberOfDestinations()))\r
     {\r
-        MIDIEndpointRef endPoint = MIDIGetDestination ((ItemCount) index);\r
+        auto endPoint = MIDIGetDestination ((ItemCount) index);\r
 \r
         CoreMidiHelpers::ScopedCFString pname;\r
 \r
         if (CHECK_ERROR (MIDIObjectGetStringProperty (endPoint, kMIDIPropertyName, &pname.cfString)))\r
         {\r
-            MIDIClientRef client = CoreMidiHelpers::getGlobalMidiClient();\r
+            auto client = CoreMidiHelpers::getGlobalMidiClient();\r
             MIDIPortRef port;\r
-            String deviceName = CoreMidiHelpers::getConnectedEndpointName (endPoint);\r
+            auto deviceName = CoreMidiHelpers::getConnectedEndpointName (endPoint);\r
 \r
             if (client != 0 && CHECK_ERROR (MIDIOutputPortCreate (client, pname.cfString, &port)))\r
             {\r
@@ -413,7 +410,7 @@ MidiOutput* MidiOutput::createNewDevice (const String& deviceName)
     {\r
         CoreMidiHelpers::setUniqueIdForMidiPort (endPoint, deviceName, false);\r
 \r
-        MidiOutput* mo = new MidiOutput (deviceName);\r
+        auto mo = new MidiOutput (deviceName);\r
         mo->internal = new CoreMidiHelpers::MidiPortAndEndpoint (0, endPoint);\r
         return mo;\r
     }\r
@@ -438,8 +435,8 @@ void MidiOutput::sendMessageNow (const MidiMessage& message)
 \r
     HeapBlock<MIDIPacketList> allocatedPackets;\r
     MIDIPacketList stackPacket;\r
-    MIDIPacketList* packetToSend = &stackPacket;\r
-    const size_t dataSize = (size_t) message.getRawDataSize();\r
+    auto* packetToSend = &stackPacket;\r
+    auto dataSize = (size_t) message.getRawDataSize();\r
 \r
     if (message.isSysEx())\r
     {\r
@@ -450,7 +447,7 @@ void MidiOutput::sendMessageNow (const MidiMessage& message)
         packetToSend = allocatedPackets;\r
         packetToSend->numPackets = (UInt32) numPackets;\r
 \r
-        MIDIPacket* p = packetToSend->packet;\r
+        auto* p = packetToSend->packet;\r
 \r
         for (int i = 0; i < numPackets; ++i)\r
         {\r
@@ -464,7 +461,7 @@ void MidiOutput::sendMessageNow (const MidiMessage& message)
     }\r
     else if (dataSize < 65536) // max packet size\r
     {\r
-        const size_t stackCapacity = sizeof (stackPacket.packet->data);\r
+        auto stackCapacity = sizeof (stackPacket.packet->data);\r
 \r
         if (dataSize > stackCapacity)\r
         {\r
@@ -473,7 +470,7 @@ void MidiOutput::sendMessageNow (const MidiMessage& message)
         }\r
 \r
         packetToSend->numPackets = 1;\r
-        MIDIPacket& p = *(packetToSend->packet);\r
+        auto& p = *(packetToSend->packet);\r
         p.timeStamp = timeStamp;\r
         p.length = (UInt16) dataSize;\r
         memcpy (p.data, message.getRawData(), dataSize);\r
@@ -500,16 +497,16 @@ MidiInput* MidiInput::openDevice (int index, MidiInputCallback* callback)
 \r
     if (isPositiveAndBelow (index, MIDIGetNumberOfSources()))\r
     {\r
-        if (MIDIEndpointRef endPoint = MIDIGetSource ((ItemCount) index))\r
+        if (auto endPoint = MIDIGetSource ((ItemCount) index))\r
         {\r
             ScopedCFString name;\r
 \r
             if (CHECK_ERROR (MIDIObjectGetStringProperty (endPoint, kMIDIPropertyName, &name.cfString)))\r
             {\r
-                if (MIDIClientRef client = getGlobalMidiClient())\r
+                if (auto client = getGlobalMidiClient())\r
                 {\r
                     MIDIPortRef port;\r
-                    ScopedPointer<MidiPortAndCallback> mpc (new MidiPortAndCallback (*callback));\r
+                    std::unique_ptr<MidiPortAndCallback> mpc (new MidiPortAndCallback (*callback));\r
 \r
                     if (CHECK_ERROR (MIDIInputPortCreate (client, name.cfString, midiInputProc, mpc.get(), &port)))\r
                     {\r
@@ -540,13 +537,11 @@ MidiInput* MidiInput::openDevice (int index, MidiInputCallback* callback)
 MidiInput* MidiInput::createNewDevice (const String& deviceName, MidiInputCallback* callback)\r
 {\r
     jassert (callback != nullptr);\r
-\r
     using namespace CoreMidiHelpers;\r
-    MidiInput* mi = nullptr;\r
 \r
-    if (MIDIClientRef client = getGlobalMidiClient())\r
+    if (auto client = getGlobalMidiClient())\r
     {\r
-        ScopedPointer<MidiPortAndCallback> mpc (new MidiPortAndCallback (*callback));\r
+        std::unique_ptr<MidiPortAndCallback> mpc (new MidiPortAndCallback (*callback));\r
         mpc->active = false;\r
 \r
         MIDIEndpointRef endPoint;\r
@@ -555,20 +550,22 @@ MidiInput* MidiInput::createNewDevice (const String& deviceName, MidiInputCallba
 \r
         if (CHECK_ERROR (MIDIDestinationCreate (client, name.cfString, midiInputProc, mpc.get(), &endPoint)))\r
         {\r
-            CoreMidiHelpers::setUniqueIdForMidiPort (endPoint, deviceName, true);\r
+            setUniqueIdForMidiPort (endPoint, deviceName, true);\r
 \r
             mpc->portAndEndpoint.reset (new MidiPortAndEndpoint (0, endPoint));\r
 \r
-            mi = new MidiInput (deviceName);\r
+            auto mi = new MidiInput (deviceName);\r
             mpc->input = mi;\r
             mi->internal = mpc.get();\r
 \r
             const ScopedLock sl (callbackLock);\r
             activeCallbacks.add (mpc.release());\r
+\r
+            return mi;\r
         }\r
     }\r
 \r
-    return mi;\r
+    return nullptr;\r
 }\r
 \r
 MidiInput::MidiInput (const String& nm)  : name (nm)\r
index b110de6fc48b9b9fe46fd2bd106ff45fa8d0e7f6..35c357d0dc86ef39e6c33024b6d3febb8084db79 100644 (file)
@@ -77,11 +77,7 @@ struct ASIOSampleFormat
 {\r
     ASIOSampleFormat() noexcept {}\r
 \r
-    ASIOSampleFormat (const long type) noexcept\r
-        : bitDepth (24),\r
-          littleEndian (true),\r
-          formatIsFloat (false),\r
-          byteStride (4)\r
+    ASIOSampleFormat (long type) noexcept\r
     {\r
         switch (type)\r
         {\r
@@ -114,7 +110,7 @@ struct ASIOSampleFormat
         }\r
     }\r
 \r
-    void convertToFloat (const void* const src, float* const dst, const int samps) const noexcept\r
+    void convertToFloat (const void* src, float* dst, int samps) const noexcept\r
     {\r
         if (formatIsFloat)\r
         {\r
@@ -132,7 +128,7 @@ struct ASIOSampleFormat
         }\r
     }\r
 \r
-    void convertFromFloat (const float* const src, void* const dst, const int samps) const noexcept\r
+    void convertFromFloat (const float* src, void* dst, int samps) const noexcept\r
     {\r
         if (formatIsFloat)\r
         {\r
@@ -150,18 +146,18 @@ struct ASIOSampleFormat
         }\r
     }\r
 \r
-    void clear (void* dst, const int numSamps) noexcept\r
+    void clear (void* dst, int numSamps) noexcept\r
     {\r
         if (dst != nullptr)\r
             zeromem (dst, numSamps * byteStride);\r
     }\r
 \r
-    int bitDepth, byteStride;\r
-    bool formatIsFloat, littleEndian;\r
+    int bitDepth = 24, byteStride = 4;\r
+    bool formatIsFloat = false, littleEndian = true;\r
 \r
 private:\r
-    static void convertInt16ToFloat (const char* src, float* dest, const int srcStrideBytes,\r
-                                     int numSamples, const bool littleEndian) noexcept\r
+    static void convertInt16ToFloat (const char* src, float* dest, int srcStrideBytes,\r
+                                     int numSamples, bool littleEndian) noexcept\r
     {\r
         const double g = 1.0 / 32768.0;\r
 \r
@@ -183,8 +179,8 @@ private:
         }\r
     }\r
 \r
-    static void convertFloatToInt16 (const float* src, char* dest, const int dstStrideBytes,\r
-                                     int numSamples, const bool littleEndian) noexcept\r
+    static void convertFloatToInt16 (const float* src, char* dest, int dstStrideBytes,\r
+                                     int numSamples, bool littleEndian) noexcept\r
     {\r
         const double maxVal = (double) 0x7fff;\r
 \r
@@ -206,8 +202,8 @@ private:
         }\r
     }\r
 \r
-    static void convertInt24ToFloat (const char* src, float* dest, const int srcStrideBytes,\r
-                                     int numSamples, const bool littleEndian) noexcept\r
+    static void convertInt24ToFloat (const char* src, float* dest, int srcStrideBytes,\r
+                                     int numSamples, bool littleEndian) noexcept\r
     {\r
         const double g = 1.0 / 0x7fffff;\r
 \r
@@ -229,8 +225,8 @@ private:
         }\r
     }\r
 \r
-    static void convertFloatToInt24 (const float* src, char* dest, const int dstStrideBytes,\r
-                                     int numSamples, const bool littleEndian) noexcept\r
+    static void convertFloatToInt24 (const float* src, char* dest, int dstStrideBytes,\r
+                                     int numSamples, bool littleEndian) noexcept\r
     {\r
         const double maxVal = (double) 0x7fffff;\r
 \r
@@ -252,8 +248,8 @@ private:
         }\r
     }\r
 \r
-    static void convertInt32ToFloat (const char* src, float* dest, const int srcStrideBytes,\r
-                                     int numSamples, const bool littleEndian) noexcept\r
+    static void convertInt32ToFloat (const char* src, float* dest, int srcStrideBytes,\r
+                                     int numSamples, bool littleEndian) noexcept\r
     {\r
         const double g = 1.0 / 0x7fffffff;\r
 \r
@@ -275,8 +271,8 @@ private:
         }\r
     }\r
 \r
-    static void convertFloatToInt32 (const float* src, char* dest, const int dstStrideBytes,\r
-                                     int numSamples, const bool littleEndian) noexcept\r
+    static void convertFloatToInt32 (const float* src, char* dest, int dstStrideBytes,\r
+                                     int numSamples, bool littleEndian) noexcept\r
     {\r
         const double maxVal = (double) 0x7fffffff;\r
 \r
@@ -300,8 +296,9 @@ private:
 };\r
 \r
 //==============================================================================\r
+constexpr int maxNumASIODevices = 16;\r
 class ASIOAudioIODevice;\r
-static ASIOAudioIODevice* volatile currentASIODev[16] = { 0 };\r
+static ASIOAudioIODevice* currentASIODev[maxNumASIODevices] = {};\r
 \r
 extern HWND juce_messageWindowHandle;\r
 \r
@@ -314,33 +311,10 @@ class ASIOAudioIODevice  : public AudioIODevice,
 {\r
 public:\r
     ASIOAudioIODevice (ASIOAudioIODeviceType* ownerType, const String& devName,\r
-                       const CLSID clsID, const int slotNumber)\r
+                       CLSID clsID, int slotNumber)\r
        : AudioIODevice (devName, "ASIO"),\r
          owner (ownerType),\r
-         asioObject (nullptr),\r
-         classId (clsID),\r
-         inputLatency (0),\r
-         outputLatency (0),\r
-         minBufferSize (0), maxBufferSize (0),\r
-         preferredBufferSize (0),\r
-         bufferGranularity (0),\r
-         numClockSources (0),\r
-         currentBlockSizeSamples (0),\r
-         currentBitDepth (16),\r
-         currentSampleRate (0),\r
-         currentCallback (nullptr),\r
-         bufferIndex (0),\r
-         numActiveInputChans (0),\r
-         numActiveOutputChans (0),\r
-         deviceIsOpen (false),\r
-         isStarted (false),\r
-         buffersCreated (false),\r
-         calledback (false),\r
-         littleEndian (false),\r
-         postOutput (true),\r
-         needToReset (false),\r
-         insideControlPanelModalLoop (false),\r
-         shouldUsePreferredSize (false)\r
+         classId (clsID)\r
     {\r
         ::CoInitialize (nullptr);\r
 \r
@@ -348,15 +322,15 @@ public:
         inBuffers.calloc (4);\r
         outBuffers.calloc (4);\r
 \r
-        jassert (currentASIODev [slotNumber] == nullptr);\r
-        currentASIODev [slotNumber] = this;\r
+        jassert (currentASIODev[slotNumber] == nullptr);\r
+        currentASIODev[slotNumber] = this;\r
 \r
         openDevice();\r
     }\r
 \r
     ~ASIOAudioIODevice()\r
     {\r
-        for (int i = 0; i < numElementsInArray (currentASIODev); ++i)\r
+        for (int i = 0; i < maxNumASIODevices; ++i)\r
             if (currentASIODev[i] == this)\r
                 currentASIODev[i] = nullptr;\r
 \r
@@ -381,7 +355,7 @@ public:
 \r
         if (newRates.isEmpty())\r
         {\r
-            double cr = getSampleRate();\r
+            auto cr = getSampleRate();\r
             JUCE_ASIO_LOG ("No sample rates supported - current rate: " + String ((int) cr));\r
 \r
             if (cr > 0)\r
@@ -394,8 +368,9 @@ public:
 \r
            #if JUCE_ASIO_DEBUGGING\r
             StringArray s;\r
-            for (int i = 0; i < sampleRates.size(); ++i)\r
-                s.add (String (sampleRates.getUnchecked(i)));\r
+\r
+            for (auto r : sampleRates)\r
+                s.add (String (r));\r
 \r
             JUCE_ASIO_LOG ("Rates: " + s.joinIntoString (" "));\r
            #endif\r
@@ -425,21 +400,20 @@ public:
 \r
         if (asioObject == nullptr)\r
         {\r
-            const String openingError (openDevice());\r
+            auto openingError = openDevice();\r
 \r
             if (asioObject == nullptr)\r
                 return openingError;\r
         }\r
 \r
         isStarted = false;\r
-        bufferIndex = -1;\r
 \r
-        long err = asioObject->getChannels (&totalNumInputChans, &totalNumOutputChans);\r
+        auto err = asioObject->getChannels (&totalNumInputChans, &totalNumOutputChans);\r
         jassert (err == ASE_OK);\r
 \r
         bufferSizeSamples = readBufferSizes (bufferSizeSamples);\r
 \r
-        double sampleRate = sr;\r
+        auto sampleRate = sr;\r
         currentSampleRate = sampleRate;\r
         currentBlockSizeSamples = bufferSizeSamples;\r
         currentChansOut.clear();\r
@@ -450,9 +424,11 @@ public:
         if (sampleRate == 0 || (sampleRates.size() > 0 && ! sampleRates.contains (sampleRate)))\r
             sampleRate = sampleRates[0];\r
 \r
-        jassert (sampleRate != 0);\r
         if (sampleRate == 0)\r
+        {\r
+            jassertfalse;\r
             sampleRate = 44100.0;\r
+        }\r
 \r
         updateClockSources();\r
         currentSampleRate = getSampleRate();\r
@@ -486,7 +462,7 @@ public:
             needToReset = false;\r
         }\r
 \r
-        const int totalBuffers = resetBuffers (inputChannels, outputChannels);\r
+        auto totalBuffers = resetBuffers (inputChannels, outputChannels);\r
 \r
         setCallbackFunctions();\r
 \r
@@ -508,7 +484,7 @@ public:
         if (err == ASE_OK)\r
         {\r
             buffersCreated = true;\r
-            tempBuffer.calloc (totalBuffers * currentBlockSizeSamples + 32);\r
+            ioBufferSpace.calloc (totalBuffers * currentBlockSizeSamples + 32);\r
 \r
             int n = 0;\r
             Array<int> types;\r
@@ -518,7 +494,7 @@ public:
             {\r
                 if (inputChannels[i])\r
                 {\r
-                    inBuffers[n] = tempBuffer + (currentBlockSizeSamples * n);\r
+                    inBuffers[n] = ioBufferSpace + (currentBlockSizeSamples * n);\r
 \r
                     ASIOChannelInfo channelInfo = { 0 };\r
                     channelInfo.channel = i;\r
@@ -540,7 +516,7 @@ public:
             {\r
                 if (outputChannels[i])\r
                 {\r
-                    outBuffers[n] = tempBuffer + (currentBlockSizeSamples * (numActiveInputChans + n));\r
+                    outBuffers[n] = ioBufferSpace + (currentBlockSizeSamples * (numActiveInputChans + n));\r
 \r
                     ASIOChannelInfo channelInfo = { 0 };\r
                     channelInfo.channel = i;\r
@@ -564,8 +540,8 @@ public:
 \r
             for (int i = 0; i < numActiveOutputChans; ++i)\r
             {\r
-                outputFormat[i].clear (bufferInfos [numActiveInputChans + i].buffers[0], currentBlockSizeSamples);\r
-                outputFormat[i].clear (bufferInfos [numActiveInputChans + i].buffers[1], currentBlockSizeSamples);\r
+                outputFormat[i].clear (bufferInfos[numActiveInputChans + i].buffers[0], currentBlockSizeSamples);\r
+                outputFormat[i].clear (bufferInfos[numActiveInputChans + i].buffers[1], currentBlockSizeSamples);\r
             }\r
 \r
             readLatencies();\r
@@ -615,7 +591,7 @@ public:
             isStarted = false;\r
             deviceIsOpen = false;\r
 \r
-            const String errorCopy (error);\r
+            auto errorCopy = error;\r
             close(); // (this resets the error string)\r
             error = errorCopy;\r
         }\r
@@ -678,7 +654,7 @@ public:
 \r
     void stop() override\r
     {\r
-        AudioIODeviceCallback* const lastCallback = currentCallback;\r
+        auto* lastCallback = currentCallback;\r
 \r
         {\r
             const ScopedLock sl (callbackLock);\r
@@ -698,15 +674,13 @@ public:
 \r
         bool done = false;\r
         insideControlPanelModalLoop = true;\r
-\r
-        const uint32 started = Time::getMillisecondCounter();\r
+        auto started = Time::getMillisecondCounter();\r
 \r
         if (asioObject != nullptr)\r
         {\r
             asioObject->controlPanel();\r
 \r
-            const int spent = (int) Time::getMillisecondCounter() - (int) started;\r
-\r
+            auto spent = (int) (Time::getMillisecondCounter() - started);\r
             JUCE_ASIO_LOG ("spent: " + String (spent));\r
 \r
             if (spent > 300)\r
@@ -730,13 +704,10 @@ public:
         if (! insideControlPanelModalLoop)\r
         {\r
             stopTimer();\r
-\r
             JUCE_ASIO_LOG ("restart request!");\r
 \r
-            AudioIODeviceCallback* const oldCallback = currentCallback;\r
-\r
+            auto* oldCallback = currentCallback;\r
             close();\r
-\r
             needToReset = true;\r
             open (BigInteger (currentChansIn), BigInteger (currentChansOut),\r
                   currentSampleRate, currentBlockSizeSamples);\r
@@ -757,51 +728,49 @@ public:
 private:\r
     //==============================================================================\r
     WeakReference<ASIOAudioIODeviceType> owner;\r
-    IASIO* volatile asioObject;\r
+    IASIO* asioObject = {};\r
     ASIOCallbacks callbacks;\r
 \r
     CLSID classId;\r
     String error;\r
 \r
-    long totalNumInputChans, totalNumOutputChans;\r
+    long totalNumInputChans = 0, totalNumOutputChans = 0;\r
     StringArray inputChannelNames, outputChannelNames;\r
 \r
     Array<double> sampleRates;\r
     Array<int> bufferSizes;\r
-    long inputLatency, outputLatency;\r
-    long minBufferSize, maxBufferSize, preferredBufferSize, bufferGranularity;\r
-    ASIOClockSource clocks[32];\r
-    int numClockSources;\r
-\r
-    int volatile currentBlockSizeSamples;\r
-    int volatile currentBitDepth;\r
-    double volatile currentSampleRate;\r
+    long inputLatency = 0, outputLatency = 0;\r
+    long minBufferSize = 0, maxBufferSize = 0, preferredBufferSize = 0, bufferGranularity = 0;\r
+    ASIOClockSource clocks[32] = {};\r
+    int numClockSources = 0;\r
+\r
+    int currentBlockSizeSamples = 0;\r
+    int currentBitDepth = 16;\r
+    double currentSampleRate = 0;\r
     BigInteger currentChansOut, currentChansIn;\r
-    AudioIODeviceCallback* volatile currentCallback;\r
+    AudioIODeviceCallback* currentCallback = {};\r
     CriticalSection callbackLock;\r
 \r
     HeapBlock<ASIOBufferInfo> bufferInfos;\r
     HeapBlock<float*> inBuffers, outBuffers;\r
+    HeapBlock<float> ioBufferSpace;\r
     HeapBlock<ASIOSampleFormat> inputFormat, outputFormat;\r
+    int numActiveInputChans = 0, numActiveOutputChans = 0;\r
 \r
-    WaitableEvent event1;\r
-    HeapBlock<float> tempBuffer;\r
-    int volatile bufferIndex, numActiveInputChans, numActiveOutputChans;\r
-\r
-    bool deviceIsOpen, isStarted, buffersCreated;\r
-    bool volatile calledback;\r
-    bool volatile littleEndian, postOutput, needToReset;\r
-    bool volatile insideControlPanelModalLoop;\r
-    bool volatile shouldUsePreferredSize;\r
+    bool deviceIsOpen = false, isStarted = false, buffersCreated = false;\r
+    std::atomic<bool> calledback { false };\r
+    bool littleEndian = false, postOutput = true, needToReset = false;\r
+    bool insideControlPanelModalLoop = false;\r
+    bool shouldUsePreferredSize = false;\r
     int xruns = 0;\r
 \r
     //==============================================================================\r
-    static String convertASIOString (char* const text, int length)\r
+    static String convertASIOString (char* text, int length)\r
     {\r
         if (CharPointer_UTF8::isValidString (text, length))\r
             return String::fromUTF8 (text, length);\r
 \r
-        WCHAR wideVersion [64] = { 0 };\r
+        WCHAR wideVersion[64] = {};\r
         MultiByteToWideChar (CP_ACP, 0, text, length, wideVersion, numElementsInArray (wideVersion));\r
         return wideVersion;\r
     }\r
@@ -867,7 +836,7 @@ private:
         if (shouldUsePreferredSize)\r
         {\r
             JUCE_ASIO_LOG ("Using preferred size for buffer..");\r
-            long err = refreshBufferSizes();\r
+            auto err = refreshBufferSizes();\r
 \r
             if (err == ASE_OK)\r
             {\r
@@ -890,8 +859,8 @@ private:
     {\r
         numActiveInputChans = 0;\r
         numActiveOutputChans = 0;\r
+        auto* info = bufferInfos.get();\r
 \r
-        ASIOBufferInfo* info = bufferInfos;\r
         for (int i = 0; i < totalNumInputChans; ++i)\r
         {\r
             if (inputChannels[i])\r
@@ -952,7 +921,7 @@ private:
     double getSampleRate() const\r
     {\r
         double cr = 0;\r
-        long err = asioObject->getSampleRate (&cr);\r
+        auto err = asioObject->getSampleRate (&cr);\r
         JUCE_ASIO_LOG_ERROR ("getSampleRate", err);\r
         return cr;\r
     }\r
@@ -962,7 +931,7 @@ private:
         if (currentSampleRate != newRate)\r
         {\r
             JUCE_ASIO_LOG ("rate change: " + String (currentSampleRate) + " to " + String (newRate));\r
-            long err = asioObject->setSampleRate (newRate);\r
+            auto err = asioObject->setSampleRate (newRate);\r
 \r
             if (err == ASE_NoClock && numClockSources > 0)\r
             {\r
@@ -970,7 +939,6 @@ private:
                 Thread::sleep (10);\r
                 err = asioObject->setClockSource (clocks[0].index);\r
                 JUCE_ASIO_LOG_ERROR ("setClockSource2", err);\r
-\r
                 Thread::sleep (10);\r
                 err = asioObject->setSampleRate (newRate);\r
             }\r
@@ -1009,7 +977,7 @@ private:
         if (numClockSources > 1 && ! isSourceSet)\r
         {\r
             JUCE_ASIO_LOG ("setting clock source");\r
-            long err = asioObject->setClockSource (clocks[0].index);\r
+            auto err = asioObject->setClockSource (clocks[0].index);\r
             JUCE_ASIO_LOG_ERROR ("setClockSource1", err);\r
             Thread::sleep (20);\r
         }\r
@@ -1035,7 +1003,7 @@ private:
         numActiveInputChans = 0;\r
         numActiveOutputChans = 0;\r
 \r
-        ASIOBufferInfo* info = bufferInfos;\r
+        auto* info = bufferInfos.get();\r
         int numChans = 0;\r
 \r
         for (int i = 0; i < jmin (2, (int) totalNumInputChans); ++i)\r
@@ -1064,7 +1032,7 @@ private:
 \r
         if (preferredSize > 0)\r
         {\r
-            long err = asioObject->createBuffers (bufferInfos, numChans, preferredSize, &callbacks);\r
+            auto err = asioObject->createBuffers (bufferInfos, numChans, preferredSize, &callbacks);\r
             JUCE_ASIO_LOG_ERROR ("dummy buffers", err);\r
         }\r
 \r
@@ -1094,8 +1062,8 @@ private:
             if (i < 2)\r
             {\r
                 // clear the channels that are used with the dummy stuff\r
-                outputFormat[i].clear (bufferInfos [outputBufferIndex + i].buffers[0], preferredBufferSize);\r
-                outputFormat[i].clear (bufferInfos [outputBufferIndex + i].buffers[1], preferredBufferSize);\r
+                outputFormat[i].clear (bufferInfos[outputBufferIndex + i].buffers[0], preferredBufferSize);\r
+                outputFormat[i].clear (bufferInfos[outputBufferIndex + i].buffers[1], preferredBufferSize);\r
             }\r
         }\r
     }\r
@@ -1140,7 +1108,7 @@ private:
     String getLastDriverError() const\r
     {\r
         jassert (asioObject != nullptr);\r
-        char buffer [512] = { 0 };\r
+        char buffer[512] = {};\r
         asioObject->getErrorMessage (buffer);\r
         return String (buffer, sizeof (buffer) - 1);\r
     }\r
@@ -1163,7 +1131,7 @@ private:
 \r
         if (driverError.isEmpty())\r
         {\r
-            char buffer [512];\r
+            char buffer[512] = {};\r
             asioObject->getDriverName (buffer); // just in case any flimsy drivers expect this to be called..\r
         }\r
 \r
@@ -1187,7 +1155,6 @@ private:
         numActiveOutputChans = 0;\r
         xruns = 0;\r
         currentCallback = nullptr;\r
-\r
         error.clear();\r
 \r
         if (getName().isEmpty())\r
@@ -1220,7 +1187,7 @@ private:
                     {\r
                         addBufferSizes (minBufferSize, maxBufferSize, preferredBufferSize, bufferGranularity);\r
 \r
-                        double currentRate = getSampleRate();\r
+                        auto currentRate = getSampleRate();\r
 \r
                         if (currentRate < 1.0 || currentRate > 192001.0)\r
                         {\r
@@ -1232,13 +1199,12 @@ private:
                         }\r
 \r
                         currentSampleRate = currentRate;\r
-\r
                         postOutput = (asioObject->outputReady() == 0);\r
+\r
                         if (postOutput)\r
                             JUCE_ASIO_LOG ("outputReady true");\r
 \r
                         updateSampleRates();\r
-\r
                         readLatencies();                          // ..doing these steps because cubase does so at this stage\r
                         createDummyBuffers (preferredBufferSize); // in initialisation, and some devices fail if we don't.\r
                         readLatencies();\r
@@ -1294,12 +1260,11 @@ private:
     }\r
 \r
     //==============================================================================\r
-    void JUCE_ASIOCALLBACK callback (const long index)\r
+    void JUCE_ASIOCALLBACK callback (long index)\r
     {\r
         if (isStarted)\r
         {\r
-            bufferIndex = index;\r
-            processBuffer();\r
+            processBuffer (index);\r
         }\r
         else\r
         {\r
@@ -1310,23 +1275,21 @@ private:
         calledback = true;\r
     }\r
 \r
-    void processBuffer()\r
+    void processBuffer (long bufferIndex)\r
     {\r
-        const ASIOBufferInfo* const infos = bufferInfos;\r
-        const int bi = bufferIndex;\r
-\r
         const ScopedLock sl (callbackLock);\r
 \r
-        if (bi >= 0)\r
+        if (bufferIndex >= 0)\r
         {\r
-            const int samps = currentBlockSizeSamples;\r
+            auto* infos = bufferInfos.get();\r
+            auto samps = currentBlockSizeSamples;\r
 \r
             if (currentCallback != nullptr)\r
             {\r
                 for (int i = 0; i < numActiveInputChans; ++i)\r
                 {\r
                     jassert (inBuffers[i] != nullptr);\r
-                    inputFormat[i].convertToFloat (infos[i].buffers[bi], inBuffers[i], samps);\r
+                    inputFormat[i].convertToFloat (infos[i].buffers[bufferIndex], inBuffers[i], samps);\r
                 }\r
 \r
                 currentCallback->audioDeviceIOCallback (const_cast<const float**> (inBuffers.getData()), numActiveInputChans,\r
@@ -1335,13 +1298,13 @@ private:
                 for (int i = 0; i < numActiveOutputChans; ++i)\r
                 {\r
                     jassert (outBuffers[i] != nullptr);\r
-                    outputFormat[i].convertFromFloat (outBuffers[i], infos [numActiveInputChans + i].buffers[bi], samps);\r
+                    outputFormat[i].convertFromFloat (outBuffers[i], infos[numActiveInputChans + i].buffers[bufferIndex], samps);\r
                 }\r
             }\r
             else\r
             {\r
                 for (int i = 0; i < numActiveOutputChans; ++i)\r
-                     outputFormat[i].clear (infos[numActiveInputChans + i].buffers[bi], samps);\r
+                     outputFormat[i].clear (infos[numActiveInputChans + i].buffers[bufferIndex], samps);\r
             }\r
         }\r
 \r
@@ -1359,15 +1322,15 @@ private:
                     return 1;\r
                 break;\r
 \r
-            case kAsioBufferSizeChange: JUCE_ASIO_LOG ("kAsioBufferSizeChange"); resetRequest(); return 1;\r
-            case kAsioResetRequest:     JUCE_ASIO_LOG ("kAsioResetRequest");     resetRequest(); return 1;\r
-            case kAsioResyncRequest:    JUCE_ASIO_LOG ("kAsioResyncRequest");    resetRequest(); return 1;\r
-            case kAsioLatenciesChanged: JUCE_ASIO_LOG ("kAsioLatenciesChanged"); return 1;\r
-            case kAsioEngineVersion:    return 2;\r
+            case kAsioBufferSizeChange:  JUCE_ASIO_LOG ("kAsioBufferSizeChange"); resetRequest(); return 1;\r
+            case kAsioResetRequest:      JUCE_ASIO_LOG ("kAsioResetRequest");     resetRequest(); return 1;\r
+            case kAsioResyncRequest:     JUCE_ASIO_LOG ("kAsioResyncRequest");    resetRequest(); return 1;\r
+            case kAsioLatenciesChanged:  JUCE_ASIO_LOG ("kAsioLatenciesChanged"); return 1;\r
+            case kAsioEngineVersion:     return 2;\r
 \r
             case kAsioSupportsTimeInfo:\r
             case kAsioSupportsTimeCode:  return 0;\r
-            case kAsioOverload: xruns++; return 1;\r
+            case kAsioOverload:          ++xruns; return 1;\r
         }\r
 \r
         return 0;\r
@@ -1379,29 +1342,30 @@ private:
     {\r
         static ASIOTime* JUCE_ASIOCALLBACK bufferSwitchTimeInfoCallback (ASIOTime*, long index, long)\r
         {\r
-            if (currentASIODev[deviceIndex] != nullptr)\r
-                currentASIODev[deviceIndex]->callback (index);\r
+            if (auto* d = currentASIODev[deviceIndex])\r
+                d->callback (index);\r
 \r
-            return nullptr;\r
+            return {};\r
         }\r
 \r
         static void JUCE_ASIOCALLBACK bufferSwitchCallback (long index, long)\r
         {\r
-            if (currentASIODev[deviceIndex] != nullptr)\r
-                currentASIODev[deviceIndex]->callback (index);\r
+            if (auto* d = currentASIODev[deviceIndex])\r
+                d->callback (index);\r
         }\r
 \r
         static long JUCE_ASIOCALLBACK asioMessagesCallback (long selector, long value, void*, double*)\r
         {\r
-            return currentASIODev[deviceIndex] != nullptr\r
-                     ? currentASIODev[deviceIndex]->asioMessagesCallback (selector, value)\r
-                     : 0;\r
+            if (auto* d = currentASIODev[deviceIndex])\r
+                return d->asioMessagesCallback (selector, value);\r
+\r
+            return {};\r
         }\r
 \r
         static void JUCE_ASIOCALLBACK sampleRateChangedCallback (ASIOSampleRate)\r
         {\r
-            if (currentASIODev[deviceIndex] != nullptr)\r
-                currentASIODev[deviceIndex]->resetRequest();\r
+            if (auto* d = currentASIODev[deviceIndex])\r
+                d->resetRequest();\r
         }\r
 \r
         static void setCallbacks (ASIOCallbacks& callbacks) noexcept\r
@@ -1430,7 +1394,7 @@ private:
 };\r
 \r
 template <>\r
-struct ASIOAudioIODevice::ASIOCallbackFunctions <sizeof(currentASIODev) / sizeof(currentASIODev[0])>\r
+struct ASIOAudioIODevice::ASIOCallbackFunctions<maxNumASIODevices>\r
 {\r
     static void setCallbacksForDevice (ASIOCallbacks&, ASIOAudioIODevice*) noexcept {}\r
 };\r
@@ -1442,10 +1406,9 @@ public:
     ASIOAudioIODeviceType() : AudioIODeviceType ("ASIO") {}\r
 \r
     //==============================================================================\r
-    void scanForDevices()\r
+    void scanForDevices() override\r
     {\r
         hasScanned = true;\r
-\r
         deviceNames.clear();\r
         classIds.clear();\r
 \r
@@ -1454,7 +1417,7 @@ public:
 \r
         if (RegOpenKey (HKEY_LOCAL_MACHINE, _T("software\\asio"), &hk) == ERROR_SUCCESS)\r
         {\r
-            TCHAR name [256];\r
+            TCHAR name[256] = {};\r
 \r
             while (RegEnumKey (hk, index++, name, numElementsInArray (name)) == ERROR_SUCCESS)\r
                 addDriverInfo (name, hk);\r
@@ -1463,14 +1426,13 @@ public:
         }\r
     }\r
 \r
-    StringArray getDeviceNames (bool /*wantInputNames*/) const\r
+    StringArray getDeviceNames (bool /*wantInputNames*/) const override\r
     {\r
         jassert (hasScanned); // need to call scanForDevices() before doing this\r
-\r
         return deviceNames;\r
     }\r
 \r
-    int getDefaultDeviceIndex (bool) const\r
+    int getDefaultDeviceIndex (bool) const override\r
     {\r
         jassert (hasScanned); // need to call scanForDevices() before doing this\r
 \r
@@ -1489,8 +1451,8 @@ public:
 \r
     static int findFreeSlot()\r
     {\r
-        for (int i = 0; i < numElementsInArray (currentASIODev); ++i)\r
-            if (currentASIODev[i] == 0)\r
+        for (int i = 0; i < maxNumASIODevices; ++i)\r
+            if (currentASIODev[i] == nullptr)\r
                 return i;\r
 \r
         jassertfalse;  // unfortunately you can only have a finite number\r
@@ -1498,29 +1460,29 @@ public:
         return -1;\r
     }\r
 \r
-    int getIndexOfDevice (AudioIODevice* d, bool /*asInput*/) const\r
+    int getIndexOfDevice (AudioIODevice* d, bool /*asInput*/) const override\r
     {\r
         jassert (hasScanned); // need to call scanForDevices() before doing this\r
 \r
         return d == nullptr ? -1 : deviceNames.indexOf (d->getName());\r
     }\r
 \r
-    bool hasSeparateInputsAndOutputs() const    { return false; }\r
+    bool hasSeparateInputsAndOutputs() const override    { return false; }\r
 \r
     AudioIODevice* createDevice (const String& outputDeviceName,\r
-                                 const String& inputDeviceName)\r
+                                 const String& inputDeviceName) override\r
     {\r
         // ASIO can't open two different devices for input and output - they must be the same one.\r
         jassert (inputDeviceName == outputDeviceName || outputDeviceName.isEmpty() || inputDeviceName.isEmpty());\r
         jassert (hasScanned); // need to call scanForDevices() before doing this\r
 \r
-        const String deviceName (outputDeviceName.isNotEmpty() ? outputDeviceName\r
-                                                               : inputDeviceName);\r
-        const int index = deviceNames.indexOf (deviceName);\r
+        auto deviceName = outputDeviceName.isNotEmpty() ? outputDeviceName\r
+                                                        : inputDeviceName;\r
+        auto index = deviceNames.indexOf (deviceName);\r
 \r
         if (index >= 0)\r
         {\r
-            const int freeSlot = findFreeSlot();\r
+            auto freeSlot = findFreeSlot();\r
 \r
             if (freeSlot >= 0)\r
                 return new ASIOAudioIODevice (this, deviceName,\r
@@ -1552,7 +1514,7 @@ private:
         if (RegOpenKey (HKEY_CLASSES_ROOT, _T("clsid"), &hk) == ERROR_SUCCESS)\r
         {\r
             int index = 0;\r
-            TCHAR name [512];\r
+            TCHAR name[512] = {};\r
 \r
             while (RegEnumKey (hk, index++, name, numElementsInArray (name)) == ERROR_SUCCESS)\r
             {\r
@@ -1564,7 +1526,7 @@ private:
                     {\r
                         if (RegOpenKeyEx (subKey, _T("InprocServer32"), 0, KEY_READ, &pathKey) == ERROR_SUCCESS)\r
                         {\r
-                            TCHAR pathName [1024] = { 0 };\r
+                            TCHAR pathName[1024] = {};\r
                             DWORD dtype = REG_SZ;\r
                             DWORD dsize = sizeof (pathName);\r
 \r
@@ -1596,7 +1558,7 @@ private:
 \r
         if (RegOpenKeyEx (hk, keyName.toWideCharPointer(), 0, KEY_READ, &subKey) == ERROR_SUCCESS)\r
         {\r
-            TCHAR buf [256] = { 0 };\r
+            TCHAR buf[256] = {};\r
             DWORD dtype = REG_SZ;\r
             DWORD dsize = sizeof (buf);\r
 \r
@@ -1605,6 +1567,7 @@ private:
                 if (dsize > 0 && checkClassIsOk (buf))\r
                 {\r
                     CLSID classId;\r
+\r
                     if (CLSIDFromString ((LPOLESTR) buf, &classId) == S_OK)\r
                     {\r
                         dtype = REG_SZ;\r
index ed457f52e454f1fa0de27347dad65655eb30419b..914215eb953bf63432b714331d467625f0105f79 100644 (file)
@@ -23,7 +23,7 @@
 extern "C"\r
 {\r
     // Declare just the minimum number of interfaces for the DSound objects that we need..\r
-    typedef struct typeDSBUFFERDESC\r
+    struct DSBUFFERDESC\r
     {\r
         DWORD dwSize;\r
         DWORD dwFlags;\r
@@ -31,7 +31,7 @@ extern "C"
         DWORD dwReserved;\r
         LPWAVEFORMATEX lpwfxFormat;\r
         GUID guid3DAlgorithm;\r
-    } DSBUFFERDESC;\r
+    };\r
 \r
     struct IDirectSoundBuffer;\r
 \r
@@ -80,14 +80,14 @@ extern "C"
     };\r
 \r
     //==============================================================================\r
-    typedef struct typeDSCBUFFERDESC\r
+    struct DSCBUFFERDESC\r
     {\r
         DWORD dwSize;\r
         DWORD dwFlags;\r
         DWORD dwBufferBytes;\r
         DWORD dwReserved;\r
         LPWAVEFORMATEX lpwfxFormat;\r
-    } DSCBUFFERDESC;\r
+    };\r
 \r
     struct IDirectSoundCaptureBuffer;\r
 \r
index 6a7d2bb8c20706a487a5b48f87be76801ddee054..f820dce8067c42c70d59840afafe973deadf1e0e 100644 (file)
@@ -48,244 +48,330 @@ struct MidiServiceType
     virtual StringArray getDevices (bool) = 0;\r
     virtual int getDefaultDeviceIndex (bool) = 0;\r
 \r
-    virtual InputWrapper* createInputWrapper (MidiInput*, int, MidiInputCallback*) = 0;\r
+    virtual InputWrapper* createInputWrapper (MidiInput&, int, MidiInputCallback&) = 0;\r
     virtual OutputWrapper* createOutputWrapper (int) = 0;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiServiceType)\r
 };\r
 \r
 //==============================================================================\r
-class WindowsMidiService  : public MidiServiceType\r
+struct Win32MidiService  : public MidiServiceType,\r
+                           private Timer\r
 {\r
+    Win32MidiService() {}\r
+\r
+    StringArray getDevices (bool isInput) override\r
+    {\r
+        return isInput ? Win32InputWrapper::getDevices()\r
+                       : Win32OutputWrapper::getDevices();\r
+    }\r
+\r
+    int getDefaultDeviceIndex (bool isInput) override\r
+    {\r
+        return isInput ? Win32InputWrapper::getDefaultDeviceIndex()\r
+                       : Win32OutputWrapper::getDefaultDeviceIndex();\r
+    }\r
+\r
+    InputWrapper* createInputWrapper (MidiInput& input, int index, MidiInputCallback& callback) override\r
+    {\r
+        return new Win32InputWrapper (*this, input, index, callback);\r
+    }\r
+\r
+    OutputWrapper* createOutputWrapper (int index) override\r
+    {\r
+        return new Win32OutputWrapper (*this, index);\r
+    }\r
+\r
 private:\r
-    struct WindowsInputWrapper  : public InputWrapper\r
+    struct Win32InputWrapper;\r
+\r
+    //==============================================================================\r
+    struct MidiInCollector  : public ReferenceCountedObject\r
     {\r
-        struct MidiInCollector\r
+        MidiInCollector (Win32MidiService& s, const String& name)  : deviceName (name), midiService (s) {}\r
+\r
+        ~MidiInCollector()\r
         {\r
-            MidiInCollector (WindowsMidiService& s,\r
-                             MidiInput* const inputDevice,\r
-                             MidiInputCallback& cb)\r
-                : midiService (s),\r
-                  input (inputDevice),\r
-                  callback (cb)\r
-            {\r
-            }\r
+            stop();\r
 \r
-            ~MidiInCollector()\r
+            if (deviceHandle != 0)\r
             {\r
-                stop();\r
-\r
-                if (deviceHandle != 0)\r
+                for (int count = 5; --count >= 0;)\r
                 {\r
-                    for (int count = 5; --count >= 0;)\r
-                    {\r
-                        if (midiInClose (deviceHandle) == MMSYSERR_NOERROR)\r
-                            break;\r
+                    if (midiInClose (deviceHandle) == MMSYSERR_NOERROR)\r
+                        break;\r
 \r
-                        Sleep (20);\r
-                    }\r
+                    Sleep (20);\r
                 }\r
             }\r
+        }\r
 \r
-            void handleMessage (const uint8* bytes, const uint32 timeStamp)\r
+        using Ptr = ReferenceCountedObjectPtr<MidiInCollector>;\r
+\r
+        void addClient (Win32InputWrapper* c)\r
+        {\r
+            const ScopedLock sl (clientLock);\r
+            jassert (! clients.contains (c));\r
+            clients.add (c);\r
+        }\r
+\r
+        void removeClient (Win32InputWrapper* c)\r
+        {\r
+            const ScopedLock sl (clientLock);\r
+            clients.removeFirstMatchingValue (c);\r
+            startOrStop();\r
+            midiService.asyncCheckForUnusedCollectors();\r
+        }\r
+\r
+        void handleMessage (const uint8* bytes, uint32 timeStamp)\r
+        {\r
+            if (bytes[0] >= 0x80 && isStarted.load())\r
             {\r
-                if (bytes[0] >= 0x80 && isStarted)\r
                 {\r
-                    concatenator.pushMidiData (bytes,\r
-                                               MidiMessage::getMessageLengthFromFirstByte (bytes[0]),\r
-                                               convertTimeStamp (timeStamp),\r
-                                               input,\r
-                                               callback);\r
-                    writeFinishedBlocks();\r
+                    auto len = MidiMessage::getMessageLengthFromFirstByte (bytes[0]);\r
+                    auto time = convertTimeStamp (timeStamp);\r
+                    const ScopedLock sl (clientLock);\r
+\r
+                    for (auto* c : clients)\r
+                        c->pushMidiData (bytes, len, time);\r
                 }\r
+\r
+                writeFinishedBlocks();\r
             }\r
+        }\r
 \r
-            void handleSysEx (MIDIHDR* const hdr, const uint32 timeStamp)\r
+        void handleSysEx (MIDIHDR* hdr, uint32 timeStamp)\r
+        {\r
+            if (isStarted.load() && hdr->dwBytesRecorded > 0)\r
             {\r
-                if (isStarted && hdr->dwBytesRecorded > 0)\r
                 {\r
-                    concatenator.pushMidiData (hdr->lpData, (int) hdr->dwBytesRecorded,\r
-                                               convertTimeStamp (timeStamp), input, callback);\r
-                    writeFinishedBlocks();\r
+                    auto time = convertTimeStamp (timeStamp);\r
+                    const ScopedLock sl (clientLock);\r
+\r
+                    for (auto* c : clients)\r
+                        c->pushMidiData (hdr->lpData, (int) hdr->dwBytesRecorded, time);\r
                 }\r
+\r
+                writeFinishedBlocks();\r
             }\r
+        }\r
 \r
-            void start()\r
-            {\r
-                if (deviceHandle != 0 && ! isStarted)\r
-                {\r
-                    midiService.activeMidiCollectors.addIfNotAlreadyThere (this);\r
+        void startOrStop()\r
+        {\r
+            const ScopedLock sl (clientLock);\r
 \r
-                    for (int i = 0; i < (int) numHeaders; ++i)\r
-                    {\r
-                        headers[i].prepare (deviceHandle);\r
-                        headers[i].write (deviceHandle);\r
-                    }\r
+            if (countRunningClients() == 0)\r
+                stop();\r
+            else\r
+                start();\r
+        }\r
 \r
-                    startTime = Time::getMillisecondCounterHiRes();\r
-                    MMRESULT res = midiInStart (deviceHandle);\r
+        void start()\r
+        {\r
+            if (deviceHandle != 0 && ! isStarted.load())\r
+            {\r
+                activeMidiCollectors.addIfNotAlreadyThere (this);\r
 \r
-                    if (res == MMSYSERR_NOERROR)\r
-                    {\r
-                        concatenator.reset();\r
-                        isStarted = true;\r
-                    }\r
-                    else\r
-                    {\r
-                        unprepareAllHeaders();\r
-                    }\r
+                for (int i = 0; i < (int) numHeaders; ++i)\r
+                {\r
+                    headers[i].prepare (deviceHandle);\r
+                    headers[i].write (deviceHandle);\r
                 }\r
-            }\r
 \r
-            void stop()\r
-            {\r
-                if (isStarted)\r
-                {\r
-                    isStarted = false;\r
-                    midiInReset (deviceHandle);\r
-                    midiInStop (deviceHandle);\r
-                    midiService.activeMidiCollectors.removeFirstMatchingValue (this);\r
+                startTime = Time::getMillisecondCounterHiRes();\r
+                auto res = midiInStart (deviceHandle);\r
+\r
+                if (res == MMSYSERR_NOERROR)\r
+                    isStarted = true;\r
+                else\r
                     unprepareAllHeaders();\r
-                    concatenator.reset();\r
-                }\r
             }\r
+        }\r
 \r
-            static void CALLBACK midiInCallback (HMIDIIN, UINT uMsg, DWORD_PTR dwInstance,\r
-                                                 DWORD_PTR midiMessage, DWORD_PTR timeStamp)\r
+        void stop()\r
+        {\r
+            if (isStarted.load())\r
             {\r
-                auto* collector = reinterpret_cast<MidiInCollector*> (dwInstance);\r
-\r
-                if (collector->midiService.activeMidiCollectors.contains (collector))\r
-                {\r
-                    if (uMsg == MIM_DATA)\r
-                        collector->handleMessage ((const uint8*) &midiMessage, (uint32) timeStamp);\r
-                    else if (uMsg == MIM_LONGDATA)\r
-                        collector->handleSysEx ((MIDIHDR*) midiMessage, (uint32) timeStamp);\r
-                }\r
+                isStarted = false;\r
+                midiInReset (deviceHandle);\r
+                midiInStop (deviceHandle);\r
+                activeMidiCollectors.removeFirstMatchingValue (this);\r
+                unprepareAllHeaders();\r
             }\r
+        }\r
 \r
-            HMIDIIN deviceHandle = 0;\r
-\r
-        private:\r
-            WindowsMidiService& midiService;\r
-            MidiInput* input;\r
-            MidiInputCallback& callback;\r
-            MidiDataConcatenator concatenator { 4096 };\r
-            bool volatile isStarted = false;\r
-            double startTime = 0;\r
+        static void CALLBACK midiInCallback (HMIDIIN, UINT uMsg, DWORD_PTR dwInstance,\r
+                                             DWORD_PTR midiMessage, DWORD_PTR timeStamp)\r
+        {\r
+            auto* collector = reinterpret_cast<MidiInCollector*> (dwInstance);\r
 \r
-            struct MidiHeader\r
+            // This is primarily a check for the collector being a dangling\r
+            // pointer, as the callback can sometimes be delayed\r
+            if (activeMidiCollectors.contains (collector))\r
             {\r
-                MidiHeader() {}\r
+                if (uMsg == MIM_DATA)\r
+                    collector->handleMessage ((const uint8*) &midiMessage, (uint32) timeStamp);\r
+                else if (uMsg == MIM_LONGDATA)\r
+                    collector->handleSysEx ((MIDIHDR*) midiMessage, (uint32) timeStamp);\r
+            }\r
+        }\r
 \r
-                void prepare (HMIDIIN device)\r
-                {\r
-                    zerostruct (hdr);\r
-                    hdr.lpData = data;\r
-                    hdr.dwBufferLength = (DWORD) numElementsInArray (data);\r
+        String deviceName;\r
+        HMIDIIN deviceHandle = 0;\r
 \r
-                    midiInPrepareHeader (device, &hdr, sizeof (hdr));\r
-                }\r
+    private:\r
+        Win32MidiService& midiService;\r
+        CriticalSection clientLock;\r
+        Array<Win32InputWrapper*> clients;\r
+        std::atomic<bool> isStarted { false };\r
+        double startTime = 0;\r
 \r
-                void unprepare (HMIDIIN device)\r
-                {\r
-                    if ((hdr.dwFlags & WHDR_DONE) != 0)\r
-                    {\r
-                        int c = 10;\r
-                        while (--c >= 0 && midiInUnprepareHeader (device, &hdr, sizeof (hdr)) == MIDIERR_STILLPLAYING)\r
-                            Thread::sleep (20);\r
+        // This static array is used to prevent occasional callbacks to objects that are\r
+        // in the process of being deleted\r
+        static Array<MidiInCollector*, CriticalSection> activeMidiCollectors;\r
 \r
-                        jassert (c >= 0);\r
-                    }\r
-                }\r
+        int countRunningClients() const\r
+        {\r
+            int num = 0;\r
 \r
-                void write (HMIDIIN device)\r
-                {\r
-                    hdr.dwBytesRecorded = 0;\r
-                    midiInAddBuffer (device, &hdr, sizeof (hdr));\r
-                }\r
+            for (auto* c : clients)\r
+                if (c->started)\r
+                    ++num;\r
 \r
-                void writeIfFinished (HMIDIIN device)\r
-                {\r
-                    if ((hdr.dwFlags & WHDR_DONE) != 0)\r
-                        write (device);\r
-                }\r
+            return num;\r
+        }\r
 \r
-                MIDIHDR hdr;\r
-                char data [256];\r
+        struct MidiHeader\r
+        {\r
+            MidiHeader() {}\r
 \r
-                JUCE_DECLARE_NON_COPYABLE (MidiHeader)\r
-            };\r
+            void prepare (HMIDIIN device)\r
+            {\r
+                zerostruct (hdr);\r
+                hdr.lpData = data;\r
+                hdr.dwBufferLength = (DWORD) numElementsInArray (data);\r
 \r
-            enum { numHeaders = 32 };\r
-            MidiHeader headers [numHeaders];\r
+                midiInPrepareHeader (device, &hdr, sizeof (hdr));\r
+            }\r
 \r
-            void writeFinishedBlocks()\r
+            void unprepare (HMIDIIN device)\r
             {\r
-                for (int i = 0; i < (int) numHeaders; ++i)\r
-                    headers[i].writeIfFinished (deviceHandle);\r
+                if ((hdr.dwFlags & WHDR_DONE) != 0)\r
+                {\r
+                    int c = 10;\r
+                    while (--c >= 0 && midiInUnprepareHeader (device, &hdr, sizeof (hdr)) == MIDIERR_STILLPLAYING)\r
+                        Thread::sleep (20);\r
+\r
+                    jassert (c >= 0);\r
+                }\r
             }\r
 \r
-            void unprepareAllHeaders()\r
+            void write (HMIDIIN device)\r
             {\r
-                for (int i = 0; i < (int) numHeaders; ++i)\r
-                    headers[i].unprepare (deviceHandle);\r
+                hdr.dwBytesRecorded = 0;\r
+                midiInAddBuffer (device, &hdr, sizeof (hdr));\r
             }\r
 \r
-            double convertTimeStamp (uint32 timeStamp)\r
+            void writeIfFinished (HMIDIIN device)\r
             {\r
-                auto t = startTime + timeStamp;\r
-                auto now = Time::getMillisecondCounterHiRes();\r
+                if ((hdr.dwFlags & WHDR_DONE) != 0)\r
+                    write (device);\r
+            }\r
 \r
-                if (t > now)\r
-                {\r
-                    if (t > now + 2.0)\r
-                        startTime -= 1.0;\r
+            MIDIHDR hdr;\r
+            char data[256];\r
 \r
-                    t = now;\r
-                }\r
+            JUCE_DECLARE_NON_COPYABLE (MidiHeader)\r
+        };\r
 \r
-                return t * 0.001;\r
+        enum { numHeaders = 32 };\r
+        MidiHeader headers[numHeaders];\r
+\r
+        void writeFinishedBlocks()\r
+        {\r
+            for (int i = 0; i < (int) numHeaders; ++i)\r
+                headers[i].writeIfFinished (deviceHandle);\r
+        }\r
+\r
+        void unprepareAllHeaders()\r
+        {\r
+            for (int i = 0; i < (int) numHeaders; ++i)\r
+                headers[i].unprepare (deviceHandle);\r
+        }\r
+\r
+        double convertTimeStamp (uint32 timeStamp)\r
+        {\r
+            auto t = startTime + timeStamp;\r
+            auto now = Time::getMillisecondCounterHiRes();\r
+\r
+            if (t > now)\r
+            {\r
+                if (t > now + 2.0)\r
+                    startTime -= 1.0;\r
+\r
+                t = now;\r
             }\r
 \r
-            JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiInCollector)\r
-        };\r
+            return t * 0.001;\r
+        }\r
 \r
-        //==============================================================================\r
-        WindowsInputWrapper (WindowsMidiService& parentService,\r
-                             MidiInput* const input,\r
-                             const int index,\r
-                             MidiInputCallback* const callback)\r
+        JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiInCollector)\r
+    };\r
+\r
+    //==============================================================================\r
+    struct Win32InputWrapper  : public InputWrapper\r
+    {\r
+        Win32InputWrapper (Win32MidiService& parentService,\r
+                           MidiInput& midiInput, int index, MidiInputCallback& c)\r
+            : input (midiInput), callback (c)\r
+        {\r
+            collector = getOrCreateCollector (parentService, index);\r
+            collector->addClient (this);\r
+        }\r
+\r
+        ~Win32InputWrapper()\r
+        {\r
+            collector->removeClient (this);\r
+        }\r
+\r
+        static MidiInCollector::Ptr getOrCreateCollector (Win32MidiService& parentService, int index)\r
         {\r
             auto names = getDevices();\r
-            UINT deviceId = MIDI_MAPPER;\r
+            UINT deviceID = MIDI_MAPPER;\r
+            String deviceName;\r
 \r
             if (isPositiveAndBelow (index, names.size()))\r
             {\r
                 deviceName = names[index];\r
-                deviceId = index;\r
+                deviceID = index;\r
             }\r
 \r
-            collector = new MidiInCollector (parentService, input, *callback);\r
+            const ScopedLock sl (parentService.activeCollectorLock);\r
+\r
+            for (auto& c : parentService.activeCollectors)\r
+                if (c->deviceName == deviceName)\r
+                    return c;\r
+\r
+            MidiInCollector::Ptr c (new MidiInCollector (parentService, deviceName));\r
 \r
             HMIDIIN h;\r
-            MMRESULT err = midiInOpen (&h, deviceId,\r
-                                       (DWORD_PTR) &MidiInCollector::midiInCallback,\r
-                                       (DWORD_PTR) (MidiInCollector*) collector.get(),\r
-                                       CALLBACK_FUNCTION);\r
+            auto err = midiInOpen (&h, deviceID,\r
+                                   (DWORD_PTR) &MidiInCollector::midiInCallback,\r
+                                   (DWORD_PTR) (MidiInCollector*) c.get(),\r
+                                   CALLBACK_FUNCTION);\r
 \r
             if (err != MMSYSERR_NOERROR)\r
                 throw std::runtime_error ("Failed to create Windows input device wrapper");\r
 \r
-            collector->deviceHandle = h;\r
+            c->deviceHandle = h;\r
+            parentService.activeCollectors.add (c);\r
+            return c;\r
         }\r
 \r
-        ~WindowsInputWrapper() {}\r
-\r
         static StringArray getDevices()\r
         {\r
             StringArray s;\r
-            const UINT num = midiInGetNumDevs();\r
+            auto num = midiInGetNumDevs();\r
 \r
             for (UINT i = 0; i < num; ++i)\r
             {\r
@@ -299,78 +385,81 @@ private:
             return s;\r
         }\r
 \r
-        static int getDefaultDeviceIndex()\r
-        {\r
-            return 0;\r
-        }\r
+        static int getDefaultDeviceIndex()  { return 0; }\r
+\r
+        void start() override   { started = true;  concatenator.reset(); collector->startOrStop(); }\r
+        void stop() override    { started = false; collector->startOrStop(); concatenator.reset(); }\r
 \r
-        void start() override   { collector->start(); }\r
-        void stop() override    { collector->stop(); }\r
+        String getDeviceName() override     { return collector->deviceName; }\r
 \r
-        String getDeviceName() override\r
+        void pushMidiData (const void* inputData, int numBytes, double time)\r
         {\r
-            return deviceName;\r
+            concatenator.pushMidiData (inputData, numBytes, time, &input, callback);\r
         }\r
 \r
-        String deviceName;\r
-        ScopedPointer<MidiInCollector> collector;\r
+        MidiInput& input;\r
+        MidiInputCallback& callback;\r
+        MidiDataConcatenator concatenator { 4096 };\r
+        MidiInCollector::Ptr collector;\r
+        bool started = false;\r
 \r
-        JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsInputWrapper)\r
+        JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Win32InputWrapper)\r
     };\r
 \r
     //==============================================================================\r
-    struct WindowsOutputWrapper  : public OutputWrapper\r
+    struct MidiOutHandle    : public ReferenceCountedObject\r
     {\r
-        struct MidiOutHandle    : public ReferenceCountedObject\r
-        {\r
-            using Ptr = ReferenceCountedObjectPtr<MidiOutHandle>;\r
+        using Ptr = ReferenceCountedObjectPtr<MidiOutHandle>;\r
 \r
-            MidiOutHandle (WindowsMidiService& parent, UINT id, HMIDIOUT h)\r
-                : owner (parent), deviceId (id), handle (h)\r
-            {\r
-                owner.activeOutputHandles.add (this);\r
-            }\r
+        MidiOutHandle (Win32MidiService& parent, const String& name, HMIDIOUT h)\r
+            : owner (parent), deviceName (name), handle (h)\r
+        {\r
+            owner.activeOutputHandles.add (this);\r
+        }\r
 \r
-            ~MidiOutHandle()\r
-            {\r
-                if (handle != nullptr)\r
-                    midiOutClose (handle);\r
+        ~MidiOutHandle()\r
+        {\r
+            if (handle != nullptr)\r
+                midiOutClose (handle);\r
 \r
-                owner.activeOutputHandles.removeFirstMatchingValue (this);\r
-            }\r
+            owner.activeOutputHandles.removeFirstMatchingValue (this);\r
+        }\r
 \r
-            WindowsMidiService& owner;\r
-            UINT deviceId;\r
-            HMIDIOUT handle;\r
+        Win32MidiService& owner;\r
+        String deviceName;\r
+        HMIDIOUT handle;\r
 \r
-            JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiOutHandle)\r
-        };\r
+        JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiOutHandle)\r
+    };\r
 \r
-        WindowsOutputWrapper (WindowsMidiService& p, int index) : parent (p)\r
+    //==============================================================================\r
+    struct Win32OutputWrapper  : public OutputWrapper\r
+    {\r
+        Win32OutputWrapper (Win32MidiService& p, int index) : parent (p)\r
         {\r
             auto names = getDevices();\r
-            UINT deviceId = MIDI_MAPPER;\r
+            UINT deviceID = MIDI_MAPPER;\r
 \r
             if (isPositiveAndBelow (index, names.size()))\r
             {\r
                 deviceName = names[index];\r
-                deviceId = index;\r
+                deviceID = index;\r
             }\r
 \r
-            if (deviceId == MIDI_MAPPER)\r
+            if (deviceID == MIDI_MAPPER)\r
             {\r
-                // use the microsoft sw synth as a default - best not to allow deviceId\r
+                // use the microsoft sw synth as a default - best not to allow deviceID\r
                 // to be MIDI_MAPPER, or else device sharing breaks\r
                 for (int i = 0; i < names.size(); ++i)\r
                     if (names[i].containsIgnoreCase ("microsoft"))\r
-                        deviceId = (UINT) i;\r
+                        deviceID = (UINT) i;\r
             }\r
 \r
             for (int i = parent.activeOutputHandles.size(); --i >= 0;)\r
             {\r
                 auto* activeHandle = parent.activeOutputHandles.getUnchecked (i);\r
 \r
-                if (activeHandle->deviceId == deviceId)\r
+                if (activeHandle->deviceName == deviceName)\r
                 {\r
                     han = activeHandle;\r
                     return;\r
@@ -380,11 +469,11 @@ private:
             for (int i = 4; --i >= 0;)\r
             {\r
                 HMIDIOUT h = 0;\r
-                MMRESULT res = midiOutOpen (&h, deviceId, 0, 0, CALLBACK_NULL);\r
+                auto res = midiOutOpen (&h, deviceID, 0, 0, CALLBACK_NULL);\r
 \r
                 if (res == MMSYSERR_NOERROR)\r
                 {\r
-                    han = new MidiOutHandle (parent, deviceId, h);\r
+                    han = new MidiOutHandle (parent, deviceName, h);\r
                     return;\r
                 }\r
 \r
@@ -408,7 +497,7 @@ private:
 \r
                 if (midiOutPrepareHeader (han->handle, &h, sizeof (MIDIHDR)) == MMSYSERR_NOERROR)\r
                 {\r
-                    MMRESULT res = midiOutLongMsg (han->handle, &h, sizeof (MIDIHDR));\r
+                    auto res = midiOutLongMsg (han->handle, &h, sizeof (MIDIHDR));\r
 \r
                     if (res == MMSYSERR_NOERROR)\r
                     {\r
@@ -444,7 +533,7 @@ private:
         static Array<MIDIOUTCAPS> getDeviceCaps()\r
         {\r
             Array<MIDIOUTCAPS> devices;\r
-            const UINT num = midiOutGetNumDevs();\r
+            auto num = midiOutGetNumDevs();\r
 \r
             for (UINT i = 0; i < num; ++i)\r
             {\r
@@ -483,54 +572,42 @@ private:
             return 0;\r
         }\r
 \r
-        String getDeviceName() override\r
-        {\r
-            return deviceName;\r
-        }\r
+        String getDeviceName() override    { return deviceName; }\r
 \r
-        WindowsMidiService& parent;\r
+        Win32MidiService& parent;\r
         String deviceName;\r
-\r
         MidiOutHandle::Ptr han;\r
 \r
-        JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsOutputWrapper)\r
+        JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Win32OutputWrapper)\r
     };\r
 \r
-public:\r
-    WindowsMidiService() {}\r
-\r
-    StringArray getDevices (bool isInput) override\r
+    //==============================================================================\r
+    void asyncCheckForUnusedCollectors()\r
     {\r
-        return isInput ? WindowsInputWrapper::getDevices()\r
-                       : WindowsOutputWrapper::getDevices();\r
+        startTimer (10);\r
     }\r
 \r
-    int getDefaultDeviceIndex (bool isInput) override\r
+    void timerCallback() override\r
     {\r
-        return isInput ? WindowsInputWrapper::getDefaultDeviceIndex()\r
-                       : WindowsOutputWrapper::getDefaultDeviceIndex();\r
-    }\r
+        stopTimer();\r
 \r
-    InputWrapper* createInputWrapper (MidiInput* input, int index, MidiInputCallback* callback) override\r
-    {\r
-        return new WindowsInputWrapper (*this, input, index, callback);\r
-    }\r
+        const ScopedLock sl (activeCollectorLock);\r
 \r
-    OutputWrapper* createOutputWrapper (int index) override\r
-    {\r
-        return new WindowsOutputWrapper (*this, index);\r
+        for (int i = activeCollectors.size(); --i >= 0;)\r
+            if (activeCollectors.getObjectPointer(i)->getReferenceCount() == 1)\r
+                activeCollectors.remove (i);\r
     }\r
 \r
-private:\r
-    Array<WindowsInputWrapper::MidiInCollector*, CriticalSection> activeMidiCollectors;\r
-    Array<WindowsOutputWrapper::MidiOutHandle*> activeOutputHandles;\r
-\r
-    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsMidiService)\r
+    CriticalSection activeCollectorLock;\r
+    ReferenceCountedArray<MidiInCollector> activeCollectors;\r
+    Array<MidiOutHandle*> activeOutputHandles;\r
 };\r
 \r
+Array<Win32MidiService::MidiInCollector*, CriticalSection> Win32MidiService::MidiInCollector::activeMidiCollectors;\r
+\r
+//==============================================================================\r
 //==============================================================================\r
 #if JUCE_USE_WINRT_MIDI\r
-\r
 using namespace Microsoft::WRL;\r
 \r
 using namespace ABI::Windows::Foundation;\r
@@ -538,21 +615,71 @@ using namespace ABI::Windows::Devices::Midi;
 using namespace ABI::Windows::Devices::Enumeration;\r
 using namespace ABI::Windows::Storage::Streams;\r
 \r
+//==============================================================================\r
 class WinRTMidiService  : public MidiServiceType\r
 {\r
-private:\r
+public:\r
+    //==============================================================================\r
+    WinRTMidiService()\r
+    {\r
+        if (! WinRTWrapper::getInstance()->isInitialised())\r
+            throw std::runtime_error ("Failed to initialise the WinRT wrapper");\r
+\r
+        midiInFactory = WinRTWrapper::getInstance()->getWRLFactory<IMidiInPortStatics> (&RuntimeClass_Windows_Devices_Midi_MidiInPort[0]);\r
+\r
+        if (midiInFactory == nullptr)\r
+            throw std::runtime_error ("Failed to create midi in factory");\r
+\r
+        midiOutFactory = WinRTWrapper::getInstance()->getWRLFactory<IMidiOutPortStatics> (&RuntimeClass_Windows_Devices_Midi_MidiOutPort[0]);\r
+\r
+        if (midiOutFactory == nullptr)\r
+            throw std::runtime_error ("Failed to create midi out factory");\r
+\r
+        inputDeviceWatcher.reset (new MidiIODeviceWatcher<IMidiInPortStatics> (midiInFactory));\r
+\r
+        if (! inputDeviceWatcher->start())\r
+            throw std::runtime_error ("Failed to start midi input device watcher");\r
+\r
+        outputDeviceWatcher.reset (new MidiIODeviceWatcher<IMidiOutPortStatics> (midiOutFactory));\r
+\r
+        if (! outputDeviceWatcher->start())\r
+            throw std::runtime_error ("Failed to start midi output device watcher");\r
+    }\r
+\r
+    ~WinRTMidiService() {}\r
+\r
+    StringArray getDevices (bool isInput) override\r
+    {\r
+        return isInput ? inputDeviceWatcher ->getDevices()\r
+                       : outputDeviceWatcher->getDevices();\r
+    }\r
+\r
+    int getDefaultDeviceIndex (bool isInput) override\r
+    {\r
+        return isInput ? inputDeviceWatcher ->getDefaultDeviceIndex()\r
+                       : outputDeviceWatcher->getDefaultDeviceIndex();\r
+    }\r
+\r
+    InputWrapper* createInputWrapper (MidiInput& input, int index, MidiInputCallback& callback) override\r
+    {\r
+        return new WinRTInputWrapper (*this, input, index, callback);\r
+    }\r
+\r
+    OutputWrapper* createOutputWrapper (int index) override\r
+    {\r
+        return new WinRTOutputWrapper (*this, index);\r
+    }\r
+\r
     template <typename COMFactoryType>\r
     struct MidiIODeviceWatcher\r
     {\r
         struct DeviceInfo\r
         {\r
-            String name;\r
-            String id;\r
+            String name, id;\r
             bool isDefault = false;\r
         };\r
 \r
-        MidiIODeviceWatcher (ComSmartPtr<COMFactoryType>& comFactory)\r
-            : factory (comFactory)\r
+        MidiIODeviceWatcher (ComSmartPtr<COMFactoryType>& comFactory)  : factory (comFactory)\r
         {\r
         }\r
 \r
@@ -564,21 +691,23 @@ private:
         bool start()\r
         {\r
             HSTRING deviceSelector;\r
-            HRESULT hr = factory->GetDeviceSelector (&deviceSelector);\r
+            auto hr = factory->GetDeviceSelector (&deviceSelector);\r
+\r
             if (FAILED (hr))\r
                 return false;\r
 \r
             auto deviceInformationFactory = WinRTWrapper::getInstance()->getWRLFactory<IDeviceInformationStatics> (&RuntimeClass_Windows_Devices_Enumeration_DeviceInformation[0]);\r
+\r
             if (deviceInformationFactory == nullptr)\r
                 return false;\r
 \r
             hr = deviceInformationFactory->CreateWatcherAqsFilter (deviceSelector, watcher.resetAndGetPointerAddress());\r
+\r
             if (FAILED (hr))\r
                 return false;\r
 \r
-            class DeviceEnumerationThread  : public Thread\r
+            struct DeviceEnumerationThread  : public Thread\r
             {\r
-            public:\r
                 DeviceEnumerationThread (String threadName, MidiIODeviceWatcher<COMFactoryType>& p)\r
                     : Thread (threadName), parent (p)\r
                 {}\r
@@ -613,7 +742,6 @@ private:
                         parent.watcher->remove_EnumerationCompleted (deviceEnumerationCompletedToken);\r
                 }\r
 \r
-            private:\r
                 MidiIODeviceWatcher<COMFactoryType>& parent;\r
                 WaitableEvent enumerationCompleted;\r
             };\r
@@ -632,7 +760,8 @@ private:
 \r
             if (deviceAddedToken.value != 0)\r
             {\r
-                HRESULT hr = watcher->remove_Added (deviceAddedToken);\r
+                auto hr = watcher->remove_Added (deviceAddedToken);\r
+\r
                 if (FAILED (hr))\r
                     return false;\r
 \r
@@ -641,14 +770,16 @@ private:
 \r
             if (deviceRemovedToken.value != 0)\r
             {\r
-                HRESULT hr = watcher->remove_Removed (deviceRemovedToken);\r
+                auto hr = watcher->remove_Removed (deviceRemovedToken);\r
+\r
                 if (FAILED (hr))\r
                     return false;\r
 \r
                 deviceRemovedToken.value = 0;\r
             }\r
 \r
-            HRESULT hr = watcher->Stop();\r
+            auto hr = watcher->Stop();\r
+\r
             if (FAILED (hr))\r
                 return false;\r
 \r
@@ -659,7 +790,8 @@ private:
         HRESULT addDevice (IDeviceInformation* addedDeviceInfo)\r
         {\r
             boolean isEnabled;\r
-            HRESULT hr = addedDeviceInfo->get_IsEnabled (&isEnabled);\r
+            auto hr = addedDeviceInfo->get_IsEnabled (&isEnabled);\r
+\r
             if (FAILED (hr))\r
                 return S_OK;\r
 \r
@@ -672,6 +804,7 @@ private:
 \r
             HSTRING name;\r
             hr = addedDeviceInfo->get_Name (&name);\r
+\r
             if (FAILED (hr))\r
                 return S_OK;\r
 \r
@@ -679,6 +812,7 @@ private:
 \r
             HSTRING id;\r
             hr = addedDeviceInfo->get_Id (&id);\r
+\r
             if (FAILED (hr))\r
                 return S_OK;\r
 \r
@@ -686,13 +820,12 @@ private:
 \r
             boolean isDefault;\r
             hr = addedDeviceInfo->get_IsDefault (&isDefault);\r
+\r
             if (FAILED (hr))\r
                 return S_OK;\r
 \r
             info.isDefault = isDefault != 0;\r
-\r
             connectedDevices.add (info);\r
-\r
             return S_OK;\r
         }\r
 \r
@@ -702,7 +835,7 @@ private:
 \r
             HSTRING removedDeviceIdHstr;\r
             removedDeviceInfo->get_Id (&removedDeviceIdHstr);\r
-            String removedDeviceId = WinRTWrapper::getInstance()->hStringToString (removedDeviceIdHstr);\r
+            auto removedDeviceId = WinRTWrapper::getInstance()->hStringToString (removedDeviceIdHstr);\r
 \r
             for (int i = 0; i < connectedDevices.size(); ++i)\r
             {\r
@@ -724,6 +857,7 @@ private:
             }\r
 \r
             StringArray result;\r
+\r
             for (auto info : lastQueriedConnectedDevices.get())\r
                 result.add (info.name);\r
 \r
@@ -733,6 +867,7 @@ private:
         int getDefaultDeviceIndex()\r
         {\r
             auto& lastDevices = lastQueriedConnectedDevices.get();\r
+\r
             for (int i = 0; i < lastDevices.size(); ++i)\r
                 if (lastDevices[i].isDefault)\r
                     return i;\r
@@ -740,7 +875,7 @@ private:
             return 0;\r
         }\r
 \r
-        String getDeviceNameFromIndex (const int index)\r
+        String getDeviceNameFromIndex (int index)\r
         {\r
             if (isPositiveAndBelow (index, lastQueriedConnectedDevices.get().size()))\r
                 return lastQueriedConnectedDevices.get()[index].name;\r
@@ -748,7 +883,7 @@ private:
             return {};\r
         }\r
 \r
-        String getDeviceID (const String name)\r
+        String getDeviceID (const String& name)\r
         {\r
             const ScopedLock lock (deviceChanges);\r
 \r
@@ -773,16 +908,15 @@ private:
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiIODeviceWatcher);\r
     };\r
 \r
+    //==============================================================================\r
     template <typename COMFactoryType, typename COMInterfaceType, typename COMType>\r
-    class OpenMidiPortThread  : public Thread\r
+    struct OpenMidiPortThread  : public Thread\r
     {\r
-    public:\r
-        OpenMidiPortThread (String threadName,\r
-                            String midiDeviceId,\r
+        OpenMidiPortThread (String threadName, String midiDeviceID,\r
                             ComSmartPtr<COMFactoryType>& comFactory,\r
                             ComSmartPtr<COMInterfaceType>& comPort)\r
             : Thread (threadName),\r
-              deviceId (midiDeviceId),\r
+              deviceID (midiDeviceID),\r
               factory (comFactory),\r
               port (comPort)\r
         {\r
@@ -790,13 +924,15 @@ private:
 \r
         ~OpenMidiPortThread()\r
         {\r
+            stopThread (2000);\r
         }\r
 \r
         void run() override\r
         {\r
-            WinRTWrapper::ScopedHString hDeviceId (deviceId);\r
+            WinRTWrapper::ScopedHString hDeviceId (deviceID);\r
             ComSmartPtr<IAsyncOperation<COMType*>> asyncOp;\r
-            HRESULT hr = factory->FromIdAsync (hDeviceId.get(), asyncOp.resetAndGetPointerAddress());\r
+            auto hr = factory->FromIdAsync (hDeviceId.get(), asyncOp.resetAndGetPointerAddress());\r
+\r
             if (FAILED (hr))\r
                 return;\r
 \r
@@ -806,7 +942,8 @@ private:
                     if (asyncOpPtr == nullptr)\r
                         return E_ABORT;\r
 \r
-                    HRESULT hr = asyncOpPtr->GetResults (port.resetAndGetPointerAddress());\r
+                    auto hr = asyncOpPtr->GetResults (port.resetAndGetPointerAddress());\r
+\r
                     if (FAILED (hr))\r
                         return hr;\r
 \r
@@ -821,30 +958,28 @@ private:
             portOpened.wait (2000);\r
         }\r
 \r
-        const String deviceId;\r
+        const String deviceID;\r
         ComSmartPtr<COMFactoryType>& factory;\r
         ComSmartPtr<COMInterfaceType>& port;\r
-\r
         WaitableEvent portOpened { true };\r
     };\r
 \r
+    //==============================================================================\r
     struct WinRTInputWrapper  : public InputWrapper\r
     {\r
-        WinRTInputWrapper (WinRTMidiService& service,\r
-                           MidiInput* const input,\r
-                           const int index,\r
-                           MidiInputCallback& cb)\r
+        WinRTInputWrapper (WinRTMidiService& service, MidiInput& input, int index, MidiInputCallback& cb)\r
             : inputDevice (input),\r
-              callback (cb),\r
-              concatenator (4096)\r
+              callback (cb)\r
         {\r
             const ScopedLock lock (service.inputDeviceWatcher->deviceChanges);\r
 \r
             deviceName = service.inputDeviceWatcher->getDeviceNameFromIndex (index);\r
+\r
             if (deviceName.isEmpty())\r
                 throw std::runtime_error ("Invalid device index");\r
 \r
-            const auto deviceID = service.inputDeviceWatcher->getDeviceID (deviceName);\r
+            auto deviceID = service.inputDeviceWatcher->getDeviceID (deviceName);\r
+\r
             if (deviceID.isEmpty())\r
                 throw std::runtime_error ("Device unavailable");\r
 \r
@@ -854,16 +989,18 @@ private:
                                                                                         midiInPort);\r
             portThread.startThread();\r
             portThread.waitForThreadToExit (-1);\r
+\r
             if (midiInPort == nullptr)\r
                 throw std::runtime_error ("Timed out waiting for midi input port creation");\r
 \r
             startTime = Time::getMillisecondCounterHiRes();\r
 \r
-            HRESULT hr = midiInPort->add_MessageReceived (\r
+            auto hr = midiInPort->add_MessageReceived (\r
                 Callback<ITypedEventHandler<MidiInPort*, MidiMessageReceivedEventArgs*>> (\r
                     [this] (IMidiInPort*, IMidiMessageReceivedEventArgs* args) { return midiInMessageReceived (args); }\r
                 ).Get(),\r
                 &midiInMessageToken);\r
+\r
             if (FAILED (hr))\r
                 throw std::runtime_error ("Failed to set midi input callback");\r
         }\r
@@ -878,7 +1015,7 @@ private:
 \r
         void start() override\r
         {\r
-            if (!isStarted)\r
+            if (! isStarted)\r
             {\r
                 concatenator.reset();\r
                 isStarted = true;\r
@@ -894,10 +1031,7 @@ private:
             }\r
         }\r
 \r
-        String getDeviceName() override\r
-        {\r
-            return deviceName;\r
-        }\r
+        String getDeviceName() override         { return deviceName; }\r
 \r
         HRESULT midiInMessageReceived (IMidiMessageReceivedEventArgs* args)\r
         {\r
@@ -905,50 +1039,53 @@ private:
                 return S_OK;\r
 \r
             ComSmartPtr<IMidiMessage> message;\r
-            HRESULT hr = args->get_Message (message.resetAndGetPointerAddress());\r
+            auto hr = args->get_Message (message.resetAndGetPointerAddress());\r
+\r
             if (FAILED (hr))\r
                 return hr;\r
 \r
             ComSmartPtr<IBuffer> buffer;\r
             hr = message->get_RawData (buffer.resetAndGetPointerAddress());\r
+\r
             if (FAILED (hr))\r
                 return hr;\r
 \r
             ComSmartPtr<Windows::Storage::Streams::IBufferByteAccess> bufferByteAccess;\r
             hr = buffer->QueryInterface (bufferByteAccess.resetAndGetPointerAddress());\r
+\r
             if (FAILED (hr))\r
                 return hr;\r
 \r
             uint8_t* bufferData = nullptr;\r
             hr = bufferByteAccess->Buffer (&bufferData);\r
+\r
             if (FAILED (hr))\r
                 return hr;\r
 \r
             uint32_t numBytes = 0;\r
             hr = buffer->get_Length (&numBytes);\r
+\r
             if (FAILED (hr))\r
                 return hr;\r
 \r
             ABI::Windows::Foundation::TimeSpan timespan;\r
             hr = message->get_Timestamp (&timespan);\r
+\r
             if (FAILED (hr))\r
                 return hr;\r
 \r
-            concatenator.pushMidiData (bufferData,\r
-                                       numBytes,\r
+            concatenator.pushMidiData (bufferData, numBytes,\r
                                        convertTimeStamp (timespan.Duration),\r
-                                       inputDevice,\r
-                                       callback);\r
-\r
+                                       &inputDevice, callback);\r
             return S_OK;\r
         }\r
 \r
         double convertTimeStamp (int64 timestamp)\r
         {\r
-            const auto millisecondsSinceStart = static_cast<double> (timestamp) / 10000.0;\r
-            double t = startTime + millisecondsSinceStart;\r
+            auto millisecondsSinceStart = static_cast<double> (timestamp) / 10000.0;\r
+            auto t = startTime + millisecondsSinceStart;\r
+            auto now = Time::getMillisecondCounterHiRes();\r
 \r
-            const double now = Time::getMillisecondCounterHiRes();\r
             if (t > now)\r
             {\r
                 if (t > now + 2.0)\r
@@ -960,10 +1097,10 @@ private:
             return t * 0.001;\r
         }\r
 \r
-        MidiInput* inputDevice;\r
+        MidiInput& inputDevice;\r
         MidiInputCallback& callback;\r
         String deviceName;\r
-        MidiDataConcatenator concatenator;\r
+        MidiDataConcatenator concatenator { 4096 };\r
         ComSmartPtr<IMidiInPort> midiInPort;\r
         EventRegistrationToken midiInMessageToken { 0 };\r
 \r
@@ -973,17 +1110,20 @@ private:
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WinRTInputWrapper);\r
     };\r
 \r
+    //==============================================================================\r
     struct WinRTOutputWrapper  : public OutputWrapper\r
     {\r
-        WinRTOutputWrapper (WinRTMidiService& service, const int index)\r
+        WinRTOutputWrapper (WinRTMidiService& service, int index)\r
         {\r
             const ScopedLock lock (service.outputDeviceWatcher->deviceChanges);\r
 \r
             deviceName = service.outputDeviceWatcher->getDeviceNameFromIndex (index);\r
+\r
             if (deviceName.isEmpty())\r
                 throw std::runtime_error ("Invalid device index");\r
 \r
-            const auto deviceID = service.outputDeviceWatcher->getDeviceID (deviceName);\r
+            auto deviceID = service.outputDeviceWatcher->getDeviceID (deviceName);\r
+\r
             if (deviceID.isEmpty())\r
                 throw std::runtime_error ("Device unavailable");\r
 \r
@@ -993,22 +1133,27 @@ private:
                                                                                             midiOutPort);\r
             portThread.startThread();\r
             portThread.waitForThreadToExit (-1);\r
+\r
             if (midiOutPort == nullptr)\r
                 throw std::runtime_error ("Timed out waiting for midi output port creation");\r
 \r
             auto bufferFactory = WinRTWrapper::getInstance()->getWRLFactory<IBufferFactory> (&RuntimeClass_Windows_Storage_Streams_Buffer[0]);\r
+\r
             if (bufferFactory == nullptr)\r
                 throw std::runtime_error ("Failed to create output buffer factory");\r
 \r
-            HRESULT hr = bufferFactory->Create (static_cast<UINT32> (65536), buffer.resetAndGetPointerAddress());\r
+            auto hr = bufferFactory->Create (static_cast<UINT32> (65536), buffer.resetAndGetPointerAddress());\r
+\r
             if (FAILED (hr))\r
                 throw std::runtime_error ("Failed to create output buffer");\r
 \r
             hr = buffer->QueryInterface (bufferByteAccess.resetAndGetPointerAddress());\r
+\r
             if (FAILED (hr))\r
                 throw std::runtime_error ("Failed to get buffer byte access");\r
 \r
             hr = bufferByteAccess->Buffer (&bufferData);\r
+\r
             if (FAILED (hr))\r
                 throw std::runtime_error ("Failed to get buffer data pointer");\r
         }\r
@@ -1017,20 +1162,17 @@ private:
 \r
         void sendMessageNow (const MidiMessage& message) override\r
         {\r
-            const UINT32 numBytes = message.getRawDataSize();\r
-            HRESULT hr = buffer->put_Length (numBytes);\r
+            auto numBytes = message.getRawDataSize();\r
+            auto hr = buffer->put_Length (numBytes);\r
+\r
             if (FAILED (hr))\r
                 jassertfalse;\r
 \r
             memcpy_s (bufferData, numBytes, message.getRawData(), numBytes);\r
-\r
             midiOutPort->SendBuffer (buffer);\r
         }\r
 \r
-        String getDeviceName() override\r
-        {\r
-            return deviceName;\r
-        }\r
+        String getDeviceName() override    { return deviceName; }\r
 \r
         String deviceName;\r
         ComSmartPtr<IMidiOutPort> midiOutPort;\r
@@ -1041,137 +1183,79 @@ private:
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WinRTOutputWrapper);\r
     };\r
 \r
-public:\r
-    WinRTMidiService()\r
-    {\r
-        if (! WinRTWrapper::getInstance()->isInitialised())\r
-            throw std::runtime_error ("Failed to initialise the WinRT wrapper");\r
-\r
-        midiInFactory = WinRTWrapper::getInstance()->getWRLFactory<IMidiInPortStatics> (&RuntimeClass_Windows_Devices_Midi_MidiInPort[0]);\r
-        if (midiInFactory == nullptr)\r
-            throw std::runtime_error ("Failed to create midi in factory");\r
-\r
-        midiOutFactory = WinRTWrapper::getInstance()->getWRLFactory<IMidiOutPortStatics> (&RuntimeClass_Windows_Devices_Midi_MidiOutPort[0]);\r
-        if (midiOutFactory == nullptr)\r
-            throw std::runtime_error ("Failed to create midi out factory");\r
+    ComSmartPtr<IMidiInPortStatics>  midiInFactory;\r
+    ComSmartPtr<IMidiOutPortStatics> midiOutFactory;\r
 \r
-        inputDeviceWatcher  = new MidiIODeviceWatcher<IMidiInPortStatics>  (midiInFactory);\r
-        if (! inputDeviceWatcher->start())\r
-            throw std::runtime_error ("Failed to start midi input device watcher");\r
+    std::unique_ptr<MidiIODeviceWatcher<IMidiInPortStatics>>  inputDeviceWatcher;\r
+    std::unique_ptr<MidiIODeviceWatcher<IMidiOutPortStatics>> outputDeviceWatcher;\r
 \r
-        outputDeviceWatcher = new MidiIODeviceWatcher<IMidiOutPortStatics> (midiOutFactory);\r
-        if (! outputDeviceWatcher->start())\r
-            throw std::runtime_error ("Failed to start midi output device watcher");\r
-    }\r
+    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WinRTMidiService)\r
+};\r
 \r
-    ~WinRTMidiService()\r
-    {\r
-    }\r
+#endif   // JUCE_USE_WINRT_MIDI\r
 \r
-    StringArray getDevices (bool isInput) override\r
+//==============================================================================\r
+struct MidiService :  public DeletedAtShutdown\r
+{\r
+    MidiService()\r
     {\r
-        return isInput ? inputDeviceWatcher ->getDevices()\r
-                       : outputDeviceWatcher->getDevices();\r
-    }\r
+       #if JUCE_USE_WINRT_MIDI\r
+        try\r
+        {\r
+            internal.reset (new WinRTMidiService());\r
+            return;\r
+        }\r
+        catch (std::runtime_error&) {}\r
+       #endif\r
 \r
-    int getDefaultDeviceIndex (bool isInput) override\r
-    {\r
-        return isInput ? inputDeviceWatcher ->getDefaultDeviceIndex()\r
-                       : outputDeviceWatcher->getDefaultDeviceIndex();\r
+        internal.reset (new Win32MidiService());\r
     }\r
 \r
-    InputWrapper* createInputWrapper (MidiInput* input, int index, MidiInputCallback* callback) override\r
+    ~MidiService()\r
     {\r
-        return new WinRTInputWrapper (*this, input, index, *callback);\r
+        clearSingletonInstance();\r
     }\r
 \r
-    OutputWrapper* createOutputWrapper (int index) override\r
+    static MidiServiceType& getService()\r
     {\r
-        return new WinRTOutputWrapper (*this, index);\r
+        jassert (getInstance()->internal != nullptr);\r
+        return *getInstance()->internal.get();\r
     }\r
 \r
-    ComSmartPtr<IMidiInPortStatics>  midiInFactory;\r
-    ComSmartPtr<IMidiOutPortStatics> midiOutFactory;\r
-\r
-    ScopedPointer<MidiIODeviceWatcher<IMidiInPortStatics>>  inputDeviceWatcher;\r
-    ScopedPointer<MidiIODeviceWatcher<IMidiOutPortStatics>> outputDeviceWatcher;\r
-\r
-    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WinRTMidiService)\r
-};\r
-\r
-#endif   // JUCE_USE_WINRT_MIDI\r
-\r
-//==============================================================================\r
-class MidiService :  public DeletedAtShutdown\r
-{\r
-public:\r
-    ~MidiService();\r
-\r
-    MidiServiceType* getService();\r
-\r
     JUCE_DECLARE_SINGLETON (MidiService, false)\r
 \r
 private:\r
-    MidiService();\r
-\r
-    ScopedPointer<MidiServiceType> internal;\r
+    std::unique_ptr<MidiServiceType> internal;\r
 };\r
 \r
 JUCE_IMPLEMENT_SINGLETON (MidiService)\r
 \r
-MidiService::~MidiService()\r
-{\r
-    clearSingletonInstance();\r
-}\r
-\r
-MidiServiceType* MidiService::getService()\r
-{\r
-    return internal.get();\r
-}\r
-\r
-MidiService::MidiService()\r
-{\r
-   #if JUCE_USE_WINRT_MIDI\r
-    try\r
-    {\r
-        internal = new WinRTMidiService();\r
-        return;\r
-    }\r
-    catch (std::runtime_error&)\r
-    {\r
-    }\r
-   #endif\r
-\r
-    internal = new WindowsMidiService();\r
-}\r
-\r
 //==============================================================================\r
 StringArray MidiInput::getDevices()\r
 {\r
-    return MidiService::getInstance()->getService()->getDevices (true);\r
+    return MidiService::getService().getDevices (true);\r
 }\r
 \r
 int MidiInput::getDefaultDeviceIndex()\r
 {\r
-    return MidiService::getInstance()->getService()->getDefaultDeviceIndex (true);\r
+    return MidiService::getService().getDefaultDeviceIndex (true);\r
 }\r
 \r
-MidiInput::MidiInput (const String& deviceName)\r
-    : name (deviceName)\r
+MidiInput::MidiInput (const String& deviceName)  : name (deviceName)\r
 {\r
 }\r
 \r
-MidiInput* MidiInput::openDevice (const int index, MidiInputCallback* const callback)\r
+MidiInput* MidiInput::openDevice (int index, MidiInputCallback* callback)\r
 {\r
     if (callback == nullptr)\r
         return nullptr;\r
 \r
-    ScopedPointer<MidiInput> in (new MidiInput (String()));\r
-    ScopedPointer<MidiServiceType::InputWrapper> wrapper;\r
+    std::unique_ptr<MidiInput> in (new MidiInput (String()));\r
+    std::unique_ptr<MidiServiceType::InputWrapper> wrapper;\r
 \r
     try\r
     {\r
-        wrapper = MidiService::getInstance()->getService()->createInputWrapper (in, index, callback);\r
+        wrapper.reset (MidiService::getService().createInputWrapper (*in, index, *callback));\r
     }\r
     catch (std::runtime_error&)\r
     {\r
@@ -1194,28 +1278,28 @@ void MidiInput::stop()    { static_cast<MidiServiceType::InputWrapper*> (interna
 //==============================================================================\r
 StringArray MidiOutput::getDevices()\r
 {\r
-    return MidiService::getInstance()->getService()->getDevices (false);\r
+    return MidiService::getService().getDevices (false);\r
 }\r
 \r
 int MidiOutput::getDefaultDeviceIndex()\r
 {\r
-    return MidiService::getInstance()->getService()->getDefaultDeviceIndex (false);\r
+    return MidiService::getService().getDefaultDeviceIndex (false);\r
 }\r
 \r
-MidiOutput* MidiOutput::openDevice (const int index)\r
+MidiOutput* MidiOutput::openDevice (int index)\r
 {\r
-    ScopedPointer<MidiServiceType::OutputWrapper> wrapper;\r
+    std::unique_ptr<MidiServiceType::OutputWrapper> wrapper;\r
 \r
     try\r
     {\r
-        wrapper = MidiService::getInstance()->getService()->createOutputWrapper (index);\r
+        wrapper.reset (MidiService::getService().createOutputWrapper (index));\r
     }\r
     catch (std::runtime_error&)\r
     {\r
         return nullptr;\r
     }\r
 \r
-    ScopedPointer<MidiOutput> out (new MidiOutput (wrapper->getDeviceName()));\r
+    std::unique_ptr<MidiOutput> out (new MidiOutput (wrapper->getDeviceName()));\r
     out->internal = wrapper.release();\r
     return out.release();\r
 }\r
index eb3df5bb378082ed6c076de8d4b98bc6c4935391..62908fed4d4d1f668a9462e63a3f86aa65c02830 100644 (file)
@@ -192,7 +192,7 @@ JUCE_IUNKNOWNCLASS (IMMDeviceEnumerator, "A95664D2-9614-4F35-A746-DE8DB63617E6")
 \r
 JUCE_COMCLASS (MMDeviceEnumerator, "BCDE0395-E52F-467C-8E3D-C4579291692E");\r
 \r
-typedef LONGLONG REFERENCE_TIME;\r
+using REFERENCE_TIME = LONGLONG;\r
 \r
 enum AVRT_PRIORITY\r
 {\r
@@ -308,7 +308,7 @@ JUCE_IUNKNOWNCLASS (IAudioSessionControl, "F4B1A599-7266-4319-A8CA-E70ACB11E8CD"
 namespace WasapiClasses\r
 {\r
 \r
-String getDeviceID (IMMDevice* const device)\r
+String getDeviceID (IMMDevice* device)\r
 {\r
     String s;\r
     WCHAR* deviceId = nullptr;\r
@@ -332,17 +332,17 @@ EDataFlow getDataFlow (const ComSmartPtr<IMMDevice>& device)
     return flow;\r
 }\r
 \r
-int refTimeToSamples (const REFERENCE_TIME& t, const double sampleRate) noexcept\r
+int refTimeToSamples (const REFERENCE_TIME& t, double sampleRate) noexcept\r
 {\r
     return roundToInt (sampleRate * ((double) t) * 0.0000001);\r
 }\r
 \r
-REFERENCE_TIME samplesToRefTime (const int numSamples, const double sampleRate) noexcept\r
+REFERENCE_TIME samplesToRefTime (int numSamples, double sampleRate) noexcept\r
 {\r
     return (REFERENCE_TIME) ((numSamples * 10000.0 * 1000.0 / sampleRate) + 0.5);\r
 }\r
 \r
-void copyWavFormat (WAVEFORMATEXTENSIBLE& dest, const WAVEFORMATEX* const src) noexcept\r
+void copyWavFormat (WAVEFORMATEXTENSIBLE& dest, const WAVEFORMATEX* src) noexcept\r
 {\r
     memcpy (&dest, src, src->wFormatTag == WAVE_FORMAT_EXTENSIBLE ? sizeof (WAVEFORMATEXTENSIBLE)\r
                                                                   : sizeof (WAVEFORMATEX));\r
@@ -352,21 +352,8 @@ void copyWavFormat (WAVEFORMATEXTENSIBLE& dest, const WAVEFORMATEX* const src) n
 class WASAPIDeviceBase\r
 {\r
 public:\r
-    WASAPIDeviceBase (const ComSmartPtr<IMMDevice>& d, const bool exclusiveMode)\r
-        : device (d),\r
-          sampleRate (0),\r
-          defaultSampleRate (0),\r
-          numChannels (0),\r
-          actualNumChannels (0),\r
-          minBufferSize (0),\r
-          defaultBufferSize (0),\r
-          latencySamples (0),\r
-          useExclusiveMode (exclusiveMode),\r
-          actualBufferSize (0),\r
-          bytesPerSample (0),\r
-          bytesPerFrame (0),\r
-          sampleRateHasChanged (false),\r
-          shouldClose (false)\r
+    WASAPIDeviceBase (const ComSmartPtr<IMMDevice>& d, bool exclusiveMode)\r
+        : device (d), useExclusiveMode (exclusiveMode)\r
     {\r
         clientEvent = CreateEvent (nullptr, false, false, nullptr);\r
 \r
@@ -443,20 +430,19 @@ public:
         {\r
             sampleRateHasChanged = false;\r
             shouldClose = false;\r
-\r
             channelMaps.clear();\r
+\r
             for (int i = 0; i <= channels.getHighestBit(); ++i)\r
                 if (channels[i])\r
                     channelMaps.add (i);\r
 \r
             REFERENCE_TIME latency;\r
+\r
             if (check (client->GetStreamLatency (&latency)))\r
                 latencySamples = refTimeToSamples (latency, sampleRate);\r
 \r
             (void) check (client->GetBufferSize (&actualBufferSize));\r
-\r
             createSessionEventCallback();\r
-\r
             return check (client->SetEventHandle (clientEvent));\r
         }\r
 \r
@@ -486,26 +472,25 @@ public:
     //==============================================================================\r
     ComSmartPtr<IMMDevice> device;\r
     ComSmartPtr<IAudioClient> client;\r
-    double sampleRate, defaultSampleRate;\r
-    int numChannels, actualNumChannels;\r
-    int minBufferSize, defaultBufferSize, latencySamples;\r
-    DWORD mixFormatChannelMask;\r
+    double sampleRate = 0, defaultSampleRate = 0;\r
+    int numChannels = 0, actualNumChannels = 0;\r
+    int minBufferSize = 0, defaultBufferSize = 0, latencySamples = 0;\r
+    DWORD mixFormatChannelMask = 0;\r
     const bool useExclusiveMode;\r
     Array<double> rates;\r
-    HANDLE clientEvent;\r
+    HANDLE clientEvent = {};\r
     BigInteger channels;\r
     Array<int> channelMaps;\r
-    UINT32 actualBufferSize;\r
-    int bytesPerSample, bytesPerFrame;\r
-    bool sampleRateHasChanged, shouldClose;\r
+    UINT32 actualBufferSize = 0;\r
+    int bytesPerSample = 0, bytesPerFrame = 0;\r
+    bool sampleRateHasChanged = false, shouldClose = false;\r
 \r
     virtual void updateFormat (bool isFloat) = 0;\r
 \r
 private:\r
     //==============================================================================\r
-    class SessionEventCallback  : public ComBaseClassHelper<IAudioSessionEvents>\r
+    struct SessionEventCallback  : public ComBaseClassHelper<IAudioSessionEvents>\r
     {\r
-    public:\r
         SessionEventCallback (WASAPIDeviceBase& d) : owner (d) {}\r
 \r
         JUCE_COMRESULT OnDisplayNameChanged (LPCWSTR, LPCGUID)                 { return S_OK; }\r
@@ -513,6 +498,7 @@ private:
         JUCE_COMRESULT OnSimpleVolumeChanged (float, BOOL, LPCGUID)            { return S_OK; }\r
         JUCE_COMRESULT OnChannelVolumeChanged (DWORD, float*, DWORD, LPCGUID)  { return S_OK; }\r
         JUCE_COMRESULT OnGroupingParamChanged (LPCGUID, LPCGUID)               { return S_OK; }\r
+\r
         JUCE_COMRESULT OnStateChanged(AudioSessionState state)\r
         {\r
             if (state == AudioSessionStateInactive || state == AudioSessionStateExpired)\r
@@ -530,9 +516,7 @@ private:
             return S_OK;\r
         }\r
 \r
-    private:\r
         WASAPIDeviceBase& owner;\r
-\r
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SessionEventCallback)\r
     };\r
 \r
@@ -644,7 +628,7 @@ private:
         return false;\r
     }\r
 \r
-    bool tryInitialisingWithBufferSize (const int bufferSizeSamples)\r
+    bool tryInitialisingWithBufferSize (int bufferSizeSamples)\r
     {\r
         WAVEFORMATEXTENSIBLE format;\r
 \r
@@ -701,9 +685,8 @@ private:
 class WASAPIInputDevice  : public WASAPIDeviceBase\r
 {\r
 public:\r
-    WASAPIInputDevice (const ComSmartPtr<IMMDevice>& d, const bool exclusiveMode)\r
-        : WASAPIDeviceBase (d, exclusiveMode),\r
-          reservoir (1, 1)\r
+    WASAPIInputDevice (const ComSmartPtr<IMMDevice>& d, bool exclusiveMode)\r
+        : WASAPIDeviceBase (d, exclusiveMode)\r
     {\r
     }\r
 \r
@@ -712,7 +695,7 @@ public:
         close();\r
     }\r
 \r
-    bool open (const double newSampleRate, const BigInteger& newChannels, int bufferSizeSamples)\r
+    bool open (double newSampleRate, const BigInteger& newChannels, int bufferSizeSamples)\r
     {\r
         return openClient (newSampleRate, newChannels, bufferSizeSamples)\r
                 && (numChannels == 0 || check (client->GetService (__uuidof (IAudioCaptureClient),\r
@@ -724,14 +707,15 @@ public:
         closeClient();\r
         captureClient = nullptr;\r
         reservoir.reset();\r
-        reservoirReadPos = reservoirWritePos = 0;\r
+        reservoirReadPos = 0;\r
+        reservoirWritePos = 0;\r
     }\r
 \r
     template<class SourceType>\r
     void updateFormatWithType (SourceType*) noexcept\r
     {\r
-        typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst> NativeType;\r
-        converter = new AudioData::ConverterInstance<AudioData::Pointer<SourceType, AudioData::LittleEndian, AudioData::Interleaved, AudioData::Const>, NativeType> (actualNumChannels, 1);\r
+        using NativeType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>;\r
+        converter.reset (new AudioData::ConverterInstance<AudioData::Pointer<SourceType, AudioData::LittleEndian, AudioData::Interleaved, AudioData::Const>, NativeType> (actualNumChannels, 1));\r
     }\r
 \r
     void updateFormat (bool isFloat) override\r
@@ -742,12 +726,13 @@ public:
         else                            updateFormatWithType ((AudioData::Int16*)   nullptr);\r
     }\r
 \r
-    bool start (const int userBufferSize)\r
+    bool start (int userBufferSize)\r
     {\r
         reservoirSize = actualBufferSize + userBufferSize;\r
         reservoirMask = nextPowerOfTwo (reservoirSize) - 1;\r
         reservoir.setSize ((reservoirMask + 1) * bytesPerFrame, true);\r
-        reservoirReadPos = reservoirWritePos = 0;\r
+        reservoirReadPos = 0;\r
+        reservoirWritePos = 0;\r
         xruns = 0;\r
 \r
         if (! check (client->Start()))\r
@@ -768,7 +753,7 @@ public:
             captureClient->ReleaseBuffer (numSamplesAvailable);\r
     }\r
 \r
-    int getNumSamplesInReservoir() const noexcept    { return reservoirWritePos - reservoirReadPos; }\r
+    int getNumSamplesInReservoir() const noexcept    { return reservoirWritePos.load() - reservoirReadPos.load(); }\r
 \r
     void handleDeviceBuffer()\r
     {\r
@@ -788,9 +773,9 @@ public:
 \r
             while (samplesLeft > 0)\r
             {\r
-                const int localWrite = reservoirWritePos & reservoirMask;\r
-                const int samplesToDo = jmin (samplesLeft, reservoirMask + 1 - localWrite);\r
-                const int samplesToDoBytes = samplesToDo * bytesPerFrame;\r
+                auto localWrite = reservoirWritePos.load() & reservoirMask;\r
+                auto samplesToDo = jmin (samplesLeft, reservoirMask + 1 - localWrite);\r
+                auto samplesToDoBytes = samplesToDo * bytesPerFrame;\r
 \r
                 void* reservoirPtr = addBytesToPointer (reservoir.getData(), localWrite * bytesPerFrame);\r
 \r
@@ -805,7 +790,7 @@ public:
             }\r
 \r
             if (getNumSamplesInReservoir() > reservoirSize)\r
-                reservoirReadPos = reservoirWritePos - reservoirSize;\r
+                reservoirReadPos = reservoirWritePos.load() - reservoirSize;\r
 \r
             captureClient->ReleaseBuffer (numSamplesAvailable);\r
         }\r
@@ -829,13 +814,13 @@ public:
 \r
         while (bufferSize > 0)\r
         {\r
-            const int localRead = reservoirReadPos & reservoirMask;\r
+            auto localRead = reservoirReadPos.load() & reservoirMask;\r
+            auto samplesToDo = jmin (bufferSize, getNumSamplesInReservoir(), reservoirMask + 1 - localRead);\r
 \r
-            const int samplesToDo = jmin (bufferSize, getNumSamplesInReservoir(), reservoirMask + 1 - localRead);\r
             if (samplesToDo <= 0)\r
                 break;\r
 \r
-            const int reservoirOffset = localRead * bytesPerFrame;\r
+            auto reservoirOffset = localRead * bytesPerFrame;\r
 \r
             for (int i = 0; i < numDestBuffers; ++i)\r
                 converter->convertSamples (destBuffers[i] + offset, 0, addBytesToPointer (reservoir.getData(), reservoirOffset), channelMaps.getUnchecked(i), samplesToDo);\r
@@ -849,9 +834,9 @@ public:
     ComSmartPtr<IAudioCaptureClient> captureClient;\r
     MemoryBlock reservoir;\r
     int reservoirSize, reservoirMask, xruns;\r
-    volatile int reservoirReadPos, reservoirWritePos;\r
+    std::atomic<int> reservoirReadPos, reservoirWritePos;\r
 \r
-    ScopedPointer<AudioData::Converter> converter;\r
+    std::unique_ptr<AudioData::Converter> converter;\r
 \r
 private:\r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WASAPIInputDevice)\r
@@ -861,7 +846,7 @@ private:
 class WASAPIOutputDevice  : public WASAPIDeviceBase\r
 {\r
 public:\r
-    WASAPIOutputDevice (const ComSmartPtr<IMMDevice>& d, const bool exclusiveMode)\r
+    WASAPIOutputDevice (const ComSmartPtr<IMMDevice>& d, bool exclusiveMode)\r
         : WASAPIDeviceBase (d, exclusiveMode)\r
     {\r
     }\r
@@ -871,7 +856,7 @@ public:
         close();\r
     }\r
 \r
-    bool open (const double newSampleRate, const BigInteger& newChannels, int bufferSizeSamples)\r
+    bool open (double newSampleRate, const BigInteger& newChannels, int bufferSizeSamples)\r
     {\r
         return openClient (newSampleRate, newChannels, bufferSizeSamples)\r
                 && (numChannels == 0 || check (client->GetService (__uuidof (IAudioRenderClient),\r
@@ -887,8 +872,8 @@ public:
     template<class DestType>\r
     void updateFormatWithType (DestType*)\r
     {\r
-        typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const> NativeType;\r
-        converter = new AudioData::ConverterInstance<NativeType, AudioData::Pointer<DestType, AudioData::LittleEndian, AudioData::Interleaved, AudioData::NonConst>> (1, actualNumChannels);\r
+        using NativeType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>;\r
+        converter.reset (new AudioData::ConverterInstance<NativeType, AudioData::Pointer<DestType, AudioData::LittleEndian, AudioData::Interleaved, AudioData::NonConst>> (1, actualNumChannels));\r
     }\r
 \r
     void updateFormat (bool isFloat) override\r
@@ -901,7 +886,7 @@ public:
 \r
     bool start()\r
     {\r
-        int samplesToDo = getNumSamplesAvailableToCopy();\r
+        auto samplesToDo = getNumSamplesAvailableToCopy();\r
         uint8* outputData;\r
 \r
         if (check (renderClient->GetBuffer (samplesToDo, &outputData)))\r
@@ -918,6 +903,7 @@ public:
         if (! useExclusiveMode)\r
         {\r
             UINT32 padding = 0;\r
+\r
             if (check (client->GetCurrentPadding (&padding)))\r
                 return actualBufferSize - (int) padding;\r
         }\r
@@ -925,7 +911,7 @@ public:
         return actualBufferSize;\r
     }\r
 \r
-    void copyBuffers (const float** const srcBuffers, const int numSrcBuffers, int bufferSize,\r
+    void copyBuffers (const float** srcBuffers, int numSrcBuffers, int bufferSize,\r
                       WASAPIInputDevice* inputDevice, Thread& thread)\r
     {\r
         if (numChannels <= 0)\r
@@ -969,7 +955,7 @@ public:
     }\r
 \r
     ComSmartPtr<IAudioRenderClient> renderClient;\r
-    ScopedPointer<AudioData::Converter> converter;\r
+    std::unique_ptr<AudioData::Converter> converter;\r
 \r
 private:\r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WASAPIOutputDevice)\r
@@ -985,18 +971,12 @@ public:
                          const String& typeName,\r
                          const String& outputDeviceID,\r
                          const String& inputDeviceID,\r
-                         const bool exclusiveMode)\r
+                         bool exclusiveMode)\r
         : AudioIODevice (deviceName, typeName),\r
           Thread ("JUCE WASAPI"),\r
           outputDeviceId (outputDeviceID),\r
           inputDeviceId (inputDeviceID),\r
-          useExclusiveMode (exclusiveMode),\r
-          isOpen_ (false),\r
-          isStarted (false),\r
-          currentBufferSizeSamples (0),\r
-          currentSampleRate (0),\r
-          callback (nullptr),\r
-          deviceBecameInactive (false)\r
+          useExclusiveMode (exclusiveMode)\r
     {\r
     }\r
 \r
@@ -1024,8 +1004,8 @@ public:
             }\r
             else\r
             {\r
-                WASAPIDeviceBase* d = inputDevice != nullptr ? static_cast<WASAPIDeviceBase*> (inputDevice)\r
-                                                             : static_cast<WASAPIDeviceBase*> (outputDevice);\r
+                WASAPIDeviceBase* d = inputDevice != nullptr ? static_cast<WASAPIDeviceBase*> (inputDevice.get())\r
+                                                             : static_cast<WASAPIDeviceBase*> (outputDevice.get());\r
                 defaultSampleRate = d->defaultSampleRate;\r
                 minBufferSize = d->minBufferSize;\r
                 defaultBufferSize = d->defaultBufferSize;\r
@@ -1085,7 +1065,7 @@ public:
     BigInteger getActiveOutputChannels() const override     { return outputDevice != nullptr ? outputDevice->channels : BigInteger(); }\r
     BigInteger getActiveInputChannels() const override      { return inputDevice  != nullptr ? inputDevice->channels  : BigInteger(); }\r
     String getLastError() override                          { return lastError; }\r
-    int getXRunCount () const noexcept override             { return inputDevice != nullptr ? inputDevice->xruns : -1; }\r
+    int getXRunCount() const noexcept override              { return inputDevice != nullptr ? inputDevice->xruns : -1; }\r
 \r
     String open (const BigInteger& inputChannels, const BigInteger& outputChannels,\r
                  double sampleRate, int bufferSizeSamples) override\r
@@ -1209,7 +1189,7 @@ public:
     {\r
         if (isStarted)\r
         {\r
-            AudioIODeviceCallback* const callbackLocal = callback;\r
+            auto* callbackLocal = callback;\r
 \r
             {\r
                 const ScopedLock sl (startStopLock);\r
@@ -1230,9 +1210,8 @@ public:
         if (avSetMmThreadCharacteristics != 0 && avSetMmThreadPriority != 0)\r
         {\r
             DWORD dummy = 0;\r
-            HANDLE h = avSetMmThreadCharacteristics (L"Pro Audio", &dummy);\r
 \r
-            if (h != 0)\r
+            if (auto h = avSetMmThreadCharacteristics (L"Pro Audio", &dummy))\r
                 avSetMmThreadPriority (h, AVRT_PRIORITY_NORMAL);\r
         }\r
     }\r
@@ -1241,15 +1220,15 @@ public:
     {\r
         setMMThreadPriority();\r
 \r
-        const int bufferSize        = currentBufferSizeSamples;\r
-        const int numInputBuffers   = getActiveInputChannels().countNumberOfSetBits();\r
-        const int numOutputBuffers  = getActiveOutputChannels().countNumberOfSetBits();\r
+        auto bufferSize        = currentBufferSizeSamples;\r
+        auto numInputBuffers   = getActiveInputChannels().countNumberOfSetBits();\r
+        auto numOutputBuffers  = getActiveOutputChannels().countNumberOfSetBits();\r
         bool sampleRateHasChanged = false;\r
 \r
         AudioBuffer<float> ins  (jmax (1, numInputBuffers),  bufferSize + 32);\r
         AudioBuffer<float> outs (jmax (1, numOutputBuffers), bufferSize + 32);\r
-        float** const inputBuffers  = ins.getArrayOfWritePointers();\r
-        float** const outputBuffers = outs.getArrayOfWritePointers();\r
+        auto inputBuffers  = ins.getArrayOfWritePointers();\r
+        auto outputBuffers = outs.getArrayOfWritePointers();\r
         ins.clear();\r
         outs.clear();\r
 \r
@@ -1303,7 +1282,7 @@ public:
             {\r
                 // Note that this function is handed the input device so it can check for the event and make sure\r
                 // the input reservoir is filled up correctly even when bufferSize > device actualBufferSize\r
-                outputDevice->copyBuffers (const_cast<const float**> (outputBuffers), numOutputBuffers, bufferSize, inputDevice, *this);\r
+                outputDevice->copyBuffers (const_cast<const float**> (outputBuffers), numOutputBuffers, bufferSize, inputDevice.get(), *this);\r
 \r
                 if (outputDevice->sampleRateHasChanged)\r
                 {\r
@@ -1326,24 +1305,24 @@ public:
 \r
 private:\r
     // Device stats...\r
-    ScopedPointer<WASAPIInputDevice> inputDevice;\r
-    ScopedPointer<WASAPIOutputDevice> outputDevice;\r
+    std::unique_ptr<WASAPIInputDevice> inputDevice;\r
+    std::unique_ptr<WASAPIOutputDevice> outputDevice;\r
     const bool useExclusiveMode;\r
-    double defaultSampleRate;\r
-    int minBufferSize, defaultBufferSize;\r
-    int latencyIn, latencyOut;\r
+    double defaultSampleRate = 0;\r
+    int minBufferSize = 0, defaultBufferSize = 0;\r
+    int latencyIn = 0, latencyOut = 0;\r
     Array<double> sampleRates;\r
     Array<int> bufferSizes;\r
 \r
     // Active state...\r
-    bool isOpen_, isStarted;\r
-    int currentBufferSizeSamples;\r
-    double currentSampleRate;\r
+    bool isOpen_ = false, isStarted = false;\r
+    int currentBufferSizeSamples = 0;\r
+    double currentSampleRate = 0;\r
 \r
-    AudioIODeviceCallback* callback;\r
+    AudioIODeviceCallback* callback = {};\r
     CriticalSection startStopLock;\r
 \r
-    bool sampleRateChangedByOutput, deviceBecameInactive;\r
+    bool sampleRateChangedByOutput = false, deviceBecameInactive = false;\r
 \r
     BigInteger lastKnownInputChannels, lastKnownOutputChannels;\r
 \r
@@ -1351,37 +1330,42 @@ private:
     bool createDevices()\r
     {\r
         ComSmartPtr<IMMDeviceEnumerator> enumerator;\r
+\r
         if (! check (enumerator.CoCreateInstance (__uuidof (MMDeviceEnumerator))))\r
             return false;\r
 \r
         ComSmartPtr<IMMDeviceCollection> deviceCollection;\r
+\r
         if (! check (enumerator->EnumAudioEndpoints (eAll, DEVICE_STATE_ACTIVE, deviceCollection.resetAndGetPointerAddress())))\r
             return false;\r
 \r
         UINT32 numDevices = 0;\r
+\r
         if (! check (deviceCollection->GetCount (&numDevices)))\r
             return false;\r
 \r
         for (UINT32 i = 0; i < numDevices; ++i)\r
         {\r
             ComSmartPtr<IMMDevice> device;\r
+\r
             if (! check (deviceCollection->Item (i, device.resetAndGetPointerAddress())))\r
                 continue;\r
 \r
-            const String deviceId (getDeviceID (device));\r
+            auto deviceId = getDeviceID (device);\r
+\r
             if (deviceId.isEmpty())\r
                 continue;\r
 \r
-            const EDataFlow flow = getDataFlow (device);\r
+            auto flow = getDataFlow (device);\r
 \r
             if (deviceId == inputDeviceId && flow == eCapture)\r
-                inputDevice = new WASAPIInputDevice (device, useExclusiveMode);\r
+                inputDevice.reset (new WASAPIInputDevice (device, useExclusiveMode));\r
             else if (deviceId == outputDeviceId && flow == eRender)\r
-                outputDevice = new WASAPIOutputDevice (device, useExclusiveMode);\r
+                outputDevice.reset (new WASAPIOutputDevice (device, useExclusiveMode));\r
         }\r
 \r
         return (outputDeviceId.isEmpty() || (outputDevice != nullptr && outputDevice->isOk()))\r
-            && (inputDeviceId.isEmpty() || (inputDevice != nullptr && inputDevice->isOk()));\r
+             && (inputDeviceId.isEmpty() || (inputDevice != nullptr && inputDevice->isOk()));\r
     }\r
 \r
     //==============================================================================\r
@@ -1428,8 +1412,7 @@ public:
     WASAPIAudioIODeviceType (bool exclusive)\r
         : AudioIODeviceType (exclusive ? "Windows Audio (Exclusive Mode)" : "Windows Audio"),\r
           DeviceChangeDetector (L"Windows Audio"),\r
-          exclusiveMode (exclusive),\r
-          hasScanned (false)\r
+          exclusiveMode (exclusive)\r
     {\r
     }\r
 \r
@@ -1471,7 +1454,7 @@ public:
     {\r
         jassert (hasScanned); // need to call scanForDevices() before doing this\r
 \r
-        if (WASAPIAudioIODevice* const d = dynamic_cast<WASAPIAudioIODevice*> (device))\r
+        if (auto d = dynamic_cast<WASAPIAudioIODevice*> (device))\r
             return asInput ? inputDeviceIds.indexOf (d->inputDeviceId)\r
                            : outputDeviceIds.indexOf (d->outputDeviceId);\r
 \r
@@ -1485,19 +1468,19 @@ public:
     {\r
         jassert (hasScanned); // need to call scanForDevices() before doing this\r
 \r
-        ScopedPointer<WASAPIAudioIODevice> device;\r
+        std::unique_ptr<WASAPIAudioIODevice> device;\r
 \r
-        const int outputIndex = outputDeviceNames.indexOf (outputDeviceName);\r
-        const int inputIndex = inputDeviceNames.indexOf (inputDeviceName);\r
+        auto outputIndex = outputDeviceNames.indexOf (outputDeviceName);\r
+        auto inputIndex = inputDeviceNames.indexOf (inputDeviceName);\r
 \r
         if (outputIndex >= 0 || inputIndex >= 0)\r
         {\r
-            device = new WASAPIAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName\r
-                                                                            : inputDeviceName,\r
-                                              getTypeName(),\r
-                                              outputDeviceIds [outputIndex],\r
-                                              inputDeviceIds [inputIndex],\r
-                                              exclusiveMode);\r
+            device.reset (new WASAPIAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName\r
+                                                                                 : inputDeviceName,\r
+                                                   getTypeName(),\r
+                                                   outputDeviceIds [outputIndex],\r
+                                                   inputDeviceIds [inputIndex],\r
+                                                   exclusiveMode));\r
 \r
             if (! device->initialise())\r
                 device = nullptr;\r
@@ -1511,7 +1494,8 @@ public:
     StringArray inputDeviceNames, inputDeviceIds;\r
 \r
 private:\r
-    bool exclusiveMode, hasScanned;\r
+    const bool exclusiveMode;\r
+    bool hasScanned = false;\r
     ComSmartPtr<IMMDeviceEnumerator> enumerator;\r
 \r
     //==============================================================================\r
@@ -1538,7 +1522,7 @@ private:
     ComSmartPtr<ChangeNotificationClient> notifyClient;\r
 \r
     //==============================================================================\r
-    static String getDefaultEndpoint (IMMDeviceEnumerator* const enumerator, const bool forCapture)\r
+    static String getDefaultEndpoint (IMMDeviceEnumerator* enumerator, bool forCapture)\r
     {\r
         String s;\r
         IMMDevice* dev = nullptr;\r
@@ -1575,8 +1559,8 @@ private:
             enumerator->RegisterEndpointNotificationCallback (notifyClient);\r
         }\r
 \r
-        const String defaultRenderer (getDefaultEndpoint (enumerator, false));\r
-        const String defaultCapture  (getDefaultEndpoint (enumerator, true));\r
+        auto defaultRenderer = getDefaultEndpoint (enumerator, false);\r
+        auto defaultCapture  = getDefaultEndpoint (enumerator, true);\r
 \r
         ComSmartPtr<IMMDeviceCollection> deviceCollection;\r
         UINT32 numDevices = 0;\r
@@ -1588,18 +1572,21 @@ private:
         for (UINT32 i = 0; i < numDevices; ++i)\r
         {\r
             ComSmartPtr<IMMDevice> device;\r
+\r
             if (! check (deviceCollection->Item (i, device.resetAndGetPointerAddress())))\r
                 continue;\r
 \r
             DWORD state = 0;\r
+\r
             if (! (check (device->GetState (&state)) && state == DEVICE_STATE_ACTIVE))\r
                 continue;\r
 \r
-            const String deviceId (getDeviceID (device));\r
+            auto deviceId = getDeviceID (device);\r
             String name;\r
 \r
             {\r
                 ComSmartPtr<IPropertyStore> properties;\r
+\r
                 if (! check (device->OpenPropertyStore (STGM_READ, properties.resetAndGetPointerAddress())))\r
                     continue;\r
 \r
@@ -1615,7 +1602,7 @@ private:
                 PropVariantClear (&value);\r
             }\r
 \r
-            const EDataFlow flow = getDataFlow (device);\r
+            auto flow = getDataFlow (device);\r
 \r
             if (flow == eRender)\r
             {\r
@@ -1666,9 +1653,11 @@ struct MMDeviceMasterVolume
     MMDeviceMasterVolume()\r
     {\r
         ComSmartPtr<IMMDeviceEnumerator> enumerator;\r
+\r
         if (check (enumerator.CoCreateInstance (__uuidof (MMDeviceEnumerator))))\r
         {\r
             ComSmartPtr<IMMDevice> device;\r
+\r
             if (check (enumerator->GetDefaultAudioEndpoint (eRender, eConsole, device.resetAndGetPointerAddress())))\r
                 check (device->Activate (__uuidof (IAudioEndpointVolume), CLSCTX_INPROC_SERVER, nullptr,\r
                                          (void**) endpointVolume.resetAndGetPointerAddress()));\r
@@ -1678,6 +1667,7 @@ struct MMDeviceMasterVolume
     float getGain() const\r
     {\r
         float vol = 0.0f;\r
+\r
         if (endpointVolume != nullptr)\r
             check (endpointVolume->GetMasterVolumeLevelScalar (&vol));\r
 \r
index bbc3d8ae48ba22c073d66e1f28f149d49bf25e75..34e05748c7a43ab81c71eabae5ed0964ce0c85c2 100644 (file)
@@ -53,8 +53,8 @@ void AudioTransportSource::setSource (PositionableAudioSource* const newSource,
     PositionableAudioSource* newPositionableSource = nullptr;\r
     AudioSource* newMasterSource = nullptr;\r
 \r
-    ScopedPointer<ResamplingAudioSource> oldResamplerSource (resamplerSource);\r
-    ScopedPointer<BufferingAudioSource> oldBufferingSource (bufferingSource);\r
+    std::unique_ptr<ResamplingAudioSource> oldResamplerSource (resamplerSource);\r
+    std::unique_ptr<BufferingAudioSource> oldBufferingSource (bufferingSource);\r
     AudioSource* oldMasterSource = masterSource;\r
 \r
     if (newSource != nullptr)\r
index 1dde682810e783ffe100a2b284448c29dabeb2e3..5ac8dfa484f62d02a3e30183ce9013e47165374e 100644 (file)
@@ -166,11 +166,11 @@ private:
     AudioSource* masterSource = nullptr;\r
 \r
     CriticalSection callbackLock;\r
-    float volatile gain = 1.0f, lastGain = 1.0f;\r
-    bool volatile playing = false, stopped = true;\r
+    float gain = 1.0f, lastGain = 1.0f;\r
+    bool playing = false, stopped = true;\r
     double sampleRate = 44100.0, sourceSampleRate = 0;\r
     int blockSize = 128, readAheadBufferSize = 0;\r
-    bool volatile isPrepared = false, inputStreamEOF = false;\r
+    bool isPrepared = false, inputStreamEOF = false;\r
 \r
     void releaseMasterResources();\r
 \r
index 38b472efb760e0ab196aba0a3de2707dcdbe3f19..6d43ce3b9b9512e970514a4c64efce07490499cd 100644 (file)
@@ -960,7 +960,7 @@ bool AiffAudioFormat::canHandleFile (const File& f)
 \r
 AudioFormatReader* AiffAudioFormat::createReaderFor (InputStream* sourceStream, bool deleteStreamIfOpeningFails)\r
 {\r
-    ScopedPointer<AiffAudioFormatReader> w (new AiffAudioFormatReader (sourceStream));\r
+    std::unique_ptr<AiffAudioFormatReader> w (new AiffAudioFormatReader (sourceStream));\r
 \r
     if (w->sampleRate > 0 && w->numChannels > 0)\r
         return w.release();\r
index c86abe151a440aea9509ffb2ee8a7c069e6cc8be..582362fdc8d81b9bf58f96d9c0606f6d8638090c 100644 (file)
@@ -570,7 +570,7 @@ bool CoreAudioFormat::canDoMono()       { return true; }
 AudioFormatReader* CoreAudioFormat::createReaderFor (InputStream* sourceStream,\r
                                                      bool deleteStreamIfOpeningFails)\r
 {\r
-    ScopedPointer<CoreAudioReader> r (new CoreAudioReader (sourceStream));\r
+    std::unique_ptr<CoreAudioReader> r (new CoreAudioReader (sourceStream));\r
 \r
     if (r->ok)\r
         return r.release();\r
index 6134ebff35095dcffff1a8e69b3d867c05564ee6..b83935c8d52fe982c9b1457755f2d04a6caeb1f4 100644 (file)
@@ -560,7 +560,7 @@ bool FlacAudioFormat::isCompressed()    { return true; }
 \r
 AudioFormatReader* FlacAudioFormat::createReaderFor (InputStream* in, const bool deleteStreamIfOpeningFails)\r
 {\r
-    ScopedPointer<FlacReader> r (new FlacReader (in));\r
+    std::unique_ptr<FlacReader> r (new FlacReader (in));\r
 \r
     if (r->sampleRate > 0)\r
         return r.release();\r
@@ -580,7 +580,7 @@ AudioFormatWriter* FlacAudioFormat::createWriterFor (OutputStream* out,
 {\r
     if (out != nullptr && getPossibleBitDepths().contains (bitsPerSample))\r
     {\r
-        ScopedPointer<FlacWriter> w (new FlacWriter (out, sampleRate, numberOfChannels,\r
+        std::unique_ptr<FlacWriter> w (new FlacWriter (out, sampleRate, numberOfChannels,\r
                                                      (uint32) bitsPerSample, qualityOptionIndex));\r
         if (w->ok)\r
             return w.release();\r
index e8eeb3da9c5343721f6d34723658d8bc8c5df627..b39dbbfccca10efc9c48fa3ca20f0efa2bfc49a5 100644 (file)
@@ -44,8 +44,8 @@ public:
 \r
         if (auto* out = tempWav.getFile().createOutputStream())\r
         {\r
-            writer = wavFormat.createWriterFor (out, sampleRate, numChannels,\r
-                                                bitsPerSample, metadata, 0);\r
+            writer.reset (wavFormat.createWriterFor (out, sampleRate, numChannels,\r
+                                                     bitsPerSample, metadata, 0));\r
 \r
             args.add (appFile.getFullPathName());\r
 \r
@@ -104,7 +104,7 @@ public:
 private:\r
     int vbrLevel, cbrBitrate;\r
     TemporaryFile tempWav { ".wav" };\r
-    ScopedPointer<AudioFormatWriter> writer;\r
+    std::unique_ptr<AudioFormatWriter> writer;\r
     StringArray args;\r
 \r
     bool runLameChildProcess (const TemporaryFile& tempMP3, const StringArray& processArgs) const\r
index a565f4c7a4661e6d69b2212a0bffa1c45c6c8aca..ffa9a2fd98d4cc587821182f65d6d7846eadc182 100644 (file)
@@ -3132,7 +3132,7 @@ StringArray MP3AudioFormat::getQualityOptions()     { return {}; }
 \r
 AudioFormatReader* MP3AudioFormat::createReaderFor (InputStream* sourceStream, const bool deleteStreamIfOpeningFails)\r
 {\r
-    ScopedPointer<MP3Decoder::MP3Reader> r (new MP3Decoder::MP3Reader (sourceStream));\r
+    std::unique_ptr<MP3Decoder::MP3Reader> r (new MP3Decoder::MP3Reader (sourceStream));\r
 \r
     if (r->lengthInSamples > 0)\r
         return r.release();\r
index f106c16558db71cea3d730679096fb471dccad4a..ae46ec2a0bdd6cb14bb4781ba17f7b7b1155c78e 100644 (file)
@@ -448,7 +448,7 @@ bool OggVorbisAudioFormat::isCompressed()   { return true; }
 \r
 AudioFormatReader* OggVorbisAudioFormat::createReaderFor (InputStream* in, bool deleteStreamIfOpeningFails)\r
 {\r
-    ScopedPointer<OggReader> r (new OggReader (in));\r
+    std::unique_ptr<OggReader> r (new OggReader (in));\r
 \r
     if (r->sampleRate > 0)\r
         return r.release();\r
@@ -469,9 +469,9 @@ AudioFormatWriter* OggVorbisAudioFormat::createWriterFor (OutputStream* out,
     if (out == nullptr)\r
         return nullptr;\r
 \r
-    ScopedPointer<OggWriter> w (new OggWriter (out, sampleRate, numChannels,\r
-                                               (unsigned int) bitsPerSample,\r
-                                               qualityOptionIndex, metadataValues));\r
+    std::unique_ptr<OggWriter> w (new OggWriter (out, sampleRate, numChannels,\r
+                                                 (unsigned int) bitsPerSample,\r
+                                                 qualityOptionIndex, metadataValues));\r
 \r
     return w->ok ? w.release() : nullptr;\r
 }\r
@@ -486,7 +486,7 @@ int OggVorbisAudioFormat::estimateOggFileQuality (const File& source)
 {\r
     if (auto* in = source.createInputStream())\r
     {\r
-        ScopedPointer<AudioFormatReader> r (createReaderFor (in, true));\r
+        std::unique_ptr<AudioFormatReader> r (createReaderFor (in, true));\r
 \r
         if (r != nullptr)\r
         {\r
index 1954b8b89fc59fe43c808ad4a675e63be895bcca..975e86daaf7473d8c5af3ea587ac2a467c2c2dd0 100644 (file)
@@ -849,7 +849,7 @@ namespace WavFileHelpers
     {\r
         static void addToMetadata (StringPairArray& destValues, const String& source)\r
         {\r
-            ScopedPointer<XmlElement> xml (XmlDocument::parse (source));\r
+            std::unique_ptr<XmlElement> xml (XmlDocument::parse (source));\r
 \r
             if (xml != nullptr && xml->hasTagName ("ebucore:ebuCoreMain"))\r
             {\r
@@ -1134,10 +1134,10 @@ public:
                                 auto identifier     = (uint32) input->readInt();\r
                                 auto sampleLength   = (uint32) input->readInt();\r
                                 auto purpose        = (uint32) input->readInt();\r
-                                auto country        = (uint16) input->readInt();\r
-                                auto language       = (uint16) input->readInt();\r
-                                auto dialect        = (uint16) input->readInt();\r
-                                auto codePage       = (uint16) input->readInt();\r
+                                auto country        = (uint16) input->readShort();\r
+                                auto language       = (uint16) input->readShort();\r
+                                auto dialect        = (uint16) input->readShort();\r
+                                auto codePage       = (uint16) input->readShort();\r
                                 auto stringLength   = adtlLength - 20;\r
 \r
                                 MemoryBlock textBlock;\r
@@ -1672,7 +1672,7 @@ bool WavAudioFormat::isChannelLayoutSupported (const AudioChannelSet& channelSet
 \r
 AudioFormatReader* WavAudioFormat::createReaderFor (InputStream* sourceStream, bool deleteStreamIfOpeningFails)\r
 {\r
-    ScopedPointer<WavAudioFormatReader> r (new WavAudioFormatReader (sourceStream));\r
+    std::unique_ptr<WavAudioFormatReader> r (new WavAudioFormatReader (sourceStream));\r
 \r
    #if JUCE_USE_OGGVORBIS\r
     if (r->isSubformatOggVorbis)\r
@@ -1738,17 +1738,17 @@ namespace WavFileHelpers
         TemporaryFile tempFile (file);\r
         WavAudioFormat wav;\r
 \r
-        ScopedPointer<AudioFormatReader> reader (wav.createReaderFor (file.createInputStream(), true));\r
+        std::unique_ptr<AudioFormatReader> reader (wav.createReaderFor (file.createInputStream(), true));\r
 \r
         if (reader != nullptr)\r
         {\r
-            ScopedPointer<OutputStream> outStream (tempFile.getFile().createOutputStream());\r
+            std::unique_ptr<OutputStream> outStream (tempFile.getFile().createOutputStream());\r
 \r
             if (outStream != nullptr)\r
             {\r
-                ScopedPointer<AudioFormatWriter> writer (wav.createWriterFor (outStream.get(), reader->sampleRate,\r
-                                                                              reader->numChannels, (int) reader->bitsPerSample,\r
-                                                                              metadata, 0));\r
+                std::unique_ptr<AudioFormatWriter> writer (wav.createWriterFor (outStream.get(), reader->sampleRate,\r
+                                                                                reader->numChannels, (int) reader->bitsPerSample,\r
+                                                                                metadata, 0));\r
 \r
                 if (writer != nullptr)\r
                 {\r
@@ -1771,7 +1771,7 @@ bool WavAudioFormat::replaceMetadataInFile (const File& wavFile, const StringPai
 {\r
     using namespace WavFileHelpers;\r
 \r
-    ScopedPointer<WavAudioFormatReader> reader (static_cast<WavAudioFormatReader*> (createReaderFor (wavFile.createInputStream(), true)));\r
+    std::unique_ptr<WavAudioFormatReader> reader (static_cast<WavAudioFormatReader*> (createReaderFor (wavFile.createInputStream(), true)));\r
 \r
     if (reader != nullptr)\r
     {\r
@@ -1841,9 +1841,9 @@ struct WaveAudioFormatTests : public UnitTest
         {\r
             beginTest ("Creating a basic wave writer");\r
 \r
-            ScopedPointer<AudioFormatWriter> writer (format.createWriterFor (new MemoryOutputStream (memoryBlock, false),\r
-                                                                             44100.0, numTestAudioBufferChannels,\r
-                                                                             32, metadataValues, 0));\r
+            std::unique_ptr<AudioFormatWriter> writer (format.createWriterFor (new MemoryOutputStream (memoryBlock, false),\r
+                                                                               44100.0, numTestAudioBufferChannels,\r
+                                                                               32, metadataValues, 0));\r
             expect (writer != nullptr);\r
 \r
             AudioBuffer<float> buffer (numTestAudioBufferChannels, numTestAudioBufferSamples);\r
@@ -1856,7 +1856,7 @@ struct WaveAudioFormatTests : public UnitTest
         {\r
             beginTest ("Creating a basic wave reader");\r
 \r
-            ScopedPointer<AudioFormatReader> reader (format.createReaderFor (new MemoryInputStream (memoryBlock, false), false));\r
+            std::unique_ptr<AudioFormatReader> reader (format.createReaderFor (new MemoryInputStream (memoryBlock, false), false));\r
             expect (reader != nullptr);\r
             expect (reader->metadataValues == metadataValues, "Somehow, the metadata is different!");\r
         }\r
index e685742038499aa81182b3cc27db820e9133db90..27803e0ddb7993ab1f293998c84aea6a5cdc76ce 100644 (file)
@@ -339,7 +339,7 @@ bool WindowsMediaAudioFormat::isCompressed()    { return true; }
 //==============================================================================\r
 AudioFormatReader* WindowsMediaAudioFormat::createReaderFor (InputStream* sourceStream, bool deleteStreamIfOpeningFails)\r
 {\r
-    ScopedPointer<WindowsMediaCodec::WMAudioReader> r (new WindowsMediaCodec::WMAudioReader (sourceStream));\r
+    std::unique_ptr<WindowsMediaCodec::WMAudioReader> r (new WindowsMediaCodec::WMAudioReader (sourceStream));\r
 \r
     if (r->sampleRate > 0)\r
         return r.release();\r
index 05cebf2153028d4396f5878a692e0f5d7ddc3a70..768271995a605cdae9e69f17a8b37671fa5ff88c 100644 (file)
@@ -141,7 +141,7 @@ AudioFormatReader* AudioFormatManager::createReaderFor (InputStream* audioFileSt
 \r
     if (audioFileStream != nullptr)\r
     {\r
-        ScopedPointer<InputStream> in (audioFileStream);\r
+        std::unique_ptr<InputStream> in (audioFileStream);\r
         auto originalStreamPos = in->getPosition();\r
 \r
         for (auto* af : knownFormats)\r
index d9342dfb035d6703e0c59c17d24b690888099d80..34a981b54a8a46cb03b1e6dac7348729266a4ee1 100644 (file)
@@ -256,8 +256,8 @@ protected:
     template <class DestSampleType, class SourceSampleType, class SourceEndianness>\r
     struct ReadHelper\r
     {\r
-        typedef AudioData::Pointer<DestSampleType, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>    DestType;\r
-        typedef AudioData::Pointer<SourceSampleType, SourceEndianness, AudioData::Interleaved, AudioData::Const>               SourceType;\r
+        using DestType   = AudioData::Pointer<DestSampleType,   AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>;\r
+        using SourceType = AudioData::Pointer<SourceSampleType, SourceEndianness, AudioData::Interleaved, AudioData::Const>;\r
 \r
         template <typename TargetType>\r
         static void read (TargetType* const* destData, int destOffset, int numDestChannels,\r
index f09606632cb2ee17b43f94575951676bccaee99e..b548f3659afd86266d5ceed99bb8deecd7d7cd7b 100644 (file)
@@ -93,8 +93,8 @@ private:
     //==============================================================================\r
     OptionalScopedPointer<AudioFormatReader> reader;\r
 \r
-    int64 volatile nextPlayPos;\r
-    bool volatile looping;\r
+    int64 nextPlayPos;\r
+    bool looping;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioFormatReaderSource)\r
 };\r
index 16ef5a4d7ca503c036053ee71d32822ae50d2364..5a64e737e9b769d1db7939e59228daf4ee4f82c7 100644 (file)
@@ -170,7 +170,7 @@ bool AudioFormatWriter::writeFromFloatArrays (const float* const* channels, int
 \r
     while (numSamples > 0)\r
     {\r
-        const int numToDo = jmin (numSamples, maxSamples);\r
+        auto numToDo = jmin (numSamples, maxSamples);\r
 \r
         for (int i = 0; i < numSourceChannels; ++i)\r
             convertFloatsToInts (chans[i], channels[i] + startSample, numToDo);\r
@@ -217,12 +217,7 @@ public:
         : fifo (numSamples),\r
           buffer (channels, numSamples),\r
           timeSliceThread (tst),\r
-          writer (w),\r
-          receiver (nullptr),\r
-          samplesWritten (0),\r
-          samplesPerFlush (0),\r
-          flushSampleCounter (0),\r
-          isRunning (true)\r
+          writer (w)\r
     {\r
         timeSliceThread.addTimeSliceClient (this);\r
     }\r
@@ -267,7 +262,7 @@ public:
 \r
     int writePendingData()\r
     {\r
-        const int numToDo = fifo.getTotalSize() / 4;\r
+        auto numToDo = fifo.getTotalSize() / 4;\r
 \r
         int start1, size1, start2, size2;\r
         fifo.prepareToRead (numToDo, start1, size1, start2, size2);\r
@@ -278,6 +273,7 @@ public:
         writer->writeFromAudioSampleBuffer (buffer, start1, size1);\r
 \r
         const ScopedLock sl (thumbnailLock);\r
+\r
         if (receiver != nullptr)\r
             receiver->addBlock (samplesWritten, buffer, start1, size1);\r
 \r
@@ -328,12 +324,12 @@ private:
     AbstractFifo fifo;\r
     AudioBuffer<float> buffer;\r
     TimeSliceThread& timeSliceThread;\r
-    ScopedPointer<AudioFormatWriter> writer;\r
+    std::unique_ptr<AudioFormatWriter> writer;\r
     CriticalSection thumbnailLock;\r
-    IncomingDataReceiver* receiver;\r
-    int64 samplesWritten;\r
-    int samplesPerFlush, flushSampleCounter;\r
-    volatile bool isRunning;\r
+    IncomingDataReceiver* receiver = {};\r
+    int64 samplesWritten = 0;\r
+    int samplesPerFlush = 0, flushSampleCounter = 0;\r
+    std::atomic<bool> isRunning { true };\r
 \r
     JUCE_DECLARE_NON_COPYABLE (Buffer)\r
 };\r
index 6c97a14f1ef64ae63453d0a0b249af6b57dc4c4b..3231dc87c20d5995d642cc00be5785b546a53642 100644 (file)
@@ -241,7 +241,7 @@ public:
     private:\r
         class Buffer;\r
         friend struct ContainerDeletePolicy<Buffer>;\r
-        ScopedPointer<Buffer> buffer;\r
+        std::unique_ptr<Buffer> buffer;\r
     };\r
 \r
 protected:\r
@@ -268,8 +268,8 @@ protected:
     template <class DestSampleType, class SourceSampleType, class DestEndianness>\r
     struct WriteHelper\r
     {\r
-        typedef AudioData::Pointer <DestSampleType, DestEndianness, AudioData::Interleaved, AudioData::NonConst>                DestType;\r
-        typedef AudioData::Pointer <SourceSampleType, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>     SourceType;\r
+        using DestType   = AudioData::Pointer <DestSampleType,   DestEndianness,          AudioData::Interleaved,    AudioData::NonConst>;\r
+        using SourceType = AudioData::Pointer <SourceSampleType, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>;\r
 \r
         static void write (void* destData, int numDestChannels, const int* const* source,\r
                            int numSamples, const int sourceOffset = 0) noexcept\r
index 25e726655fe829fde6682c026783e541ccf0c5ad..e45d05df974950733fbfeb4e68fec95b9018e936 100644 (file)
@@ -67,7 +67,7 @@ public:
                       int64 startSampleInFile, int numSamples) override;\r
 \r
 private:\r
-    ScopedPointer<AudioFormatReader> source;\r
+    std::unique_ptr<AudioFormatReader> source;\r
     TimeSliceThread& thread;\r
     int64 nextReadPosition;\r
     const int numBlocks;\r
index 62ad3daaebde8afc0f6188473b028332834c7507..e3fef6e30a71cf8d35d0b125995bec6087386e62 100644 (file)
@@ -85,7 +85,7 @@ public:
 protected:\r
     File file;\r
     Range<int64> mappedSection;\r
-    ScopedPointer<MemoryMappedFile> map;\r
+    std::unique_ptr<MemoryMappedFile> map;\r
     int64 dataChunkStart, dataLength;\r
     int bytesPerFrame;\r
 \r
@@ -102,7 +102,7 @@ protected:
     template <typename SampleType, typename Endianness>\r
     Range<float> scanMinAndMaxInterleaved (int channel, int64 startSampleInFile, int64 numSamples) const noexcept\r
     {\r
-        typedef AudioData::Pointer <SampleType, Endianness, AudioData::Interleaved, AudioData::Const> SourceType;\r
+        using SourceType = AudioData::Pointer <SampleType, Endianness, AudioData::Interleaved, AudioData::Const>;\r
 \r
         return SourceType (addBytesToPointer (sampleToPointer (startSampleInFile), ((int) bitsPerSample / 8) * channel), (int) numChannels)\r
                 .findMinAndMax ((size_t) numSamples);\r
index c8d816d3f08e4d6cf2e31efdfffc5a8dfe6f892d..500777ae488b12678c1bc2d97c941a5d41093f57 100644 (file)
@@ -35,7 +35,7 @@
 \r
   ID:               juce_audio_formats\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE audio file format codecs\r
   description:      Classes for reading and writing various audio file formats.\r
   website:          http://www.juce.com/juce\r
index f3f88c7627fc9a25310d2b7750601e561d15a491..a8cd0717cd0db82a2082538ae803554581b9d4fb 100644 (file)
@@ -94,7 +94,7 @@ private:
     friend class SamplerVoice;\r
 \r
     String name;\r
-    ScopedPointer<AudioBuffer<float>> data;\r
+    std::unique_ptr<AudioBuffer<float>> data;\r
     double sourceSampleRate;\r
     BigInteger midiNotes;\r
     int length = 0, attackSamples = 0, releaseSamples = 0;\r
index d698d0e6502f003c8d2aee7476538bbae1162ea1..c205381d599999ba56dbc483f64d3641405cef8d 100644 (file)
@@ -259,7 +259,7 @@ namespace AAXClasses
         return AAX_eStemFormat_INT32_MAX;\r
     }\r
 \r
-    static AudioChannelSet channelSetFromStemFormat (AAX_EStemFormat format, bool ignoreLayout) noexcept\r
+    static inline AudioChannelSet channelSetFromStemFormat (AAX_EStemFormat format, bool ignoreLayout) noexcept\r
     {\r
         if (! ignoreLayout)\r
         {\r
@@ -533,7 +533,8 @@ namespace AAXClasses
                 setOpaque (true);\r
                 setBroughtToFrontOnMouseClick (true);\r
 \r
-                addAndMakeVisible (pluginEditor = plugin.createEditorIfNeeded());\r
+                pluginEditor.reset (plugin.createEditorIfNeeded());\r
+                addAndMakeVisible (pluginEditor.get());\r
 \r
                 if (pluginEditor != nullptr)\r
                 {\r
@@ -551,7 +552,7 @@ namespace AAXClasses
                 {\r
                     PopupMenu::dismissAllActiveMenus();\r
                     pluginEditor->removeMouseListener (this);\r
-                    pluginEditor->processor.editorBeingDeleted (pluginEditor);\r
+                    pluginEditor->processor.editorBeingDeleted (pluginEditor.get());\r
                 }\r
             }\r
 \r
@@ -603,7 +604,7 @@ namespace AAXClasses
                 }\r
             }\r
 \r
-            ScopedPointer<AudioProcessorEditor> pluginEditor;\r
+            std::unique_ptr<AudioProcessorEditor> pluginEditor;\r
             JuceAAX_GUI& owner;\r
 \r
            #if JUCE_WINDOWS\r
@@ -615,7 +616,7 @@ namespace AAXClasses
             JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ContentWrapperComponent)\r
         };\r
 \r
-        ScopedPointer<ContentWrapperComponent> component;\r
+        std::unique_ptr<ContentWrapperComponent> component;\r
         ScopedJuceInitialiser_GUI libraryInitialiser;\r
 \r
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceAAX_GUI)\r
@@ -1425,9 +1426,8 @@ namespace AAXClasses
             {\r
                 aaxWrapperProvidedBypassParam = true;\r
 \r
-                ownedBypassParameter = new AudioParameterBool (cDefaultMasterBypassID, "Master Bypass", false, {}, {}, {});\r
-\r
-                bypassParameter = ownedBypassParameter;\r
+                ownedBypassParameter.reset (new AudioParameterBool (cDefaultMasterBypassID, "Master Bypass", false, {}, {}, {}));\r
+                bypassParameter = ownedBypassParameter.get();\r
             }\r
 \r
             if (! bypassPartOfRegularParams)\r
@@ -1760,7 +1760,7 @@ namespace AAXClasses
         //==============================================================================\r
         ScopedJuceInitialiser_GUI libraryInitialiser;\r
 \r
-        ScopedPointer<AudioProcessor> pluginInstance;\r
+        std::unique_ptr<AudioProcessor> pluginInstance;\r
 \r
         bool isPrepared = false;\r
         MidiBuffer midiBuffer;\r
@@ -1778,7 +1778,7 @@ namespace AAXClasses
         Array<String> aaxParamIDs;\r
         HashMap<int32, AudioProcessorParameter*> paramMap;\r
         LegacyAudioParametersWrapper juceParameters;\r
-        ScopedPointer<AudioProcessorParameter> ownedBypassParameter;\r
+        std::unique_ptr<AudioProcessorParameter> ownedBypassParameter;\r
 \r
         Array<AudioProcessorParameter*> aaxMeters;\r
 \r
@@ -1808,7 +1808,7 @@ namespace AAXClasses
         if (component == nullptr)\r
         {\r
             if (auto* params = dynamic_cast<JuceAAX_Processor*> (GetEffectParameters()))\r
-                component = new ContentWrapperComponent (*this, params->getPluginInstance());\r
+                component.reset (new ContentWrapperComponent (*this, params->getPluginInstance()));\r
             else\r
                 jassertfalse;\r
         }\r
@@ -2024,7 +2024,7 @@ namespace AAXClasses
         check (desc.AddProcessProc_Native (algorithmProcessCallback, properties));\r
     }\r
 \r
-    static bool hostSupportsStemFormat (AAX_EStemFormat stemFormat, const AAX_IFeatureInfo* featureInfo)\r
+    static inline bool hostSupportsStemFormat (AAX_EStemFormat stemFormat, const AAX_IFeatureInfo* featureInfo)\r
     {\r
         if (featureInfo != nullptr)\r
         {\r
@@ -2032,7 +2032,7 @@ namespace AAXClasses
 \r
             if (featureInfo->SupportLevel (supportLevel) == AAX_SUCCESS && supportLevel == AAX_eSupportLevel_ByProperty)\r
             {\r
-                ScopedPointer<const AAX_IPropertyMap> props (featureInfo->AcquireProperties());\r
+                std::unique_ptr<const AAX_IPropertyMap> props (featureInfo->AcquireProperties());\r
 \r
                 // Due to a bug in ProTools 12.8, ProTools thinks that AAX_eStemFormat_Ambi_1_ACN is not supported\r
                 // To workaround this bug, check if ProTools supports AAX_eStemFormat_Ambi_2_ACN, and, if yes,\r
@@ -2051,7 +2051,7 @@ namespace AAXClasses
     static void getPlugInDescription (AAX_IEffectDescriptor& descriptor, const AAX_IFeatureInfo* featureInfo)\r
     {\r
         PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AAX;\r
-        ScopedPointer<AudioProcessor> plugin = createPluginFilterOfType (AudioProcessor::wrapperType_AAX);\r
+        std::unique_ptr<AudioProcessor> plugin (createPluginFilterOfType (AudioProcessor::wrapperType_AAX));\r
         auto numInputBuses  = plugin->getBusCount (true);\r
         auto numOutputBuses = plugin->getBusCount (false);\r
 \r
@@ -2078,19 +2078,18 @@ namespace AAXClasses
         check (descriptor.AddProcPtr ((void*) JuceAAX_GUI::Create,        kAAX_ProcPtrID_Create_EffectGUI));\r
         check (descriptor.AddProcPtr ((void*) JuceAAX_Processor::Create,  kAAX_ProcPtrID_Create_EffectParameters));\r
 \r
+        Array<int32> pluginIds;\r
        #if JucePlugin_IsMidiEffect\r
         // MIDI effect plug-ins do not support any audio channels\r
         jassert (numInputBuses == 0 && numOutputBuses == 0);\r
+        ignoreUnused (featureInfo);\r
 \r
         if (auto* desc = descriptor.NewComponentDescriptor())\r
         {\r
-            createDescriptor (*desc, 0, plugin->getBusesLayout(), *plugin, numMeters);\r
+            createDescriptor (*desc, plugin->getBusesLayout(), *plugin, pluginIds, numMeters);\r
             check (descriptor.AddComponent (desc));\r
         }\r
-\r
        #else\r
-        Array<int32> pluginIds;\r
-\r
         const int numIns  = numInputBuses  > 0 ? numElementsInArray (aaxFormats) : 0;\r
         const int numOuts = numOutputBuses > 0 ? numElementsInArray (aaxFormats) : 0;\r
 \r
@@ -2138,14 +2137,14 @@ AAX_Result JUCE_CDECL GetEffectDescriptions (AAX_ICollection* collection)
 {\r
     ScopedJuceInitialiser_GUI libraryInitialiser;\r
 \r
-    ScopedPointer<const AAX_IFeatureInfo> stemFormatFeatureInfo;\r
+    std::unique_ptr<const AAX_IFeatureInfo> stemFormatFeatureInfo;\r
 \r
     if (const auto* hostDescription = collection->DescriptionHost())\r
-        stemFormatFeatureInfo = hostDescription->AcquireFeatureProperties (AAXATTR_ClientFeature_StemFormat);\r
+        stemFormatFeatureInfo.reset (hostDescription->AcquireFeatureProperties (AAXATTR_ClientFeature_StemFormat));\r
 \r
     if (auto* descriptor = collection->NewDescriptor())\r
     {\r
-        AAXClasses::getPlugInDescription (*descriptor, stemFormatFeatureInfo);\r
+        AAXClasses::getPlugInDescription (*descriptor, stemFormatFeatureInfo.get());\r
         collection->AddEffect (JUCE_STRINGIFY (JucePlugin_AAXIdentifier), descriptor);\r
 \r
         collection->SetManufacturerName (JucePlugin_Manufacturer);\r
index 43465edce1a28c3f35862e5dcbf9098e65c86443..c3297249b2a002bd96148a4975ab031b1409dfe9 100644 (file)
@@ -99,10 +99,10 @@ public:
     //==============================================================================\r
     void initialise (const String&) override\r
     {\r
-        mainWindow = createWindow();\r
+        mainWindow.reset (createWindow());\r
 \r
        #if JUCE_STANDALONE_FILTER_WINDOW_USE_KIOSK_MODE\r
-        Desktop::getInstance().setKioskModeComponent (mainWindow, false);\r
+        Desktop::getInstance().setKioskModeComponent (mainWindow.get(), false);\r
        #endif\r
 \r
         mainWindow->setVisible (true);\r
@@ -133,7 +133,7 @@ public:
 \r
 protected:\r
     ApplicationProperties appProperties;\r
-    ScopedPointer<StandaloneFilterWindow> mainWindow;\r
+    std::unique_ptr<StandaloneFilterWindow> mainWindow;\r
 };\r
 \r
 } // namespace juce\r
index 69bd2cdea46fd5608614c840e7146a554383b1ad..ece0bc19b8a01ef113742ecee593882dbd35a434 100644 (file)
@@ -87,7 +87,7 @@ public:
                                                            : processor->getMainBusNumInputChannels());\r
 \r
         if (preferredSetupOptions != nullptr)\r
-            options = new AudioDeviceManager::AudioDeviceSetup (*preferredSetupOptions);\r
+            options.reset (new AudioDeviceManager::AudioDeviceSetup (*preferredSetupOptions));\r
 \r
         if (inChannels > 0 && RuntimePermissions::isRequired (RuntimePermissions::recordAudio)\r
             && ! RuntimePermissions::isGranted (RuntimePermissions::recordAudio))\r
@@ -99,7 +99,7 @@ public:
 \r
     void init (bool enableAudioInput, const String& preferredDefaultDeviceName)\r
     {\r
-        setupAudioDevices (enableAudioInput, preferredDefaultDeviceName, options);\r
+        setupAudioDevices (enableAudioInput, preferredDefaultDeviceName, options.get());\r
         reloadPluginState();\r
         startPlaying();\r
 \r
@@ -120,10 +120,10 @@ public:
     {\r
 \r
       #if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client\r
-        processor = ::createPluginFilterOfType (AudioProcessor::wrapperType_Standalone);\r
+        processor.reset (::createPluginFilterOfType (AudioProcessor::wrapperType_Standalone));\r
       #else\r
         AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Standalone);\r
-        processor = createPluginFilter();\r
+        processor.reset (createPluginFilter());\r
         AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Undefined);\r
       #endif\r
         jassert (processor != nullptr); // Your createPluginFilter() function must return a valid object!\r
@@ -228,7 +228,7 @@ public:
     //==============================================================================\r
     void startPlaying()\r
     {\r
-        player.setProcessor (processor);\r
+        player.setProcessor (processor.get());\r
 \r
        #if JucePlugin_Enable_IAA && JUCE_IOS\r
         if (auto device = dynamic_cast<iOSAudioIODevice*> (deviceManager.getCurrentAudioDevice()))\r
@@ -295,9 +295,9 @@ public:
     {\r
         if (settings != nullptr)\r
         {\r
-            ScopedPointer<XmlElement> xml (deviceManager.createStateXml());\r
+            std::unique_ptr<XmlElement> xml (deviceManager.createStateXml());\r
 \r
-            settings->setValue ("audioSetup", xml);\r
+            settings->setValue ("audioSetup", xml.get());\r
 \r
            #if ! (JUCE_IOS || JUCE_ANDROID)\r
             settings->setValue ("shouldMuteInput", (bool) shouldMuteInput.getValue());\r
@@ -309,11 +309,11 @@ public:
                                  const String& preferredDefaultDeviceName,\r
                                  const AudioDeviceManager::AudioDeviceSetup* preferredSetupOptions)\r
     {\r
-        ScopedPointer<XmlElement> savedState;\r
+        std::unique_ptr<XmlElement> savedState;\r
 \r
         if (settings != nullptr)\r
         {\r
-            savedState = settings->getXmlValue ("audioSetup");\r
+            savedState.reset (settings->getXmlValue ("audioSetup"));\r
 \r
            #if ! (JUCE_IOS || JUCE_ANDROID)\r
             shouldMuteInput.setValue (settings->getBoolValue ("shouldMuteInput", true));\r
@@ -332,7 +332,7 @@ public:
 \r
         deviceManager.initialise (enableAudioInput ? totalInChannels : 0,\r
                                   totalOutChannels,\r
-                                  savedState,\r
+                                  savedState.get(),\r
                                   true,\r
                                   preferredDefaultDeviceName,\r
                                   preferredSetupOptions);\r
@@ -398,7 +398,7 @@ public:
 \r
     //==============================================================================\r
     OptionalScopedPointer<PropertySet> settings;\r
-    ScopedPointer<AudioProcessor> processor;\r
+    std::unique_ptr<AudioProcessor> processor;\r
     AudioDeviceManager deviceManager;\r
     AudioProcessorPlayer player;\r
     Array<PluginInOuts> channelConfiguration;\r
@@ -409,7 +409,7 @@ public:
     AudioBuffer<float> emptyBuffer;\r
     bool autoOpenMidiDevices;\r
 \r
-    ScopedPointer<AudioDeviceManager::AudioDeviceSetup> options;\r
+    std::unique_ptr<AudioDeviceManager::AudioDeviceSetup> options;\r
     StringArray lastMidiDevices;\r
 \r
 private:\r
@@ -603,9 +603,9 @@ public:
         optionsButton.setTriggeredOnMouseDown (true);\r
        #endif\r
 \r
-        pluginHolder = new StandalonePluginHolder (settingsToUse, takeOwnershipOfSettings,\r
-                                                   preferredDefaultDeviceName, preferredSetupOptions,\r
-                                                   constrainToConfiguration, autoOpenMidiDevices);\r
+        pluginHolder.reset (new StandalonePluginHolder (settingsToUse, takeOwnershipOfSettings,\r
+                                                        preferredDefaultDeviceName, preferredSetupOptions,\r
+                                                        constrainToConfiguration, autoOpenMidiDevices));\r
 \r
        #if JUCE_IOS || JUCE_ANDROID\r
         setFullScreen (true);\r
@@ -646,7 +646,7 @@ public:
     }\r
 \r
     //==============================================================================\r
-    AudioProcessor* getAudioProcessor() const noexcept      { return pluginHolder->processor; }\r
+    AudioProcessor* getAudioProcessor() const noexcept      { return pluginHolder->processor.get(); }\r
     AudioDeviceManager& getDeviceManager() const noexcept   { return pluginHolder->deviceManager; }\r
 \r
     /** Deletes and re-creates the plugin, resetting it to its default state. */\r
@@ -710,9 +710,9 @@ public:
         optionsButton.setBounds (8, 6, 60, getTitleBarHeight() - 8);\r
     }\r
 \r
-    virtual StandalonePluginHolder* getPluginHolder()    { return pluginHolder; }\r
+    virtual StandalonePluginHolder* getPluginHolder()    { return pluginHolder.get(); }\r
 \r
-    ScopedPointer<StandalonePluginHolder> pluginHolder;\r
+    std::unique_ptr<StandalonePluginHolder> pluginHolder;\r
 \r
 private:\r
     //==============================================================================\r
@@ -733,7 +733,7 @@ private:
                 editor->addComponentListener (this);\r
                 componentMovedOrResized (*editor, false, true);\r
 \r
-                addAndMakeVisible (editor);\r
+                addAndMakeVisible (editor.get());\r
             }\r
 \r
             addChildComponent (notification);\r
@@ -752,7 +752,7 @@ private:
             if (editor != nullptr)\r
             {\r
                 editor->removeComponentListener (this);\r
-                owner.pluginHolder->processor->editorBeingDeleted (editor);\r
+                owner.pluginHolder->processor->editorBeingDeleted (editor.get());\r
                 editor = nullptr;\r
             }\r
         }\r
@@ -851,7 +851,7 @@ private:
         //==============================================================================\r
         StandaloneFilterWindow& owner;\r
         NotificationArea notification;\r
-        ScopedPointer<AudioProcessorEditor> editor;\r
+        std::unique_ptr<AudioProcessorEditor> editor;\r
         bool shouldShowNotification = false;\r
 \r
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent)\r
index 2e959c667c51d5113e1c82e9768362d81ab84f20..a39f8977d4549ea6d6ced661cef4e685dd0d48ee 100644 (file)
@@ -36,6 +36,18 @@ struct VSTCallbackHandler
 {\r
     virtual ~VSTCallbackHandler() {}\r
 \r
+    /** This is called by the VST plug-in wrapper when it receives unhandled\r
+        plug-in "can do" calls from the host.\r
+    */\r
+    virtual pointer_sized_int handleVstPluginCanDo (int32 index,\r
+                                                    pointer_sized_int value,\r
+                                                    void* ptr,\r
+                                                    float opt)\r
+    {\r
+        ignoreUnused (index, value, ptr, opt);\r
+        return 0;\r
+    }\r
+\r
     /** This is called by the VST plug-in wrapper when it receives unhandled\r
         vendor specific calls from the host.\r
     */\r
index 152566e4a34c4d3c13d2aebaede8a5c4a82081ba..216265ea4d15ffeb879d52e6efcd2eafe3c5502c 100644 (file)
@@ -1072,7 +1072,7 @@ public:
             if (auto* ed = processor->createEditorIfNeeded())\r
             {\r
                 vstEffect.flags |= vstEffectFlagHasEditor;\r
-                editorComp = new EditorCompWrapper (*this, *ed);\r
+                editorComp.reset (new EditorCompWrapper (*this, *ed));\r
 \r
                #if ! (JUCE_MAC || JUCE_IOS)\r
                 ed->setScaleFactor (editorScaleFactor);\r
@@ -1220,7 +1220,7 @@ public:
 \r
         ~EditorCompWrapper()\r
         {\r
-            deleteAllChildren(); // note that we can't use a ScopedPointer because the editor may\r
+            deleteAllChildren(); // note that we can't use a std::unique_ptr because the editor may\r
                                  // have been transferred to another parent which takes over ownership.\r
         }\r
 \r
@@ -1481,7 +1481,7 @@ private:
     VstEffectInterface vstEffect;\r
     juce::MemoryBlock chunkMemory;\r
     juce::uint32 chunkMemoryTime = 0;\r
-    ScopedPointer<EditorCompWrapper> editorComp;\r
+    std::unique_ptr<EditorCompWrapper> editorComp;\r
     VstEditorBounds editorBounds;\r
     MidiBuffer midiEvents;\r
     VSTMidiEventList outgoingEvents;\r
@@ -2037,6 +2037,9 @@ private:
         if (matches ("hasCockosExtensions"))\r
             return (int32) 0xbeef0000;\r
 \r
+        if (auto callbackHandler = dynamic_cast<VSTCallbackHandler*> (processor))\r
+            return callbackHandler->handleVstPluginCanDo (args.index, args.value, args.ptr, args.opt);\r
+\r
         return 0;\r
     }\r
 \r
index 614d1f02bce258798cf957ce880c4418492c0865..a58c7e0a9cbe7625366f73fb9a116770441cb1ef 100644 (file)
@@ -98,21 +98,20 @@ public:
 \r
     virtual ~JuceAudioProcessor() {}\r
 \r
-    AudioProcessor* get() const noexcept      { return audioProcessor; }\r
+    AudioProcessor* get() const noexcept      { return audioProcessor.get(); }\r
 \r
     JUCE_DECLARE_VST3_COM_QUERY_METHODS\r
     JUCE_DECLARE_VST3_COM_REF_METHODS\r
 \r
     //==============================================================================\r
-    #if JUCE_FORCE_USE_LEGACY_PARAM_IDS\r
-    inline Vst::ParamID getVSTParamIDForIndex (int paramIndex) const noexcept   { return static_cast<Vst::ParamID> (paramIndex); }\r
-   #else\r
     inline Vst::ParamID getVSTParamIDForIndex (int paramIndex) const noexcept\r
     {\r
-        return isUsingManagedParameters() ? vstParamIDs.getReference (paramIndex)\r
-                                          : static_cast<Vst::ParamID> (paramIndex);\r
+       #if JUCE_FORCE_USE_LEGACY_PARAM_IDS\r
+        return static_cast<Vst::ParamID> (paramIndex);\r
+       #else\r
+        return vstParamIDs.getReference (paramIndex);\r
+       #endif\r
     }\r
-   #endif\r
 \r
     AudioProcessorParameter* getParamForVSTParamID (Vst::ParamID paramID) const noexcept\r
     {\r
@@ -169,7 +168,8 @@ private:
         if (bypassParameter == nullptr)\r
         {\r
             vst3WrapperProvidedBypassParam = true;\r
-            bypassParameter = ownedBypassParameter = new AudioParameterBool ("byps", "Bypass", false, {}, {}, {});\r
+            ownedBypassParameter.reset (new AudioParameterBool ("byps", "Bypass", false, {}, {}, {}));\r
+            bypassParameter = ownedBypassParameter.get();\r
         }\r
 \r
         // if the bypass parameter is not part of the exported parameters that the plug-in supports\r
@@ -204,6 +204,10 @@ private:
     Vst::ParamID generateVSTParamIDForParam (AudioProcessorParameter* param)\r
     {\r
         auto juceParamID = LegacyAudioParameter::getParamID (param, false);\r
+\r
+      #if JUCE_FORCE_USE_LEGACY_PARAM_IDS\r
+        return static_cast<Vst::ParamID> (juceParamID.getIntValue());\r
+      #else\r
         auto paramHash = static_cast<Vst::ParamID> (juceParamID.hashCode());\r
 \r
        #if JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS\r
@@ -211,19 +215,19 @@ private:
         paramHash &= ~(1 << (sizeof (Vst::ParamID) * 8 - 1));\r
        #endif\r
 \r
-        return isUsingManagedParameters() ? paramHash\r
-                                          : static_cast<Vst::ParamID> (juceParamID.getIntValue());\r
+        return paramHash;\r
+      #endif\r
     }\r
 \r
     //==============================================================================\r
     Atomic<int> refCount;\r
-    ScopedPointer<AudioProcessor> audioProcessor;\r
+    std::unique_ptr<AudioProcessor> audioProcessor;\r
     ScopedJuceInitialiser_GUI libraryInitialiser;\r
 \r
     //==============================================================================\r
     LegacyAudioParametersWrapper juceParameters;\r
     HashMap<int32, AudioProcessorParameter*> paramMap;\r
-    ScopedPointer<AudioProcessorParameter> ownedBypassParameter;\r
+    std::unique_ptr<AudioProcessorParameter> ownedBypassParameter;\r
 \r
     JuceAudioProcessor() = delete;\r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceAudioProcessor)\r
@@ -388,7 +392,11 @@ public:
 \r
         void toString (Vst::ParamValue value, Vst::String128 result) const override\r
         {\r
-            toString128 (result, param.getText ((float) value, 128));\r
+            if (LegacyAudioParameter::isLegacy (&param))\r
+                // remain backward-compatible with old JUCE code\r
+                toString128 (result, param.getCurrentValueAsText());\r
+            else\r
+                toString128 (result, param.getText ((float) value, 128));\r
         }\r
 \r
         bool fromString (const Vst::TChar* text, Vst::ParamValue& outValueNormalized) const override\r
@@ -717,7 +725,7 @@ private:
 \r
             if (parameters.getParameterCount() <= 0)\r
             {\r
-                #if JUCE_FORCE_USE_LEGACY_PARAM_IDS\r
+               #if JUCE_FORCE_USE_LEGACY_PARAM_IDS\r
                 const bool forceLegacyParamIDs = true;\r
                #else\r
                 const bool forceLegacyParamIDs = false;\r
@@ -789,7 +797,7 @@ private:
           : Vst::EditorView (&ec, nullptr),\r
             owner (&ec), pluginInstance (p)\r
         {\r
-            component = new ContentWrapperComponent (*this, p);\r
+            component.reset (new ContentWrapperComponent (*this, p));\r
         }\r
 \r
         tresult PLUGIN_API queryInterface (const TUID targetIID, void** obj) override\r
@@ -822,7 +830,7 @@ private:
                 return kResultFalse;\r
 \r
             if (component == nullptr)\r
-                component = new ContentWrapperComponent (*this, pluginInstance);\r
+                component.reset (new ContentWrapperComponent (*this, pluginInstance));\r
 \r
            #if JUCE_WINDOWS\r
             component->addToDesktop (0, parent);\r
@@ -830,7 +838,7 @@ private:
             component->setVisible (true);\r
            #else\r
             isNSView = (strcmp (type, kPlatformTypeNSView) == 0);\r
-            macHostWindow = juce::attachComponentToWindowRefVST (component, parent, isNSView);\r
+            macHostWindow = juce::attachComponentToWindowRefVST (component.get(), parent, isNSView);\r
            #endif\r
 \r
             component->resizeHostWindow();\r
@@ -853,7 +861,7 @@ private:
                #else\r
                 if (macHostWindow != nullptr)\r
                 {\r
-                    juce::detachComponentFromWindowRefVST (component, macHostWindow, isNSView);\r
+                    juce::detachComponentFromWindowRefVST (component.get(), macHostWindow, isNSView);\r
                     macHostWindow = nullptr;\r
                 }\r
                #endif\r
@@ -912,8 +920,8 @@ private:
                 if (auto* editor = component->pluginEditor.get())\r
                 {\r
                     // checkSizeConstraint\r
-                    auto juceRect = editor->getLocalArea (component, Rectangle<int>::leftTopRightBottom (rectToCheck->left, rectToCheck->top,\r
-                                                                                                         rectToCheck->right, rectToCheck->bottom));\r
+                    auto juceRect = editor->getLocalArea (component.get(), Rectangle<int>::leftTopRightBottom (rectToCheck->left, rectToCheck->top,\r
+                                                                                                               rectToCheck->right, rectToCheck->bottom));\r
                     if (auto* constrainer = editor->getConstrainer())\r
                     {\r
                         Rectangle<int> limits (0, 0, constrainer->getMaximumWidth(), constrainer->getMaximumHeight());\r
@@ -972,7 +980,7 @@ private:
 \r
                 if (pluginEditor != nullptr)\r
                 {\r
-                    addAndMakeVisible (pluginEditor);\r
+                    addAndMakeVisible (pluginEditor.get());\r
 \r
                     pluginEditor->setTopLeftPosition (0, 0);\r
                     lastBounds = getSizeToContainChild();\r
@@ -991,7 +999,7 @@ private:
                 if (pluginEditor != nullptr)\r
                 {\r
                     PopupMenu::dismissAllActiveMenus();\r
-                    pluginEditor->processor.editorBeingDeleted (pluginEditor);\r
+                    pluginEditor->processor.editorBeingDeleted (pluginEditor.get());\r
                 }\r
             }\r
 \r
@@ -1003,7 +1011,7 @@ private:
             juce::Rectangle<int> getSizeToContainChild()\r
             {\r
                 if (pluginEditor != nullptr)\r
-                    return getLocalArea (pluginEditor, pluginEditor->getLocalBounds());\r
+                    return getLocalArea (pluginEditor.get(), pluginEditor->getLocalBounds());\r
 \r
                 return {};\r
             }\r
@@ -1088,7 +1096,7 @@ private:
                 }\r
             }\r
 \r
-            ScopedPointer<AudioProcessorEditor> pluginEditor;\r
+            std::unique_ptr<AudioProcessorEditor> pluginEditor;\r
 \r
         private:\r
             JuceVST3Editor& owner;\r
@@ -1104,7 +1112,7 @@ private:
         ComSmartPtr<JuceVST3EditController> owner;\r
         AudioProcessor& pluginInstance;\r
 \r
-        ScopedPointer<ContentWrapperComponent> component;\r
+        std::unique_ptr<ContentWrapperComponent> component;\r
         friend struct ContentWrapperComponent;\r
 \r
        #if JUCE_MAC\r
index 640f5289e0b93a8f93a456e82b4315304b752fde..f2501da534e126e1fde932ff99ba56acc1faa04c 100644 (file)
@@ -35,7 +35,7 @@
 \r
   ID:               juce_audio_plugin_client\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE audio plugin wrapper classes\r
   description:      Classes for building VST, VST3, AudioUnit, AAX and RTAS plugins.\r
   website:          http://www.juce.com/juce\r
@@ -72,7 +72,7 @@
     DAW projects with automation data written by an AudioUnit, VST3 or\r
     AAX plug-in built with JUCE version 5.1.1 or earlier may load\r
     incorrectly when opened by an AudioUnit, VST3 or AAX plug-in built\r
-    with JUCE version 5.3.0 and later.\r
+    with JUCE version 5.2.0 and later.\r
 */\r
 #ifndef JUCE_FORCE_LEGACY_PARAMETER_AUTOMATION_TYPE\r
  #define JUCE_FORCE_LEGACY_PARAMETER_AUTOMATION_TYPE 0\r
index f2620756be5e1fe1b07be0fd0fd05ca208e88bd2..9c2c9d229ddf10f663485e2ddecd9dfb7153d43f 100644 (file)
@@ -41,6 +41,18 @@ public:
         startTimer (1000 / 30);\r
     }\r
 \r
+    static bool componentContainsAudioProcessorEditor (Component* comp) noexcept\r
+    {\r
+        if (dynamic_cast<AudioProcessorEditor*> (comp) != nullptr)\r
+            return true;\r
+\r
+        for (auto* child : comp->getChildren())\r
+            if (componentContainsAudioProcessorEditor (child))\r
+                return true;\r
+\r
+        return false;\r
+    }\r
+\r
     void timerCallback() override\r
     {\r
         // Workaround for windows not getting mouse-moves...\r
@@ -49,36 +61,39 @@ public:
         if (screenPos != lastScreenPos)\r
         {\r
             lastScreenPos = screenPos;\r
-            auto mods = ModifierKeys::getCurrentModifiers();\r
+            auto mods = ModifierKeys::currentModifiers;\r
 \r
             if (! mods.isAnyMouseButtonDown())\r
             {\r
                 if (auto* comp = Desktop::getInstance().findComponentAt (screenPos.roundToInt()))\r
                 {\r
-                    safeOldComponent = comp;\r
-\r
-                    if (auto* peer = comp->getPeer())\r
+                    if (componentContainsAudioProcessorEditor (comp->getTopLevelComponent()))\r
                     {\r
-                        if (! peer->isFocused())\r
+                        safeOldComponent = comp;\r
+\r
+                        if (auto* peer = comp->getPeer())\r
                         {\r
-                            peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, peer->globalToLocal (screenPos), mods,\r
-                                                    MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, Time::currentTimeMillis());\r
+                            if (! peer->isFocused())\r
+                            {\r
+                                peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, peer->globalToLocal (screenPos), mods,\r
+                                                        MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, Time::currentTimeMillis());\r
+                            }\r
                         }\r
+\r
+                        return;\r
                     }\r
                 }\r
-                else\r
+\r
+                if (safeOldComponent != nullptr)\r
                 {\r
-                    if (safeOldComponent != nullptr)\r
+                    if (auto* peer = safeOldComponent->getPeer())\r
                     {\r
-                        if (auto* peer = safeOldComponent->getPeer())\r
-                        {\r
-                            peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, { -1.0f, -1.0f }, mods,\r
-                                                    MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, Time::currentTimeMillis());\r
-                        }\r
+                        peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, { -1.0f, -1.0f }, mods,\r
+                                                MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, Time::currentTimeMillis());\r
                     }\r
-\r
-                    safeOldComponent = nullptr;\r
                 }\r
+\r
+                safeOldComponent = nullptr;\r
             }\r
         }\r
     }\r
index 1811cd3f7e081cb176c3ee262c935a9cfd75fd13..ea5c5d9ab746561ed0add8f440ab414fc261d945 100644 (file)
@@ -44,8 +44,8 @@ namespace AudioPluginFormatHelpers
             //==============================================================================\r
             AudioPluginInstance* instance;\r
             String error;\r
-            ScopedPointer<AudioPluginFormat::InstantiationCompletionCallback> compCallback;\r
-            ScopedPointer<CallbackInvoker> owner;\r
+            std::unique_ptr<AudioPluginFormat::InstantiationCompletionCallback> compCallback;\r
+            std::unique_ptr<CallbackInvoker> owner;\r
         };\r
 \r
         //==============================================================================\r
@@ -119,7 +119,7 @@ AudioPluginInstance* AudioPluginFormat::createInstanceFromDescription (const Plu
     WaitableEvent waitForCreation;\r
     AudioPluginInstance* instance = nullptr;\r
 \r
-    ScopedPointer<EventSignaler> eventSignaler (new EventSignaler (waitForCreation, instance, errorMessage));\r
+    std::unique_ptr<EventSignaler> eventSignaler (new EventSignaler (waitForCreation, instance, errorMessage));\r
 \r
     if (! MessageManager::getInstance()->isThisTheMessageThread())\r
         createPluginInstanceAsync (desc, initialSampleRate, initialBufferSize, eventSignaler.release());\r
index 69e737e19161a21288798966a9e7a199df967310..b996c5c6a5d77026da92625ec943d461fa46c4af 100644 (file)
@@ -40,7 +40,7 @@ namespace PluginFormatManagerHelpers
         void messageCallback() override          { callback->completionCallback (nullptr, error); }\r
 \r
         String error;\r
-        ScopedPointer<AudioPluginFormat::InstantiationCompletionCallback> callback;\r
+        std::unique_ptr<AudioPluginFormat::InstantiationCompletionCallback> callback;\r
     };\r
 \r
     struct ErrorLambdaOnMessageThread : public CallbackMessage\r
index 61943535aaa8a0bf952de631be1dc440eb2df755..6552a81339880c2543bf1248b3130c67b9606401 100644 (file)
@@ -1452,7 +1452,7 @@ public:
         auSupportsBypass = (AudioUnitGetPropertyInfo (audioUnit, kAudioUnitProperty_BypassEffect,\r
                                                      kAudioUnitScope_Global, 0, &propertySize, &writable) == noErr\r
                               && propertySize >= sizeof (UInt32) && writable);\r
-        bypassParam = new AUBypassParameter (*this);\r
+        bypassParam.reset (new AUBypassParameter (*this));\r
     }\r
 \r
     void updateLatency()\r
@@ -1615,7 +1615,7 @@ private:
     MidiDataConcatenator midiConcatenator;\r
     CriticalSection midiInLock;\r
     MidiBuffer incomingMidi;\r
-    ScopedPointer<AUBypassParameter> bypassParam;\r
+    std::unique_ptr<AUBypassParameter> bypassParam;\r
     bool lastProcessBlockCallWasBypass = false, auSupportsBypass = false;\r
 \r
     void createPluginCallbacks()\r
@@ -2418,7 +2418,8 @@ public:
           audioComponent (nullptr),\r
           viewComponent (nullptr)\r
     {\r
-        addAndMakeVisible (innerWrapper = new InnerWrapperComponent (*this));\r
+        innerWrapper.reset (new InnerWrapperComponent (*this));\r
+        addAndMakeVisible (innerWrapper.get());\r
 \r
         setOpaque (true);\r
         setVisible (true);\r
@@ -2535,7 +2536,7 @@ private:
     };\r
 \r
     friend class InnerWrapperComponent;\r
-    ScopedPointer<InnerWrapperComponent> innerWrapper;\r
+    std::unique_ptr<InnerWrapperComponent> innerWrapper;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioUnitPluginWindowCarbon)\r
 };\r
@@ -2545,7 +2546,7 @@ private:
 //==============================================================================\r
 AudioProcessorEditor* AudioUnitPluginInstance::createEditor()\r
 {\r
-    ScopedPointer<AudioProcessorEditor> w (new AudioUnitPluginWindowCocoa (*this, false));\r
+    std::unique_ptr<AudioProcessorEditor> w (new AudioUnitPluginWindowCocoa (*this, false));\r
 \r
     if (! static_cast<AudioUnitPluginWindowCocoa*> (w.get())->isValid())\r
         w.reset();\r
@@ -2553,10 +2554,10 @@ AudioProcessorEditor* AudioUnitPluginInstance::createEditor()
    #if JUCE_SUPPORT_CARBON\r
     if (w == nullptr)\r
     {\r
-        w = new AudioUnitPluginWindowCarbon (*this);\r
+        w.reset (new AudioUnitPluginWindowCarbon (*this));\r
 \r
         if (! static_cast<AudioUnitPluginWindowCarbon*> (w.get())->isValid())\r
-            w = nullptr;\r
+            w.reset();\r
     }\r
    #endif\r
 \r
@@ -2566,8 +2567,6 @@ AudioProcessorEditor* AudioUnitPluginInstance::createEditor()
     return w.release();\r
 }\r
 \r
-\r
-//==============================================================================\r
 //==============================================================================\r
 AudioUnitPluginFormat::AudioUnitPluginFormat()\r
 {\r
@@ -2593,7 +2592,7 @@ void AudioUnitPluginFormat::findAllTypesForFile (OwnedArray<PluginDescription>&
 \r
     try\r
     {\r
-        ScopedPointer<AudioPluginInstance> createdInstance (createInstanceFromDescription (desc, 44100.0, 512));\r
+        std::unique_ptr<AudioPluginInstance> createdInstance (createInstanceFromDescription (desc, 44100.0, 512));\r
 \r
         if (AudioUnitPluginInstance* auInstance = dynamic_cast<AudioUnitPluginInstance*> (createdInstance.get()))\r
             results.add (new PluginDescription (auInstance->getPluginDescription()));\r
@@ -2663,7 +2662,7 @@ void AudioUnitPluginFormat::createPluginInstance (const PluginDescription& desc,
             {\r
                 if (err == noErr)\r
                 {\r
-                    ScopedPointer<AudioUnitPluginInstance> instance (new AudioUnitPluginInstance (audioUnit));\r
+                    std::unique_ptr<AudioUnitPluginInstance> instance (new AudioUnitPluginInstance (audioUnit));\r
 \r
                     if (instance->initialise (sampleRate, framesPerBuffer))\r
                         originalCallback (passUserData, instance.release(), StringRef());\r
index bdb755488c0d88e9ef9c48cf746450d19b20a965..439c06f8ac5b7b001f7aaf4a6cfc839170a813a5 100644 (file)
@@ -47,7 +47,7 @@ class LADSPAModuleHandle    : public ReferenceCountedObject
 {\r
 public:\r
     LADSPAModuleHandle (const File& f)\r
-        : file (f), moduleMain (nullptr)\r
+        : file (f)\r
     {\r
         getActiveModules().add (this);\r
     }\r
@@ -58,7 +58,7 @@ public:
         close();\r
     }\r
 \r
-    typedef ReferenceCountedObjectPtr<LADSPAModuleHandle> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<LADSPAModuleHandle>;\r
 \r
     static Array<LADSPAModuleHandle*>& getActiveModules()\r
     {\r
@@ -68,9 +68,9 @@ public:
 \r
     static LADSPAModuleHandle* findOrCreateModule (const File& file)\r
     {\r
-        for (int i = getActiveModules().size(); --i >= 0;)\r
+        for (auto i = getActiveModules().size(); --i >= 0;)\r
         {\r
-            LADSPAModuleHandle* const module = getActiveModules().getUnchecked(i);\r
+            auto* module = getActiveModules().getUnchecked(i);\r
 \r
             if (module->file == file)\r
                 return module;\r
@@ -81,7 +81,7 @@ public:
 \r
         JUCE_LADSPA_LOG ("Loading LADSPA module: " + file.getFullPathName());\r
 \r
-        ScopedPointer<LADSPAModuleHandle> m (new LADSPAModuleHandle (file));\r
+        std::unique_ptr<LADSPAModuleHandle> m (new LADSPAModuleHandle (file));\r
 \r
         if (! m->open())\r
             m = nullptr;\r
@@ -92,7 +92,7 @@ public:
     }\r
 \r
     File file;\r
-    LADSPA_Descriptor_Function moduleMain;\r
+    LADSPA_Descriptor_Function moduleMain = nullptr;\r
 \r
 private:\r
     DynamicLibrary module;\r
@@ -101,7 +101,8 @@ private:
     {\r
         module.open (file.getFullPathName());\r
         moduleMain = (LADSPA_Descriptor_Function) module.getFunction ("ladspa_descriptor");\r
-        return moduleMain != nullptr;\r
+\r
+        return (moduleMain != nullptr);\r
     }\r
 \r
     void close()\r
@@ -116,172 +117,8 @@ private:
 class LADSPAPluginInstance     : public AudioPluginInstance\r
 {\r
 public:\r
-    struct LADSPAParameter final   : public Parameter\r
-    {\r
-        struct ParameterValue\r
-        {\r
-            inline ParameterValue() noexcept                   : scaled (0), unscaled (0) {}\r
-            inline ParameterValue (float s, float u) noexcept  : scaled (s), unscaled (u) {}\r
-\r
-            float scaled, unscaled;\r
-        };\r
-\r
-        LADSPAParameter (LADSPAPluginInstance& parent,\r
-                         int parameterID,\r
-                         const String& parameterName,\r
-                         bool parameterIsAutomatable)\r
-            : pluginInstance (parent),\r
-              paramID (parameterID),\r
-              name (parameterName),\r
-              automatable (parameterIsAutomatable)\r
-        {\r
-            reset();\r
-        }\r
-\r
-        virtual float getValue() const override\r
-        {\r
-            if (pluginInstance.plugin != nullptr)\r
-            {\r
-                const ScopedLock sl (pluginInstance.lock);\r
-\r
-                return paramValue.unscaled;\r
-            }\r
-\r
-            return 0.0f;\r
-        }\r
-\r
-        String getCurrentValueAsText() const override\r
-        {\r
-            if (auto* interface = pluginInstance.plugin)\r
-            {\r
-                const LADSPA_PortRangeHint& hint = interface->PortRangeHints[paramID];\r
-\r
-                if (LADSPA_IS_HINT_INTEGER (hint.HintDescriptor))\r
-                    return String ((int) paramValue.scaled);\r
-\r
-                return String (paramValue.scaled, 4);\r
-            }\r
-\r
-            return {};\r
-        }\r
-\r
-        virtual void setValue (float newValue) override\r
-        {\r
-            if (auto* interface = pluginInstance.plugin)\r
-            {\r
-                const ScopedLock sl (pluginInstance.lock);\r
-\r
-                if (paramValue.unscaled != newValue)\r
-                    paramValue = ParameterValue (getNewParamScaled (interface->PortRangeHints [paramID], newValue), newValue);\r
-            }\r
-        }\r
-\r
-        float getDefaultValue() const override\r
-        {\r
-            return defaultValue;\r
-        }\r
-\r
-        ParameterValue getDefaultParamValue() const\r
-        {\r
-            if (auto* interface = pluginInstance.plugin)\r
-            {\r
-                const LADSPA_PortRangeHint& hint = interface->PortRangeHints[paramID];\r
-                const LADSPA_PortRangeHintDescriptor& desc = hint.HintDescriptor;\r
-\r
-                if (LADSPA_IS_HINT_HAS_DEFAULT (desc))\r
-                {\r
-                    if (LADSPA_IS_HINT_DEFAULT_0 (desc))    return ParameterValue();\r
-                    if (LADSPA_IS_HINT_DEFAULT_1 (desc))    return ParameterValue (1.0f, 1.0f);\r
-                    if (LADSPA_IS_HINT_DEFAULT_100 (desc))  return ParameterValue (100.0f, 0.5f);\r
-                    if (LADSPA_IS_HINT_DEFAULT_440 (desc))  return ParameterValue (440.0f, 0.5f);\r
-\r
-                    const float scale = LADSPA_IS_HINT_SAMPLE_RATE (desc) ? (float) pluginInstance.getSampleRate() : 1.0f;\r
-                    const float lower = hint.LowerBound * scale;\r
-                    const float upper = hint.UpperBound * scale;\r
-\r
-                    if (LADSPA_IS_HINT_BOUNDED_BELOW (desc) && LADSPA_IS_HINT_DEFAULT_MINIMUM (desc))   return ParameterValue (lower, 0.0f);\r
-                    if (LADSPA_IS_HINT_BOUNDED_ABOVE (desc) && LADSPA_IS_HINT_DEFAULT_MAXIMUM (desc))   return ParameterValue (upper, 1.0f);\r
-\r
-                    if (LADSPA_IS_HINT_BOUNDED_BELOW (desc))\r
-                    {\r
-                        const bool useLog = LADSPA_IS_HINT_LOGARITHMIC (desc);\r
-\r
-                        if (LADSPA_IS_HINT_DEFAULT_LOW    (desc))  return ParameterValue (scaledValue (lower, upper, 0.25f, useLog), 0.25f);\r
-                        if (LADSPA_IS_HINT_DEFAULT_MIDDLE (desc))  return ParameterValue (scaledValue (lower, upper, 0.50f, useLog), 0.50f);\r
-                        if (LADSPA_IS_HINT_DEFAULT_HIGH   (desc))  return ParameterValue (scaledValue (lower, upper, 0.75f, useLog), 0.75f);\r
-                    }\r
-                }\r
-            }\r
-\r
-            return ParameterValue();\r
-        }\r
-\r
-        void reset()\r
-        {\r
-            paramValue = getDefaultParamValue();\r
-            defaultValue = paramValue.unscaled;\r
-        }\r
-\r
-        String getName (int /*maximumStringLength*/) const override\r
-        {\r
-            return name;\r
-        }\r
-\r
-        String getLabel() const override\r
-        {\r
-            return {};\r
-        }\r
-\r
-        bool isAutomatable() const override\r
-        {\r
-            return automatable;\r
-        }\r
-\r
-        static float scaledValue (float low, float high, float alpha, bool useLog) noexcept\r
-        {\r
-            if (useLog && low > 0 && high > 0)\r
-                return expf (logf (low) * (1.0f - alpha) + logf (high) * alpha);\r
-\r
-            return low + (high - low) * alpha;\r
-        }\r
-\r
-        static float toIntIfNecessary (const LADSPA_PortRangeHintDescriptor& desc, float value)\r
-        {\r
-            return LADSPA_IS_HINT_INTEGER (desc) ? ((float) (int) value) : value;\r
-        }\r
-\r
-        float getNewParamScaled (const LADSPA_PortRangeHint& hint, float newValue) const\r
-        {\r
-            const LADSPA_PortRangeHintDescriptor& desc = hint.HintDescriptor;\r
-\r
-            if (LADSPA_IS_HINT_TOGGLED (desc))\r
-                return (newValue < 0.5f) ? 0.0f : 1.0f;\r
-\r
-            const float scale = LADSPA_IS_HINT_SAMPLE_RATE (desc) ? (float) pluginInstance.getSampleRate() : 1.0f;\r
-            const float lower = hint.LowerBound * scale;\r
-            const float upper = hint.UpperBound * scale;\r
-\r
-            if (LADSPA_IS_HINT_BOUNDED_BELOW (desc) && LADSPA_IS_HINT_BOUNDED_ABOVE (desc))\r
-                return toIntIfNecessary (desc, scaledValue (lower, upper, newValue, LADSPA_IS_HINT_LOGARITHMIC (desc)));\r
-\r
-            if (LADSPA_IS_HINT_BOUNDED_BELOW (desc))   return toIntIfNecessary (desc, newValue);\r
-            if (LADSPA_IS_HINT_BOUNDED_ABOVE (desc))   return toIntIfNecessary (desc, newValue * upper);\r
-\r
-            return 0.0f;\r
-        }\r
-\r
-        LADSPAPluginInstance& pluginInstance;\r
-        const int paramID;\r
-        const String name;\r
-        const bool automatable;\r
-\r
-        ParameterValue paramValue;\r
-        float defaultValue = 0;\r
-    };\r
-\r
     LADSPAPluginInstance (const LADSPAModuleHandle::Ptr& m)\r
-        : module (m), plugin (nullptr), handle (nullptr),\r
-          initialised (false), tempBuffer (1, 1)\r
+        : module (m)\r
     {\r
         ++insideLADSPACallback;\r
 \r
@@ -291,7 +128,7 @@ public:
 \r
         if (module->moduleMain != nullptr)\r
         {\r
-            plugin = module->moduleMain (shellLADSPAUIDToCreate);\r
+            plugin = module->moduleMain ((size_t) shellLADSPAUIDToCreate);\r
 \r
             if (plugin == nullptr)\r
             {\r
@@ -307,7 +144,8 @@ public:
             return;\r
         }\r
 \r
-        const double sampleRate = getSampleRate() > 0 ? getSampleRate() : 44100.0;\r
+        const auto sampleRate = getSampleRate() > 0 ? getSampleRate()\r
+                                                    : 44100.0;\r
 \r
         handle = plugin->instantiate (plugin, (uint32) sampleRate);\r
 \r
@@ -346,24 +184,21 @@ public:
 \r
         for (unsigned int i = 0; i < plugin->PortCount; ++i)\r
         {\r
-            const LADSPA_PortDescriptor portDesc = plugin->PortDescriptors[i];\r
+            const auto portDesc = plugin->PortDescriptors[i];\r
 \r
             if ((portDesc & LADSPA_PORT_CONTROL) != 0)\r
-                addParameter (new LADSPAParameter (*this,\r
-                                                   i,\r
-                                                   String (plugin->PortNames[i]).trim(),\r
-                                                   (portDesc & LADSPA_PORT_INPUT) != 0));\r
+                addParameter (new LADSPAParameter (*this, (int) i, String (plugin->PortNames[i]).trim(), (portDesc & LADSPA_PORT_INPUT) != 0));\r
 \r
             if ((portDesc & LADSPA_PORT_AUDIO) != 0)\r
             {\r
-                if ((portDesc & LADSPA_PORT_INPUT) != 0)    inputs.add (i);\r
-                if ((portDesc & LADSPA_PORT_OUTPUT) != 0)   outputs.add (i);\r
+                if ((portDesc & LADSPA_PORT_INPUT) != 0)    inputs.add ((int) i);\r
+                if ((portDesc & LADSPA_PORT_OUTPUT) != 0)   outputs.add ((int) i);\r
             }\r
         }\r
 \r
         for (auto* param : getParameters())\r
             if (auto* ladspaParam = dynamic_cast<LADSPAParameter*> (param))\r
-                plugin->connect_port (handle, ladspaParam->paramID, &(ladspaParam->paramValue.scaled));\r
+                plugin->connect_port (handle, (size_t) ladspaParam->paramID, &(ladspaParam->paramValue.scaled));\r
 \r
         setPlayConfigDetails (inputs.size(), outputs.size(), initialSampleRate, initialBlockSize);\r
 \r
@@ -432,7 +267,7 @@ public:
             // dodgy hack to force some plugins to initialise the sample rate..\r
             if (auto* firstParam = getParameters()[0])\r
             {\r
-                const float old = firstParam->getValue();\r
+                const auto old = firstParam->getValue();\r
                 firstParam->setValue ((old < 0.5f) ? 1.0f : 0.0f);\r
                 firstParam->setValue (old);\r
             }\r
@@ -450,23 +285,23 @@ public:
         tempBuffer.setSize (1, 1);\r
     }\r
 \r
-    void processBlock (AudioBuffer<float>& buffer, MidiBuffer& midiMessages)\r
+    void processBlock (AudioBuffer<float>& buffer, MidiBuffer&)\r
     {\r
         auto numSamples = buffer.getNumSamples();\r
 \r
         if (initialised && plugin != nullptr && handle != nullptr)\r
         {\r
             for (int i = 0; i < inputs.size(); ++i)\r
-                plugin->connect_port (handle, inputs[i],\r
+                plugin->connect_port (handle, (size_t) inputs[i],\r
                                       i < buffer.getNumChannels() ? buffer.getWritePointer (i) : nullptr);\r
 \r
             if (plugin->run != nullptr)\r
             {\r
                 for (int i = 0; i < outputs.size(); ++i)\r
-                    plugin->connect_port (handle, outputs.getUnchecked(i),\r
+                    plugin->connect_port (handle, (size_t) outputs.getUnchecked(i),\r
                                           i < buffer.getNumChannels() ? buffer.getWritePointer (i) : nullptr);\r
 \r
-                plugin->run (handle, numSamples);\r
+                plugin->run (handle, (size_t) numSamples);\r
                 return;\r
             }\r
 \r
@@ -476,9 +311,9 @@ public:
                 tempBuffer.clear();\r
 \r
                 for (int i = 0; i < outputs.size(); ++i)\r
-                    plugin->connect_port (handle, outputs.getUnchecked(i), tempBuffer.getWritePointer (i));\r
+                    plugin->connect_port (handle, (size_t) outputs.getUnchecked(i), tempBuffer.getWritePointer (i));\r
 \r
-                plugin->run_adding (handle, numSamples);\r
+                plugin->run_adding (handle, (size_t) numSamples);\r
 \r
                 for (int i = 0; i < outputs.size(); ++i)\r
                     if (i < buffer.getNumChannels())\r
@@ -490,7 +325,7 @@ public:
             jassertfalse; // no callback to use?\r
         }\r
 \r
-        for (int i = getTotalNumInputChannels(), e = getTotalNumOutputChannels(); i < e; ++i)\r
+        for (auto i = getTotalNumInputChannels(), e = getTotalNumOutputChannels(); i < e; ++i)\r
             buffer.clear (i, 0, numSamples);\r
     }\r
 \r
@@ -514,8 +349,8 @@ public:
     }\r
 \r
     //==============================================================================\r
-    int getNumPrograms()                                { return 0; }\r
-    int getCurrentProgram()                             { return 0; }\r
+    int getNumPrograms()       { return 0; }\r
+    int getCurrentProgram()    { return 0; }\r
 \r
     void setCurrentProgram (int)\r
     {\r
@@ -524,87 +359,219 @@ public:
                 ladspaParam->reset();\r
     }\r
 \r
-    const String getProgramName (int index)\r
-    {\r
-        // XXX\r
-        return {};\r
-    }\r
-\r
-    void changeProgramName (int index, const String& newName)\r
-    {\r
-        // XXX\r
-    }\r
+    const String getProgramName (int)              { return {}; }\r
+    void changeProgramName (int, const String&)    {}\r
 \r
     //==============================================================================\r
     void getStateInformation (MemoryBlock& destData)\r
     {\r
         auto numParameters = getParameters().size();\r
-        destData.setSize (sizeof (float) * numParameters);\r
+        destData.setSize (sizeof (float) * (size_t) numParameters);\r
         destData.fillWith (0);\r
 \r
-        float* const p = (float*) ((char*) destData.getData());\r
+        auto* p = (float*) ((char*) destData.getData());\r
 \r
         for (int i = 0; i < numParameters; ++i)\r
             if (auto* param = getParameters()[i])\r
                 p[i] = param->getValue();\r
     }\r
 \r
-    void getCurrentProgramStateInformation (MemoryBlock& destData)\r
-    {\r
-        getStateInformation (destData);\r
-    }\r
+    void getCurrentProgramStateInformation (MemoryBlock& destData)                { getStateInformation (destData); }\r
+    void setCurrentProgramStateInformation (const void* data, int sizeInBytes)    { setStateInformation (data, sizeInBytes); }\r
 \r
     void setStateInformation (const void* data, int sizeInBytes)\r
     {\r
-        const float* p = static_cast<const float*> (data);\r
+        ignoreUnused (sizeInBytes);\r
+\r
+        auto* p = static_cast<const float*> (data);\r
 \r
         for (int i = 0; i < getParameters().size(); ++i)\r
             if (auto* param = getParameters()[i])\r
                 param->setValue (p[i]);\r
     }\r
 \r
-    void setCurrentProgramStateInformation (const void* data, int sizeInBytes)\r
-    {\r
-        setStateInformation (data, sizeInBytes);\r
-    }\r
+    bool hasEditor() const                  { return false; }\r
+    AudioProcessorEditor* createEditor()    { return nullptr; }\r
 \r
-    bool hasEditor() const\r
-    {\r
-        return false;\r
-    }\r
+    bool isValid() const                    { return handle != nullptr; }\r
 \r
-    AudioProcessorEditor* createEditor()\r
-    {\r
-        return nullptr;\r
-    }\r
+    //==============================================================================\r
+    LADSPAModuleHandle::Ptr module;\r
+    const LADSPA_Descriptor* plugin = nullptr;\r
 \r
-    bool isValid() const\r
+private:\r
+    //==============================================================================\r
+    struct LADSPAParameter final   : public Parameter\r
     {\r
-        return handle != nullptr;\r
-    }\r
+        struct ParameterValue\r
+        {\r
+            inline ParameterValue() noexcept                                               {}\r
+            inline ParameterValue (float s, float u) noexcept  : scaled (s), unscaled (u)  {}\r
 \r
-    LADSPAModuleHandle::Ptr module;\r
-    const LADSPA_Descriptor* plugin;\r
+            float scaled = 0, unscaled = 0;\r
+        };\r
 \r
-private:\r
-    LADSPA_Handle handle;\r
+        LADSPAParameter (LADSPAPluginInstance& parent, int parameterID,\r
+                         const String& parameterName, bool parameterIsAutomatable)\r
+            : pluginInstance (parent),\r
+              paramID (parameterID),\r
+              name (parameterName),\r
+              automatable (parameterIsAutomatable)\r
+        {\r
+            reset();\r
+        }\r
+\r
+        virtual float getValue() const override\r
+        {\r
+            if (pluginInstance.plugin != nullptr)\r
+            {\r
+                const ScopedLock sl (pluginInstance.lock);\r
+\r
+                return paramValue.unscaled;\r
+            }\r
+\r
+            return 0.0f;\r
+        }\r
+\r
+        String getCurrentValueAsText() const override\r
+        {\r
+            if (auto* interface = pluginInstance.plugin)\r
+            {\r
+                const auto& hint = interface->PortRangeHints[paramID];\r
+\r
+                if (LADSPA_IS_HINT_INTEGER (hint.HintDescriptor))\r
+                    return String ((int) paramValue.scaled);\r
+\r
+                return String (paramValue.scaled, 4);\r
+            }\r
+\r
+            return {};\r
+        }\r
+\r
+        virtual void setValue (float newValue) override\r
+        {\r
+            if (auto* interface = pluginInstance.plugin)\r
+            {\r
+                const ScopedLock sl (pluginInstance.lock);\r
+\r
+                if (paramValue.unscaled != newValue)\r
+                    paramValue = ParameterValue (getNewParamScaled (interface->PortRangeHints [paramID], newValue), newValue);\r
+            }\r
+        }\r
+\r
+        float getDefaultValue() const override\r
+        {\r
+            return defaultValue;\r
+        }\r
+\r
+        ParameterValue getDefaultParamValue() const\r
+        {\r
+            if (auto* interface = pluginInstance.plugin)\r
+            {\r
+                const auto& hint = interface->PortRangeHints[paramID];\r
+                const auto& desc = hint.HintDescriptor;\r
+\r
+                if (LADSPA_IS_HINT_HAS_DEFAULT (desc))\r
+                {\r
+                    if (LADSPA_IS_HINT_DEFAULT_0 (desc))    return {};\r
+                    if (LADSPA_IS_HINT_DEFAULT_1 (desc))    return { 1.0f, 1.0f };\r
+                    if (LADSPA_IS_HINT_DEFAULT_100 (desc))  return { 100.0f, 0.5f };\r
+                    if (LADSPA_IS_HINT_DEFAULT_440 (desc))  return { 440.0f, 0.5f };\r
+\r
+                    const auto scale = LADSPA_IS_HINT_SAMPLE_RATE (desc) ? (float) pluginInstance.getSampleRate()\r
+                    : 1.0f;\r
+                    const auto lower = hint.LowerBound * scale;\r
+                    const auto upper = hint.UpperBound * scale;\r
+\r
+                    if (LADSPA_IS_HINT_BOUNDED_BELOW (desc) && LADSPA_IS_HINT_DEFAULT_MINIMUM (desc))   return { lower, 0.0f };\r
+                    if (LADSPA_IS_HINT_BOUNDED_ABOVE (desc) && LADSPA_IS_HINT_DEFAULT_MAXIMUM (desc))   return { upper, 1.0f };\r
+\r
+                    if (LADSPA_IS_HINT_BOUNDED_BELOW (desc))\r
+                    {\r
+                        auto useLog = LADSPA_IS_HINT_LOGARITHMIC (desc);\r
+\r
+                        if (LADSPA_IS_HINT_DEFAULT_LOW    (desc))  return { scaledValue (lower, upper, 0.25f, useLog), 0.25f };\r
+                        if (LADSPA_IS_HINT_DEFAULT_MIDDLE (desc))  return { scaledValue (lower, upper, 0.50f, useLog), 0.50f };\r
+                        if (LADSPA_IS_HINT_DEFAULT_HIGH   (desc))  return { scaledValue (lower, upper, 0.75f, useLog), 0.75f };\r
+                    }\r
+                }\r
+            }\r
+\r
+            return {};\r
+        }\r
+\r
+        void reset()\r
+        {\r
+            paramValue = getDefaultParamValue();\r
+            defaultValue = paramValue.unscaled;\r
+        }\r
+\r
+        String getName (int /*maximumStringLength*/) const override    { return name; }\r
+        String getLabel() const override                               { return {}; }\r
+\r
+        bool isAutomatable() const override                            { return automatable; }\r
+\r
+        static float scaledValue (float low, float high, float alpha, bool useLog) noexcept\r
+        {\r
+            if (useLog && low > 0 && high > 0)\r
+                return expf (logf (low) * (1.0f - alpha) + logf (high) * alpha);\r
+\r
+                return low + (high - low) * alpha;\r
+        }\r
+\r
+        static float toIntIfNecessary (const LADSPA_PortRangeHintDescriptor& desc, float value)\r
+        {\r
+            return LADSPA_IS_HINT_INTEGER (desc) ? ((float) (int) value) : value;\r
+        }\r
+\r
+        float getNewParamScaled (const LADSPA_PortRangeHint& hint, float newValue) const\r
+        {\r
+            const auto& desc = hint.HintDescriptor;\r
+\r
+            if (LADSPA_IS_HINT_TOGGLED (desc))\r
+                return (newValue < 0.5f) ? 0.0f : 1.0f;\r
+\r
+            const auto scale = LADSPA_IS_HINT_SAMPLE_RATE (desc) ? (float) pluginInstance.getSampleRate()\r
+            : 1.0f;\r
+            const auto lower = hint.LowerBound * scale;\r
+            const auto upper = hint.UpperBound * scale;\r
+\r
+            if (LADSPA_IS_HINT_BOUNDED_BELOW (desc) && LADSPA_IS_HINT_BOUNDED_ABOVE (desc))\r
+                return toIntIfNecessary (desc, scaledValue (lower, upper, newValue, LADSPA_IS_HINT_LOGARITHMIC (desc)));\r
+\r
+            if (LADSPA_IS_HINT_BOUNDED_BELOW (desc))   return toIntIfNecessary (desc, newValue);\r
+            if (LADSPA_IS_HINT_BOUNDED_ABOVE (desc))   return toIntIfNecessary (desc, newValue * upper);\r
+\r
+            return 0.0f;\r
+        }\r
+\r
+        LADSPAPluginInstance& pluginInstance;\r
+        const int paramID;\r
+        const String name;\r
+        const bool automatable;\r
+\r
+        ParameterValue paramValue;\r
+        float defaultValue = 0.0f;\r
+    };\r
+\r
+    //==============================================================================\r
+    LADSPA_Handle handle = nullptr;\r
     String name;\r
     CriticalSection lock;\r
-    bool initialised;\r
-    AudioBuffer<float> tempBuffer;\r
+    bool initialised = false;\r
+    AudioBuffer<float> tempBuffer { 1, 1 };\r
     Array<int> inputs, outputs;\r
 \r
+    //==============================================================================\r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LADSPAPluginInstance)\r
 };\r
 \r
 \r
-//==============================================================================\r
 //==============================================================================\r
 LADSPAPluginFormat::LADSPAPluginFormat() {}\r
 LADSPAPluginFormat::~LADSPAPluginFormat() {}\r
 \r
-void LADSPAPluginFormat::findAllTypesForFile (OwnedArray<PluginDescription>& results,\r
-                                              const String& fileOrIdentifier)\r
+void LADSPAPluginFormat::findAllTypesForFile (OwnedArray<PluginDescription>& results, const String& fileOrIdentifier)\r
 {\r
     if (! fileMightContainThisPluginType (fileOrIdentifier))\r
         return;\r
@@ -613,20 +580,19 @@ void LADSPAPluginFormat::findAllTypesForFile (OwnedArray<PluginDescription>& res
     desc.fileOrIdentifier = fileOrIdentifier;\r
     desc.uid = 0;\r
 \r
-    ScopedPointer<LADSPAPluginInstance> instance (dynamic_cast<LADSPAPluginInstance*> (createInstanceFromDescription (desc, 44100.0, 512)));\r
+    std::unique_ptr<LADSPAPluginInstance> instance (dynamic_cast<LADSPAPluginInstance*> (createInstanceFromDescription (desc, 44100.0, 512)));\r
 \r
     if (instance == nullptr || ! instance->isValid())\r
         return;\r
 \r
     instance->initialise (44100.0, 512);\r
-\r
     instance->fillInPluginDescription (desc);\r
 \r
     if (instance->module->moduleMain != nullptr)\r
     {\r
         for (int uid = 0;; ++uid)\r
         {\r
-            if (const LADSPA_Descriptor* plugin = instance->module->moduleMain (uid))\r
+            if (auto* plugin = instance->module->moduleMain ((size_t) uid))\r
             {\r
                 desc.uid = uid;\r
                 desc.name = plugin->Name != nullptr ? plugin->Name : "Unknown";\r
@@ -642,19 +608,16 @@ void LADSPAPluginFormat::findAllTypesForFile (OwnedArray<PluginDescription>& res
     }\r
 }\r
 \r
-void LADSPAPluginFormat::createPluginInstance (const PluginDescription& desc,\r
-                                               double sampleRate, int blockSize,\r
-                                               void* userData,\r
-                                               void (*callback) (void*, AudioPluginInstance*, const String&))\r
+void LADSPAPluginFormat::createPluginInstance (const PluginDescription& desc, double sampleRate, int blockSize,\r
+                                               void* userData, void (*callback) (void*, AudioPluginInstance*, const String&))\r
 {\r
-    ScopedPointer<LADSPAPluginInstance> result;\r
-\r
+    std::unique_ptr<LADSPAPluginInstance> result;\r
 \r
     if (fileMightContainThisPluginType (desc.fileOrIdentifier))\r
     {\r
-        File file (desc.fileOrIdentifier);\r
+        auto file = File (desc.fileOrIdentifier);\r
 \r
-        const File previousWorkingDirectory (File::getCurrentWorkingDirectory());\r
+        auto previousWorkingDirectory = File::getCurrentWorkingDirectory();\r
         file.getParentDirectory().setAsCurrentWorkingDirectory();\r
 \r
         const LADSPAModuleHandle::Ptr module (LADSPAModuleHandle::findOrCreateModule (file));\r
@@ -663,7 +626,7 @@ void LADSPAPluginFormat::createPluginInstance (const PluginDescription& desc,
         {\r
             shellLADSPAUIDToCreate = desc.uid;\r
 \r
-            result = new LADSPAPluginInstance (module);\r
+            result.reset (new LADSPAPluginInstance (module));\r
 \r
             if (result->plugin != nullptr && result->isValid())\r
                 result->initialise (sampleRate, blockSize);\r
@@ -689,7 +652,7 @@ bool LADSPAPluginFormat::requiresUnblockedMessageThreadDuringCreation (const Plu
 \r
 bool LADSPAPluginFormat::fileMightContainThisPluginType (const String& fileOrIdentifier)\r
 {\r
-    const File f (File::createFileWithoutCheckingPath (fileOrIdentifier));\r
+    auto f = File::createFileWithoutCheckingPath (fileOrIdentifier);\r
     return f.existsAsFile() && f.hasFileExtension (".so");\r
 }\r
 \r
@@ -724,7 +687,7 @@ void LADSPAPluginFormat::recursiveFileSearch (StringArray& results, const File&
 \r
     while (iter.next())\r
     {\r
-        const File f (iter.getFile());\r
+        auto f = iter.getFile();\r
         bool isPlugin = false;\r
 \r
         if (fileMightContainThisPluginType (f.getFullPathName()))\r
@@ -740,9 +703,7 @@ void LADSPAPluginFormat::recursiveFileSearch (StringArray& results, const File&
 \r
 FileSearchPath LADSPAPluginFormat::getDefaultLocationsToSearch()\r
 {\r
-    return FileSearchPath (SystemStats::getEnvironmentVariable ("LADSPA_PATH",\r
-                                                                "/usr/lib/ladspa;/usr/local/lib/ladspa;~/.ladspa")\r
-                             .replace (":", ";"));\r
+    return  { SystemStats::getEnvironmentVariable ("LADSPA_PATH", "/usr/lib/ladspa;/usr/local/lib/ladspa;~/.ladspa").replace (":", ";") };\r
 }\r
 \r
 } // namespace juce\r
index aa0c5d6c2ad2ff664a083fc76a78f395fa5b08a6..b744f569e89cecd1177668d66931970644716240 100644 (file)
@@ -42,26 +42,28 @@ class LegacyAudioParameter :   public AudioProcessorParameter
 {\r
 public:\r
     LegacyAudioParameter (AudioProcessor& audioProcessorToUse, int audioParameterIndex)\r
-        : audioProcessor (audioProcessorToUse), idx (audioParameterIndex)\r
     {\r
-        jassert (idx < audioProcessor.getNumParameters());\r
+        processor = &audioProcessorToUse;\r
+\r
+        parameterIndex = audioParameterIndex;\r
+        jassert (parameterIndex < processor->getNumParameters());\r
     }\r
 \r
     //==============================================================================\r
-    float getValue() const override                    { return audioProcessor.getParameter (idx); }\r
-    void setValue (float newValue) override            { audioProcessor.setParameter (idx, newValue); }\r
-    float getDefaultValue() const override             { return audioProcessor.getParameterDefaultValue (idx); }\r
-    String getName (int maxLen) const override         { return audioProcessor.getParameterName (idx, maxLen); }\r
-    String getLabel() const override                   { return audioProcessor.getParameterLabel (idx); }\r
-    int getNumSteps() const override                   { return audioProcessor.getParameterNumSteps (idx); }\r
-    bool isDiscrete() const override                   { return audioProcessor.isParameterDiscrete (idx); }\r
+    float getValue() const override                    { return processor->getParameter (parameterIndex); }\r
+    void setValue (float newValue) override            { processor->setParameter (parameterIndex, newValue); }\r
+    float getDefaultValue() const override             { return processor->getParameterDefaultValue (parameterIndex); }\r
+    String getName (int maxLen) const override         { return processor->getParameterName (parameterIndex, maxLen); }\r
+    String getLabel() const override                   { return processor->getParameterLabel (parameterIndex); }\r
+    int getNumSteps() const override                   { return processor->getParameterNumSteps (parameterIndex); }\r
+    bool isDiscrete() const override                   { return processor->isParameterDiscrete (parameterIndex); }\r
     bool isBoolean() const override                    { return false; }\r
-    bool isOrientationInverted() const override        { return audioProcessor.isParameterOrientationInverted (idx); }\r
-    bool isAutomatable() const override                { return audioProcessor.isParameterAutomatable (idx); }\r
-    bool isMetaParameter() const override              { return audioProcessor.isMetaParameter (idx); }\r
-    Category getCategory() const override              { return audioProcessor.getParameterCategory (idx); }\r
-    String getCurrentValueAsText() const override      { return audioProcessor.getParameterText (idx); }\r
-    String getParamID() const                          { return audioProcessor.getParameterID (idx); }\r
+    bool isOrientationInverted() const override        { return processor->isParameterOrientationInverted (parameterIndex); }\r
+    bool isAutomatable() const override                { return processor->isParameterAutomatable (parameterIndex); }\r
+    bool isMetaParameter() const override              { return processor->isMetaParameter (parameterIndex); }\r
+    Category getCategory() const override              { return processor->getParameterCategory (parameterIndex); }\r
+    String getCurrentValueAsText() const override      { return processor->getParameterText (parameterIndex); }\r
+    String getParamID() const                          { return processor->getParameterID (parameterIndex); }\r
 \r
     //==============================================================================\r
     float getValueForText (const String&) const override\r
@@ -88,7 +90,7 @@ public:
     {\r
         if (auto* legacy = dynamic_cast<LegacyAudioParameter*> (param))\r
         {\r
-            return legacy->idx;\r
+            return legacy->parameterIndex;\r
         }\r
         else\r
         {\r
@@ -119,9 +121,6 @@ public:
 \r
         return String (param->getParameterIndex());\r
     }\r
-private:\r
-    AudioProcessor& audioProcessor;\r
-    int idx;\r
 };\r
 \r
 //==============================================================================\r
index 970f2b777738cc104a20a63e0a9a77aaf45cc75a..7cba0117b2dd93e410e07f35bd0aca33fded94a6 100644 (file)
@@ -577,8 +577,8 @@ private:
 template <typename FloatType>\r
 struct VST3BufferExchange\r
 {\r
-    typedef Array<FloatType*> Bus;\r
-    typedef Array<Bus> BusMap;\r
+    using Bus = Array<FloatType*>;\r
+    using BusMap = Array<Bus>;\r
 \r
     static inline void assignRawPointer (Steinberg::Vst::AudioBusBuffers& vstBuffers, float** raw)  { vstBuffers.channelBuffers32 = raw; }\r
     static inline void assignRawPointer (Steinberg::Vst::AudioBusBuffers& vstBuffers, double** raw) { vstBuffers.channelBuffers64 = raw; }\r
index 466478d62a357097c31ad9a064f6206c8b76b7d7..b6aabd110bdc8966fe3a45397b355341c0bb67d8 100644 (file)
@@ -648,7 +648,7 @@ private:
     Atomic<int> refCount;\r
     String appName;\r
 \r
-    typedef std::map<Vst::ParamID, int> ParamMapType;\r
+    using ParamMapType = std::map<Vst::ParamID, int>;\r
     ParamMapType paramToIndexMap;\r
 \r
     int getIndexOfParamID (Vst::ParamID paramID)\r
@@ -897,8 +897,8 @@ struct DescriptionFactory
             if (foundNames.contains (name, true))\r
                 continue;\r
 \r
-            ScopedPointer<PClassInfo2> info2;\r
-            ScopedPointer<PClassInfoW> infoW;\r
+            std::unique_ptr<PClassInfo2> info2;\r
+            std::unique_ptr<PClassInfoW> infoW;\r
 \r
             {\r
                 ComSmartPtr<IPluginFactory2> pf2;\r
@@ -1219,7 +1219,7 @@ struct VST3ModuleHandle  : public ReferenceCountedObject
     }\r
 \r
     //==============================================================================\r
-    typedef ReferenceCountedObjectPtr<VST3ModuleHandle> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<VST3ModuleHandle>;\r
 \r
     static VST3ModuleHandle::Ptr findOrCreateModule (const File& file, const PluginDescription& description)\r
     {\r
@@ -1243,7 +1243,7 @@ struct VST3ModuleHandle  : public ReferenceCountedObject
     String name;\r
 \r
 private:\r
-    ScopedPointer<DLLHandle> dllHandle;\r
+    std::unique_ptr<DLLHandle> dllHandle;\r
 \r
     //==============================================================================\r
     static Array<VST3ModuleHandle*>& getActiveModules()\r
@@ -1450,14 +1450,14 @@ private:
     };\r
 \r
     ChildComponent embeddedComponent;\r
-    ScopedPointer<ComponentPeer> peer;\r
-    typedef HWND HandleFormat;\r
+    std::unique_ptr<ComponentPeer> peer;\r
+    using HandleFormat = HWND;\r
    #elif JUCE_MAC\r
     AutoResizingNSViewComponentWithParent embeddedComponent;\r
-    typedef NSView* HandleFormat;\r
+    using HandleFormat = NSView*;\r
    #else\r
     Component embeddedComponent;\r
-    typedef void* HandleFormat;\r
+    using HandleFormat = void*;\r
    #endif\r
 \r
     HandleFormat pluginHandle = {};\r
@@ -1477,7 +1477,7 @@ private:
         {\r
            #if JUCE_WINDOWS\r
             if (auto* topComp = getTopLevelComponent())\r
-                peer = embeddedComponent.createNewPeer (0, topComp->getWindowHandle());\r
+                peer.reset (embeddedComponent.createNewPeer (0, topComp->getWindowHandle()));\r
             else\r
                 peer = nullptr;\r
 \r
@@ -1576,8 +1576,8 @@ struct VST3ComponentHolder
             ComSmartPtr<IPluginFactory2> pf2;\r
             ComSmartPtr<IPluginFactory3> pf3;\r
 \r
-            ScopedPointer<PClassInfo2> info2;\r
-            ScopedPointer<PClassInfoW> infoW;\r
+            std::unique_ptr<PClassInfo2> info2;\r
+            std::unique_ptr<PClassInfoW> infoW;\r
 \r
             if (pf2.loadFrom (factory))\r
             {\r
@@ -1662,7 +1662,9 @@ struct VST3ComponentHolder
 \r
     void terminate()\r
     {\r
-        if (isComponentInitialised) component->terminate();\r
+        if (isComponentInitialised)\r
+            component->terminate();\r
+\r
         isComponentInitialised = false;\r
     }\r
 \r
@@ -1698,20 +1700,10 @@ struct VST3PluginInstance : public AudioPluginInstance
     {\r
         VST3Parameter (VST3PluginInstance& parent,\r
                        Steinberg::Vst::ParamID parameterID,\r
-                       const String& parameterName,\r
-                       const String& parameterLabel,\r
-                       Steinberg::Vst::ParamValue defaultParameterValue,\r
-                       bool parameterIsAutomatable,\r
-                       bool parameterIsDiscrete,\r
-                       int numParameterSteps)\r
+                       bool parameterIsAutomatable)\r
             : pluginInstance (parent),\r
               paramID (parameterID),\r
-              name (parameterName),\r
-              label (parameterLabel),\r
-              defaultValue (defaultParameterValue),\r
-              automatable (parameterIsAutomatable),\r
-              discrete (parameterIsDiscrete),\r
-              numSteps (numParameterSteps)\r
+              automatable (parameterIsAutomatable)\r
         {\r
         }\r
 \r
@@ -1765,17 +1757,17 @@ struct VST3PluginInstance : public AudioPluginInstance
 \r
         float getDefaultValue() const override\r
         {\r
-            return (float) defaultValue;\r
+            return (float) pluginInstance.getParameterInfoForIndex (getParameterIndex()).defaultNormalizedValue;\r
         }\r
 \r
         String getName (int /*maximumStringLength*/) const override\r
         {\r
-            return name;\r
+            return toString (pluginInstance.getParameterInfoForIndex (getParameterIndex()).title);\r
         }\r
 \r
         String getLabel() const override\r
         {\r
-            return label;\r
+            return toString (pluginInstance.getParameterInfoForIndex (getParameterIndex()).units);\r
         }\r
 \r
         bool isAutomatable() const override\r
@@ -1785,12 +1777,14 @@ struct VST3PluginInstance : public AudioPluginInstance
 \r
         bool isDiscrete() const override\r
         {\r
-            return discrete;\r
+            return getNumSteps() != AudioProcessor::getDefaultNumParameterSteps();\r
         }\r
 \r
         int getNumSteps() const override\r
         {\r
-            return numSteps;\r
+            auto stepCount = pluginInstance.getParameterInfoForIndex (getParameterIndex()).stepCount;\r
+            return stepCount == 0 ? AudioProcessor::getDefaultNumParameterSteps()\r
+                                  : stepCount + 1;\r
         }\r
 \r
         StringArray getAllValueStrings() const override\r
@@ -1800,10 +1794,7 @@ struct VST3PluginInstance : public AudioPluginInstance
 \r
         VST3PluginInstance& pluginInstance;\r
         const Steinberg::Vst::ParamID paramID;\r
-        const String name, label;\r
-        const Steinberg::Vst::ParamValue defaultValue;\r
-        const bool automatable, discrete;\r
-        const int numSteps;\r
+        const bool automatable;\r
     };\r
 \r
     VST3PluginInstance (VST3ComponentHolder* componentHolder)\r
@@ -1876,21 +1867,10 @@ struct VST3PluginInstance : public AudioPluginInstance
 \r
         for (int i = 0; i < editController->getParameterCount(); ++i)\r
         {\r
-            Vst::ParameterInfo paramInfo = { 0 };\r
-            editController->getParameterInfo (i, paramInfo);\r
-\r
-            bool isDiscrete = paramInfo.stepCount != 0;\r
-            int numSteps = isDiscrete ? paramInfo.stepCount + 1\r
-                                      : AudioProcessor::getDefaultNumParameterSteps();\r
-\r
+            auto paramInfo = getParameterInfoForIndex (i);\r
             VST3Parameter* p = new VST3Parameter (*this,\r
                                                   paramInfo.id,\r
-                                                  toString (paramInfo.title),\r
-                                                  toString (paramInfo.units),\r
-                                                  paramInfo.defaultNormalizedValue,\r
-                                                  (paramInfo.flags & Vst::ParameterInfo::kCanAutomate) != 0,\r
-                                                  isDiscrete,\r
-                                                  numSteps);\r
+                                                  (paramInfo.flags & Vst::ParameterInfo::kCanAutomate) != 0);\r
             addParameter (p);\r
 \r
             if ((paramInfo.flags & Vst::ParameterInfo::kIsBypass) != 0)\r
@@ -2385,7 +2365,7 @@ struct VST3PluginInstance : public AudioPluginInstance
 \r
     void setStateInformation (const void* data, int sizeInBytes) override\r
     {\r
-        ScopedPointer<XmlElement> head (AudioProcessor::getXmlFromBinary (data, sizeInBytes));\r
+        std::unique_ptr<XmlElement> head (AudioProcessor::getXmlFromBinary (data, sizeInBytes));\r
 \r
         if (head != nullptr)\r
         {\r
@@ -2558,15 +2538,15 @@ struct VST3PluginInstance : public AudioPluginInstance
 \r
 private:\r
     //==============================================================================\r
-    ScopedPointer<VST3ComponentHolder> holder;\r
+    std::unique_ptr<VST3ComponentHolder> holder;\r
 \r
     friend VST3HostContext;\r
 \r
     // Information objects:\r
     String company;\r
-    ScopedPointer<PClassInfo> info;\r
-    ScopedPointer<PClassInfo2> info2;\r
-    ScopedPointer<PClassInfoW> infoW;\r
+    std::unique_ptr<PClassInfo> info;\r
+    std::unique_ptr<PClassInfo2> info2;\r
+    std::unique_ptr<PClassInfoW> infoW;\r
 \r
     // Rudimentary interfaces:\r
     ComSmartPtr<Vst::IEditController> editController;\r
@@ -2945,7 +2925,7 @@ void VST3PluginFormat::findAllTypesForFile (OwnedArray<PluginDescription>& resul
 void VST3PluginFormat::createPluginInstance (const PluginDescription& description, double, int, void* userData,\r
                                              void (*callback) (void*, AudioPluginInstance*, const String&))\r
 {\r
-    ScopedPointer<VST3Classes::VST3PluginInstance> result;\r
+    std::unique_ptr<VST3Classes::VST3PluginInstance> result;\r
 \r
     if (fileMightContainThisPluginType (description.fileOrIdentifier))\r
     {\r
@@ -2956,7 +2936,7 @@ void VST3PluginFormat::createPluginInstance (const PluginDescription& descriptio
 \r
         if (const VST3Classes::VST3ModuleHandle::Ptr module = VST3Classes::VST3ModuleHandle::findOrCreateModule (file, description))\r
         {\r
-            ScopedPointer<VST3Classes::VST3ComponentHolder> holder (new VST3Classes::VST3ComponentHolder (module));\r
+            std::unique_ptr<VST3Classes::VST3ComponentHolder> holder (new VST3Classes::VST3ComponentHolder (module));\r
 \r
             if (holder->initialise())\r
             {\r
index c3c5e31511433c624811087fb055db6ff208f96a..a52f2f8aaf3d82725de32e741e407d9b9f2997cc 100644 (file)
@@ -578,9 +578,9 @@ struct ModuleHandle    : public ReferenceCountedObject
     File file;\r
     MainCall moduleMain, customMain = {};\r
     String pluginName;\r
-    ScopedPointer<XmlElement> vstXml;\r
+    std::unique_ptr<XmlElement> vstXml;\r
 \r
-    typedef ReferenceCountedObjectPtr<ModuleHandle> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<ModuleHandle>;\r
 \r
     static Array<ModuleHandle*>& getActiveModules()\r
     {\r
@@ -659,11 +659,11 @@ struct ModuleHandle    : public ReferenceCountedObject
 \r
         if (moduleMain != nullptr)\r
         {\r
-            vstXml = XmlDocument::parse (file.withFileExtension ("vstxml"));\r
+            vstXml.reset (XmlDocument::parse (file.withFileExtension ("vstxml")));\r
 \r
            #if JUCE_WINDOWS\r
             if (vstXml == nullptr)\r
-                vstXml = XmlDocument::parse (getDLLResource (file, "VSTXML", 1));\r
+                vstXml.reset (XmlDocument::parse (getDLLResource (file, "VSTXML", 1)));\r
            #endif\r
         }\r
 \r
@@ -916,6 +916,10 @@ struct VSTPluginInstance     : public AudioPluginInstance,
 \r
         String getName (int maximumStringLength) const override\r
         {\r
+            if (name.isEmpty())\r
+                return pluginInstance.getTextForOpcode (getParameterIndex(),\r
+                                                        plugInOpcodeGetParameterName);\r
+\r
             if (name.length() <= maximumStringLength)\r
                 return name;\r
 \r
@@ -933,7 +937,9 @@ struct VSTPluginInstance     : public AudioPluginInstance,
 \r
         String getLabel() const override\r
         {\r
-            return label;\r
+            return label.isEmpty() ? pluginInstance.getTextForOpcode (getParameterIndex(),\r
+                                                                      plugInOpcodeGetParameterLabel)\r
+                                   : label;\r
         }\r
 \r
         bool isAutomatable() const override\r
@@ -989,10 +995,10 @@ struct VSTPluginInstance     : public AudioPluginInstance,
 \r
         for (int i = 0; i < vstEffect->numParameters; ++i)\r
         {\r
-            String paramName (getTextForOpcode (i, plugInOpcodeGetParameterName));\r
+            String paramName;\r
             Array<String> shortParamNames;\r
             float defaultValue = 0;\r
-            String label (getTextForOpcode (i, plugInOpcodeGetParameterLabel));\r
+            String label;\r
             bool isAutomatable = dispatch (plugInOpcodeIsParameterAutomatable, i, 0, 0, 0) != 0;\r
             bool isDiscrete = false;\r
             int numSteps = AudioProcessor::getDefaultNumParameterSteps();\r
@@ -1064,7 +1070,7 @@ struct VSTPluginInstance     : public AudioPluginInstance,
                                             valueType));\r
         }\r
 \r
-        vstSupportsBypass = pluginCanDo ("bypass");\r
+        vstSupportsBypass = (pluginCanDo ("bypass") > 0);\r
         setRateAndBufferSizeDetails (sampleRateToUse, blockSizeToUse);\r
     }\r
 \r
@@ -1946,14 +1952,20 @@ struct VSTPluginInstance     : public AudioPluginInstance,
     VstEffectInterface* vstEffect;\r
     ModuleHandle::Ptr vstModule;\r
 \r
-    ScopedPointer<VSTPluginFormat::ExtraFunctions> extraFunctions;\r
+    std::unique_ptr<VSTPluginFormat::ExtraFunctions> extraFunctions;\r
     bool usesCocoaNSView = false;\r
 \r
 private:\r
     //==============================================================================\r
     struct VST2BypassParameter    : Parameter\r
     {\r
-        VST2BypassParameter (VSTPluginInstance& effectToUse)   : parent (effectToUse) {}\r
+        VST2BypassParameter (VSTPluginInstance& effectToUse)\r
+            : parent (effectToUse),\r
+              onStrings (TRANS("on"), TRANS("yes"), TRANS("true")),\r
+              offStrings (TRANS("off"), TRANS("no"), TRANS("false")),\r
+              values (TRANS("Off"), TRANS("On"))\r
+        {\r
+        }\r
 \r
         void setValue (float newValue) override\r
         {\r
@@ -1991,9 +2003,7 @@ private:
 \r
         VSTPluginInstance& parent;\r
         bool currentValue = false;\r
-        StringArray onStrings  { TRANS("on"),  TRANS("yes"), TRANS("true") };\r
-        StringArray offStrings { TRANS("off"), TRANS("no"),  TRANS("false") };\r
-        StringArray values { TRANS("Off"), TRANS("On") };\r
+        StringArray onStrings, offStrings, values;\r
     };\r
 \r
     //==============================================================================\r
@@ -2014,9 +2024,9 @@ private:
 \r
     AudioBuffer<double> tmpBufferDouble;\r
     HeapBlock<double*> channelBufferDouble;\r
-    ScopedPointer<VST2BypassParameter> bypassParam;\r
+    std::unique_ptr<VST2BypassParameter> bypassParam;\r
 \r
-    ScopedPointer<VSTXMLInfo> xmlInfo;\r
+    std::unique_ptr<VSTXMLInfo> xmlInfo;\r
 \r
     static pointer_sized_int handleCanDo (const char* name)\r
     {\r
@@ -3293,10 +3303,10 @@ private:
     };\r
 \r
     friend struct CarbonWrapperComponent;\r
-    ScopedPointer<CarbonWrapperComponent> carbonWrapper;\r
+    std::unique_ptr<CarbonWrapperComponent> carbonWrapper;\r
    #endif\r
 \r
-    ScopedPointer<AutoResizingNSViewComponentWithParent> cocoaWrapper;\r
+    std::unique_ptr<AutoResizingNSViewComponentWithParent> cocoaWrapper;\r
 \r
     void resized() override\r
     {\r
@@ -3374,7 +3384,7 @@ void VSTPluginFormat::findAllTypesForFile (OwnedArray<PluginDescription>& result
     desc.fileOrIdentifier = fileOrIdentifier;\r
     desc.uid = 0;\r
 \r
-    ScopedPointer<VSTPluginInstance> instance (createAndUpdateDesc (*this, desc));\r
+    std::unique_ptr<VSTPluginInstance> instance (createAndUpdateDesc (*this, desc));\r
 \r
     if (instance == nullptr)\r
         return;\r
@@ -3402,7 +3412,7 @@ void VSTPluginFormat::findAllTypesForFile (OwnedArray<PluginDescription>& result
 \r
             aboutToScanVSTShellPlugin (desc);\r
 \r
-            ScopedPointer<VSTPluginInstance> shellInstance (createAndUpdateDesc (*this, desc));\r
+            std::unique_ptr<VSTPluginInstance> shellInstance (createAndUpdateDesc (*this, desc));\r
 \r
             if (shellInstance != nullptr)\r
             {\r
@@ -3423,7 +3433,7 @@ void VSTPluginFormat::createPluginInstance (const PluginDescription& desc,
                                             void* userData,\r
                                             void (*callback) (void*, AudioPluginInstance*, const String&))\r
 {\r
-    ScopedPointer<VSTPluginInstance> result;\r
+    std::unique_ptr<VSTPluginInstance> result;\r
 \r
     if (fileMightContainThisPluginType (desc.fileOrIdentifier))\r
     {\r
@@ -3600,7 +3610,7 @@ AudioPluginInstance* VSTPluginFormat::createCustomVSTFromMainCall (void* entryPo
 \r
     if (module->open())\r
     {\r
-        ScopedPointer<VSTPluginInstance> result (VSTPluginInstance::create (module, initialSampleRate, initialBufferSize));\r
+        std::unique_ptr<VSTPluginInstance> result (VSTPluginInstance::create (module, initialSampleRate, initialBufferSize));\r
 \r
         if (result != nullptr)\r
             if (result->initialiseEffect (initialSampleRate, initialBufferSize))\r
@@ -3612,7 +3622,7 @@ AudioPluginInstance* VSTPluginFormat::createCustomVSTFromMainCall (void* entryPo
 \r
 void VSTPluginFormat::setExtraFunctions (AudioPluginInstance* plugin, ExtraFunctions* functions)\r
 {\r
-    ScopedPointer<ExtraFunctions> f (functions);\r
+    std::unique_ptr<ExtraFunctions> f (functions);\r
 \r
     if (auto* vst = dynamic_cast<VSTPluginInstance*> (plugin))\r
         std::swap (vst->extraFunctions, f);\r
index ed56fdb87da0e175967ff96d20e510464893d713..8c6f416a7bd6a81b81637804f4808ef73290a827 100644 (file)
@@ -82,10 +82,10 @@ static inline bool arrayContainsPlugin (const OwnedArray<PluginDescription>& lis
 \r
 #if JUCE_IOS\r
  #define JUCE_IOS_MAC_VIEW  UIView\r
typedef UIViewComponent  ViewComponentBaseClass;\r
using ViewComponentBaseClass = UIViewComponent;\r
 #else\r
  #define JUCE_IOS_MAC_VIEW  NSView\r
typedef NSViewComponent  ViewComponentBaseClass;\r
using ViewComponentBaseClass = NSViewComponent;\r
 #endif\r
 \r
 //==============================================================================\r
index a5fcee522365b2296f64604519ab97836f6565a2..59ada712a14677597a27656a2fda01253c128865 100644 (file)
@@ -35,9 +35,9 @@
 \r
   ID:               juce_audio_processors\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE audio processor classes\r
-  description:      Classes for loading and playing VST, AU, or internally-generated audio processors.\r
+  description:      Classes for loading and playing VST, AU, LADSPA, or internally-generated audio processors.\r
   website:          http://www.juce.com/juce\r
   license:          GPL/Commercial\r
 \r
@@ -60,7 +60,7 @@
 /** Config: JUCE_PLUGINHOST_VST\r
     Enables the VST audio plugin hosting classes.\r
 \r
-    @see VSTPluginFormat, VST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU, JUCE_PLUGINHOST_VST3\r
+    @see VSTPluginFormat, VST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU, JUCE_PLUGINHOST_VST3, JUCE_PLUGINHOST_LADSPA\r
 */\r
 #ifndef JUCE_PLUGINHOST_VST\r
  #define JUCE_PLUGINHOST_VST 0\r
@@ -70,7 +70,7 @@
     Enables the VST3 audio plugin hosting classes. This requires the Steinberg VST3 SDK to be\r
     installed on your machine.\r
 \r
-    @see VSTPluginFormat, VST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_AU\r
+    @see VSTPluginFormat, VST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_AU, JUCE_PLUGINHOST_LADSPA\r
 */\r
 #ifndef JUCE_PLUGINHOST_VST3\r
  #define JUCE_PLUGINHOST_VST3 0\r
 /** Config: JUCE_PLUGINHOST_AU\r
     Enables the AudioUnit plugin hosting classes. This is Mac-only, of course.\r
 \r
-    @see AudioUnitPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_VST3\r
+    @see AudioUnitPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_VST3, JUCE_PLUGINHOST_LADSPA\r
 */\r
 #ifndef JUCE_PLUGINHOST_AU\r
  #define JUCE_PLUGINHOST_AU 0\r
 #endif\r
 \r
-#if ! (JUCE_PLUGINHOST_AU || JUCE_PLUGINHOST_VST || JUCE_PLUGINHOST_VST3)\r
-// #error "You need to set either the JUCE_PLUGINHOST_AU and/or JUCE_PLUGINHOST_VST and/or JUCE_PLUGINHOST_VST3 flags if you're using this module!"\r
+/** Config: JUCE_PLUGINHOST_LADSPA\r
+    Enables the LADSPA plugin hosting classes. This is Linux-only, of course.\r
+\r
+    @see LADSPAPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_VST3, JUCE_PLUGINHOST_AU\r
+ */\r
+#ifndef JUCE_PLUGINHOST_LADSPA\r
+ #define JUCE_PLUGINHOST_LADSPA 0\r
+#endif\r
+\r
+#if ! (JUCE_PLUGINHOST_AU || JUCE_PLUGINHOST_VST || JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_LADSPA)\r
+// #error "You need to set either the JUCE_PLUGINHOST_AU and/or JUCE_PLUGINHOST_VST and/or JUCE_PLUGINHOST_VST3 and/or JUCE_PLUGINHOST_LADSPA flags if you're using this module!"\r
 #endif\r
 \r
 #if ! (defined (JUCE_SUPPORT_CARBON) || JUCE_64BIT || JUCE_IOS)\r
index 31f2ad74c892794a519d8c83919a080ac1a8320d..a228766bd57f5507360e00cc71399acc36978d50 100644 (file)
@@ -38,6 +38,15 @@ String AudioPluginInstance::getParameterID (int parameterIndex)
 {\r
     assertOnceOnDeprecatedMethodUse();\r
 \r
+    // Currently there is no corresponding method available in the\r
+    // AudioProcessorParameter class, and the previous behaviour of JUCE's\r
+    // plug-in hosting code simply returns a string version of the index; to\r
+    // maintain backwards compatibilty you should perform the operation below\r
+    // this comment. However the caveat is that for plug-ins which change their\r
+    // number of parameters dynamically at runtime you cannot rely upon the\r
+    // returned parameter ID mapping to the correct parameter. A comprehensive\r
+    // solution to this problem requires some additional work in JUCE's hosting\r
+    // code.\r
     return String (parameterIndex);\r
 }\r
 \r
@@ -56,7 +65,7 @@ void AudioPluginInstance::setParameter (int parameterIndex, float newValue)
     assertOnceOnDeprecatedMethodUse();\r
 \r
     if (auto* param = getParameters()[parameterIndex])\r
-        return param->setValue (newValue);\r
+        param->setValue (newValue);\r
 }\r
 \r
 const String AudioPluginInstance::getParameterName (int parameterIndex)\r
index 43658a5772be1c6444835975c82f7adaefe9d524..c0f2bd12a52b3f9947540ffa933c62d152e23fd4 100644 (file)
@@ -432,7 +432,7 @@ void AudioProcessor::setParameterNotifyingHost (int parameterIndex, float newVal
     {\r
         param->setValueNotifyingHost (newValue);\r
     }\r
-    else\r
+    else if (isPositiveAndBelow (parameterIndex, getNumParameters()))\r
     {\r
         setParameter (parameterIndex, newValue);\r
         sendParamChangeMessageToListeners (parameterIndex, newValue);\r
@@ -522,7 +522,8 @@ String AudioProcessor::getParameterName (int index, int maximumStringLength)
     if (auto* p = managedParameters[index])\r
         return p->getName (maximumStringLength);\r
 \r
-    return getParameterName (index).substring (0, maximumStringLength);\r
+    return isPositiveAndBelow (index, getNumParameters()) ? getParameterName (index).substring (0, maximumStringLength)\r
+                                                          : String();\r
 }\r
 \r
 const String AudioProcessor::getParameterText (int index)\r
@@ -534,7 +535,8 @@ const String AudioProcessor::getParameterText (int index)
     ScopedValueSetter<bool> sv (textRecursionCheck, true, false);\r
    #endif\r
 \r
-    return getParameterText (index, 1024);\r
+    return isPositiveAndBelow (index, getNumParameters()) ? getParameterText (index, 1024)\r
+                                                          : String();\r
 }\r
 \r
 String AudioProcessor::getParameterText (int index, int maximumStringLength)\r
@@ -542,7 +544,8 @@ String AudioProcessor::getParameterText (int index, int maximumStringLength)
     if (auto* p = managedParameters[index])\r
         return p->getText (p->getValue(), maximumStringLength);\r
 \r
-    return getParameterText (index).substring (0, maximumStringLength);\r
+    return isPositiveAndBelow (index, getNumParameters()) ? getParameterText (index).substring (0, maximumStringLength)\r
+                                                          : String();\r
 }\r
 \r
 #if JUCE_GCC\r
index 11122fc04868a5a189ba7d0d643b9b7a576ca63a..201f3b363644a32bdca3947fb355436f921cb445 100644 (file)
@@ -66,18 +66,10 @@ protected:
     /** Constructor for AudioProcessors which use layout maps\r
         If your AudioProcessor uses layout maps then use this constructor.\r
     */\r
-   #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
     AudioProcessor (const std::initializer_list<const short[2]>& channelLayoutList)\r
         : AudioProcessor (busesPropertiesFromLayoutArray (layoutListToArray (channelLayoutList)))\r
     {\r
     }\r
-   #else\r
-    template <int numLayouts>\r
-    AudioProcessor (const short (&channelLayoutList) [numLayouts][2])\r
-        : AudioProcessor (busesPropertiesFromLayoutArray (layoutListToArray (channelLayoutList)))\r
-    {\r
-    }\r
-   #endif\r
 \r
 public:\r
     //==============================================================================\r
@@ -766,12 +758,10 @@ public:
         }\r
         @endcode\r
     */\r
-   #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
     static bool containsLayout (const BusesLayout& layouts, const std::initializer_list<const short[2]>& channelLayoutList)\r
     {\r
         return containsLayout (layouts, layoutListToArray (channelLayoutList));\r
     }\r
-   #endif\r
 \r
     template <int numLayouts>\r
     static bool containsLayout (const BusesLayout& layouts, const short (&channelLayoutList) [numLayouts][2])\r
@@ -1590,7 +1580,6 @@ private:
         return layouts;\r
     }\r
 \r
-   #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
     static Array<InOutChannelPair> layoutListToArray (const std::initializer_list<const short[2]>& configuration)\r
     {\r
         Array<InOutChannelPair> layouts;\r
@@ -1600,7 +1589,6 @@ private:
 \r
         return layouts;\r
     }\r
-   #endif\r
 \r
     //==============================================================================\r
     static BusesProperties busesPropertiesFromLayoutArray (const Array<InOutChannelPair>&);\r
index 1d126a8abe8e2c26d55f296d7dcb93608834dde9..76dffc48cd6c62a440650afd1ebf10bc3e2cc5f9 100644 (file)
@@ -177,7 +177,7 @@ public:
      */\r
     void setBoundsConstrained (Rectangle<int> newBounds);\r
 \r
-    ScopedPointer<ResizableCornerComponent> resizableCorner;\r
+    std::unique_ptr<ResizableCornerComponent> resizableCorner;\r
 \r
 private:\r
     //==============================================================================\r
@@ -200,7 +200,7 @@ private:
     void attachConstrainer (ComponentBoundsConstrainer*);\r
 \r
     //==============================================================================\r
-    ScopedPointer<AudioProcessorEditorListener> resizeListener;\r
+    std::unique_ptr<AudioProcessorEditorListener> resizeListener;\r
     bool resizable;\r
     ComponentBoundsConstrainer defaultConstrainer;\r
     ComponentBoundsConstrainer* constrainer = {};\r
index 8eedcb8ecff0009f25be176af69ba33b5b9ec5ca..8c6b32763dc42a6198bf1d631136ba44a8840ee8 100644 (file)
@@ -348,7 +348,7 @@ struct RenderSequenceBuilder
     }\r
 \r
     //==============================================================================\r
-    typedef AudioProcessorGraph::NodeID NodeID;\r
+    using NodeID = AudioProcessorGraph::NodeID;\r
 \r
     AudioProcessorGraph& graph;\r
     RenderSequence& sequence;\r
@@ -1045,7 +1045,6 @@ bool AudioProcessorGraph::isAnInputTo (Node& src, Node& dst, int recursionCheck)
     return false;\r
 }\r
 \r
-\r
 bool AudioProcessorGraph::canConnect (Node* source, int sourceChannel, Node* dest, int destChannel) const noexcept\r
 {\r
     bool sourceIsMIDI = sourceChannel == midiChannelIndex;\r
@@ -1181,8 +1180,8 @@ bool AudioProcessorGraph::removeIllegalConnections()
 //==============================================================================\r
 void AudioProcessorGraph::clearRenderingSequence()\r
 {\r
-    ScopedPointer<RenderSequenceFloat> oldSequenceF;\r
-    ScopedPointer<RenderSequenceDouble> oldSequenceD;\r
+    std::unique_ptr<RenderSequenceFloat> oldSequenceF;\r
+    std::unique_ptr<RenderSequenceDouble> oldSequenceD;\r
 \r
     {\r
         const ScopedLock sl (getCallbackLock());\r
@@ -1202,8 +1201,8 @@ bool AudioProcessorGraph::anyNodesNeedPreparing() const noexcept
 \r
 void AudioProcessorGraph::buildRenderingSequence()\r
 {\r
-    ScopedPointer<RenderSequenceFloat>  newSequenceF (new RenderSequenceFloat());\r
-    ScopedPointer<RenderSequenceDouble> newSequenceD (new RenderSequenceDouble());\r
+    std::unique_ptr<RenderSequenceFloat>  newSequenceF (new RenderSequenceFloat());\r
+    std::unique_ptr<RenderSequenceDouble> newSequenceD (new RenderSequenceDouble());\r
 \r
     {\r
         MessageManagerLock mml;\r
@@ -1212,8 +1211,11 @@ void AudioProcessorGraph::buildRenderingSequence()
         RenderSequenceBuilder<RenderSequenceDouble> builderD (*this, *newSequenceD);\r
     }\r
 \r
-    newSequenceF->prepareBuffers (getBlockSize());\r
-    newSequenceD->prepareBuffers (getBlockSize());\r
+    {\r
+        const ScopedLock sl (getCallbackLock());\r
+        newSequenceF->prepareBuffers (getBlockSize());\r
+        newSequenceD->prepareBuffers (getBlockSize());\r
+    }\r
 \r
     if (anyNodesNeedPreparing())\r
     {\r
@@ -1295,10 +1297,10 @@ bool AudioProcessorGraph::producesMidi() const                      { return tru
 void AudioProcessorGraph::getStateInformation (juce::MemoryBlock&)  {}\r
 void AudioProcessorGraph::setStateInformation (const void*, int)    {}\r
 \r
-template <typename Type>\r
-static void processBlockForBuffer (AudioBuffer<Type>& buffer, MidiBuffer& midiMessages,\r
+template <typename FloatType, typename SequenceType>\r
+static void processBlockForBuffer (AudioBuffer<FloatType>& buffer, MidiBuffer& midiMessages,\r
                                    AudioProcessorGraph& graph,\r
-                                   GraphRenderSequence<Type>* renderSequence,\r
+                                   std::unique_ptr<SequenceType>& renderSequence,\r
                                    Atomic<int>& isPrepared)\r
 {\r
     if (graph.isNonRealtime())\r
index 15983d30819e874f198ed6ae0887a7274280dd77..a752149d5d019148f9524b112df3480fec45570d 100644 (file)
@@ -58,7 +58,7 @@ public:
     ~AudioProcessorGraph();\r
 \r
     /** Each node in the graph has a UID of this type. */\r
-    typedef uint32 NodeID;\r
+    using NodeID = uint32;\r
 \r
     //==============================================================================\r
     /** A special index that represents the midi channel of a node.\r
@@ -117,7 +117,7 @@ public:
 \r
         //==============================================================================\r
         /** A convenient typedef for referring to a pointer to a node object. */\r
-        typedef ReferenceCountedObjectPtr<Node> Ptr;\r
+        using Ptr = ReferenceCountedObjectPtr<Node>;\r
 \r
     private:\r
         //==============================================================================\r
@@ -131,7 +131,7 @@ public:
             bool operator== (const Connection&) const noexcept;\r
         };\r
 \r
-        const ScopedPointer<AudioProcessor> processor;\r
+        const std::unique_ptr<AudioProcessor> processor;\r
         Array<Connection> inputs, outputs;\r
         bool isPrepared = false, bypassed = false;\r
 \r
@@ -380,8 +380,8 @@ private:
 \r
     struct RenderSequenceFloat;\r
     struct RenderSequenceDouble;\r
-    ScopedPointer<RenderSequenceFloat> renderSequenceFloat;\r
-    ScopedPointer<RenderSequenceDouble> renderSequenceDouble;\r
+    std::unique_ptr<RenderSequenceFloat> renderSequenceFloat;\r
+    std::unique_ptr<RenderSequenceDouble> renderSequenceDouble;\r
 \r
     friend class AudioGraphIOProcessor;\r
 \r
index 98fd08ad821252083b36d32ec550322ad3c437db..276ba3dc80aa65648642f6b5dc99033c857e84a2 100644 (file)
@@ -287,6 +287,7 @@ public:
 private:\r
     //==============================================================================\r
     friend class AudioProcessor;\r
+    friend class LegacyAudioParameter;\r
     AudioProcessor* processor = nullptr;\r
     int parameterIndex = -1;\r
     CriticalSection listenerLock;\r
index 3a302b2e1e020192eadbba315c7f6348f9c2583a..58855f0b1739c97b5f1d9c687e8253e6a23b4993 100644 (file)
@@ -28,20 +28,27 @@ namespace juce
 {\r
 \r
 class ParameterListener   : private AudioProcessorParameter::Listener,\r
+                            private AudioProcessorListener,\r
                             private Timer\r
 {\r
 public:\r
-    ParameterListener (AudioProcessorParameter& param)\r
-        : parameter (param)\r
+    ParameterListener (AudioProcessor& p, AudioProcessorParameter& param)\r
+        : processor (p), parameter (param)\r
     {\r
-        parameter.addListener (this);\r
+        if (LegacyAudioParameter::isLegacy (&parameter))\r
+            processor.addListener (this);\r
+        else\r
+            parameter.addListener (this);\r
 \r
         startTimer (100);\r
     }\r
 \r
     virtual ~ParameterListener()\r
     {\r
-        parameter.removeListener (this);\r
+        if (LegacyAudioParameter::isLegacy (&parameter))\r
+            processor.removeListener (this);\r
+        else\r
+            parameter.removeListener (this);\r
     }\r
 \r
     AudioProcessorParameter& getParameter() noexcept\r
@@ -52,6 +59,7 @@ public:
     virtual void handleNewParameterValue() = 0;\r
 \r
 private:\r
+    //==============================================================================\r
     void parameterValueChanged (int, float) override\r
     {\r
         parameterValueHasChanged = 1;\r
@@ -59,6 +67,16 @@ private:
 \r
     void parameterGestureChanged (int, bool) override {}\r
 \r
+    //==============================================================================\r
+    void audioProcessorParameterChanged (AudioProcessor*, int index, float) override\r
+    {\r
+        if (index == parameter.getParameterIndex())\r
+            parameterValueHasChanged = 1;\r
+    }\r
+\r
+    void audioProcessorChanged (AudioProcessor*) override {}\r
+\r
+    //==============================================================================\r
     void timerCallback() override\r
     {\r
         if (parameterValueHasChanged.compareAndSetBool (0, 1))\r
@@ -72,6 +90,7 @@ private:
         }\r
     }\r
 \r
+    AudioProcessor& processor;\r
     AudioProcessorParameter& parameter;\r
     Atomic<int> parameterValueHasChanged { 0 };\r
 \r
@@ -82,8 +101,8 @@ class BooleanParameterComponent final   : public Component,
                                           private ParameterListener\r
 {\r
 public:\r
-    BooleanParameterComponent (AudioProcessorParameter& param)\r
-        : ParameterListener (param)\r
+    BooleanParameterComponent (AudioProcessor& processor, AudioProcessorParameter& param)\r
+        : ParameterListener (processor, param)\r
     {\r
         // Set the initial value.\r
         handleNewParameterValue();\r
@@ -135,8 +154,8 @@ class SwitchParameterComponent final   : public Component,
                                          private ParameterListener\r
 {\r
 public:\r
-    SwitchParameterComponent (AudioProcessorParameter& param)\r
-        : ParameterListener (param)\r
+    SwitchParameterComponent (AudioProcessor& processor, AudioProcessorParameter& param)\r
+        : ParameterListener (processor, param)\r
     {\r
         auto* leftButton  = buttons.add (new TextButton());\r
         auto* rightButton = buttons.add (new TextButton());\r
@@ -240,8 +259,8 @@ class ChoiceParameterComponent final   : public Component,
                                          private ParameterListener\r
 {\r
 public:\r
-    ChoiceParameterComponent (AudioProcessorParameter& param)\r
-        : ParameterListener (param),\r
+    ChoiceParameterComponent (AudioProcessor& processor, AudioProcessorParameter& param)\r
+        : ParameterListener (processor, param),\r
           parameterValues (getParameter().getAllValueStrings())\r
     {\r
         box.addItemList (parameterValues, 1);\r
@@ -302,8 +321,8 @@ class SliderParameterComponent final   : public Component,
                                          private ParameterListener\r
 {\r
 public:\r
-    SliderParameterComponent (AudioProcessorParameter& param)\r
-        : ParameterListener (param)\r
+    SliderParameterComponent (AudioProcessor& processor, AudioProcessorParameter& param)\r
+        : ParameterListener (processor, param)\r
     {\r
         if (getParameter().getNumSteps() != AudioProcessor::getDefaultNumParameterSteps())\r
             slider.setRange (0.0, 1.0, 1.0 / (getParameter().getNumSteps() - 1.0));\r
@@ -392,7 +411,7 @@ private:
 class ParameterDisplayComponent   : public Component\r
 {\r
 public:\r
-    ParameterDisplayComponent (AudioProcessorParameter& param)\r
+    ParameterDisplayComponent (AudioProcessor& processor, AudioProcessorParameter& param)\r
         : parameter (param)\r
     {\r
         parameterName.setText (parameter.getName (128), dontSendNotification);\r
@@ -408,27 +427,27 @@ public:
             // marking a parameter as boolean. If you want consistency across\r
             // all  formats then it might be best to use a\r
             // SwitchParameterComponent instead.\r
-            parameterComp.reset (new BooleanParameterComponent (param));\r
+            parameterComp.reset (new BooleanParameterComponent (processor, param));\r
         }\r
         else if (param.getNumSteps() == 2)\r
         {\r
             // Most hosts display any parameter with just two steps as a switch.\r
-            parameterComp.reset (new SwitchParameterComponent (param));\r
+            parameterComp.reset (new SwitchParameterComponent (processor, param));\r
         }\r
         else if (! param.getAllValueStrings().isEmpty())\r
         {\r
             // If we have a list of strings to represent the different states a\r
             // parameter can be in then we should present a dropdown allowing a\r
             // user to pick one of them.\r
-            parameterComp.reset (new ChoiceParameterComponent (param));\r
+            parameterComp.reset (new ChoiceParameterComponent (processor, param));\r
         }\r
         else\r
         {\r
             // Everything else can be represented as a slider.\r
-            parameterComp.reset (new SliderParameterComponent (param));\r
+            parameterComp.reset (new SliderParameterComponent (processor, param));\r
         }\r
 \r
-        addAndMakeVisible (parameterComp);\r
+        addAndMakeVisible (parameterComp.get());\r
 \r
         setSize (400, 40);\r
     }\r
@@ -447,7 +466,7 @@ public:
 private:\r
     AudioProcessorParameter& parameter;\r
     Label parameterName, parameterLabel;\r
-    ScopedPointer<Component> parameterComp;\r
+    std::unique_ptr<Component> parameterComp;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ParameterDisplayComponent)\r
 };\r
@@ -455,11 +474,11 @@ private:
 class ParametersPanel   : public Component\r
 {\r
 public:\r
-    ParametersPanel (const Array<AudioProcessorParameter*>& parameters)\r
+    ParametersPanel (AudioProcessor& processor, const Array<AudioProcessorParameter*>& parameters)\r
     {\r
         for (auto* param : parameters)\r
             if (param->isAutomatable())\r
-                addAndMakeVisible (paramComponents.add (new ParameterDisplayComponent (*param)));\r
+                addAndMakeVisible (paramComponents.add (new ParameterDisplayComponent (processor, *param)));\r
 \r
         if (auto* comp = paramComponents[0])\r
             setSize (comp->getWidth(), comp->getHeight() * paramComponents.size());\r
@@ -499,7 +518,7 @@ struct  GenericAudioProcessorEditor::Pimpl
 \r
         owner.setOpaque (true);\r
 \r
-        view.setViewedComponent (new ParametersPanel (juceParameters.params));\r
+        view.setViewedComponent (new ParametersPanel (*p, juceParameters.params));\r
         owner.addAndMakeVisible (view);\r
 \r
         view.setScrollBarsShown (true, false);\r
index c79be1b5fee4802a0c9624617f2dcfc087a92f35..78f4820200ad3c93e9de18d1a1a5e37198d17664 100644 (file)
@@ -53,7 +53,7 @@ public:
 private:\r
     //==============================================================================\r
     struct Pimpl;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GenericAudioProcessorEditor)\r
 };\r
index 2a9d6edbf8994f393635f76843eca6973174fa53..ffa40b3f3fb8c27adc1058d2d077c9935cb33f22 100644 (file)
@@ -404,7 +404,7 @@ struct PluginTreeUtils
                                      const KnownPluginList::SortMethod sortMethod)\r
     {\r
         String lastType;\r
-        ScopedPointer<KnownPluginList::PluginTree> current (new KnownPluginList::PluginTree());\r
+        std::unique_ptr<KnownPluginList::PluginTree> current (new KnownPluginList::PluginTree());\r
 \r
         for (auto* pd : sorted)\r
         {\r
@@ -548,7 +548,7 @@ KnownPluginList::PluginTree* KnownPluginList::createTree (const SortMethod sortM
 void KnownPluginList::addToMenu (PopupMenu& menu, const SortMethod sortMethod,\r
                                  const String& currentlyTickedPluginID) const\r
 {\r
-    ScopedPointer<PluginTree> tree (createTree (sortMethod));\r
+    std::unique_ptr<PluginTree> tree (createTree (sortMethod));\r
     PluginTreeUtils::addToMenu (*tree, menu, types, currentlyTickedPluginID);\r
 }\r
 \r
index cb5cb632f29a8b7ca0c762eb2512d44ec82790c2..b34ade577c38574b59a22c9ea968249744305431 100644 (file)
@@ -220,7 +220,7 @@ private:
     //==============================================================================\r
     OwnedArray<PluginDescription> types;\r
     StringArray blacklist;\r
-    ScopedPointer<CustomScanner> scanner;\r
+    std::unique_ptr<CustomScanner> scanner;\r
     CriticalSection scanLock, typesArrayLock;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (KnownPluginList)\r
index ca9f5979effeddfa7efaae77fec924fb9fc0c0c4..3c0d447e98e9fe09003ae77f5d7ea3a0648dba38 100644 (file)
@@ -393,14 +393,14 @@ private:
     AudioPluginFormat& formatToScan;\r
     StringArray filesOrIdentifiersToScan;\r
     PropertiesFile* propertiesToUse;\r
-    ScopedPointer<PluginDirectoryScanner> scanner;\r
+    std::unique_ptr<PluginDirectoryScanner> scanner;\r
     AlertWindow pathChooserWindow, progressWindow;\r
     FileSearchPathListComponent pathList;\r
     String pluginBeingScanned;\r
     double progress;\r
     int numThreads;\r
     bool allowAsync, finished;\r
-    ScopedPointer<ThreadPool> pool;\r
+    std::unique_ptr<ThreadPool> pool;\r
 \r
     static void startScanCallback (int result, AlertWindow* alert, Scanner* scanner)\r
     {\r
index a34b4ad57104c82b1867a0b5ce76a0476d51986d..d7d71ffb777acfc23397bb2c42a35354ebd22385 100644 (file)
@@ -110,12 +110,12 @@ private:
     int numThreads;\r
 \r
     class TableModel;\r
-    ScopedPointer<TableListBoxModel> tableModel;\r
+    std::unique_ptr<TableListBoxModel> tableModel;\r
 \r
     class Scanner;\r
     friend class Scanner;\r
     friend struct ContainerDeletePolicy<Scanner>;\r
-    ScopedPointer<Scanner> currentScanner;\r
+    std::unique_ptr<Scanner> currentScanner;\r
 \r
     void scanFinished (const StringArray&);\r
     static void optionsMenuStaticCallback (int, PluginListComponent*);\r
index 955a44ecf56287dbb4429d1294d8694ed1a6d008..af86714488d68a2e2d7089e07c6f5f37403dd34a 100644 (file)
@@ -49,8 +49,8 @@ struct AudioProcessorValueTreeState::Parameter   : public AudioProcessorParamete
           isDiscreteParam (discrete),\r
           isBooleanParam (boolean)\r
     {\r
+        value = defaultValue;\r
         state.addListener (this);\r
-        needsUpdate.set (1);\r
     }\r
 \r
     ~Parameter()\r
@@ -93,7 +93,7 @@ struct AudioProcessorValueTreeState::Parameter   : public AudioProcessorParamete
             listeners.call ([=] (AudioProcessorValueTreeState::Listener& l) { l.parameterChanged (paramID, value); });\r
             listenersNeedCalling = false;\r
 \r
-            needsUpdate.set (1);\r
+            needsUpdate = true;\r
         }\r
     }\r
 \r
@@ -119,12 +119,25 @@ struct AudioProcessorValueTreeState::Parameter   : public AudioProcessorParamete
 \r
     void copyValueToValueTree()\r
     {\r
-        if (state.isValid())\r
-            state.setPropertyExcludingListener (this, owner.valuePropertyID, value, owner.undoManager);\r
+        if (auto* valueProperty = state.getPropertyPointer (owner.valuePropertyID))\r
+        {\r
+            if ((float) *valueProperty != value)\r
+            {\r
+                ScopedValueSetter<bool> svs (ignoreParameterChangedCallbacks, true);\r
+                state.setProperty (owner.valuePropertyID, value, owner.undoManager);\r
+            }\r
+        }\r
+        else\r
+        {\r
+            state.setProperty (owner.valuePropertyID, value, nullptr);\r
+        }\r
     }\r
 \r
     void valueTreePropertyChanged (ValueTree&, const Identifier& property) override\r
     {\r
+        if (ignoreParameterChangedCallbacks)\r
+            return;\r
+\r
         if (property == owner.valuePropertyID)\r
             updateFromValueTree();\r
     }\r
@@ -163,9 +176,10 @@ struct AudioProcessorValueTreeState::Parameter   : public AudioProcessorParamete
     std::function<float (const String&)> textToValueFunction;\r
     NormalisableRange<float> range;\r
     float value, defaultValue;\r
-    Atomic<int> needsUpdate;\r
+    std::atomic<bool> needsUpdate { true };\r
     bool listenersNeedCalling;\r
     const bool isMetaParam, isAutomatableParam, isDiscreteParam, isBooleanParam;\r
+    bool ignoreParameterChangedCallbacks = false;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Parameter)\r
 };\r
@@ -218,7 +232,7 @@ Value AudioProcessorValueTreeState::getParameterAsValue (StringRef paramID) cons
     if (Parameter* p = Parameter::getParameterForID (processor, paramID))\r
         return p->state.getPropertyAsValue (valuePropertyID, undoManager);\r
 \r
-    return Value();\r
+    return {};\r
 }\r
 \r
 NormalisableRange<float> AudioProcessorValueTreeState::getParameterRange (StringRef paramID) const noexcept\r
@@ -246,6 +260,8 @@ ValueTree AudioProcessorValueTreeState::copyState()
 {\r
     ScopedLock lock (valueTreeChanging);\r
 \r
+    flushParameterValuesToValueTree();\r
+\r
     return state.createCopy();\r
 }\r
 \r
@@ -254,6 +270,9 @@ void AudioProcessorValueTreeState::replaceState (const ValueTree& newState)
     ScopedLock lock (valueTreeChanging);\r
 \r
     state = newState;\r
+\r
+    if (undoManager != nullptr)\r
+        undoManager->clearUndoHistory();\r
 }\r
 \r
 ValueTree AudioProcessorValueTreeState::getOrCreateChildValueTree (const String& paramID)\r
@@ -263,8 +282,8 @@ ValueTree AudioProcessorValueTreeState::getOrCreateChildValueTree (const String&
     if (! v.isValid())\r
     {\r
         v = ValueTree (valueType);\r
-        v.setProperty (idPropertyID, paramID, undoManager);\r
-        state.appendChild (v, undoManager);\r
+        v.setProperty (idPropertyID, paramID, nullptr);\r
+        state.appendChild (v, nullptr);\r
     }\r
 \r
     return v;\r
@@ -316,14 +335,16 @@ bool AudioProcessorValueTreeState::flushParameterValuesToValueTree()
 {\r
     ScopedLock lock (valueTreeChanging);\r
 \r
-    auto anythingUpdated = false;\r
+    bool anythingUpdated = false;\r
 \r
     for (auto* ap : processor.getParameters())\r
     {\r
         jassert (dynamic_cast<Parameter*> (ap) != nullptr);\r
         auto* p = static_cast<Parameter*> (ap);\r
 \r
-        if (p->needsUpdate.compareAndSetBool (0, 1))\r
+        bool needsUpdateTestValue = true;\r
+\r
+        if (p->needsUpdate.compare_exchange_strong (needsUpdateTestValue, false))\r
         {\r
             p->copyValueToValueTree();\r
             anythingUpdated = true;\r
@@ -395,7 +416,12 @@ struct AttachedControlBase  : public AudioProcessorValueTreeState::Listener,
     void beginParameterChange()\r
     {\r
         if (AudioProcessorParameter* p = state.getParameter (paramID))\r
+        {\r
+            if (state.undoManager != nullptr)\r
+                state.undoManager->beginNewTransaction();\r
+\r
             p->beginChangeGesture();\r
+        }\r
     }\r
 \r
     void endParameterChange()\r
@@ -502,7 +528,7 @@ struct AudioProcessorValueTreeState::SliderAttachment::Pimpl  : private Attached
     {\r
         const ScopedLock selfCallbackLock (selfCallbackMutex);\r
 \r
-        if ((! ignoreCallbacks) && (! ModifierKeys::getCurrentModifiers().isRightButtonDown()))\r
+        if ((! ignoreCallbacks) && (! ModifierKeys::currentModifiers.isRightButtonDown()))\r
             setNewUnnormalisedValue ((float) s->getValue());\r
     }\r
 \r
index 70fc72f52993e5ec39b1bf33a98eea433dc16803..509410ac03de7472e493abf76fb839661afdd439 100644 (file)
@@ -198,7 +198,7 @@ public:
     private:\r
         struct Pimpl;\r
         friend struct ContainerDeletePolicy<Pimpl>;\r
-        ScopedPointer<Pimpl> pimpl;\r
+        std::unique_ptr<Pimpl> pimpl;\r
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SliderAttachment)\r
     };\r
 \r
@@ -222,7 +222,7 @@ public:
     private:\r
         struct Pimpl;\r
         friend struct ContainerDeletePolicy<Pimpl>;\r
-        ScopedPointer<Pimpl> pimpl;\r
+        std::unique_ptr<Pimpl> pimpl;\r
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComboBoxAttachment)\r
     };\r
 \r
@@ -246,7 +246,7 @@ public:
     private:\r
         struct Pimpl;\r
         friend struct ContainerDeletePolicy<Pimpl>;\r
-        ScopedPointer<Pimpl> pimpl;\r
+        std::unique_ptr<Pimpl> pimpl;\r
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ButtonAttachment)\r
     };\r
 \r
index f75df9a194dfedc712abe253fc83a155766bbf56..cca13675656d58ef781db197918074a2a9fd0cd7 100644 (file)
@@ -163,7 +163,7 @@ private:
 \r
     class Pimpl;\r
     friend struct ContainerDeletePolicy<Pimpl>;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioCDBurner)\r
 };\r
index 175cf06b2c8cb826a1ae6b54b8d59d97a4f440ae..66a822f4170eb69394ff561874d7cfe151910b8b 100644 (file)
@@ -155,7 +155,7 @@ private:
     File volumeDir;\r
     Array<File> tracks;\r
     int currentReaderTrack;\r
-    ScopedPointer<AudioFormatReader> reader;\r
+    std::unique_ptr<AudioFormatReader> reader;\r
     AudioCDReader (const File& volume);\r
 \r
    #elif JUCE_WINDOWS\r
index 3a174dcd33f3fd449515d847972ac306c6a346af..1b1b292c8df7912546cf05da8b43b15e158c8757 100644 (file)
@@ -116,7 +116,7 @@ public:
 \r
             g.setFont (height * 0.6f);\r
             g.setColour (findColour (ListBox::textColourId, true).withMultipliedAlpha (enabled ? 1.0f : 0.6f));\r
-            g.drawText (item, x, 0, width - x - 2, height, Justification::centredLeft, true);\r
+            g.drawText (item, x + 5, 0, width - x - 5, height, Justification::centredLeft, true);\r
         }\r
     }\r
 \r
@@ -178,7 +178,7 @@ private:
 \r
     int getTickX() const\r
     {\r
-        return getRowHeight() + 5;\r
+        return getRowHeight();\r
     }\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiInputSelectorComponentListBox)\r
@@ -515,11 +515,11 @@ private:
     AudioIODeviceType& type;\r
     const AudioDeviceSetupDetails setup;\r
 \r
-    ScopedPointer<ComboBox> outputDeviceDropDown, inputDeviceDropDown, sampleRateDropDown, bufferSizeDropDown;\r
-    ScopedPointer<Label> outputDeviceLabel, inputDeviceLabel, sampleRateLabel, bufferSizeLabel, inputChanLabel, outputChanLabel;\r
-    ScopedPointer<TextButton> testButton;\r
-    ScopedPointer<Component> inputLevelMeter;\r
-    ScopedPointer<TextButton> showUIButton, showAdvancedSettingsButton, resetDeviceButton;\r
+    std::unique_ptr<ComboBox> outputDeviceDropDown, inputDeviceDropDown, sampleRateDropDown, bufferSizeDropDown;\r
+    std::unique_ptr<Label> outputDeviceLabel, inputDeviceLabel, sampleRateLabel, bufferSizeLabel, inputChanLabel, outputChanLabel;\r
+    std::unique_ptr<TextButton> testButton;\r
+    std::unique_ptr<Component> inputLevelMeter;\r
+    std::unique_ptr<TextButton> showUIButton, showAdvancedSettingsButton, resetDeviceButton;\r
 \r
     void showCorrectDeviceName (ComboBox* box, bool isInput)\r
     {\r
@@ -947,7 +947,7 @@ public:
     };\r
 \r
 private:\r
-    ScopedPointer<ChannelSelectorListBox> inputChanList, outputChanList;\r
+    std::unique_ptr<ChannelSelectorListBox> inputChanList, outputChanList;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDeviceSettingsPanel)\r
 };\r
index e90ee5f66efc9a9a357feec13058c0fded461bf2..f57fc693585fe8d7349c7784f1d0881a32cc1b87 100644 (file)
@@ -95,9 +95,9 @@ public:
 \r
 private:\r
     //==============================================================================\r
-    ScopedPointer<ComboBox> deviceTypeDropDown;\r
-    ScopedPointer<Label> deviceTypeDropDownLabel;\r
-    ScopedPointer<Component> audioDeviceSettingsComp;\r
+    std::unique_ptr<ComboBox> deviceTypeDropDown;\r
+    std::unique_ptr<Label> deviceTypeDropDownLabel;\r
+    std::unique_ptr<Component> audioDeviceSettingsComp;\r
     String audioDeviceSettingsCompType;\r
     int itemHeight;\r
     const int minOutputChannels, maxOutputChannels, minInputChannels, maxInputChannels;\r
@@ -106,10 +106,10 @@ private:
 \r
     class MidiInputSelectorComponentListBox;\r
     friend struct ContainerDeletePolicy<MidiInputSelectorComponentListBox>;\r
-    ScopedPointer<MidiInputSelectorComponentListBox> midiInputsList;\r
-    ScopedPointer<ComboBox> midiOutputSelector;\r
-    ScopedPointer<Label> midiInputsLabel, midiOutputLabel;\r
-    ScopedPointer<TextButton> bluetoothButton;\r
+    std::unique_ptr<MidiInputSelectorComponentListBox> midiInputsList;\r
+    std::unique_ptr<ComboBox> midiOutputSelector;\r
+    std::unique_ptr<Label> midiInputsLabel, midiOutputLabel;\r
+    std::unique_ptr<TextButton> bluetoothButton;\r
 \r
     void handleBluetoothButton();\r
     void updateDeviceType();\r
index 1aae8793d9ced9651121652e0de7b547b3641a09..9ad264c296c4488fa32ab869083f3ec7965ab27a 100644 (file)
@@ -211,8 +211,8 @@ public:
 \r
 private:\r
     AudioThumbnail& owner;\r
-    ScopedPointer<InputSource> source;\r
-    ScopedPointer<AudioFormatReader> reader;\r
+    std::unique_ptr<InputSource> source;\r
+    std::unique_ptr<AudioFormatReader> reader;\r
     CriticalSection readerLock;\r
     uint32 lastReaderUseTime = 0;\r
 \r
index ed7ab0e22acd1b6850f5fc21f7e5ccf7a886589d..2b9b19bba1e718af24eac7be7cd3fc9e5734eaca 100644 (file)
@@ -208,8 +208,8 @@ private:
     friend struct ContainerDeletePolicy<ThumbData>;\r
     friend struct ContainerDeletePolicy<CachedWindow>;\r
 \r
-    ScopedPointer<LevelDataSource> source;\r
-    ScopedPointer<CachedWindow> window;\r
+    std::unique_ptr<LevelDataSource> source;\r
+    std::unique_ptr<CachedWindow> window;\r
     OwnedArray<ThumbData> channels;\r
 \r
     int32 samplesPerThumbSample = 0;\r
index 04b66df6550ac242456d5ede78e09e1234c6e8ad..aa96f3a4389df608ac8eb56bc3423704b50b510e 100644 (file)
@@ -108,6 +108,17 @@ void MidiKeyboardComponent::setKeyWidth (float widthInPixels)
     }\r
 }\r
 \r
+void MidiKeyboardComponent::setScrollButtonWidth (int widthInPixels)\r
+{\r
+    jassert (widthInPixels > 0);\r
+\r
+    if (scrollButtonWidth != widthInPixels)\r
+    {\r
+        scrollButtonWidth = widthInPixels;\r
+        resized();\r
+    }\r
+}\r
+\r
 void MidiKeyboardComponent::setOrientation (Orientation newOrientation)\r
 {\r
     if (orientation != newOrientation)\r
@@ -307,7 +318,7 @@ int MidiKeyboardComponent::remappedXYToNote (Point<float> pos, float& mousePosit
                 {\r
                     if (getKeyPos (note).contains (pos.x - xOffset))\r
                     {\r
-                        mousePositionVelocity = pos.y / blackNoteLength;\r
+                        mousePositionVelocity = jmax (0.0f, pos.y / blackNoteLength);\r
                         return note;\r
                     }\r
                 }\r
@@ -326,7 +337,7 @@ int MidiKeyboardComponent::remappedXYToNote (Point<float> pos, float& mousePosit
                 if (getKeyPos (note).contains (pos.x - xOffset))\r
                 {\r
                     auto whiteNoteLength = (orientation == horizontalKeyboard) ? getHeight() : getWidth();\r
-                    mousePositionVelocity = pos.y / (float) whiteNoteLength;\r
+                    mousePositionVelocity = jmax (0.0f, pos.y / (float) whiteNoteLength);\r
                     return note;\r
                 }\r
             }\r
@@ -610,7 +621,7 @@ void MidiKeyboardComponent::resized()
 \r
         if (canScroll)\r
         {\r
-            auto scrollButtonW = jmin (12, w / 2);\r
+            auto scrollButtonW = jmin (scrollButtonWidth, w / 2);\r
             auto r = getLocalBounds();\r
 \r
             if (orientation == horizontalKeyboard)\r
index dbbb4d7a10ac814e08b0f67d142daed83bc2c7b8..95b599d8abd52301c3b8585a39c479905301918d 100644 (file)
@@ -129,6 +129,12 @@ public:
     /** Returns the width that was set by setKeyWidth(). */\r
     float getKeyWidth() const noexcept                              { return keyWidth; }\r
 \r
+    /** Changes the width used to draw the buttons that scroll the keyboard up/down in octaves. */\r
+    void setScrollButtonWidth (int widthInPixels);\r
+\r
+    /** Returns the width that was set by setScrollButtonWidth(). */\r
+    int getScrollButtonWidth() const noexcept                       { return scrollButtonWidth; }\r
+\r
     /** Changes the keyboard's current direction. */\r
     void setOrientation (Orientation newOrientation);\r
 \r
@@ -396,6 +402,7 @@ private:
     float blackNoteWidthRatio = 0.7f;\r
     float xOffset = 0;\r
     float keyWidth = 16.0f;\r
+    int scrollButtonWidth = 12;\r
     Orientation orientation;\r
 \r
     int midiChannel = 1, midiInChannelMask = 0xffff;\r
@@ -408,7 +415,7 @@ private:
     int rangeStart = 0, rangeEnd = 127;\r
     float firstKey = 12 * 4.0f;\r
     bool canScroll = true, useMousePositionForVelocity = true, shouldCheckMousePos = false;\r
-    ScopedPointer<Button> scrollDown, scrollUp;\r
+    std::unique_ptr<Button> scrollDown, scrollUp;\r
 \r
     Array<KeyPress> keyPresses;\r
     Array<int> keyPressNotes;\r
index 392692ad25f08b7b95394a323513fcb45e06c388..2588d92a30b0292e77acfc3a96abf63cada7a4f4 100644 (file)
@@ -35,7 +35,7 @@
 \r
   ID:               juce_audio_utils\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE extra audio utility classes\r
   description:      Classes for audio-related GUI and miscellaneous tasks.\r
   website:          http://www.juce.com/juce\r
index 4d0713f72df94aac44f4b894d88140a20e4270ba..0353e8412b5cede98621879ff1ccee0bba7b352d 100644 (file)
@@ -395,7 +395,7 @@ public:
                                   const Rectangle<int>& boundsToUse)\r
         : bounds (boundsToUse)\r
     {\r
-        ScopedPointer<ModalComponentManager::Callback> exitCallback (exitCallbackToUse);\r
+        std::unique_ptr<ModalComponentManager::Callback> exitCallback (exitCallbackToUse);\r
 \r
         AndroidBluetoothMidiInterface::startStopScan (true);\r
 \r
@@ -484,7 +484,7 @@ private:
 bool BluetoothMidiDevicePairingDialogue::open (ModalComponentManager::Callback* exitCallbackPtr,\r
                                                Rectangle<int>* btBounds)\r
 {\r
-    ScopedPointer<ModalComponentManager::Callback> exitCallback (exitCallbackPtr);\r
+    std::unique_ptr<ModalComponentManager::Callback> exitCallback (exitCallbackPtr);\r
     auto boundsToUse = (btBounds != nullptr ? *btBounds : Rectangle<int> {});\r
 \r
     if (! RuntimePermissions::isGranted (RuntimePermissions::bluetoothMidi))\r
index a1e2875ae1ad63efe46e7722582222f43cfcecba..0b2e003ae9a6c08992a7e5715987837818d2fe93 100644 (file)
@@ -39,7 +39,7 @@ public:
                                   const Rectangle<int>& boundsToUse)\r
         : bounds (boundsToUse)\r
     {\r
-        ScopedPointer<ModalComponentManager::Callback> exitCallback (exitCallbackToUse);\r
+        std::unique_ptr<ModalComponentManager::Callback> exitCallback (exitCallbackToUse);\r
 \r
         setAlwaysOnTop (true);\r
         setVisible (true);\r
@@ -112,7 +112,7 @@ private:
 bool BluetoothMidiDevicePairingDialogue::open (ModalComponentManager::Callback* exitCallback,\r
                                                Rectangle<int>* btBounds)\r
 {\r
-    ScopedPointer<ModalComponentManager::Callback> cb (exitCallback);\r
+    std::unique_ptr<ModalComponentManager::Callback> cb (exitCallback);\r
     auto boundsToUse = (btBounds != nullptr ? *btBounds : Rectangle<int> {});\r
 \r
     if (isAvailable())\r
@@ -139,7 +139,7 @@ namespace juce
     bool BluetoothMidiDevicePairingDialogue::open (ModalComponentManager::Callback* exitCallback,\r
                                                    Rectangle<int>*)\r
     {\r
-        ScopedPointer<ModalComponentManager::Callback> cb (exitCallback);\r
+        std::unique_ptr<ModalComponentManager::Callback> cb (exitCallback);\r
         return false;\r
     }\r
 \r
index f3d4244f1ee08aff910fb9f6b66e7ad1f16bae85..305c3a2c542b364e61938432cf05231cf83934a4 100644 (file)
@@ -30,7 +30,7 @@ namespace juce
 bool BluetoothMidiDevicePairingDialogue::open (ModalComponentManager::Callback* exitCallback,\r
                                                Rectangle<int>*)\r
 {\r
-    ScopedPointer<ModalComponentManager::Callback> cb (exitCallback);\r
+    std::unique_ptr<ModalComponentManager::Callback> cb (exitCallback);\r
     // not implemented on Linux yet!\r
     // You should check whether the dialogue is available on your system\r
     // using isAvailable() before calling open().\r
index 964ae3126b277712aa164c8f4032f473d397134b..79382604e1667d7c9953e20a61987e79ed8458af 100644 (file)
@@ -68,7 +68,7 @@ struct AudioTrackProducerClass  : public ObjCClass <NSObject>
                 source->releaseResources();\r
         }\r
 \r
-        ScopedPointer<AudioSource> source;\r
+        std::unique_ptr<AudioSource> source;\r
         int readPosition, lengthInFrames;\r
     };\r
 \r
@@ -282,7 +282,7 @@ public:
     {\r
         if (DRDevice* dev = [[DRDevice devices] objectAtIndex: static_cast<NSUInteger> (deviceIndex)])\r
         {\r
-            device = new OpenDiskDevice (dev);\r
+            device.reset (new OpenDiskDevice (dev));\r
             lastState = getDiskState();\r
             startTimer (1000);\r
         }\r
@@ -361,7 +361,7 @@ public:
                                           objectForKey: DRDeviceMediaBlocksFreeKey] intValue];\r
     }\r
 \r
-    ScopedPointer<OpenDiskDevice> device;\r
+    std::unique_ptr<OpenDiskDevice> device;\r
 \r
 private:\r
     DiskState lastState;\r
@@ -380,7 +380,7 @@ AudioCDBurner::~AudioCDBurner()
 \r
 AudioCDBurner* AudioCDBurner::openDevice (const int deviceIndex)\r
 {\r
-    ScopedPointer<AudioCDBurner> b (new AudioCDBurner (deviceIndex));\r
+    std::unique_ptr<AudioCDBurner> b (new AudioCDBurner (deviceIndex));\r
 \r
     if (b->pimpl->device == nil)\r
         b = nullptr;\r
index 4066369713e0795e63914f5ace1ad87d7281f3cd..6268396bbfa1dc5f569bd1b338e1492143b986f3 100644 (file)
@@ -48,7 +48,7 @@ namespace CDReaderHelpers
     // Returns NULL on success, otherwise a const char* representing an error.\r
     static const char* getTrackOffsets (XmlDocument& xmlDocument, Array<int>& offsets)\r
     {\r
-        const ScopedPointer<XmlElement> xml (xmlDocument.getDocumentElement());\r
+        const std::unique_ptr<XmlElement> xml (xmlDocument.getDocumentElement());\r
         if (xml == nullptr)\r
             return "Couldn't parse XML in file";\r
 \r
@@ -207,7 +207,7 @@ bool AudioCDReader::readSamples (int** destSamples, int numDestChannels, int sta
                 BufferedInputStream* const bin = new BufferedInputStream (in, 65536, true);\r
 \r
                 AiffAudioFormat format;\r
-                reader = format.createReaderFor (bin, true);\r
+                reader.reset (format.createReaderFor (bin, true));\r
 \r
                 if (reader == nullptr)\r
                     currentReaderTrack = -1;\r
index 09b55ed1fafecf8a89584f25076f2759d7b8c8c8..a1d30f23d3736d53cf1c14b0f7a9c6a17d16e57e 100644 (file)
@@ -30,7 +30,7 @@ namespace juce
 bool BluetoothMidiDevicePairingDialogue::open (ModalComponentManager::Callback* exitCallback,\r
                                                Rectangle<int>*)\r
 {\r
-    ScopedPointer<ModalComponentManager::Callback> cb (exitCallback);\r
+    std::unique_ptr<ModalComponentManager::Callback> cb (exitCallback);\r
     // Do not call this on OSX. Instead, you should pair Bluetooth MIDI devices\r
     // using the "Audio MIDI Setup" app (located in /Applications/Utilities).\r
     jassertfalse;\r
index e1e19d77e19074105312f7bb5ee0304cd68b9b22..da880a273635d25b010ff92756cc8a31d4a392e1 100644 (file)
@@ -254,7 +254,7 @@ StringArray AudioCDBurner::findAvailableDevices()
 \r
 AudioCDBurner* AudioCDBurner::openDevice (const int deviceIndex)\r
 {\r
-    ScopedPointer<AudioCDBurner> b (new AudioCDBurner (deviceIndex));\r
+    std::unique_ptr<AudioCDBurner> b (new AudioCDBurner (deviceIndex));\r
 \r
     if (b->pimpl == 0)\r
         b = nullptr;\r
@@ -333,7 +333,7 @@ String AudioCDBurner::burn (AudioCDBurner::BurnProgressListener* listener, bool
     pimpl->shouldCancel = false;\r
 \r
     UINT_PTR cookie;\r
-    HRESULT hr = pimpl->discMaster->ProgressAdvise ((AudioCDBurner::Pimpl*) pimpl, &cookie);\r
+    HRESULT hr = pimpl->discMaster->ProgressAdvise ((AudioCDBurner::Pimpl*) pimpl.get(), &cookie);\r
 \r
     hr = pimpl->discMaster->RecordDisc (performFakeBurnForTesting,\r
                                         ejectDiscAfterwards);\r
@@ -362,7 +362,7 @@ bool AudioCDBurner::addAudioTrack (AudioSource* audioSource, int numSamples)
     if (audioSource == 0)\r
         return false;\r
 \r
-    ScopedPointer<AudioSource> source (audioSource);\r
+    std::unique_ptr<AudioSource> source (audioSource);\r
 \r
     long bytesPerBlock;\r
     HRESULT hr = pimpl->redbook->GetAudioBlockSize (&bytesPerBlock);\r
index bdcef8cf47cbc76ee7f24689021209c7251c00ed..b0e081b285b9dd5e98f11abcff7845692576084f 100644 (file)
@@ -292,7 +292,7 @@ public:
     BYTE readType;\r
 \r
 private:\r
-    ScopedPointer<CDController> controller;\r
+    std::unique_ptr<CDController> controller;\r
 \r
     bool testController (int readType, CDController* newController, CDReadBuffer& bufferToUse);\r
 };\r
@@ -893,7 +893,7 @@ void CDDeviceHandle::openDrawer (bool shouldBeOpen)
 \r
 bool CDDeviceHandle::testController (const int type, CDController* const newController, CDReadBuffer& rb)\r
 {\r
-    controller = newController;\r
+    controller.reset (newController);\r
     readType = (BYTE) type;\r
 \r
     controller->deviceInfo = this;\r
@@ -998,7 +998,7 @@ AudioCDReader* AudioCDReader::createReaderForCD (const int deviceIndex)
 \r
         if (h != INVALID_HANDLE_VALUE)\r
         {\r
-            ScopedPointer<AudioCDReader> cd (new AudioCDReader (new CDDeviceWrapper (list [deviceIndex], h)));\r
+            std::unique_ptr<AudioCDReader> cd (new AudioCDReader (new CDDeviceWrapper (list [deviceIndex], h)));\r
 \r
             if (cd->lengthInSamples > 0)\r
                 return cd.release();\r
index 61d702dd84e24d51fe1808277922f28b7b813062..d6e26401fa90b6b71d49180475091146a9ecb3e2 100644 (file)
@@ -30,7 +30,7 @@ namespace juce
 bool BluetoothMidiDevicePairingDialogue::open (ModalComponentManager::Callback* exitCallback,\r
                                                Rectangle<int>*)\r
 {\r
-    ScopedPointer<ModalComponentManager::Callback> cb (exitCallback);\r
+    std::unique_ptr<ModalComponentManager::Callback> cb (exitCallback);\r
     // not implemented on Windows yet!\r
     // You should check whether the dialogue is available on your system\r
     // using isAvailable() before calling open().\r
index 21854966a4c8b49551ecb5a11b70767c17c4c7d3..45af97f5ce5c3775048c98f45bce21cca9440a14 100644 (file)
@@ -41,7 +41,7 @@ struct AudioSourceOwningTransportSource  : public AudioTransportSource
     }\r
 \r
 private:\r
-    ScopedPointer<PositionableAudioSource> source;\r
+    std::unique_ptr<PositionableAudioSource> source;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioSourceOwningTransportSource)\r
 };\r
index 84320b0f520291963caf02072f2174cc77d2d20d..4a5f3ecbaa67a11af481121a36cff0ca4e2ccb6f 100644 (file)
@@ -98,7 +98,7 @@ struct BlockConfigManager
         { fixedVelocityValue,   127,    1,      127,    false,  "Fixed Velocity Value", ConfigType::integer,    {},               "5D Touch" },\r
         { pianoMode,            0,      0,      1,      false,  "Piano Mode",           ConfigType::boolean,    {},               "Play mode" },\r
         { glideLock,            0,      0,      127,    false,  "Glide Rate",           ConfigType::integer,    {},               "Play mode" },\r
-        { glideLockEnable,      0,      0,      1,      false,  "Glidelock Enable",     ConfigType::boolean,    {},               "Play mode" },\r
+        { glideLockEnable,      0,      0,      1,      false,  "Glide Lock Enable",    ConfigType::boolean,    {},               "Play mode" },\r
         { mode,                 4,      1,      5,      false,  "Mode",                 ConfigType::integer,    {},               "Play mode" },\r
         { volume,               100,    0,      127,    false,  "Volume",               ConfigType::integer,    {},               "Play mode" },\r
         { scale,                0,      0,      18,     false,  "Scale",                ConfigType::integer,    {},               "Play mode" }, // NOTE: Should be options\r
index 15e4a18c1062c487246d3fa3080ccf462f274bb4..fcd764b24fa3d31a432f6476e82760cfd825c904 100644 (file)
@@ -22,9 +22,9 @@
 \r
 #include "juce_blocks_basics.h"\r
 \r
-#if (! defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)) || (! defined (JUCE_HAS_CONSTEXPR))\r
+#if ! JUCE_HAS_CONSTEXPR\r
  #ifndef JUCE_DEMO_RUNNER\r
-  #error "juce_blocks_basics module requires your compiler to have a newer version of the standard library"\r
+  #error "The juce_blocks_basics module requires a compiler that supports constexpr"\r
  #endif\r
 #else\r
 \r
index a260f32de45c326705eea9a554f5b2ff1eb0b34a..6ca644d5c852dc08de06cbfc30abdb57465e9d48 100644 (file)
@@ -31,7 +31,7 @@
 \r
   ID:               juce_blocks_basics\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             Provides low-level control over ROLI BLOCKS devices\r
   description:      JUCE wrapper for low-level control over ROLI BLOCKS devices.\r
   website:          http://developer.roli.com\r
@@ -50,9 +50,9 @@
 #include <juce_events/juce_events.h>\r
 #include <juce_audio_devices/juce_audio_devices.h>\r
 \r
-#if (! defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)) || (! defined (JUCE_HAS_CONSTEXPR))\r
+#if ! JUCE_HAS_CONSTEXPR\r
  #ifndef JUCE_DEMO_RUNNER\r
-  #error "juce_blocks_basics module requires your compiler to have a newer version of the standard library"\r
+  #error "The juce_blocks_basics module requires a compiler that supports constexpr"\r
  #endif\r
 #else\r
 \r
index a313e914283a319f57906bcdde5e9e7963e2b18e..0b0fb8be150e775c3168c406362881e6d3a8d7a3 100644 (file)
@@ -2358,7 +2358,8 @@ const char* const* PhysicalTopologySource::getStandardLittleFootFunctions() noex
     return BlocksProtocol::ledProgramLittleFootFunctions;\r
 }\r
 \r
-static bool blocksMatch (const Block::Array& list1, const Block::Array& list2) noexcept\r
+template <typename ListType>\r
+static bool collectionsMatch (const ListType& list1, const ListType& list2) noexcept\r
 {\r
     if (list1.size() != list2.size())\r
         return false;\r
@@ -2372,7 +2373,7 @@ static bool blocksMatch (const Block::Array& list1, const Block::Array& list2) n
 \r
 bool BlockTopology::operator== (const BlockTopology& other) const noexcept\r
 {\r
-    return connections == other.connections && blocksMatch (blocks, other.blocks);\r
+    return collectionsMatch (connections, other.connections) && collectionsMatch (blocks, other.blocks);\r
 }\r
 \r
 bool BlockTopology::operator!= (const BlockTopology& other) const noexcept\r
index 6cdc80aec3cea5f3b2a0d53d25c749bb13269a1e..8e4ea6120da780da7dff1a4a9fb39f7f9719a92d 100644 (file)
@@ -80,7 +80,7 @@ private:
     //==========================================================================\r
     struct Internal;\r
     struct DetectorHolder;\r
-    juce::ScopedPointer<DetectorHolder> detector;\r
+    std::unique_ptr<DetectorHolder> detector;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PhysicalTopologySource)\r
 };\r
index 83e72dc4553830af908424af542712b4145831d2..0074034318d9e2e61894f25290c2a80f1155488d 100644 (file)
@@ -90,7 +90,7 @@ struct RuleBasedTopologySource::Internal  : public TopologySource::Listener,
 \r
 RuleBasedTopologySource::RuleBasedTopologySource (TopologySource& d)\r
 {\r
-    internal = new Internal (*this, d);\r
+    internal.reset (new Internal (*this, d));\r
 }\r
 \r
 RuleBasedTopologySource::~RuleBasedTopologySource()\r
index f21f1dfa59e82c4c44046f982aa1e7b9dd577274..975e08e0a30ac79d16848d850b1df63db3f6d946 100644 (file)
@@ -76,7 +76,7 @@ public:
 private:\r
     //==========================================================================\r
     struct Internal;\r
-    juce::ScopedPointer<Internal> internal;\r
+    std::unique_ptr<Internal> internal;\r
 };\r
 \r
 } // namespace juce\r
index b8e039849a2b299d554c4e35c498b2f7758036dd..3c63de75c19b3205e8ecb747aa326d915629e511 100644 (file)
@@ -18,8 +18,7 @@
 \r
 #include "b2ChainShape.h"\r
 #include "b2EdgeShape.h"\r
-#include <new>\r
-#include <cstring>\r
+\r
 using namespace std;\r
 \r
 b2ChainShape::~b2ChainShape()\r
index 419de26e5f9ef25fb28e655e0e338af77a619d2e..c8737f99d337022c512e90c6ccc5f1bd1108c857 100644 (file)
@@ -17,7 +17,7 @@
 */\r
 \r
 #include "b2CircleShape.h"\r
-#include <new>\r
+\r
 using namespace std;\r
 \r
 b2Shape* b2CircleShape::Clone(b2BlockAllocator* allocator) const\r
index 7f27d85283ecdbc9e15a4f1284f226eabfe6afc3..f47ff501b0641da257722d627b5e25833bf415a5 100644 (file)
@@ -17,7 +17,7 @@
 */\r
 \r
 #include "b2EdgeShape.h"\r
-#include <new>\r
+\r
 using namespace std;\r
 \r
 void b2EdgeShape::Set(const b2Vec2& v1, const b2Vec2& v2)\r
index daf74f18ac62217afaea962191c6566e6af4a928..9742ecfd0efeaa2f2c86e54a8db66c325130b13e 100644 (file)
@@ -17,7 +17,6 @@
 */\r
 \r
 #include "b2PolygonShape.h"\r
-#include <new>\r
 \r
 b2Shape* b2PolygonShape::Clone(b2BlockAllocator* allocator) const\r
 {\r
index 6dab09f33840064a88a7ddc72620f8dc823abd7e..ed7d22bd3b05ca813c158e19869527aad92e259d 100644 (file)
@@ -17,7 +17,7 @@
 */\r
 \r
 #include "b2BroadPhase.h"\r
-#include <cstring>\r
+\r
 using namespace std;\r
 \r
 b2BroadPhase::b2BroadPhase()\r
index 150e3beba0488b9c3f06e8ff159a5b29238afd8b..31effb751a90d568c2bb6eb46f0717b676d5e63d 100644 (file)
@@ -20,7 +20,6 @@
 #define B2_COLLISION_H\r
 \r
 #include "../Common/b2Math.h"\r
-#include <climits>\r
 \r
 /// @file\r
 /// Structures and functions used for computing contact points, distance\r
index b9f5060f09dd167cabdf100631b592ebb7832fd7..4dd346651db8c2d8fdab4be5b1b38b2c62494e5b 100644 (file)
 */\r
 \r
 #include "b2BlockAllocator.h"\r
-#include <cstdlib>\r
-#include <climits>\r
-#include <cstring>\r
-#include <memory>\r
+\r
 using namespace std;\r
 \r
 int32 b2BlockAllocator::s_blockSizes[b2_blockSizes] =\r
index f1b3d1708d651235d833692eb6f08228524bfd03..e42428e6ef5ccd37529ef40f5d4d4466f882e695 100644 (file)
 \r
 #include "b2Settings.h"\r
 \r
-#include <cmath>\r
-#include <cfloat>\r
-#include <cstddef>\r
-#include <limits>\r
-\r
 /// This function is used to ensure that a floating point number is\r
 /// not a NaN or infinity.\r
 inline bool b2IsValid(float32 x)\r
index f26cfd82b14286048ed1292ae5ac9cf5e9305248..f6593482b1f049b6d3f355ac79a36e2c891d33a8 100644 (file)
@@ -17,9 +17,6 @@
 */\r
 \r
 #include "b2Settings.h"\r
-#include <cstdlib>\r
-#include <cstdio>\r
-#include <cstdarg>\r
 \r
 b2Version b2_version = {2, 2, 1};\r
 \r
index d367de56e5e8b4e84e078a73deb7d651d18cab5e..24f0bd3e37f1bf98806b2d7cdae75d6719754bf2 100644 (file)
 #ifndef B2_SETTINGS_H\r
 #define B2_SETTINGS_H\r
 \r
-#include <cassert>\r
-#include <cmath>\r
-\r
 #define B2_NOT_USED(x) ((void)(x))\r
-#define b2Assert(A) assert(A)\r
+#define b2Assert(A) jassert(A)\r
 \r
 typedef float float32;\r
 typedef double float64;\r
index 2647f2f190b92210e028a75ff14981c29aa5e00e..12533219bc113479079b96bf09ace699587d67d3 100644 (file)
 \r
 #include "b2Timer.h"\r
 \r
-#if defined(_WIN32)\r
-\r
-float64 b2Timer::s_invFrequency = 0.0f;\r
-\r
-#include <windows.h>\r
-\r
-b2Timer::b2Timer()\r
-{\r
-       LARGE_INTEGER largeInteger;\r
-\r
-       if (s_invFrequency == 0.0f)\r
-       {\r
-               QueryPerformanceFrequency(&largeInteger);\r
-               s_invFrequency = float64(largeInteger.QuadPart);\r
-               if (s_invFrequency > 0.0f)\r
-               {\r
-                       s_invFrequency = 1000.0f / s_invFrequency;\r
-               }\r
-       }\r
-\r
-       QueryPerformanceCounter(&largeInteger);\r
-       m_start = float64(largeInteger.QuadPart);\r
-}\r
-\r
-void b2Timer::Reset()\r
-{\r
-       LARGE_INTEGER largeInteger;\r
-       QueryPerformanceCounter(&largeInteger);\r
-       m_start = float64(largeInteger.QuadPart);\r
-}\r
-\r
-float32 b2Timer::GetMilliseconds() const\r
-{\r
-       LARGE_INTEGER largeInteger;\r
-       QueryPerformanceCounter(&largeInteger);\r
-       float64 count = float64(largeInteger.QuadPart);\r
-       float32 ms = float32(s_invFrequency * (count - m_start));\r
-       return ms;\r
-}\r
-\r
-#elif defined(__linux__) || defined (__APPLE__)\r
-\r
-#include <sys/time.h>\r
-\r
 b2Timer::b2Timer()\r
 {\r
     Reset();\r
@@ -69,32 +25,10 @@ b2Timer::b2Timer()
 \r
 void b2Timer::Reset()\r
 {\r
-    timeval t;\r
-    gettimeofday(&t, 0);\r
-    m_start_sec = t.tv_sec;\r
-    m_start_msec = t.tv_usec * 0.001f;\r
-}\r
-\r
-float32 b2Timer::GetMilliseconds() const\r
-{\r
-    timeval t;\r
-    gettimeofday(&t, 0);\r
-    return (t.tv_sec - m_start_sec) * 1000 + t.tv_usec * 0.001f - m_start_msec;\r
-}\r
-\r
-#else\r
-\r
-b2Timer::b2Timer()\r
-{\r
-}\r
-\r
-void b2Timer::Reset()\r
-{\r
+       juceStartTime = juce::Time::getCurrentTime();\r
 }\r
 \r
 float32 b2Timer::GetMilliseconds() const\r
 {\r
-       return 0.0f;\r
+       return static_cast<float32> ((juce::Time::getCurrentTime() - juceStartTime).inMilliseconds());\r
 }\r
-\r
-#endif\r
index 7855031483e33a2d2968a309bad04a5260f0e739..bbc16a46bd619a7ba18d6610dfb91d78ee931e84 100644 (file)
@@ -37,14 +37,7 @@ public:
        float32 GetMilliseconds() const;\r
 \r
 private:\r
-\r
-#if defined(_WIN32)\r
-       float64 m_start;\r
-       static float64 s_invFrequency;\r
-#elif defined(__linux__) || defined (__APPLE__)\r
-       unsigned long m_start_sec;\r
-       unsigned long m_start_msec;\r
-#endif\r
+    juce::Time juceStartTime;\r
 };\r
 \r
 #endif\r
index 6c53cc258360e8717cebab8fa301146ebed31853..c887efb093ee4ca71f8fdd46d3b4771f9c63c420 100644 (file)
@@ -21,7 +21,6 @@
 \r
 #include "../Common/b2Math.h"\r
 #include "../Collision/Shapes/b2Shape.h"\r
-#include <memory>\r
 \r
 class b2Fixture;\r
 class b2Joint;\r
index ab6bade7c76c51b6ca40625435eccfd5b3a1f64b..fb6acae8a275e77188eab698f3d96f772a5893b4 100644 (file)
 \r
 #include "juce_box2d.h"\r
 \r
-typedef juce::int8   int8;\r
-typedef juce::int16  int16;\r
-typedef juce::int32  int32;\r
-typedef juce::uint8  uint8;\r
-typedef juce::uint16 uint16;\r
-typedef juce::uint32 uint32;\r
+#include <cstdarg>\r
 \r
+using int8   = juce::int8;\r
+using int16  = juce::int16;\r
+using int32  = juce::int32;\r
+using uint8  = juce::uint8;\r
+using uint16 = juce::uint16;\r
+using uint32 = juce::uint32;\r
 \r
 #include "box2d/Collision/b2BroadPhase.cpp"\r
 #include "box2d/Collision/b2CollideCircle.cpp"\r
index a3d06abd014a349a77d2f18bc8909c10db7db865..d8d477a0cfa0ed62981773d9d28909834d2cda5e 100644 (file)
@@ -35,7 +35,7 @@
 \r
   ID:               juce_box2d\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE wrapper for the Box2D physics engine\r
   description:      The Box2D physics engine and some utility classes.\r
   website:          http://www.juce.com/juce\r
@@ -59,6 +59,9 @@
  #pragma GCC diagnostic ignored "-Wconversion"\r
 #endif\r
 \r
+#include <climits>\r
+#include <cfloat>\r
+\r
 #include "box2d/Box2D.h"\r
 \r
 #ifdef __GNUC__\r
index cce599f4d0e94075748b4ae69b447e81f7495a47..f3911dba4e2db768240165c2c86fd15d623c2438 100644 (file)
@@ -55,7 +55,7 @@ template <typename ElementType,
 class Array\r
 {\r
 private:\r
-    typedef typename TypeHelpers::ParameterType<ElementType>::type ParameterType;\r
+    using ParameterType = typename TypeHelpers::ParameterType<ElementType>::type;\r
 \r
 public:\r
     //==============================================================================\r
@@ -135,13 +135,11 @@ public:
         addAssumingCapacityIsReady (static_cast<ElementType&&> (firstNewElement), otherElements...);\r
     }\r
 \r
-   #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
     template <typename TypeToCreateFrom>\r
     Array (const std::initializer_list<TypeToCreateFrom>& items)\r
     {\r
         addArray (items);\r
     }\r
-   #endif\r
 \r
     /** Destructor. */\r
     ~Array()\r
@@ -658,7 +656,6 @@ public:
         }\r
     }\r
 \r
-   #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
     template <typename TypeToCreateFrom>\r
     void addArray (const std::initializer_list<TypeToCreateFrom>& items)\r
     {\r
@@ -671,7 +668,6 @@ public:
             ++numUsed;\r
         }\r
     }\r
-   #endif\r
 \r
     /** Adds elements from a null-terminated array of pointers to the end of this array.\r
 \r
@@ -1239,7 +1235,7 @@ public:
     inline const TypeOfCriticalSectionToUse& getLock() const noexcept      { return data; }\r
 \r
     /** Returns the type of scoped lock to use for locking this array */\r
-    typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;\r
+    using ScopedLockType = typename TypeOfCriticalSectionToUse::ScopedLockType;\r
 \r
 \r
     //==============================================================================\r
index 0132fb10c563b22c80e3f5e99a9d68ea1ca24ed8..a4b8c4d6828beea9d6fd2fde15fa4d61c8e8cd48 100644 (file)
@@ -44,7 +44,7 @@ public:
     DynamicObject (const DynamicObject&);\r
     ~DynamicObject();\r
 \r
-    typedef ReferenceCountedObjectPtr<DynamicObject> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<DynamicObject>;\r
 \r
     //==============================================================================\r
     /** Returns true if the object has a property with this name.\r
index 8ce16acd56b45dba106d6e414d93d104b4ae8456..e8189920848fd851f431700a56b0af81aab3d30b 100644 (file)
@@ -185,7 +185,7 @@ template <class ElementType>
 class DefaultElementComparator\r
 {\r
 private:\r
-    typedef typename TypeHelpers::ParameterType<ElementType>::type ParameterType;\r
+    using ParameterType = typename TypeHelpers::ParameterType<ElementType>::type;\r
 \r
 public:\r
     static int compareElements (ParameterType first, ParameterType second)\r
index c033b700609dd118659ecf59855dc6a5c399eaf0..d10ae0444fd39c4745c388b9c2b2e3e59a949645 100644 (file)
@@ -46,7 +46,9 @@ struct DefaultHashFunctions
     /** Generates a simple hash from a variant. */\r
     static int generateHash (const var& key, int upperLimit) noexcept       { return generateHash (key.toString(), upperLimit); }\r
     /** Generates a simple hash from a void ptr. */\r
-    static int generateHash (const void* key, int upperLimit) noexcept      { return generateHash ((pointer_sized_uint) key, upperLimit); }\r
+    static int generateHash (const void* key, int upperLimit) noexcept      { return generateHash ((uint64) (pointer_sized_uint) key, upperLimit); }\r
+    /** Generates a simple hash from a UUID. */\r
+    static int generateHash (const Uuid& key, int upperLimit) noexcept      { return generateHash (key.hash(), upperLimit); }\r
 };\r
 \r
 \r
@@ -101,8 +103,8 @@ template <typename KeyType,
 class HashMap\r
 {\r
 private:\r
-    typedef typename TypeHelpers::ParameterType<KeyType>::type   KeyTypeParameter;\r
-    typedef typename TypeHelpers::ParameterType<ValueType>::type ValueTypeParameter;\r
+    using KeyTypeParameter   = typename TypeHelpers::ParameterType<KeyType>::type;\r
+    using ValueTypeParameter = typename TypeHelpers::ParameterType<ValueType>::type;\r
 \r
 public:\r
     //==============================================================================\r
@@ -144,7 +146,7 @@ public:
 \r
             while (h != nullptr)\r
             {\r
-                const ScopedPointer<HashEntry> deleter (h);\r
+                const std::unique_ptr<HashEntry> deleter (h);\r
                 h = h->nextEntry;\r
             }\r
 \r
@@ -241,7 +243,7 @@ public:
         {\r
             if (entry->key == keyToRemove)\r
             {\r
-                const ScopedPointer<HashEntry> deleter (entry);\r
+                const std::unique_ptr<HashEntry> deleter (entry);\r
 \r
                 entry = entry->nextEntry;\r
 \r
@@ -274,7 +276,7 @@ public:
             {\r
                 if (entry->value == valueToRemove)\r
                 {\r
-                    const ScopedPointer<HashEntry> deleter (entry);\r
+                    const std::unique_ptr<HashEntry> deleter (entry);\r
 \r
                     entry = entry->nextEntry;\r
 \r
index 6e537ee879819534dc472d2ec7049b5936d294d4..164e618e81dc8e1311ff84a5a99e71f1af4b405a 100644 (file)
@@ -118,6 +118,8 @@ public:
     template <typename Callback>\r
     void call (Callback&& callback)\r
     {\r
+        typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
         for (Iterator<DummyBailOutChecker, ThisType> iter (*this); iter.next();)\r
             callback (*iter.getListener());\r
     }\r
@@ -128,6 +130,8 @@ public:
     template <typename Callback>\r
     void callExcluding (ListenerClass* listenerToExclude, Callback&& callback)\r
     {\r
+        typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
         for (Iterator<DummyBailOutChecker, ThisType> iter (*this); iter.next();)\r
         {\r
             auto* l = iter.getListener();\r
@@ -143,6 +147,8 @@ public:
     template <typename Callback, typename BailOutCheckerType>\r
     void callChecked (const BailOutCheckerType& bailOutChecker, Callback&& callback)\r
     {\r
+        typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
         for (Iterator<BailOutCheckerType, ThisType> iter (*this); iter.next (bailOutChecker);)\r
             callback (*iter.getListener());\r
     }\r
@@ -156,6 +162,8 @@ public:
                                const BailOutCheckerType& bailOutChecker,\r
                                Callback&& callback)\r
     {\r
+        typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
         for (Iterator<BailOutCheckerType, ThisType> iter (*this); iter.next (bailOutChecker);)\r
         {\r
             auto* l = iter.getListener();\r
@@ -174,8 +182,8 @@ public:
         bool shouldBailOut() const noexcept                 { return false; }\r
     };\r
 \r
-    typedef ListenerList<ListenerClass, ArrayType> ThisType;\r
-    typedef ListenerClass ListenerType;\r
+    using ThisType      = ListenerList<ListenerClass, ArrayType>;\r
+    using ListenerType  = ListenerClass;\r
 \r
     //==============================================================================\r
     /** Iterates the listeners in a ListenerList. */\r
@@ -252,6 +260,8 @@ public:
     template <typename... MethodArgs, typename... Args>\r
     void call (void (ListenerClass::*callbackFunction) (MethodArgs...), Args&&... args)\r
     {\r
+        typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
         for (Iterator<DummyBailOutChecker, ThisType> iter (*this); iter.next();)\r
             (iter.getListener()->*callbackFunction) (static_cast<typename TypeHelpers::ParameterType<Args>::type> (args)...);\r
     }\r
@@ -261,6 +271,8 @@ public:
                         void (ListenerClass::*callbackFunction) (MethodArgs...),\r
                         Args&&... args)\r
     {\r
+        typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
         for (Iterator<DummyBailOutChecker, ThisType> iter (*this); iter.next();)\r
             if (iter.getListener() != listenerToExclude)\r
                 (iter.getListener()->*callbackFunction) (static_cast<typename TypeHelpers::ParameterType<Args>::type> (args)...);\r
@@ -271,6 +283,8 @@ public:
                       void (ListenerClass::*callbackFunction) (MethodArgs...),\r
                       Args&&... args)\r
     {\r
+        typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
         for (Iterator<BailOutCheckerType, ThisType> iter (*this); iter.next (bailOutChecker);)\r
             (iter.getListener()->*callbackFunction) (static_cast<typename TypeHelpers::ParameterType<Args>::type> (args)...);\r
     }\r
@@ -281,6 +295,8 @@ public:
                                void (ListenerClass::*callbackFunction) (MethodArgs...),\r
                                Args&&... args)\r
     {\r
+        typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
         for (Iterator<BailOutCheckerType, ThisType> iter (*this); iter.next (bailOutChecker);)\r
             if (iter.getListener() != listenerToExclude)\r
                 (iter.getListener()->*callbackFunction) (static_cast<typename TypeHelpers::ParameterType<Args>::type> (args)...);\r
index de71c7274a145c6a712fe18d97b5b5a8ad14c0f7..763db28d8d07547d36c50f968b25a01d5e2e9119 100644 (file)
@@ -66,7 +66,7 @@ public:
         deleteAllObjects();\r
     }\r
 \r
-    /** Move constructor */\r
+    /** Move constructor. */\r
     OwnedArray (OwnedArray&& other) noexcept\r
         : data (static_cast<ArrayAllocationBase <ObjectClass*, TypeOfCriticalSectionToUse>&&> (other.data)),\r
           numUsed (other.numUsed)\r
@@ -74,14 +74,13 @@ public:
         other.numUsed = 0;\r
     }\r
 \r
-   #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
+    /** Creates an array from a list of objects. */\r
     OwnedArray (const std::initializer_list<ObjectClass*>& items)\r
     {\r
         addArray (items);\r
     }\r
-   #endif\r
 \r
-    /** Move assignment operator */\r
+    /** Move assignment operator. */\r
     OwnedArray& operator= (OwnedArray&& other) noexcept\r
     {\r
         const ScopedLockType lock (getLock());\r
@@ -409,7 +408,7 @@ public:
     {\r
         if (indexToChange >= 0)\r
         {\r
-            ScopedPointer<ObjectClass> toDelete;\r
+            std::unique_ptr<ObjectClass> toDelete;\r
 \r
             {\r
                 const ScopedLockType lock (getLock());\r
@@ -478,7 +477,7 @@ public:
         }\r
     }\r
 \r
-   #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
+    /** Adds elements from another array to the end of this array. */\r
     template <typename OtherArrayType>\r
     void addArray (const std::initializer_list<OtherArrayType>& items)\r
     {\r
@@ -491,7 +490,6 @@ public:
             ++numUsed;\r
         }\r
     }\r
-   #endif\r
 \r
     /** Adds copies of the elements in another array to the end of this array.\r
 \r
@@ -605,7 +603,7 @@ public:
     */\r
     void remove (int indexToRemove, bool deleteObject = true)\r
     {\r
-        ScopedPointer<ObjectClass> toDelete;\r
+        std::unique_ptr<ObjectClass> toDelete;\r
 \r
         {\r
             const ScopedLockType lock (getLock());\r
@@ -895,7 +893,7 @@ public:
     inline const TypeOfCriticalSectionToUse& getLock() const noexcept      { return data; }\r
 \r
     /** Returns the type of scoped lock to use for locking this array */\r
-    typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;\r
+    using ScopedLockType = typename TypeOfCriticalSectionToUse::ScopedLockType;\r
 \r
 \r
     //==============================================================================\r
index a70a1e0b953181b0ea85ddceaa13f0e6f17643a9..6505078ea1ff44b8fbf8c756eb9a561420204e02 100644 (file)
@@ -50,7 +50,7 @@ template <class ObjectClass, class TypeOfCriticalSectionToUse = DummyCriticalSec
 class ReferenceCountedArray\r
 {\r
 public:\r
-    typedef ReferenceCountedObjectPtr<ObjectClass> ObjectClassPtr;\r
+    using ObjectClassPtr = ReferenceCountedObjectPtr<ObjectClass>;\r
 \r
     //==============================================================================\r
     /** Creates an empty array.\r
@@ -880,7 +880,7 @@ public:
     inline const TypeOfCriticalSectionToUse& getLock() const noexcept      { return data; }\r
 \r
     /** Returns the type of scoped lock to use for locking this array */\r
-    typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;\r
+    using ScopedLockType = typename TypeOfCriticalSectionToUse::ScopedLockType;\r
 \r
 \r
     //==============================================================================\r
index bf2179300617348fcaac9ebae580527bdbaa0738..ea6e3e98886a1a6e1b9c4590f4df66df93b9b9b6 100644 (file)
@@ -473,7 +473,7 @@ public:
     inline const TypeOfCriticalSectionToUse& getLock() const noexcept      { return data.getLock(); }\r
 \r
     /** Returns the type of scoped lock to use for locking this array */\r
-    typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;\r
+    using ScopedLockType = typename TypeOfCriticalSectionToUse::ScopedLockType;\r
 \r
 \r
 private:\r
diff --git a/modules/juce_core/containers/juce_SparseSet.cpp b/modules/juce_core/containers/juce_SparseSet.cpp
new file mode 100644 (file)
index 0000000..da215de
--- /dev/null
@@ -0,0 +1,204 @@
+/*\r
+  ==============================================================================\r
+\r
+   This file is part of the JUCE library.\r
+   Copyright (c) 2018 - ROLI Ltd.\r
+\r
+   JUCE is an open source library subject to commercial or open-source\r
+   licensing.\r
+\r
+   The code included in this file is provided under the terms of the ISC license\r
+   http://www.isc.org/downloads/software-support-policy/isc-license. Permission\r
+   To use, copy, modify, and/or distribute this software for any purpose with or\r
+   without fee is hereby granted provided that the above copyright notice and\r
+   this permission notice appear in all copies.\r
+\r
+   JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r
+   EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r
+   DISCLAIMED.\r
+\r
+  ==============================================================================\r
+*/\r
+\r
+namespace juce\r
+{\r
+\r
+#if JUCE_UNIT_TESTS\r
+\r
+class SparseSetTests  : public UnitTest\r
+{\r
+public:\r
+    SparseSetTests() : UnitTest ("SparseSet class", "Containers") {}\r
+\r
+    void runTest() override\r
+    {\r
+        beginTest ("basic operations");\r
+        {\r
+            SparseSet<int> set;\r
+\r
+            expect (set.isEmpty());\r
+            expectEquals (set.size(), 0);\r
+            expectEquals (set.getNumRanges(), 0);\r
+            expect (set.getTotalRange().isEmpty());\r
+\r
+            set.addRange ({0, 10});\r
+            expect (! set.isEmpty());\r
+            expectEquals (set.size(), 10);\r
+            expectEquals (set.getNumRanges(), 1);\r
+            expect (! set.getTotalRange().isEmpty());\r
+            expect (set.getRange (0) == Range<int> (0, 10));\r
+\r
+            expectEquals (set[0], 0);\r
+            expectEquals (set[5], 5);\r
+            expectEquals (set[9], 9);\r
+            // Index out of range yields a default value for a type\r
+            expectEquals (set[10], 0);\r
+            expect (set.contains (0));\r
+            expect (set.contains (9));\r
+            expect (! set.contains (10));\r
+        }\r
+\r
+        beginTest ("adding ranges");\r
+        {\r
+            SparseSet<int> set;\r
+\r
+            // Adding same range twice should yield just a single range\r
+            set.addRange ({0, 10});\r
+            set.addRange ({0, 10});\r
+            expectEquals (set.getNumRanges(), 1);\r
+            expect (set.getRange (0) == Range<int> (0, 10));\r
+\r
+            // Adding already included range does not increase num ranges\r
+            set.addRange ({0, 2});\r
+            expectEquals (set.getNumRanges(), 1);\r
+            set.addRange ({8, 10});\r
+            expectEquals (set.getNumRanges(), 1);\r
+            set.addRange ({2, 5});\r
+            expectEquals (set.getNumRanges(), 1);\r
+\r
+            // Adding non adjacent range includes total number of ranges\r
+            set.addRange ({-10, -5});\r
+            expectEquals (set.getNumRanges(), 2);\r
+            expect (set.getRange (0) == Range<int> (-10, -5));\r
+            expect (set.getRange (1) == Range<int> (0, 10));\r
+            expect (set.getTotalRange() == Range<int> (-10, 10));\r
+\r
+            set.addRange ({15, 20});\r
+            expectEquals (set.getNumRanges(), 3);\r
+            expect (set.getRange (0) == Range<int> (-10, -5));\r
+            expect (set.getRange (1) == Range<int> (0, 10));\r
+            expect (set.getRange (2) == Range<int> (15, 20));\r
+            expect (set.getTotalRange() == Range<int> (-10, 20));\r
+\r
+            // Adding adjacent ranges merges them.\r
+            set.addRange ({-5, -3});\r
+            expectEquals (set.getNumRanges(), 3);\r
+            expect (set.getRange (0) == Range<int> (-10, -3));\r
+            expect (set.getRange (1) == Range<int> (0, 10));\r
+            expect (set.getRange (2) == Range<int> (15, 20));\r
+            expect (set.getTotalRange() == Range<int> (-10, 20));\r
+\r
+            set.addRange ({20, 25});\r
+            expectEquals (set.getNumRanges(), 3);\r
+            expect (set.getRange (0) == Range<int> (-10, -3));\r
+            expect (set.getRange (1) == Range<int> (0, 10));\r
+            expect (set.getRange (2) == Range<int> (15, 25));\r
+            expect (set.getTotalRange() == Range<int> (-10, 25));\r
+\r
+            // Adding range containing other ranges merges them\r
+            set.addRange ({-50, 50});\r
+            expectEquals (set.getNumRanges(), 1);\r
+            expect (set.getRange (0) == Range<int> (-50, 50));\r
+            expect (set.getTotalRange() == Range<int> (-50, 50));\r
+        }\r
+\r
+        beginTest ("removing ranges");\r
+        {\r
+            SparseSet<int> set;\r
+\r
+            set.addRange ({-20, -10});\r
+            set.addRange ({0, 10});\r
+            set.addRange ({20, 30});\r
+            expectEquals (set.getNumRanges(), 3);\r
+\r
+            // Removing ranges not included in the set has no effect\r
+            set.removeRange ({-5, 5});\r
+            expectEquals (set.getNumRanges(), 3);\r
+\r
+            // Removing partially overlapping range\r
+            set.removeRange ({-15, 5});\r
+            expectEquals (set.getNumRanges(), 3);\r
+            expect (set.getRange (0) == Range<int> (-20, -15));\r
+            expect (set.getRange (1) == Range<int> (5, 10));\r
+            expect (set.getRange (2) == Range<int> (20, 30));\r
+\r
+            // Removing subrange of existing range\r
+            set.removeRange ({20, 22});\r
+            expectEquals (set.getNumRanges(), 3);\r
+            expect (set.getRange (2) == Range<int> (22, 30));\r
+\r
+            set.removeRange ({28, 30});\r
+            expectEquals (set.getNumRanges(), 3);\r
+            expect (set.getRange (2) == Range<int> (22, 28));\r
+\r
+            set.removeRange ({24, 26});\r
+            expectEquals (set.getNumRanges(), 4);\r
+            expect (set.getRange (0) == Range<int> (-20, -15));\r
+            expect (set.getRange (1) == Range<int> (5, 10));\r
+            expect (set.getRange (2) == Range<int> (22, 24));\r
+            expect (set.getRange (3) == Range<int> (26, 28));\r
+        }\r
+\r
+        beginTest ("XORing ranges");\r
+        {\r
+            SparseSet<int> set;\r
+            set.addRange ({0, 10});\r
+\r
+            set.invertRange ({0, 10});\r
+            expectEquals (set.getNumRanges(), 0);\r
+            set.invertRange ({0, 10});\r
+            expectEquals (set.getNumRanges(), 1);\r
+\r
+            set.invertRange ({4, 6});\r
+            expectEquals (set.getNumRanges(), 2);\r
+            expect (set.getRange (0) == Range<int> (0, 4));\r
+            expect (set.getRange (1) == Range<int> (6, 10));\r
+\r
+            set.invertRange ({-2, 2});\r
+            expectEquals (set.getNumRanges(), 3);\r
+            expect (set.getRange (0) == Range<int> (-2, 0));\r
+            expect (set.getRange (1) == Range<int> (2, 4));\r
+            expect (set.getRange (2) == Range<int> (6, 10));\r
+        }\r
+\r
+        beginTest ("range contains & overlaps checks");\r
+        {\r
+            SparseSet<int> set;\r
+            set.addRange ({0, 10});\r
+\r
+            expect (set.containsRange (Range<int> (0, 2)));\r
+            expect (set.containsRange (Range<int> (8, 10)));\r
+            expect (set.containsRange (Range<int> (0, 10)));\r
+\r
+            expect (! set.containsRange (Range<int> (-2, 0)));\r
+            expect (! set.containsRange (Range<int> (-2, 10)));\r
+            expect (! set.containsRange (Range<int> (10, 12)));\r
+            expect (! set.containsRange (Range<int> (0, 12)));\r
+\r
+            expect (set.overlapsRange (Range<int> (0, 2)));\r
+            expect (set.overlapsRange (Range<int> (8, 10)));\r
+            expect (set.overlapsRange (Range<int> (0, 10)));\r
+\r
+            expect (! set.overlapsRange (Range<int> (-2, 0)));\r
+            expect (  set.overlapsRange (Range<int> (-2, 10)));\r
+            expect (! set.overlapsRange (Range<int> (10, 12)));\r
+            expect (  set.overlapsRange (Range<int> (0, 12)));\r
+        }\r
+    }\r
+};\r
+\r
+static SparseSetTests sparseSetTests;\r
+\r
+#endif\r
+\r
+} // namespace juce\r
index d1c0d2c8361bcc470ff519f505fb55c66cf4f35d..11c2c8ee738c92cd8b826b85af82f300fc5f9fca 100644 (file)
@@ -169,23 +169,33 @@ public:
                 if (r.getStart() >= rangeToRemove.getEnd())\r
                     continue;\r
 \r
-                if (r.contains (rangeToRemove))\r
+                if (rangeToRemove.contains (r))\r
                 {\r
-                    auto start = r.withEnd (rangeToRemove.getStart());\r
-                    r.setStart (rangeToRemove.getEnd());\r
-                    ranges.insert (i, start);\r
+                    ranges.remove (i);\r
                 }\r
-                else if (rangeToRemove.contains (r))\r
+                else if (r.contains (rangeToRemove))\r
                 {\r
-                    ranges.remove (i);\r
+                    auto r1 = r.withEnd (rangeToRemove.getStart());\r
+                    auto r2 = r.withStart (rangeToRemove.getEnd());\r
+\r
+                    // this should be covered in if (rangeToRemove.contains (r))\r
+                    jassert (! r1.isEmpty() || ! r2.isEmpty());\r
+\r
+                    r = r1;\r
+\r
+                    if (r.isEmpty())\r
+                        r = r2;\r
+\r
+                    if (! r1.isEmpty() && ! r2.isEmpty())\r
+                        ranges.insert (i + 1, r2);\r
                 }\r
-                else if (rangeToRemove.getEnd() > r.getStart())\r
+                else if (rangeToRemove.getEnd() > r.getEnd())\r
                 {\r
-                    r.setStart (rangeToRemove.getEnd());\r
+                    r.setEnd (rangeToRemove.getStart());\r
                 }\r
                 else\r
                 {\r
-                    r.setEnd (rangeToRemove.getStart());\r
+                    r.setStart (rangeToRemove.getEnd());\r
                 }\r
             }\r
         }\r
index e3b307ff9b0a4c9ce1093487f613004ce3454465..43b8180ddc6e45d9c5ce7294d50824da77a69a9f 100644 (file)
@@ -435,9 +435,7 @@ var::var() noexcept : type (&VariantType_Void::instance) {}
 var::var (const VariantType& t) noexcept  : type (&t) {}\r
 var::~var() noexcept  { type->cleanUp (value); }\r
 \r
-#if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-const var var::null;\r
-#endif\r
+JUCE_DECLARE_DEPRECATED_STATIC (const var var::null);\r
 \r
 //==============================================================================\r
 var::var (const var& valueToCopy)  : type (valueToCopy.type)\r
index ca5d8c73d6add89145b85a8ae38d8e2ff81f85e5..975c6781f0548b31d16cc1a2fb28b8c8d01f90ac 100644 (file)
@@ -274,17 +274,15 @@ public:
     */\r
     static var readFromStream (InputStream& input);\r
 \r
-   #if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-    /** This was a static empty var object, but is now deprecated as it's too easy to accidentally\r
-        use it indirectly during a static constructor, leading to hard-to-find order-of-initialisation\r
-        problems.\r
-        @deprecated If you need a default-constructed var, just use var() or {}.\r
-        The only time you might miss having var::null available might be if you need to return an\r
-        empty var from a function by reference, but if you need to do that, it's easy enough to use\r
-        a function-local static var and return that, avoiding any order-of-initialisation issues.\r
+    /* This was a static empty var object, but is now deprecated as it's too easy to accidentally\r
+       use it indirectly during a static constructor, leading to hard-to-find order-of-initialisation\r
+       problems.\r
+       @deprecated If you need a default-constructed var, just use var() or {}.\r
+       The only time you might miss having var::null available might be if you need to return an\r
+       empty var from a function by reference, but if you need to do that, it's easy enough to use\r
+       a function-local static var and return that, avoiding any order-of-initialisation issues.\r
     */\r
-    static const var null;\r
-   #endif\r
+    JUCE_DEPRECATED_STATIC (static const var null);\r
 \r
 private:\r
     //==============================================================================\r
index f8d63e022bcc4e9863b6cb5d5bf696c3500ef867..631a4512c89b608d382d7a840245c08f6da7f1ff 100644 (file)
@@ -133,7 +133,7 @@ private:
     private:\r
         friend class DirectoryIterator;\r
         friend struct ContainerDeletePolicy<Pimpl>;\r
-        ScopedPointer<Pimpl> pimpl;\r
+        std::unique_ptr<Pimpl> pimpl;\r
 \r
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NativeIterator)\r
     };\r
@@ -147,7 +147,7 @@ private:
     const int whatToLookFor;\r
     const bool isRecursive;\r
     bool hasBeenAdvanced = false;\r
-    ScopedPointer<DirectoryIterator> subIterator;\r
+    std::unique_ptr<DirectoryIterator> subIterator;\r
     File currentFile;\r
 \r
     static StringArray parseWildcards (const String& pattern);\r
index 358edd27492b835b3fa47038f3bb10392a14c0d0..1bf3258964aed68e892453168fa704cf883dc233 100644 (file)
@@ -63,9 +63,7 @@ File& File::operator= (File&& other) noexcept
     return *this;\r
 }\r
 \r
-#if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-const File File::nonexistent;\r
-#endif\r
+JUCE_DECLARE_DEPRECATED_STATIC (const File File::nonexistent);\r
 \r
 //==============================================================================\r
 static String removeEllipsis (const String& path)\r
@@ -710,7 +708,7 @@ bool File::startAsProcess (const String& parameters) const
 //==============================================================================\r
 FileInputStream* File::createInputStream() const\r
 {\r
-    ScopedPointer<FileInputStream> fin (new FileInputStream (*this));\r
+    std::unique_ptr<FileInputStream> fin (new FileInputStream (*this));\r
 \r
     if (fin->openedOk())\r
         return fin.release();\r
@@ -720,7 +718,7 @@ FileInputStream* File::createInputStream() const
 \r
 FileOutputStream* File::createOutputStream (size_t bufferSize) const\r
 {\r
-    ScopedPointer<FileOutputStream> out (new FileOutputStream (*this, bufferSize));\r
+    std::unique_ptr<FileOutputStream> out (new FileOutputStream (*this, bufferSize));\r
 \r
     return out->failedToOpen() ? nullptr\r
                                : out.release();\r
@@ -750,24 +748,20 @@ bool File::replaceWithData (const void* const dataToWrite,
     return tempFile.overwriteTargetFileWithTemporary();\r
 }\r
 \r
-bool File::appendText (const String& text,\r
-                       const bool asUnicode,\r
-                       const bool writeUnicodeHeaderBytes) const\r
+bool File::appendText (const String& text, bool asUnicode, bool writeHeaderBytes, const char* lineFeed) const\r
 {\r
     FileOutputStream out (*this);\r
 \r
     if (out.failedToOpen())\r
         return false;\r
 \r
-    return out.writeText (text, asUnicode, writeUnicodeHeaderBytes);\r
+    return out.writeText (text, asUnicode, writeHeaderBytes, lineFeed);\r
 }\r
 \r
-bool File::replaceWithText (const String& textToWrite,\r
-                            const bool asUnicode,\r
-                            const bool writeUnicodeHeaderBytes) const\r
+bool File::replaceWithText (const String& textToWrite, bool asUnicode, bool writeHeaderBytes, const char* lineFeed) const\r
 {\r
     TemporaryFile tempFile (*this, TemporaryFile::useHiddenFile);\r
-    tempFile.getFile().appendText (textToWrite, asUnicode, writeUnicodeHeaderBytes);\r
+    tempFile.getFile().appendText (textToWrite, asUnicode, writeHeaderBytes, lineFeed);\r
     return tempFile.overwriteTargetFileWithTemporary();\r
 }\r
 \r
@@ -975,6 +969,7 @@ bool File::createSymbolicLink (const File& linkFileToCreate,
                                nativePathOfTarget.toWideCharPointer(),\r
                                targetFile.isDirectory() ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0) != FALSE;\r
    #else\r
+    ignoreUnused (nativePathOfTarget);\r
     jassertfalse; // symbolic links not supported on this platform!\r
     return false;\r
    #endif\r
index 5f7d2d1b29465f1e3e75f9c1b4095ae7b41252b0..5c11921964d1749a99dfac5ed3348e927d646f9a 100644 (file)
@@ -681,13 +681,15 @@ public:
         It can also write the 'ff fe' unicode header bytes before the text to indicate\r
         the endianness of the file.\r
 \r
-        Any single \\n characters in the string are replaced with \\r\\n before it is written.\r
+        If lineEndings is nullptr, then line endings in the text won't be modified. If you\r
+        pass "\\n" or "\\r\\n" then this function will replace any existing line feeds.\r
 \r
         @see replaceWithText\r
     */\r
     bool appendText (const String& textToAppend,\r
                      bool asUnicode = false,\r
-                     bool writeUnicodeHeaderBytes = false) const;\r
+                     bool writeUnicodeHeaderBytes = false,\r
+                     const char* lineEndings = "\r\n") const;\r
 \r
     /** Replaces this file's contents with a given text string.\r
 \r
@@ -707,7 +709,8 @@ public:
     */\r
     bool replaceWithText (const String& textToWrite,\r
                           bool asUnicode = false,\r
-                          bool writeUnicodeHeaderBytes = false) const;\r
+                          bool writeUnicodeHeaderBytes = false,\r
+                          const char* lineEndings = "\r\n") const;\r
 \r
     /** Attempts to scan the contents of this file and compare it to another file, returning\r
         true if this is possible and they match byte-for-byte.\r
@@ -1045,21 +1048,14 @@ public:
         bool foldersFirst;\r
     };\r
 \r
-   #if (! defined(DOXYGEN)) && (! defined (JUCE_GCC))\r
-    // Deprecated: use File::getSeparatorChar() and File::getSeparatorString() instead!\r
-    JUCE_DEPRECATED (static const juce_wchar separator);\r
-    JUCE_DEPRECATED (static const StringRef separatorString);\r
-   #endif\r
-\r
-    //==============================================================================\r
-   #if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-    /** This was a static empty File object, but is now deprecated as it's too easy to accidentally\r
-        use it indirectly during a static constructor, leading to hard-to-find order-of-initialisation\r
-        problems.\r
-        @deprecated If you need a default-constructed File object, just use File() or {}.\r
+    /* These static objects are deprecated because it's too easy to accidentally use them indirectly\r
+       during a static constructor, which leads to very obscure order-of-initialisation bugs.\r
+       Use File::getSeparatorChar() and File::getSeparatorString(), and instead of File::nonexistent,\r
+       just use File() or {}.\r
     */\r
-    static const File nonexistent;\r
-   #endif\r
+    JUCE_DEPRECATED_STATIC (static const juce_wchar separator);\r
+    JUCE_DEPRECATED_STATIC (static const StringRef separatorString);\r
+    JUCE_DEPRECATED_STATIC (static const File nonexistent);\r
 \r
 private:\r
     //==============================================================================\r
index 9813de411e55e64795c63ffc1c1147d8d3c9169e..f9a92838292c3ded2f78b3458b30d272b111b6b2 100644 (file)
@@ -41,7 +41,7 @@ namespace juce
         TemporaryFile temp (myTargetFile);\r
 \r
         // create a stream to the temporary file, and write some data to it...\r
-        ScopedPointer<FileOutputStream> out (temp.getFile().createOutputStream());\r
+        std::unique_ptr<FileOutputStream> out (temp.getFile().createOutputStream());\r
 \r
         if (out != nullptr)\r
         {\r
index f6aecc8b9409bb2360a8e8316da2548cd3a9fa10..d1e09d63c67c110af41c99ae1f24b035f6e051d4 100644 (file)
@@ -75,13 +75,13 @@ struct JavascriptEngine::RootObject   : public DynamicObject
 \r
     Time timeout;\r
 \r
-    typedef const var::NativeFunctionArgs& Args;\r
-    typedef const char* TokenType;\r
+    using Args = const var::NativeFunctionArgs&;\r
+    using TokenType = const char*;\r
 \r
     void execute (const String& code)\r
     {\r
         ExpressionTreeBuilder tb (code);\r
-        ScopedPointer<BlockStatement> (tb.parseStatementList())->perform (Scope (nullptr, this, this), nullptr);\r
+        std::unique_ptr<BlockStatement> (tb.parseStatementList())->perform (Scope (nullptr, this, this), nullptr);\r
     }\r
 \r
     var evaluate (const String& code)\r
@@ -263,7 +263,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
         ResultCode perform (const Scope& s, var*) const override  { getResult (s); return ok; }\r
     };\r
 \r
-    typedef ScopedPointer<Expression> ExpPtr;\r
+    using ExpPtr = std::unique_ptr<Expression>;\r
 \r
     struct BlockStatement  : public Statement\r
     {\r
@@ -291,7 +291,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
         }\r
 \r
         ExpPtr condition;\r
-        ScopedPointer<Statement> trueBranch, falseBranch;\r
+        std::unique_ptr<Statement> trueBranch, falseBranch;\r
     };\r
 \r
     struct VarStatement  : public Statement\r
@@ -333,7 +333,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
             return ok;\r
         }\r
 \r
-        ScopedPointer<Statement> initialiser, iterator, body;\r
+        std::unique_ptr<Statement> initialiser, iterator, body;\r
         ExpPtr condition;\r
         bool isDoLoop;\r
     };\r
@@ -592,14 +592,15 @@ struct JavascriptEngine::RootObject   : public DynamicObject
     struct DivideOp  : public BinaryOperator\r
     {\r
         DivideOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::divide) {}\r
-        var getWithDoubles (double a, double b) const override  { return b != 0.0 ? a / b : std::numeric_limits<double>::infinity(); }\r
-        var getWithInts (int64 a, int64 b) const override       { return b != 0   ? var (a / (double) b) : var (std::numeric_limits<double>::infinity()); }\r
+        var getWithDoubles (double a, double b) const override  { return b != 0 ? a / b : std::numeric_limits<double>::infinity(); }\r
+        var getWithInts (int64 a, int64 b) const override       { return b != 0 ? var (a / (double) b) : var (std::numeric_limits<double>::infinity()); }\r
     };\r
 \r
     struct ModuloOp  : public BinaryOperator\r
     {\r
         ModuloOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::modulo) {}\r
-        var getWithInts (int64 a, int64 b) const override   { return b != 0 ? var (a % b) : var (std::numeric_limits<double>::infinity()); }\r
+        var getWithDoubles (double a, double b) const override  { return b != 0 ? fmod (a, b) : std::numeric_limits<double>::infinity(); }\r
+        var getWithInts (int64 a, int64 b) const override       { return b != 0 ? var (a % b) : var (std::numeric_limits<double>::infinity()); }\r
     };\r
 \r
     struct BitwiseOrOp  : public BinaryOperator\r
@@ -853,7 +854,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
 \r
         String functionCode;\r
         Array<Identifier> parameters;\r
-        ScopedPointer<Statement> body;\r
+        std::unique_ptr<Statement> body;\r
     };\r
 \r
     //==============================================================================\r
@@ -1057,7 +1058,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
 \r
         BlockStatement* parseStatementList()\r
         {\r
-            ScopedPointer<BlockStatement> b (new BlockStatement (location));\r
+            std::unique_ptr<BlockStatement> b (new BlockStatement (location));\r
 \r
             while (currentType != TokenTypes::closeBrace && currentType != TokenTypes::eof)\r
                 b->statements.add (parseStatement());\r
@@ -1111,7 +1112,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
         BlockStatement* parseBlock()\r
         {\r
             match (TokenTypes::openBrace);\r
-            ScopedPointer<BlockStatement> b (parseStatementList());\r
+            std::unique_ptr<BlockStatement> b (parseStatementList());\r
             match (TokenTypes::closeBrace);\r
             return b.release();\r
         }\r
@@ -1147,7 +1148,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
 \r
         Statement* parseIf()\r
         {\r
-            ScopedPointer<IfStatement> s (new IfStatement (location));\r
+            std::unique_ptr<IfStatement> s (new IfStatement (location));\r
             match (TokenTypes::openParen);\r
             s->condition.reset (parseExpression());\r
             match (TokenTypes::closeParen);\r
@@ -1168,13 +1169,13 @@ struct JavascriptEngine::RootObject   : public DynamicObject
 \r
         Statement* parseVar()\r
         {\r
-            ScopedPointer<VarStatement> s (new VarStatement (location));\r
+            std::unique_ptr<VarStatement> s (new VarStatement (location));\r
             s->name = parseIdentifier();\r
             s->initialiser.reset (matchIf (TokenTypes::assign) ? parseExpression() : new Expression (location));\r
 \r
             if (matchIf (TokenTypes::comma))\r
             {\r
-                ScopedPointer<BlockStatement> block (new BlockStatement (location));\r
+                std::unique_ptr<BlockStatement> block (new BlockStatement (location));\r
                 block->statements.add (s.release());\r
                 block->statements.add (parseVar());\r
                 return block.release();\r
@@ -1198,7 +1199,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
 \r
         Statement* parseForLoop()\r
         {\r
-            ScopedPointer<LoopStatement> s (new LoopStatement (location, false));\r
+            std::unique_ptr<LoopStatement> s (new LoopStatement (location, false));\r
             match (TokenTypes::openParen);\r
             s->initialiser.reset (parseStatement());\r
 \r
@@ -1224,7 +1225,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
 \r
         Statement* parseDoOrWhileLoop (bool isDoLoop)\r
         {\r
-            ScopedPointer<LoopStatement> s (new LoopStatement (location, isDoLoop));\r
+            std::unique_ptr<LoopStatement> s (new LoopStatement (location, isDoLoop));\r
             s->initialiser.reset (new Statement (location));\r
             s->iterator.reset (new Statement (location));\r
 \r
@@ -1261,7 +1262,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
             if (currentType == TokenTypes::identifier)\r
                 functionName = parseIdentifier();\r
 \r
-            ScopedPointer<FunctionObject> fo (new FunctionObject());\r
+            std::unique_ptr<FunctionObject> fo (new FunctionObject());\r
             parseFunctionParamsAndBody (*fo);\r
             fo->functionCode = String (functionStart, location.location);\r
             return var (fo.release());\r
@@ -1269,7 +1270,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
 \r
         Expression* parseFunctionCall (FunctionCall* call, ExpPtr& function)\r
         {\r
-            ScopedPointer<FunctionCall> s (call);\r
+            std::unique_ptr<FunctionCall> s (call);\r
             s->object.reset (function.release());\r
             match (TokenTypes::openParen);\r
 \r
@@ -1295,7 +1296,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
 \r
             if (matchIf (TokenTypes::openBracket))\r
             {\r
-                ScopedPointer<ArraySubscript> s (new ArraySubscript (location));\r
+                std::unique_ptr<ArraySubscript> s (new ArraySubscript (location));\r
                 s->object.reset (input.release());\r
                 s->index.reset (parseExpression());\r
                 match (TokenTypes::closeBracket);\r
@@ -1325,7 +1326,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
 \r
             if (matchIf (TokenTypes::openBrace))\r
             {\r
-                ScopedPointer<ObjectDeclaration> e (new ObjectDeclaration (location));\r
+                std::unique_ptr<ObjectDeclaration> e (new ObjectDeclaration (location));\r
 \r
                 while (currentType != TokenTypes::closeBrace)\r
                 {\r
@@ -1347,7 +1348,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
 \r
             if (matchIf (TokenTypes::openBracket))\r
             {\r
-                ScopedPointer<ArrayDeclaration> e (new ArrayDeclaration (location));\r
+                std::unique_ptr<ArrayDeclaration> e (new ArrayDeclaration (location));\r
 \r
                 while (currentType != TokenTypes::closeBracket)\r
                 {\r
@@ -1404,7 +1405,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
 \r
         Expression* parseTypeof()\r
         {\r
-            ScopedPointer<FunctionCall> f (new FunctionCall (location));\r
+            std::unique_ptr<FunctionCall> f (new FunctionCall (location));\r
             f->object.reset (new UnqualifiedName (location, "typeof"));\r
             f->arguments.add (parseUnary());\r
             return f.release();\r
@@ -1504,7 +1505,7 @@ struct JavascriptEngine::RootObject   : public DynamicObject
 \r
         Expression* parseTernaryOperator (ExpPtr& condition)\r
         {\r
-            ScopedPointer<ConditionalOp> e (new ConditionalOp (location));\r
+            std::unique_ptr<ConditionalOp> e (new ConditionalOp (location));\r
             e->condition.reset (condition.release());\r
             e->trueBranch.reset (parseExpression());\r
             match (TokenTypes::colon);\r
index 4784f65936e7ed7ff9a70e44b3523a9bdbe5e860..9725a1b5a6fbf9528d750b55dc7c411663e8a46d 100644 (file)
 #include "containers/juce_AbstractFifo.cpp"\r
 #include "containers/juce_NamedValueSet.cpp"\r
 #include "containers/juce_PropertySet.cpp"\r
+#include "containers/juce_SparseSet.cpp"\r
 #include "containers/juce_Variant.cpp"\r
 #include "files/juce_DirectoryIterator.cpp"\r
 #include "files/juce_File.cpp"\r
index 275b633066f91e6b3f66756370149c3f92a5ab43..0c4951088e6fb361b78c5dd11b37f9152075732e 100644 (file)
@@ -32,7 +32,7 @@
 \r
   ID:               juce_core\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE core classes\r
   description:      The essential set of basic JUCE classes, as required by all the other JUCE modules. Includes text, container, memory, threading and i/o functionality.\r
   website:          http://www.juce.com/juce\r
@@ -250,6 +250,7 @@ namespace juce
 #include "text/juce_LocalisedStrings.h"\r
 #include "text/juce_Base64.h"\r
 #include "misc/juce_Result.h"\r
+#include "misc/juce_Uuid.h"\r
 #include "containers/juce_Variant.h"\r
 #include "containers/juce_NamedValueSet.h"\r
 #include "containers/juce_DynamicObject.h"\r
@@ -280,7 +281,6 @@ namespace juce
 #include "maths/juce_Expression.h"\r
 #include "maths/juce_Random.h"\r
 #include "misc/juce_RuntimePermissions.h"\r
-#include "misc/juce_Uuid.h"\r
 #include "misc/juce_WindowsRegistry.h"\r
 #include "threads/juce_ChildProcess.h"\r
 #include "threads/juce_DynamicLibrary.h"\r
index a0c1a26354a39f43be845802eaad007c469fc182..62a43ae275fab5ab4b5f0696fc1993e45b54603c 100644 (file)
@@ -80,9 +80,9 @@ private:
 //==============================================================================\r
 struct Expression::Helpers\r
 {\r
-    typedef ReferenceCountedObjectPtr<Term> TermPtr;\r
+    using TermPtr = ReferenceCountedObjectPtr<Term>;\r
 \r
-    static void checkRecursionDepth (const int depth)\r
+    static void checkRecursionDepth (int depth)\r
     {\r
         if (depth > 256)\r
             throw EvaluationError ("Recursive symbol references");\r
@@ -857,7 +857,7 @@ struct Expression::Helpers
                 if (readOperator ("(")) // method call...\r
                 {\r
                     Function* const f = new Function (identifier);\r
-                    ScopedPointer<Term> func (f);  // (can't use ScopedPointer<Function> in MSVC)\r
+                    std::unique_ptr<Term> func (f);  // (can't use std::unique_ptr<Function> in MSVC)\r
 \r
                     TermPtr param (readExpression());\r
 \r
@@ -1021,7 +1021,7 @@ Expression Expression::function (const String& functionName, const Array<Express
 \r
 Expression Expression::adjustedToGiveNewResult (const double targetValue, const Expression::Scope& scope) const\r
 {\r
-    ScopedPointer<Term> newTerm (term->clone());\r
+    std::unique_ptr<Term> newTerm (term->clone());\r
 \r
     Helpers::Constant* termToAdjust = Helpers::findTermToAdjust (newTerm.get(), true);\r
 \r
index 83d2ce225b3601ccf3d920f595b7cd0835c412e1..d8e1bf364e8fe2128c05afa3719d952de96ee3ae 100644 (file)
@@ -32,28 +32,28 @@ namespace juce
 // Definitions for the int8, int16, int32, int64 and pointer_sized_int types.\r
 \r
 /** A platform-independent 8-bit signed integer type. */\r
-typedef signed char                 int8;\r
+using int8      = signed char;\r
 /** A platform-independent 8-bit unsigned integer type. */\r
-typedef unsigned char               uint8;\r
+using uint8     = unsigned char;\r
 /** A platform-independent 16-bit signed integer type. */\r
-typedef signed short                int16;\r
+using int16     = signed short;\r
 /** A platform-independent 16-bit unsigned integer type. */\r
-typedef unsigned short              uint16;\r
+using uint16    = unsigned short;\r
 /** A platform-independent 32-bit signed integer type. */\r
-typedef signed int                  int32;\r
+using int32     = signed int;\r
 /** A platform-independent 32-bit unsigned integer type. */\r
 typedef unsigned int                uint32;\r
 \r
 #if JUCE_MSVC\r
   /** A platform-independent 64-bit integer type. */\r
-  typedef __int64                   int64;\r
+  using int64  = __int64;\r
   /** A platform-independent 64-bit unsigned integer type. */\r
-  typedef unsigned __int64          uint64;\r
+  using uint64 = unsigned __int64;\r
 #else\r
   /** A platform-independent 64-bit integer type. */\r
-  typedef long long                 int64;\r
+  using int64  = long long;\r
   /** A platform-independent 64-bit unsigned integer type. */\r
-  typedef unsigned long long        uint64;\r
+  using uint64 = unsigned long long;\r
 #endif\r
 \r
 #ifndef DOXYGEN\r
@@ -67,23 +67,23 @@ typedef unsigned int                uint32;
 \r
 #if JUCE_64BIT\r
   /** A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it. */\r
-  typedef int64                     pointer_sized_int;\r
+  using pointer_sized_int  = int64;\r
   /** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */\r
-  typedef uint64                    pointer_sized_uint;\r
+  using pointer_sized_uint = uint64;\r
 #elif JUCE_MSVC\r
   /** A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it. */\r
-  typedef _W64 int                  pointer_sized_int;\r
+  using pointer_sized_int  = _W64 int;\r
   /** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */\r
-  typedef _W64 unsigned int         pointer_sized_uint;\r
+  using pointer_sized_uint = _W64 unsigned int;\r
 #else\r
   /** A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it. */\r
-  typedef int                       pointer_sized_int;\r
+  using pointer_sized_int  = int;\r
   /** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */\r
-  typedef unsigned int              pointer_sized_uint;\r
+  using pointer_sized_uint = unsigned int;\r
 #endif\r
 \r
 #if JUCE_WINDOWS && ! JUCE_MINGW\r
-  typedef pointer_sized_int ssize_t;\r
+  using ssize_t = pointer_sized_int;\r
 #endif\r
 \r
 //==============================================================================\r
@@ -627,24 +627,24 @@ namespace TypeHelpers
 \r
         @tags{Core}\r
     */\r
-    template <typename Type> struct ParameterType                   { typedef const Type& type; };\r
+    template <typename Type> struct ParameterType                   { using type = const Type&; };\r
 \r
    #if ! DOXYGEN\r
-    template <typename Type> struct ParameterType <Type&>           { typedef Type& type; };\r
-    template <typename Type> struct ParameterType <Type*>           { typedef Type* type; };\r
-    template <>              struct ParameterType <char>            { typedef char type; };\r
-    template <>              struct ParameterType <unsigned char>   { typedef unsigned char type; };\r
-    template <>              struct ParameterType <short>           { typedef short type; };\r
-    template <>              struct ParameterType <unsigned short>  { typedef unsigned short type; };\r
-    template <>              struct ParameterType <int>             { typedef int type; };\r
-    template <>              struct ParameterType <unsigned int>    { typedef unsigned int type; };\r
-    template <>              struct ParameterType <long>            { typedef long type; };\r
-    template <>              struct ParameterType <unsigned long>   { typedef unsigned long type; };\r
-    template <>              struct ParameterType <int64>           { typedef int64 type; };\r
-    template <>              struct ParameterType <uint64>          { typedef uint64 type; };\r
-    template <>              struct ParameterType <bool>            { typedef bool type; };\r
-    template <>              struct ParameterType <float>           { typedef float type; };\r
-    template <>              struct ParameterType <double>          { typedef double type; };\r
+    template <typename Type> struct ParameterType <Type&>           { using type = Type&; };\r
+    template <typename Type> struct ParameterType <Type*>           { using type = Type*; };\r
+    template <>              struct ParameterType <char>            { using type = char; };\r
+    template <>              struct ParameterType <unsigned char>   { using type = unsigned char; };\r
+    template <>              struct ParameterType <short>           { using type = short; };\r
+    template <>              struct ParameterType <unsigned short>  { using type = unsigned short; };\r
+    template <>              struct ParameterType <int>             { using type = int; };\r
+    template <>              struct ParameterType <unsigned int>    { using type = unsigned int; };\r
+    template <>              struct ParameterType <long>            { using type = long; };\r
+    template <>              struct ParameterType <unsigned long>   { using type = unsigned long; };\r
+    template <>              struct ParameterType <int64>           { using type = int64; };\r
+    template <>              struct ParameterType <uint64>          { using type = uint64; };\r
+    template <>              struct ParameterType <bool>            { using type = bool; };\r
+    template <>              struct ParameterType <float>           { using type = float; };\r
+    template <>              struct ParameterType <double>          { using type = double; };\r
    #endif\r
 \r
     /** These templates are designed to take a type, and if it's a double, they return a double\r
@@ -652,10 +652,10 @@ namespace TypeHelpers
 \r
         @tags{Core}\r
     */\r
-    template <typename Type> struct SmallestFloatType               { typedef float  type; };\r
+    template <typename Type> struct SmallestFloatType               { using type = float; };\r
 \r
    #if ! DOXYGEN\r
-    template <>              struct SmallestFloatType <double>      { typedef double type; };\r
+    template <>              struct SmallestFloatType <double>      { using type = double; };\r
    #endif\r
 \r
     /** These templates are designed to take an integer type, and return an unsigned int\r
@@ -666,10 +666,10 @@ namespace TypeHelpers
     template <int bytes>     struct UnsignedTypeWithSize            {};\r
 \r
    #if ! DOXYGEN\r
-    template <>              struct UnsignedTypeWithSize<1>         { typedef uint8  type; };\r
-    template <>              struct UnsignedTypeWithSize<2>         { typedef uint16 type; };\r
-    template <>              struct UnsignedTypeWithSize<4>         { typedef uint32 type; };\r
-    template <>              struct UnsignedTypeWithSize<8>         { typedef uint64 type; };\r
+    template <>              struct UnsignedTypeWithSize<1>         { using type = uint8; };\r
+    template <>              struct UnsignedTypeWithSize<2>         { using type = uint16; };\r
+    template <>              struct UnsignedTypeWithSize<4>         { using type = uint32; };\r
+    template <>              struct UnsignedTypeWithSize<8>         { using type = uint64; };\r
    #endif\r
 }\r
 \r
index f4ff23ee5f04850f75e1f5ed63b3a4a9ec6a6219..e5bb1cd21cd60cc919b030b81e67843e704d63c1 100644 (file)
@@ -267,14 +267,15 @@ private:
     {\r
         auto clampedValue = jlimit (static_cast<ValueType> (0), static_cast<ValueType> (1), value);\r
 \r
-        // If you his this assertion then either your normalisation function is not working\r
+        // If you hit this assertion then either your normalisation function is not working\r
         // correctly or your input is out of the expected bounds.\r
         jassert (clampedValue == value);\r
 \r
         return clampedValue;\r
     }\r
 \r
-    typedef std::function<ValueType(ValueType, ValueType, ValueType)> ConverstionFunction;\r
+    using ConverstionFunction = std::function<ValueType(ValueType, ValueType, ValueType)>;\r
+\r
     ConverstionFunction convertFrom0To1Function  = {},\r
                         convertTo0To1Function    = {},\r
                         snapToLegalValueFunction = {};\r
index 9e9a7ec1b0d03dedd59fc80cc81348bc7026dc44..2a3d1feb91609543c58b9605e857e4cc38f7a09c 100644 (file)
@@ -26,406 +26,121 @@ namespace juce
 #ifndef DOXYGEN\r
  namespace AtomicHelpers\r
  {\r
-     template <typename T> struct DiffTypeHelper     { typedef T Type; };\r
-     template <typename T> struct DiffTypeHelper<T*> { typedef std::ptrdiff_t Type; };\r
+     template <typename T> struct DiffTypeHelper     { using Type = T; };\r
+     template <typename T> struct DiffTypeHelper<T*> { using Type = std::ptrdiff_t; };\r
  }\r
 #endif\r
 \r
-#if JUCE_ATOMIC_AVAILABLE\r
- //==============================================================================\r
- /**\r
-     A simple wrapper around std::atomic.\r
+//==============================================================================\r
+/**\r
+    A simple wrapper around std::atomic.\r
 \r
-     @tags{Core}\r
- */\r
- template <typename Type>\r
- struct Atomic  final\r
- {\r
-     typedef typename AtomicHelpers::DiffTypeHelper<Type>::Type DiffType;\r
-\r
-     /** Creates a new value, initialised to zero. */\r
-     Atomic() noexcept  : value (0) {}\r
-\r
-     /** Creates a new value, with a given initial value. */\r
-     Atomic (Type initialValue) noexcept  : value (initialValue) {}\r
-\r
-     /** Copies another value (atomically). */\r
-     Atomic (const Atomic& other) noexcept  : value (other.get()) {}\r
-\r
-     /** Destructor. */\r
-     ~Atomic() noexcept\r
-     {\r
-        #if __cpp_lib_atomic_is_always_lock_free\r
-         static_assert (std::atomic<Type>::is_always_lock_free,\r
-                        "This class can only be used for lock-free types");\r
-        #endif\r
-     }\r
-\r
-     /** Atomically reads and returns the current value. */\r
-     Type get() const noexcept               { return value.load(); }\r
-\r
-     /** Atomically sets the current value. */\r
-     void set (Type newValue) noexcept       { value = newValue; }\r
-\r
-     /** Atomically sets the current value, returning the value that was replaced. */\r
-     Type exchange (Type newValue) noexcept  { return value.exchange (newValue); }\r
-\r
-     /** Atomically compares this value with a target value, and if it is equal, sets\r
-         this to be equal to a new value.\r
-\r
-         This operation is the atomic equivalent of doing this:\r
-         @code\r
-         bool compareAndSetBool (Type newValue, Type valueToCompare)\r
-         {\r
-             if (get() == valueToCompare)\r
-             {\r
-                 set (newValue);\r
-                 return true;\r
-             }\r
-\r
-             return false;\r
-         }\r
-         @endcode\r
-\r
-         Internally, this method calls std::atomic::compare_exchange_strong with\r
-         memory_order_seq_cst (the strictest std::memory_order).\r
-\r
-         @returns true if the comparison was true and the value was replaced; false if\r
-                  the comparison failed and the value was left unchanged.\r
-         @see compareAndSetValue\r
-     */\r
-     bool compareAndSetBool (Type newValue, Type valueToCompare) noexcept\r
-     {\r
-         return value.compare_exchange_strong (valueToCompare, newValue);\r
-     }\r
-\r
-     /** Copies another value into this one (atomically). */\r
-     Atomic<Type>& operator= (const Atomic& other) noexcept\r
-     {\r
-         value = other.value.load();\r
-         return *this;\r
-     }\r
-\r
-     /** Copies another value into this one (atomically). */\r
-     Atomic<Type>& operator= (Type newValue) noexcept\r
-     {\r
-         value = newValue;\r
-         return *this;\r
-     }\r
-\r
-     /** Atomically adds a number to this value, returning the new value. */\r
-     Type operator+= (DiffType amountToAdd) noexcept { return value += amountToAdd; }\r
-\r
-     /** Atomically subtracts a number from this value, returning the new value. */\r
-     Type operator-= (DiffType amountToSubtract) noexcept { return value -= amountToSubtract; }\r
-\r
-     /** Atomically increments this value, returning the new value. */\r
-     Type operator++() noexcept { return ++value; }\r
-\r
-     /** Atomically decrements this value, returning the new value. */\r
-     Type operator--() noexcept { return --value; }\r
-\r
-     /** Implements a memory read/write barrier.\r
-\r
-         Internally this calls std::atomic_thread_fence with\r
-         memory_order_seq_cst (the strictest std::memory_order).\r
-      */\r
-     void memoryBarrier() noexcept          { atomic_thread_fence (std::memory_order_seq_cst); }\r
-\r
-     /** The std::atomic object that this class operates on. */\r
-     std::atomic<Type> value;\r
-\r
-     //==============================================================================\r
-    #ifndef DOXYGEN\r
-     /* This method has been deprecated as there is no equivalent method in\r
-        std::atomic. Use compareAndSetBool instead.\r
-     */\r
-     JUCE_DEPRECATED (Type compareAndSetValue (Type, Type) noexcept);\r
-    #endif\r
- };\r
-\r
-#else\r
-\r
- #if JUCE_MSVC\r
-  JUCE_COMPILER_WARNING ("You must use a version of MSVC which supports std::atomic")\r
- #endif\r
-\r
- #if JUCE_IOS || JUCE_ANDROID      // (64-bit ops will compile but not link)\r
-  #define JUCE_64BIT_ATOMICS_UNAVAILABLE 1\r
- #endif\r
-\r
- #ifndef DOXYGEN\r
-  template <typename Type> class AtomicBase;\r
- #endif\r
-\r
- //==============================================================================\r
- /**\r
-     Simple class to hold a primitive value and perform atomic operations on it.\r
-\r
-     The type used must be a 32 or 64 bit primitive, like an int, pointer, etc.\r
-     There are methods to perform most of the basic atomic operations.\r
-\r
-     @tags{Core}\r
- */\r
- template <typename Type>\r
- class Atomic  final  : public AtomicBase<Type>\r
- {\r
- public:\r
-     /** Resulting type when subtracting the underlying Type. */\r
-     typedef typename AtomicBase<Type>::DiffType DiffType;\r
-\r
-     /** Creates a new value, initialised to zero. */\r
-     inline Atomic() noexcept {}\r
-\r
-     /** Creates a new value, with a given initial value. */\r
-     inline explicit Atomic (const Type initialValue) noexcept  : AtomicBase<Type> (initialValue) {}\r
-\r
-     /** Copies another value (atomically). */\r
-     inline Atomic (const Atomic& other) noexcept   : AtomicBase<Type> (other) {}\r
-\r
-     /** Destructor. */\r
-     inline ~Atomic() noexcept\r
-     {\r
-         static_assert (sizeof (Type) == 4 || sizeof (Type) == 8,\r
-                        "Atomic can only be used for types which are 32 or 64 bits in size");\r
-     }\r
-\r
-     /** Atomically reads and returns the current value. */\r
-     inline Type get() const noexcept   { return AtomicBase<Type>::get(); }\r
-\r
-     /** Copies another value into this one (atomically). */\r
-     inline Atomic& operator= (const Atomic& other) noexcept         { AtomicBase<Type>::operator= (other); return *this; }\r
-\r
-     /** Copies another value into this one (atomically). */\r
-     inline Atomic& operator= (const Type newValue) noexcept         { AtomicBase<Type>::operator= (newValue); return *this; }\r
-\r
-     /** Atomically sets the current value. */\r
-     inline void set (Type newValue) noexcept                        { exchange (newValue); }\r
-\r
-     /** Atomically sets the current value, returning the value that was replaced. */\r
-     inline Type exchange (Type v) noexcept                          { return AtomicBase<Type>::exchange (v); }\r
-\r
-     /** Atomically adds a number to this value, returning the new value. */\r
-     Type operator+= (DiffType amountToAdd) noexcept;\r
-\r
-     /** Atomically subtracts a number from this value, returning the new value. */\r
-     Type operator-= (DiffType amountToSubtract) noexcept;\r
-\r
-     /** Atomically increments this value, returning the new value. */\r
-     Type operator++() noexcept;\r
-\r
-     /** Atomically decrements this value, returning the new value. */\r
-     Type operator--() noexcept;\r
-\r
-     /** Atomically compares this value with a target value, and if it is equal, sets\r
-         this to be equal to a new value.\r
-\r
-         This operation is the atomic equivalent of doing this:\r
-         @code\r
-         bool compareAndSetBool (Type newValue, Type valueToCompare)\r
-         {\r
-             if (get() == valueToCompare)\r
-             {\r
-                 set (newValue);\r
-                 return true;\r
-             }\r
-\r
-             return false;\r
-         }\r
-         @endcode\r
-\r
-         @returns true if the comparison was true and the value was replaced; false if\r
-                  the comparison failed and the value was left unchanged.\r
-         @see compareAndSetValue\r
-     */\r
-     inline bool compareAndSetBool (Type newValue, Type valueToCompare) noexcept  { return AtomicBase<Type>::compareAndSetBool (newValue, valueToCompare); }\r
-\r
-     /** Atomically compares this value with a target value, and if it is equal, sets\r
-         this to be equal to a new value.\r
-\r
-         This operation is the atomic equivalent of doing this:\r
-         @code\r
-         Type compareAndSetValue (Type newValue, Type valueToCompare)\r
-         {\r
-             Type oldValue = get();\r
-             if (oldValue == valueToCompare)\r
-                 set (newValue);\r
-\r
-             return oldValue;\r
-         }\r
-         @endcode\r
-\r
-         @returns the old value before it was changed.\r
-         @see compareAndSetBool\r
-     */\r
-     inline Type compareAndSetValue (Type newValue, Type valueToCompare) noexcept  { return AtomicBase<Type>::compareAndSetValue (newValue, valueToCompare); }\r
-\r
-     /** Implements a memory read/write barrier. */\r
-     static inline void memoryBarrier() noexcept   { AtomicBase<Type>::memoryBarrier(); }\r
- };\r
-\r
- #if ! DOXYGEN\r
-\r
- //==============================================================================\r
- // Internal implementation follows\r
- //==============================================================================\r
- template <typename Type>\r
- class AtomicBase\r
- {\r
- public:\r
-     typedef typename AtomicHelpers::DiffTypeHelper<Type>::Type DiffType;\r
-\r
-     inline AtomicBase() noexcept : value (0) {}\r
-     inline explicit AtomicBase (const Type v) noexcept : value (v) {}\r
-     inline AtomicBase (const AtomicBase& other) noexcept : value (other.get()) {}\r
-     Type get() const noexcept;\r
-     inline AtomicBase& operator= (const AtomicBase<Type>& other) noexcept { exchange (other.get()); return *this; }\r
-     inline AtomicBase& operator= (const Type newValue) noexcept           { exchange (newValue);    return *this; }\r
-     void set (Type newValue) noexcept                                     { exchange (newValue); }\r
-     Type exchange (Type) noexcept;\r
-     bool compareAndSetBool (Type, Type) noexcept;\r
-     Type compareAndSetValue (Type, Type) noexcept;\r
-     static void memoryBarrier() noexcept;\r
-\r
-     //==============================================================================\r
-     #if JUCE_64BIT\r
-      JUCE_ALIGN (8)\r
-     #else\r
-      JUCE_ALIGN (4)\r
-     #endif\r
-\r
-     /** The raw value that this class operates on.\r
-         This is exposed publicly in case you need to manipulate it directly\r
-         for performance reasons.\r
+    @tags{Core}\r
+*/\r
+template <typename Type>\r
+struct Atomic  final\r
+{\r
+    typedef typename AtomicHelpers::DiffTypeHelper<Type>::Type DiffType;\r
+\r
+    /** Creates a new value, initialised to zero. */\r
+    Atomic() noexcept  : value (0) {}\r
+\r
+    /** Creates a new value, with a given initial value. */\r
+    Atomic (Type initialValue) noexcept  : value (initialValue) {}\r
+\r
+    /** Copies another value (atomically). */\r
+    Atomic (const Atomic& other) noexcept  : value (other.get()) {}\r
+\r
+    /** Destructor. */\r
+    ~Atomic() noexcept\r
+    {\r
+       #if __cpp_lib_atomic_is_always_lock_free\r
+        static_assert (std::atomic<Type>::is_always_lock_free,\r
+                       "This class can only be used for lock-free types");\r
+       #endif\r
+    }\r
+\r
+    /** Atomically reads and returns the current value. */\r
+    Type get() const noexcept               { return value.load(); }\r
+\r
+    /** Atomically sets the current value. */\r
+    void set (Type newValue) noexcept       { value = newValue; }\r
+\r
+    /** Atomically sets the current value, returning the value that was replaced. */\r
+    Type exchange (Type newValue) noexcept  { return value.exchange (newValue); }\r
+\r
+    /** Atomically compares this value with a target value, and if it is equal, sets\r
+        this to be equal to a new value.\r
+\r
+        This operation is the atomic equivalent of doing this:\r
+        @code\r
+        bool compareAndSetBool (Type newValue, Type valueToCompare)\r
+        {\r
+            if (get() == valueToCompare)\r
+            {\r
+                set (newValue);\r
+                return true;\r
+            }\r
+\r
+            return false;\r
+        }\r
+        @endcode\r
+\r
+        Internally, this method calls std::atomic::compare_exchange_strong with\r
+        memory_order_seq_cst (the strictest std::memory_order).\r
+\r
+        @returns true if the comparison was true and the value was replaced; false if\r
+                 the comparison failed and the value was left unchanged.\r
+        @see compareAndSetValue\r
+    */\r
+    bool compareAndSetBool (Type newValue, Type valueToCompare) noexcept\r
+    {\r
+        return value.compare_exchange_strong (valueToCompare, newValue);\r
+    }\r
+\r
+    /** Copies another value into this one (atomically). */\r
+    Atomic<Type>& operator= (const Atomic& other) noexcept\r
+    {\r
+        value = other.value.load();\r
+        return *this;\r
+    }\r
+\r
+    /** Copies another value into this one (atomically). */\r
+    Atomic<Type>& operator= (Type newValue) noexcept\r
+    {\r
+        value = newValue;\r
+        return *this;\r
+    }\r
+\r
+    /** Atomically adds a number to this value, returning the new value. */\r
+    Type operator+= (DiffType amountToAdd) noexcept { return value += amountToAdd; }\r
+\r
+    /** Atomically subtracts a number from this value, returning the new value. */\r
+    Type operator-= (DiffType amountToSubtract) noexcept { return value -= amountToSubtract; }\r
+\r
+    /** Atomically increments this value, returning the new value. */\r
+    Type operator++() noexcept { return ++value; }\r
+\r
+    /** Atomically decrements this value, returning the new value. */\r
+    Type operator--() noexcept { return --value; }\r
+\r
+    /** Implements a memory read/write barrier.\r
+\r
+        Internally this calls std::atomic_thread_fence with\r
+        memory_order_seq_cst (the strictest std::memory_order).\r
      */\r
-     volatile Type value;\r
-\r
- protected:\r
-     template <typename Dest, typename Source>\r
-     static inline Dest castTo (Source value) noexcept         { union { Dest d; Source s; } u; u.s = value; return u.d; }\r
-\r
-     static inline Type castFrom32Bit (int32 value) noexcept   { return castTo <Type, int32> (value); }\r
-     static inline Type castFrom64Bit (int64 value) noexcept   { return castTo <Type, int64> (value); }\r
-     static inline int32 castTo32Bit (Type value) noexcept     { return castTo <int32, Type> (value); }\r
-     static inline int64 castTo64Bit (Type value) noexcept     { return castTo <int64, Type> (value); }\r
-\r
-     Type operator++ (int); // better to just use pre-increment with atomics..\r
-     Type operator-- (int);\r
-\r
-     /** This templated negate function will negate pointers as well as integers */\r
-     template <typename ValueType>\r
-     inline ValueType negateValue (ValueType n) noexcept\r
-     {\r
-         return sizeof (ValueType) == 1 ? (ValueType) -(signed char) n\r
-             : (sizeof (ValueType) == 2 ? (ValueType) -(short) n\r
-             : (sizeof (ValueType) == 4 ? (ValueType) -(int) n\r
-             : ((ValueType) -(int64) n)));\r
-     }\r
-\r
-     /** This templated negate function will negate pointers as well as integers */\r
-     template <typename PointerType>\r
-     inline PointerType* negateValue (PointerType* n) noexcept\r
-     {\r
-         return reinterpret_cast<PointerType*> (-reinterpret_cast<pointer_sized_int> (n));\r
-     }\r
- };\r
-\r
- //==============================================================================\r
- // Specialisation for void* which does not include the pointer arithmetic\r
- template <>\r
- class Atomic<void*> : public AtomicBase<void*>\r
- {\r
- public:\r
-     inline Atomic() noexcept {}\r
-     inline explicit Atomic (void* const initialValue) noexcept  : AtomicBase<void*> (initialValue) {}\r
-     inline Atomic (const Atomic<void*>& other) noexcept   : AtomicBase<void*> (other) {}\r
-     inline void* get() const noexcept   { return AtomicBase<void*>::get(); }\r
-     inline Atomic& operator= (const Atomic& other) noexcept         { AtomicBase<void*>::operator= (other); return *this; }\r
-     inline Atomic& operator= (void* const newValue) noexcept        { AtomicBase<void*>::operator= (newValue); return *this; }\r
-     inline void set (void* newValue) noexcept                       { exchange (newValue); }\r
-     inline void* exchange (void* v) noexcept                        { return AtomicBase<void*>::exchange (v); }\r
-     inline bool compareAndSetBool (void* newValue, void* valueToCompare) noexcept  { return AtomicBase<void*>::compareAndSetBool (newValue, valueToCompare); }\r
-     inline void* compareAndSetValue (void* newValue, void* valueToCompare) noexcept  { return AtomicBase<void*>::compareAndSetValue (newValue, valueToCompare); }\r
-     static inline void memoryBarrier() noexcept { AtomicBase<void*>::memoryBarrier(); }\r
- };\r
-\r
- template <typename Type>\r
- struct AtomicIncrementDecrement\r
- {\r
-     static inline Type inc (AtomicBase<Type>& a) noexcept\r
-     {\r
-         return sizeof (Type) == 4 ? (Type) __sync_add_and_fetch (& (a.value), (Type) 1)\r
-                                   : (Type) __sync_add_and_fetch ((int64_t*) & (a.value), 1);\r
-     }\r
-\r
-     static inline Type dec (AtomicBase<Type>& a) noexcept\r
-     {\r
-         return sizeof (Type) == 4 ? (Type) __sync_add_and_fetch (& (a.value), (Type) -1)\r
-                                   : (Type) __sync_add_and_fetch ((int64_t*) & (a.value), -1);\r
-     }\r
- };\r
-\r
- template <typename Type>\r
- struct AtomicIncrementDecrement<Type*>\r
- {\r
-     static inline Type* inc (Atomic<Type*>& a) noexcept { return a.operator+= (1); }\r
-     static inline Type* dec (Atomic<Type*>& a) noexcept { return a.operator-= (1); }\r
- };\r
-\r
- //==============================================================================\r
- template <typename Type>\r
- inline Type AtomicBase<Type>::get() const noexcept\r
- {\r
-     return sizeof (Type) == 4 ? castFrom32Bit ((int32) __sync_add_and_fetch ((volatile int32*) &value, 0))\r
-                               : castFrom64Bit ((int64) __sync_add_and_fetch ((volatile int64*) &value, 0));\r
- }\r
-\r
- template <typename Type>\r
- inline Type AtomicBase<Type>::exchange (const Type newValue) noexcept\r
- {\r
-     Type currentVal = get();\r
-     while (! compareAndSetBool (newValue, currentVal)) { currentVal = get(); }\r
-     return currentVal;\r
- }\r
-\r
- template <typename Type>\r
- inline Type Atomic<Type>::operator+= (const DiffType amountToAdd) noexcept\r
- {\r
-     Type amount = (Type() + amountToAdd);\r
-     return (Type) __sync_add_and_fetch (& (AtomicBase<Type>::value), amount);\r
- }\r
-\r
- template <typename Type>\r
- inline Type Atomic<Type>::operator-= (const DiffType amountToSubtract) noexcept\r
- {\r
-     return operator+= (AtomicBase<Type>::negateValue (amountToSubtract));\r
- }\r
-\r
- template <typename Type>\r
- inline Type Atomic<Type>::operator++() noexcept   { return AtomicIncrementDecrement<Type>::inc (*this); }\r
-\r
- template <typename Type>\r
- inline Type Atomic<Type>::operator--() noexcept   { return AtomicIncrementDecrement<Type>::dec (*this); }\r
-\r
- template <typename Type>\r
- inline bool AtomicBase<Type>::compareAndSetBool (const Type newValue, const Type valueToCompare) noexcept\r
- {\r
-     return sizeof (Type) == 4 ? __sync_bool_compare_and_swap ((volatile int32*) &value, castTo32Bit (valueToCompare), castTo32Bit (newValue))\r
-                               : __sync_bool_compare_and_swap ((volatile int64*) &value, castTo64Bit (valueToCompare), castTo64Bit (newValue));\r
- }\r
-\r
- template <typename Type>\r
- inline Type AtomicBase<Type>::compareAndSetValue (const Type newValue, const Type valueToCompare) noexcept\r
- {\r
-     return sizeof (Type) == 4 ? castFrom32Bit ((int32) __sync_val_compare_and_swap ((volatile int32*) &value, castTo32Bit (valueToCompare), castTo32Bit (newValue)))\r
-                               : castFrom64Bit ((int64) __sync_val_compare_and_swap ((volatile int64*) &value, castTo64Bit (valueToCompare), castTo64Bit (newValue)));\r
- }\r
-\r
- template <typename Type>\r
- inline void AtomicBase<Type>::memoryBarrier() noexcept   { __sync_synchronize(); }\r
-\r
- #endif // ! DOXYGEN\r
-\r
-#endif\r
+    void memoryBarrier() noexcept          { atomic_thread_fence (std::memory_order_seq_cst); }\r
+\r
+    /** The std::atomic object that this class operates on. */\r
+    std::atomic<Type> value;\r
+\r
+    //==============================================================================\r
+   #ifndef DOXYGEN\r
+    /* This method has been deprecated as there is no equivalent method in\r
+       std::atomic. Use compareAndSetBool instead.\r
+    */\r
+    JUCE_DEPRECATED (Type compareAndSetValue (Type, Type) noexcept);\r
+   #endif\r
+};\r
 \r
 } // namespace juce\r
index a1e9368b16e8cfa17fcb3ed39f472854c066635c..1196a751adc8addf163ef8f262173d04cd8fa217 100644 (file)
@@ -60,7 +60,7 @@ public:
                 at an earlier point in the program, and simply not been detected until now.\r
 \r
                 Most errors like this are caused by using old-fashioned, non-RAII techniques for\r
-                your object management. Tut, tut. Always, always use ScopedPointers, OwnedArrays,\r
+                your object management. Tut, tut. Always, always use std::unique_ptrs, OwnedArrays,\r
                 ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs!\r
             */\r
             jassertfalse;\r
@@ -84,7 +84,7 @@ private:
                     the 'OwnerClass' template parameter - the name should have been printed by the line above.\r
 \r
                     If you're leaking, it's probably because you're using old-fashioned, non-RAII techniques for\r
-                    your object management. Tut, tut. Always, always use ScopedPointers, OwnedArrays,\r
+                    your object management. Tut, tut. Always, always use std::unique_ptrs, OwnedArrays,\r
                     ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs!\r
                 */\r
                 jassertfalse;\r
index c2be191f2da83998ebb5c4882c27ba7c290e7705..3e82fa875cc9189b61172895476c110c3807710a 100644 (file)
@@ -33,7 +33,7 @@ inline void zerostruct (Type& structure) noexcept                   { memset (&s
 \r
 /** Delete an object pointer, and sets the pointer to null.\r
 \r
-    Remember that it's not good c++ practice to use delete directly - always try to use a ScopedPointer\r
+    Remember that it's not good c++ practice to use delete directly - always try to use a std::unique_ptr\r
     or other automatic lifetime-management system rather than resorting to deleting raw pointers!\r
 */\r
 template <typename Type>\r
index 37986db99417c9a17ba48df7ddbac67c1266e291..61000b0737e790099075ace4c63ddd5dc414cfb3 100644 (file)
@@ -37,7 +37,7 @@ namespace juce
 \r
         // This is a neat way of declaring a typedef for a pointer class,\r
         // rather than typing out the full templated name each time..\r
-        typedef ReferenceCountedObjectPtr<MyClass> Ptr;\r
+        using Ptr = ReferenceCountedObjectPtr<MyClass>;\r
     };\r
 \r
     MyClass::Ptr p = new MyClass();\r
@@ -228,7 +228,7 @@ private:
     @code\r
     struct MyClass  : public ReferenceCountedObject\r
     {\r
-        typedef ReferenceCountedObjectPtr<MyClass> Ptr;\r
+        using Ptr = ReferenceCountedObjectPtr<MyClass>;\r
         ...\r
     }\r
     @endcode\r
@@ -237,12 +237,12 @@ private:
 \r
     @tags{Core}\r
 */\r
-template <class ReferenceCountedObjectClass>\r
+template <class ObjectType>\r
 class ReferenceCountedObjectPtr\r
 {\r
 public:\r
     /** The class being referenced by this pointer. */\r
-    typedef ReferenceCountedObjectClass ReferencedType;\r
+    using ReferencedType = ObjectType;\r
 \r
     //==============================================================================\r
     /** Creates a pointer to a null object. */\r
@@ -274,7 +274,7 @@ public:
     */\r
     template <typename Convertible>\r
     ReferenceCountedObjectPtr (const ReferenceCountedObjectPtr<Convertible>& other) noexcept\r
-        : referencedObject (static_cast<ReferencedType*> (other.get()))\r
+        : referencedObject (other.get())\r
     {\r
         incIfNotNull (referencedObject);\r
     }\r
@@ -295,7 +295,7 @@ public:
     template <typename Convertible>\r
     ReferenceCountedObjectPtr& operator= (const ReferenceCountedObjectPtr<Convertible>& other)\r
     {\r
-        return operator= (static_cast<ReferencedType*> (other.get()));\r
+        return operator= (other.get());\r
     }\r
 \r
     /** Changes this pointer to point at a different object.\r
@@ -303,7 +303,7 @@ public:
         The reference count of the old object is decremented, and it might be\r
         deleted if it hits zero. The new object's count is incremented.\r
     */\r
-    ReferenceCountedObjectPtr& operator= (ReferencedType* const newObject)\r
+    ReferenceCountedObjectPtr& operator= (ReferencedType* newObject)\r
     {\r
         if (referencedObject != newObject)\r
         {\r
@@ -382,43 +382,43 @@ private:
 \r
 //==============================================================================\r
 /** Compares two ReferenceCountedObjectPtrs. */\r
-template <typename ReferenceCountedObjectClass>\r
-bool operator== (const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object1, ReferenceCountedObjectClass* const object2) noexcept\r
+template <typename ObjectType>\r
+bool operator== (const ReferenceCountedObjectPtr<ObjectType>& object1, ObjectType* const object2) noexcept\r
 {\r
     return object1.get() == object2;\r
 }\r
 \r
 /** Compares two ReferenceCountedObjectPtrs. */\r
-template <typename ReferenceCountedObjectClass>\r
-bool operator== (const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object1, const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object2) noexcept\r
+template <typename ObjectType>\r
+bool operator== (const ReferenceCountedObjectPtr<ObjectType>& object1, const ReferenceCountedObjectPtr<ObjectType>& object2) noexcept\r
 {\r
     return object1.get() == object2.get();\r
 }\r
 \r
 /** Compares two ReferenceCountedObjectPtrs. */\r
-template <typename ReferenceCountedObjectClass>\r
-bool operator== (ReferenceCountedObjectClass* object1, const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object2) noexcept\r
+template <typename ObjectType>\r
+bool operator== (ObjectType* object1, const ReferenceCountedObjectPtr<ObjectType>& object2) noexcept\r
 {\r
     return object1 == object2.get();\r
 }\r
 \r
 /** Compares two ReferenceCountedObjectPtrs. */\r
-template <typename ReferenceCountedObjectClass>\r
-bool operator!= (const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object1, const ReferenceCountedObjectClass* object2) noexcept\r
+template <typename ObjectType>\r
+bool operator!= (const ReferenceCountedObjectPtr<ObjectType>& object1, const ObjectType* object2) noexcept\r
 {\r
     return object1.get() != object2;\r
 }\r
 \r
 /** Compares two ReferenceCountedObjectPtrs. */\r
-template <typename ReferenceCountedObjectClass>\r
-bool operator!= (const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object1, const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object2) noexcept\r
+template <typename ObjectType>\r
+bool operator!= (const ReferenceCountedObjectPtr<ObjectType>& object1, const ReferenceCountedObjectPtr<ObjectType>& object2) noexcept\r
 {\r
     return object1.get() != object2.get();\r
 }\r
 \r
 /** Compares two ReferenceCountedObjectPtrs. */\r
-template <typename ReferenceCountedObjectClass>\r
-bool operator!= (ReferenceCountedObjectClass* object1, const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object2) noexcept\r
+template <typename ObjectType>\r
+bool operator!= (ObjectType* object1, const ReferenceCountedObjectPtr<ObjectType>& object2) noexcept\r
 {\r
     return object1 != object2.get();\r
 }\r
index 35de13397bb483b67f1b2d58dd0f1742c59f60eb..186889366a63fd400b3fb29bd9959ae4b4c0063c 100644 (file)
@@ -25,8 +25,11 @@ namespace juce
 \r
 //==============================================================================\r
 /**\r
-    This class holds a pointer which is automatically deleted when this object goes\r
-    out of scope.\r
+    This class is deprecated. You should use std::unique_ptr instead.\r
+\r
+\r
+    A ScopedPointer holds a pointer that is automatically deleted when the ScopedPointer\r
+    goes out of scope.\r
 \r
     Once a pointer has been passed to a ScopedPointer, it will make sure that the pointer\r
     gets deleted when the ScopedPointer is deleted. Using the ScopedPointer on the stack or\r
@@ -49,17 +52,6 @@ namespace juce
     If you need to get a pointer out of a ScopedPointer without it being deleted, you\r
     can use the release() method.\r
 \r
-    Something to note is the main difference between this class and the std::auto_ptr class,\r
-    which is that ScopedPointer provides a cast-to-object operator, whereas std::auto_ptr\r
-    requires that you always call get() to retrieve the pointer. The advantages of providing\r
-    the cast is that you don't need to call get(), so can use the ScopedPointer in pretty much\r
-    exactly the same way as a raw pointer. The disadvantage is that the compiler is free to\r
-    use the cast in unexpected and sometimes dangerous ways - in particular, it becomes difficult\r
-    to return a ScopedPointer as the result of a function. To avoid this causing errors,\r
-    ScopedPointer contains an overloaded constructor that should cause a syntax error in these\r
-    circumstances, but it does mean that instead of returning a ScopedPointer from a function,\r
-    you'd need to return a raw pointer (or use a std::auto_ptr instead).\r
-\r
     @tags{Core}\r
 */\r
 template <class ObjectType>\r
index cb9d2fc55c947ba626b49243119aa0a5b5b74971..80fdf33a4e3f79eead41bbc7a7cd27065d05dc95 100644 (file)
@@ -131,7 +131,7 @@ private:
     struct SharedObjectHolder\r
     {\r
         SpinLock lock;\r
-        ScopedPointer<SharedObjectType> sharedInstance;\r
+        std::unique_ptr<SharedObjectType> sharedInstance;\r
         int refCount;\r
     };\r
 \r
@@ -149,9 +149,9 @@ private:
         const SpinLock::ScopedLockType sl (holder.lock);\r
 \r
         if (++(holder.refCount) == 1)\r
-            holder.sharedInstance = new SharedObjectType();\r
+            holder.sharedInstance.reset (new SharedObjectType());\r
 \r
-        sharedObject = holder.sharedInstance;\r
+        sharedObject = holder.sharedInstance.get();\r
     }\r
 \r
     // There's no need to assign to a SharedResourcePointer because every\r
index 0c89af8483629f539597eca65cb1eb614c93e2b2..b3d3d3f996a8bffd5195cb65a100d0a4aa57680e 100644 (file)
@@ -79,7 +79,7 @@ template <class ObjectType, class ReferenceCountingType = ReferenceCountedObject
 class WeakReference\r
 {\r
 public:\r
-    /** Creates a null SafePointer. */\r
+    /** Creates a null WeakReference. */\r
     inline WeakReference() noexcept {}\r
 \r
     /** Creates a WeakReference that points at the given object. */\r
index 43200ebea8cca7c56dd603b78fba78907e05cac9..532a0038ea8a109f4103538f33234c7f6d7c97a5 100644 (file)
@@ -83,7 +83,10 @@ public:
         readExternalStorage = 3,\r
 \r
         /** Permission to write to external storage such as SD cards */\r
-        writeExternalStorage = 4\r
+        writeExternalStorage = 4,\r
+\r
+        /** Permission to use camera */\r
+        camera = 5\r
     };\r
 \r
     //==============================================================================\r
index eb6a1f62eff21c0dfdd34dbc074a4f123f8bdc33..70e3547149ceafbcab92b4610ba920cc9335681c 100644 (file)
@@ -71,7 +71,7 @@ namespace FunctionTestsHelpers
 \r
         int operator()(int i) const { return bigData->sum() + i; }\r
 \r
-        ScopedPointer<BigData> bigData { new BigData() };\r
+        std::unique_ptr<BigData> bigData { new BigData() };\r
     };\r
 }\r
 \r
@@ -173,13 +173,13 @@ public:
         {\r
             beginTest ("move constructor");\r
 \r
-            ScopedPointer<std::function<int()>> fStackTmp (new std::function<int()> (fStack));\r
+            std::unique_ptr<std::function<int()>> fStackTmp (new std::function<int()> (fStack));\r
             std::function<int()> f1 (static_cast<std::function<int()>&&> (*fStackTmp));\r
 \r
             fStackTmp.reset();\r
             expectEquals (f1(), 3);\r
 \r
-            ScopedPointer<std::function<int()>> fHeapTmp (new std::function<int()> (fHeap));\r
+            std::unique_ptr<std::function<int()>> fHeapTmp (new std::function<int()> (fHeap));\r
             std::function<int()> f2 (static_cast<std::function<int()>&&> (*fHeapTmp));\r
             if (*fHeapTmp)\r
                 expect (false);\r
@@ -187,7 +187,7 @@ public:
             fHeapTmp.reset();\r
             expectEquals (f2(), FunctionTestsHelpers::BigData::bigDataSum);\r
 \r
-            ScopedPointer<std::function<int()>> fEmptyTmp (new std::function<int()>());\r
+            std::unique_ptr<std::function<int()>> fEmptyTmp (new std::function<int()>());\r
             std::function<int()> f3 (static_cast<std::function<int()>&&> (*fEmptyTmp));\r
             fEmptyTmp.reset();\r
             if (f3)\r
@@ -198,14 +198,14 @@ public:
             beginTest ("move assignment");\r
 \r
             std::function<int()> f1 (fHeap);\r
-            ScopedPointer<std::function<int()>> fStackTmp (new std::function<int()> (fStack));\r
+            std::unique_ptr<std::function<int()>> fStackTmp (new std::function<int()> (fStack));\r
             f1 = static_cast<std::function<int()>&&> (*fStackTmp);\r
 \r
             fStackTmp.reset();\r
             expectEquals (f1(), 3);\r
 \r
             std::function<int()> f2 (fStack);\r
-            ScopedPointer<std::function<int()>> fHeapTmp (new std::function<int()> (fHeap));\r
+            std::unique_ptr<std::function<int()>> fHeapTmp (new std::function<int()> (fHeap));\r
             f2 = static_cast<std::function<int()>&&> (*fHeapTmp);\r
             if (*fHeapTmp)\r
                 expect (false);\r
@@ -214,7 +214,7 @@ public:
             expectEquals (f2(), FunctionTestsHelpers::BigData::bigDataSum);\r
 \r
             std::function<int()> f3 (fHeap);\r
-            ScopedPointer<std::function<int()>> fEmptyTmp (new std::function<int()>());\r
+            std::unique_ptr<std::function<int()>> fEmptyTmp (new std::function<int()>());\r
             f3 = static_cast<std::function<int()>&&> (*fEmptyTmp);\r
             fEmptyTmp.reset();\r
             if (f3)\r
index 807031d02be11e465c856fdd9b88bb11644c3c40..b4a830cf29795bba3ca1d68ae2ea3477700b41d8 100644 (file)
@@ -134,4 +134,24 @@ uint8  Uuid::getClockSeqAndReserved() const noexcept      { return uuid[8]; }
 uint8  Uuid::getClockSeqLow() const noexcept              { return uuid[9]; }\r
 uint64 Uuid::getNode() const noexcept                     { return (((uint64) ByteOrder::bigEndianShort (uuid + 10)) << 32) + ByteOrder::bigEndianInt (uuid + 12); }\r
 \r
+uint64 Uuid::hash() const noexcept\r
+{\r
+    uint64 result = 0;\r
+\r
+    for (auto n : uuid)\r
+        result = ((uint64) 101) * result + n;\r
+\r
+    return result;\r
+}\r
+\r
 } // namespace juce\r
+\r
+#if ! DOXYGEN\r
+namespace std\r
+{\r
+    template <> struct hash<juce::Uuid>\r
+    {\r
+        size_t operator() (const juce::Uuid& u) const noexcept   { return (size_t) u.hash(); }\r
+    };\r
+}\r
+#endif\r
index 08bb4da94e40c68b553083a9acfc522b0a4e320e..f15d6e8724e38024d7d6f786a41be02da8c018e4 100644 (file)
@@ -105,6 +105,9 @@ public:
     /** Returns the node section of the UUID. */\r
     uint64 getNode() const noexcept;\r
 \r
+    /** Returns a hash of the UUID. */\r
+    uint64 hash() const noexcept;\r
+\r
     //==============================================================================\r
     /** Returns a pointer to the internal binary representation of the ID.\r
 \r
diff --git a/modules/juce_core/native/java/AndroidCamera.java b/modules/juce_core/native/java/AndroidCamera.java
new file mode 100644 (file)
index 0000000..936e46d
--- /dev/null
@@ -0,0 +1,169 @@
+$$CameraApi21\r
+    //==============================================================================\r
+    public class CameraDeviceStateCallback  extends CameraDevice.StateCallback\r
+    {\r
+        private native void cameraDeviceStateClosed       (long host, CameraDevice camera);\r
+        private native void cameraDeviceStateDisconnected (long host, CameraDevice camera);\r
+        private native void cameraDeviceStateError        (long host, CameraDevice camera, int error);\r
+        private native void cameraDeviceStateOpened       (long host, CameraDevice camera);\r
+\r
+        CameraDeviceStateCallback (long hostToUse)\r
+        {\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onClosed (CameraDevice camera)\r
+        {\r
+            cameraDeviceStateClosed (host, camera);\r
+        }\r
+\r
+        @Override\r
+        public void onDisconnected (CameraDevice camera)\r
+        {\r
+            cameraDeviceStateDisconnected (host, camera);\r
+        }\r
+\r
+        @Override\r
+        public void onError (CameraDevice camera, int error)\r
+        {\r
+            cameraDeviceStateError (host, camera, error);\r
+        }\r
+\r
+        @Override\r
+        public void onOpened (CameraDevice camera)\r
+        {\r
+            cameraDeviceStateOpened (host, camera);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+    //==============================================================================\r
+    public class CameraCaptureSessionStateCallback  extends CameraCaptureSession.StateCallback\r
+    {\r
+        private native void cameraCaptureSessionActive          (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionClosed          (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionConfigured      (long host, CameraCaptureSession session);\r
+        private native void cameraCaptureSessionReady           (long host, CameraCaptureSession session);\r
+\r
+        CameraCaptureSessionStateCallback (long hostToUse)\r
+        {\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onActive (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionActive (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onClosed (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionClosed (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onConfigureFailed (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionConfigureFailed (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onConfigured (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionConfigured (host, session);\r
+        }\r
+\r
+        @Override\r
+        public void onReady (CameraCaptureSession session)\r
+        {\r
+            cameraCaptureSessionReady (host, session);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+    //==============================================================================\r
+    public class CameraCaptureSessionCaptureCallback    extends CameraCaptureSession.CaptureCallback\r
+    {\r
+        private native void cameraCaptureSessionCaptureCompleted  (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, TotalCaptureResult result);\r
+        private native void cameraCaptureSessionCaptureFailed     (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureFailure failure);\r
+        private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureResult partialResult);\r
+        private native void cameraCaptureSessionCaptureStarted    (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, long timestamp, long frameNumber);\r
+        private native void cameraCaptureSessionCaptureSequenceAborted   (long host, boolean isPreview, CameraCaptureSession session, int sequenceId);\r
+        private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber);\r
+\r
+        CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview)\r
+        {\r
+            host = hostToUse;\r
+            preview = shouldBePreview;\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request,\r
+                                        TotalCaptureResult result)\r
+        {\r
+            cameraCaptureSessionCaptureCompleted (host, preview, session, request, result);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure)\r
+        {\r
+            cameraCaptureSessionCaptureFailed (host, preview, session, request, failure);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request,\r
+                                         CaptureResult partialResult)\r
+        {\r
+            cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId)\r
+        {\r
+            cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber)\r
+        {\r
+            cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber);\r
+        }\r
+\r
+        @Override\r
+        public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp,\r
+                                      long frameNumber)\r
+        {\r
+            cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber);\r
+        }\r
+\r
+        private long host;\r
+        private boolean preview;\r
+    }\r
+\r
+    //==============================================================================\r
+    public class JuceOrientationEventListener    extends OrientationEventListener\r
+    {\r
+        private native void deviceOrientationChanged (long host, int orientation);\r
+\r
+        public JuceOrientationEventListener (long hostToUse, Context context, int rate)\r
+        {\r
+            super (context, rate);\r
+\r
+            host = hostToUse;\r
+        }\r
+\r
+        @Override\r
+        public void onOrientationChanged (int orientation)\r
+        {\r
+            deviceOrientationChanged (host, orientation);\r
+        }\r
+\r
+        private long host;\r
+    }\r
+\r
+CameraApi21$$\r
index eb2a50a3054c178c272653c0656e99377b0e3d87..4fdeac0d9d8e2171b5847977d96f0943d003d094 100644 (file)
@@ -30,6 +30,7 @@ import android.content.Intent;
 import android.content.res.Configuration;\r
 import android.content.pm.PackageInfo;\r
 import android.content.pm.PackageManager;\r
+$$JuceAndroidCameraImports$$       // If you get an error here, you need to re-save your project with the Projucer!\r
 import android.net.http.SslError;\r
 import android.net.Uri;\r
 import android.os.Bundle;\r
@@ -114,6 +115,7 @@ public class JuceAppActivity   extends $$JuceAppActivityBaseClass$$
     private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2;\r
     private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3;\r
     private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4;\r
+    private static final int JUCE_PERMISSIONS_CAMERA = 5;\r
 \r
     private static String getAndroidPermissionName (int permissionID)\r
     {\r
@@ -124,6 +126,7 @@ public class JuceAppActivity   extends $$JuceAppActivityBaseClass$$
                                                           // use string value as this is not defined in SDKs < 16\r
             case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE:  return "android.permission.READ_EXTERNAL_STORAGE";\r
             case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE;\r
+            case JUCE_PERMISSIONS_CAMERA:                 return Manifest.permission.CAMERA;\r
         }\r
 \r
         // unknown permission ID!\r
@@ -191,6 +194,7 @@ public class JuceAppActivity   extends $$JuceAppActivityBaseClass$$
         setVolumeControlStream (AudioManager.STREAM_MUSIC);\r
 \r
         permissionCallbackPtrMap = new HashMap<Integer, Long>();\r
+        appPausedResumedListeners = new HashMap<Long, AppPausedResumedListener>();\r
     }\r
 \r
     @Override\r
@@ -207,6 +211,11 @@ public class JuceAppActivity   extends $$JuceAppActivityBaseClass$$
     {\r
         suspendApp();\r
 \r
+        Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+        for (Long k : keys)\r
+            appPausedResumedListeners.get (k).appPaused();\r
+\r
         try\r
         {\r
             Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down\r
@@ -222,12 +231,10 @@ public class JuceAppActivity   extends $$JuceAppActivityBaseClass$$
         super.onResume();\r
         resumeApp();\r
 \r
-        // Ensure that navigation/status bar visibility is correctly restored.\r
-        for (int i = 0; i < viewHolder.getChildCount(); ++i)\r
-        {\r
-            if (viewHolder.getChildAt (i) instanceof ComponentPeerView)\r
-                ((ComponentPeerView) viewHolder.getChildAt (i)).appResumed();\r
-        }\r
+        Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+        for (Long k : keys)\r
+            appPausedResumedListeners.get (k).appResumed();\r
     }\r
 \r
     @Override\r
@@ -354,11 +361,14 @@ public class JuceAppActivity   extends $$JuceAppActivityBaseClass$$
     {\r
         ComponentPeerView v = new ComponentPeerView (this, opaque, host);\r
         viewHolder.addView (v);\r
+        addAppPausedResumedListener (v, host);\r
         return v;\r
     }\r
 \r
     public final void deleteView (ComponentPeerView view)\r
     {\r
+        removeAppPausedResumedListener (view, view.host);\r
+\r
         view.host = 0;\r
 \r
         ViewGroup group = (ViewGroup) (view.getParent());\r
@@ -576,9 +586,28 @@ public class JuceAppActivity   extends $$JuceAppActivityBaseClass$$
 \r
     public native void alertDismissed (long callback, int id);\r
 \r
+    //==============================================================================\r
+    public interface AppPausedResumedListener\r
+    {\r
+        void appPaused();\r
+        void appResumed();\r
+    }\r
+\r
+    private Map<Long, AppPausedResumedListener> appPausedResumedListeners;\r
+\r
+    public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+    {\r
+        appPausedResumedListeners.put (new Long (listenerHost), l);\r
+    }\r
+\r
+    public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+    {\r
+        appPausedResumedListeners.remove (new Long (listenerHost));\r
+    }\r
+\r
     //==============================================================================\r
     public final class ComponentPeerView extends ViewGroup\r
-                                         implements View.OnFocusChangeListener\r
+                                         implements View.OnFocusChangeListener, AppPausedResumedListener\r
     {\r
         public ComponentPeerView (Context context, boolean opaque_, long host)\r
         {\r
@@ -926,13 +955,25 @@ public class JuceAppActivity   extends $$JuceAppActivityBaseClass$$
         }\r
 \r
         //==============================================================================\r
+        private native void handleAppPaused (long host);\r
         private native void handleAppResumed (long host);\r
 \r
+        @Override\r
+        public void appPaused()\r
+        {\r
+            if (host == 0)\r
+                return;\r
+\r
+            handleAppPaused (host);\r
+        }\r
+\r
+        @Override\r
         public void appResumed()\r
         {\r
             if (host == 0)\r
                 return;\r
 \r
+            // Ensure that navigation/status bar visibility is correctly restored.\r
             handleAppResumed (host);\r
         }\r
     }\r
@@ -1569,6 +1610,8 @@ $$JuceAndroidWebViewNativeCode$$ // If you get an error here, you need to re-sav
         private final Object hostLock = new Object();\r
     }\r
 \r
+    $$JuceAndroidCameraCode$$ // If you get an error here, you need to re-save your project with the Projucer!\r
+\r
     //==============================================================================\r
     public static final String getLocaleValue (boolean isRegion)\r
     {\r
index 1b050b9440a6a1cbb7efe2bd1178a11fd24c5bf4..1324649685bdcd704884505c632a32491501922d 100644 (file)
@@ -163,39 +163,6 @@ private:
     }\r
 };\r
 \r
-//==============================================================================\r
-namespace\r
-{\r
-    inline String juceString (JNIEnv* env, jstring s)\r
-    {\r
-        if (s == 0)\r
-            return {};\r
-\r
-        const char* const utf8 = env->GetStringUTFChars (s, nullptr);\r
-        CharPointer_UTF8 utf8CP (utf8);\r
-        const String result (utf8CP);\r
-        env->ReleaseStringUTFChars (s, utf8);\r
-        return result;\r
-    }\r
-\r
-    inline String juceString (jstring s)\r
-    {\r
-        return juceString (getEnv(), s);\r
-    }\r
-\r
-    inline LocalRef<jstring> javaString (const String& s)\r
-    {\r
-        return LocalRef<jstring> (getEnv()->NewStringUTF (s.toUTF8()));\r
-    }\r
-\r
-    inline LocalRef<jstring> javaStringFromChar (const juce_wchar c)\r
-    {\r
-        char utf8[8] = { 0 };\r
-        CharPointer_UTF8 (utf8).write (c);\r
-        return LocalRef<jstring> (getEnv()->NewStringUTF (utf8));\r
-    }\r
-}\r
-\r
 //==============================================================================\r
 class JNIClassBase\r
 {\r
@@ -287,6 +254,7 @@ extern AndroidSystem android;
  METHOD (deleteView,                      "deleteView",                      "(L" JUCE_ANDROID_ACTIVITY_CLASSPATH "$ComponentPeerView;)V") \\r
  METHOD (createNativeSurfaceView,         "createNativeSurfaceView",         "(J)L" JUCE_ANDROID_ACTIVITY_CLASSPATH "$NativeSurfaceView;") \\r
  METHOD (finish,                          "finish",                          "()V") \\r
+ METHOD (getWindowManager,                "getWindowManager",                "()Landroid/view/WindowManager;") \\r
  METHOD (setRequestedOrientation,         "setRequestedOrientation",         "(I)V") \\r
  METHOD (getClipboardContent,             "getClipboardContent",             "()Ljava/lang/String;") \\r
  METHOD (setClipboardContent,             "setClipboardContent",             "(Ljava/lang/String;)V") \\r
@@ -329,14 +297,21 @@ extern AndroidSystem android;
  METHOD (startActivity,                   "startActivity",                   "(Landroid/content/Intent;)V") \\r
  METHOD (startActivityForResult,          "startActivityForResult",          "(Landroid/content/Intent;I)V") \\r
  METHOD (getContentResolver,              "getContentResolver",              "()Landroid/content/ContentResolver;") \\r
+ METHOD (addAppPausedResumedListener,     "addAppPausedResumedListener",     "(L" JUCE_ANDROID_ACTIVITY_CLASSPATH "$AppPausedResumedListener;J)V") \\r
+ METHOD (removeAppPausedResumedListener,  "removeAppPausedResumedListener",  "(L" JUCE_ANDROID_ACTIVITY_CLASSPATH "$AppPausedResumedListener;J)V")\r
 \r
 DECLARE_JNI_CLASS (JuceAppActivity, JUCE_ANDROID_ACTIVITY_CLASSPATH);\r
 #undef JNI_CLASS_MEMBERS\r
 \r
 //==============================================================================\r
 #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
-  STATICMETHOD (createBitmap, "createBitmap", "(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;") \\r
-  METHOD (setPixel, "setPixel", "(III)V")\r
+  STATICMETHOD (createBitmap,     "createBitmap", "(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;") \\r
+  STATICMETHOD (createBitmapFrom, "createBitmap", "(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;") \\r
+  METHOD (compress,  "compress",  "(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z") \\r
+  METHOD (getHeight, "getHeight", "()I") \\r
+  METHOD (getWidth,  "getWidth",  "()I") \\r
+  METHOD (recycle,   "recycle",   "()V") \\r
+  METHOD (setPixel,  "setPixel",  "(III)V")\r
 \r
 DECLARE_JNI_CLASS (AndroidBitmap, "android/graphics/Bitmap");\r
 #undef JNI_CLASS_MEMBERS\r
@@ -347,6 +322,12 @@ DECLARE_JNI_CLASS (AndroidBitmap, "android/graphics/Bitmap");
 DECLARE_JNI_CLASS (AndroidBitmapConfig, "android/graphics/Bitmap$Config");\r
 #undef JNI_CLASS_MEMBERS\r
 \r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+  STATICMETHOD (decodeByteArray, "decodeByteArray", "([BII)Landroid/graphics/Bitmap;")\r
+\r
+DECLARE_JNI_CLASS (AndroidBitmapFactory, "android/graphics/BitmapFactory");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
 #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
   STATICMETHOD (dumpReferenceTables, "dumpReferenceTables", "()V")\r
 \r
@@ -355,6 +336,31 @@ DECLARE_JNI_CLASS (AndroidBitmapConfig, "android/graphics/Bitmap$Config");
 \r
 #define JUCE_LOG_JNI_REFERENCES_TABLE getEnv()->CallStaticVoidMethod (AndroidDebug, AndroidDebug.dumpReferenceTables);\r
 \r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (getRotation, "getRotation", "()I")\r
+\r
+DECLARE_JNI_CLASS (AndroidDisplay, "android/view/Display");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+  METHOD (constructor,           "<init>",      "()V") \\r
+  METHOD (constructorWithLooper, "<init>",      "(Landroid/os/Looper;)V") \\r
+  METHOD (post,                  "post",        "(Ljava/lang/Runnable;)Z") \\r
+  METHOD (postDelayed,           "postDelayed", "(Ljava/lang/Runnable;J)Z") \\r
+\r
+DECLARE_JNI_CLASS (AndroidHandler, "android/os/Handler");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+  METHOD (constructor, "<init>",     "(Ljava/lang/String;)V") \\r
+  METHOD (getLooper,   "getLooper",  "()Landroid/os/Looper;") \\r
+  METHOD (join,        "join",       "()V") \\r
+  METHOD (quitSafely,  "quitSafely", "()Z") \\r
+  METHOD (start,       "start",      "()V")\r
+\r
+DECLARE_JNI_CLASS (AndroidHandlerThread, "android/os/HandlerThread");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
 #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
   STATICMETHOD (createChooser, "createChooser", "(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;") \\r
   METHOD (addCategory,                    "addCategory",    "(Ljava/lang/String;)Landroid/content/Intent;") \\r
@@ -382,8 +388,11 @@ DECLARE_JNI_CLASS (AndroidIntent, "android/content/Intent");
 #undef JNI_CLASS_MEMBERS\r
 \r
 #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
- METHOD (constructor,   "<init>",    "()V") \\r
- METHOD (setValues,     "setValues", "([F)V") \\r
+ METHOD (constructor,    "<init>",        "()V") \\r
+ METHOD (postRotate,     "postRotate",    "(FFF)Z") \\r
+ METHOD (postScale,      "postScale",     "(FFFF)Z") \\r
+ METHOD (postTranslate,  "postTranslate", "(FF)Z") \\r
+ METHOD (setValues,      "setValues",     "([F)V")\r
 \r
 DECLARE_JNI_CLASS (AndroidMatrix, "android/graphics/Matrix");\r
 #undef JNI_CLASS_MEMBERS\r
@@ -417,6 +426,12 @@ DECLARE_JNI_CLASS (AndroidPaint, "android/graphics/Paint");
 DECLARE_JNI_CLASS (AndroidPendingIntent, "android/app/PendingIntent");\r
 #undef JNI_CLASS_MEMBERS\r
 \r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+  METHOD (toString, "toString", "()Ljava/lang/String;")\r
+\r
+DECLARE_JNI_CLASS (AndroidRange, "android/util/Range");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
 #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
  METHOD (constructor,   "<init>",   "(IIII)V") \\r
  FIELD (left,           "left",     "I") \\r
@@ -424,7 +439,7 @@ DECLARE_JNI_CLASS (AndroidPendingIntent, "android/app/PendingIntent");
  FIELD (top,            "top",      "I") \\r
  FIELD (bottom,         "bottom",   "I") \\r
 \r
-DECLARE_JNI_CLASS (AndroidRectClass, "android/graphics/Rect");\r
+DECLARE_JNI_CLASS (AndroidRect, "android/graphics/Rect");\r
 #undef JNI_CLASS_MEMBERS\r
 \r
 #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
@@ -434,6 +449,13 @@ DECLARE_JNI_CLASS (AndroidRectClass, "android/graphics/Rect");
 DECLARE_JNI_CLASS (AndroidResources, "android/content/res/Resources")\r
 #undef JNI_CLASS_MEMBERS\r
 \r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+  METHOD (getHeight, "getHeight", "()I") \\r
+  METHOD (getWidth,  "getWidth",  "()I")\r
+\r
+DECLARE_JNI_CLASS (AndroidSize, "android/util/Size");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
 #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
   STATICMETHOD (parse, "parse", "(Ljava/lang/String;)Landroid/net/Uri;") \\r
   METHOD (toString, "toString", "()Ljava/lang/String;")\r
@@ -465,6 +487,12 @@ DECLARE_JNI_CLASS (AndroidView, "android/view/View");
 DECLARE_JNI_CLASS (AndroidViewGroup, "android/view/ViewGroup")\r
 #undef JNI_CLASS_MEMBERS\r
 \r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (getDefaultDisplay, "getDefaultDisplay", "()Landroid/view/Display;")\r
+\r
+DECLARE_JNI_CLASS (AndroidWindowManager, "android/view/WindowManager");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
 //==============================================================================\r
 #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
   METHOD (constructor, "<init>",   "(I)V") \\r
@@ -477,6 +505,7 @@ DECLARE_JNI_CLASS (JavaArrayList, "java/util/ArrayList");
 #undef JNI_CLASS_MEMBERS\r
 \r
 #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+  STATICMETHOD (valueOf, "valueOf", "(Z)Ljava/lang/Boolean;") \\r
   METHOD (booleanValue, "booleanValue", "()Z")\r
 \r
 DECLARE_JNI_CLASS (JavaBoolean, "java/lang/Boolean");\r
@@ -507,6 +536,13 @@ DECLARE_JNI_CLASS (JavaBoolean, "java/lang/Boolean");
 DECLARE_JNI_CLASS (JavaBundle, "android/os/Bundle");\r
 #undef JNI_CLASS_MEMBERS\r
 \r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+  METHOD (get,       "get",       "([B)Ljava/nio/ByteBuffer;") \\r
+  METHOD (remaining, "remaining", "()I")\r
+\r
+DECLARE_JNI_CLASS (JavaByteBuffer, "java/nio/ByteBuffer");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
 #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
   METHOD (toString, "toString", "()Ljava/lang/String;")\r
 \r
@@ -514,6 +550,7 @@ DECLARE_JNI_CLASS (JavaCharSequence, "java/lang/CharSequence");
 #undef JNI_CLASS_MEMBERS\r
 \r
 #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+  STATICMETHOD (forName, "forName", "(Ljava/lang/String;)Ljava/lang/Class;") \\r
   METHOD (getName,           "getName",           "()Ljava/lang/String;") \\r
   METHOD (getModifiers,      "getModifiers",      "()I")            \\r
   METHOD (isAnnotation,      "isAnnotation",      "()Z") \\r
@@ -571,7 +608,8 @@ DECLARE_JNI_CLASS (JavaHashMap, "java/util/HashMap");
 \r
 #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
   STATICMETHOD (parseInt, "parseInt", "(Ljava/lang/String;I)I") \\r
-  STATICMETHOD (valueOf,  "valueOf",  "(I)Ljava/lang/Integer;")\r
+  STATICMETHOD (valueOf,  "valueOf",  "(I)Ljava/lang/Integer;") \\r
+  METHOD (intValue, "intValue", "()I")\r
 \r
 DECLARE_JNI_CLASS (JavaInteger, "java/lang/Integer");\r
 #undef JNI_CLASS_MEMBERS\r
@@ -583,6 +621,13 @@ DECLARE_JNI_CLASS (JavaInteger, "java/lang/Integer");
 DECLARE_JNI_CLASS (JavaIterator, "java/util/Iterator");\r
 #undef JNI_CLASS_MEMBERS\r
 \r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+  METHOD (get,  "get",  "(I)Ljava/lang/Object;") \\r
+  METHOD (size, "size", "()I")\r
+\r
+DECLARE_JNI_CLASS (JavaList, "java/util/List");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
 #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
   METHOD (constructor, "<init>", "(J)V")\r
 \r
@@ -633,6 +678,71 @@ DECLARE_JNI_CLASS (JavaSet, "java/util/Set");
 DECLARE_JNI_CLASS (JavaString, "java/lang/String");\r
 #undef JNI_CLASS_MEMBERS\r
 \r
+//==============================================================================\r
+namespace\r
+{\r
+    inline String juceString (JNIEnv* env, jstring s)\r
+    {\r
+        if (s == 0)\r
+            return {};\r
+\r
+        const char* const utf8 = env->GetStringUTFChars (s, nullptr);\r
+        CharPointer_UTF8 utf8CP (utf8);\r
+        const String result (utf8CP);\r
+        env->ReleaseStringUTFChars (s, utf8);\r
+        return result;\r
+    }\r
+\r
+    inline String juceString (jstring s)\r
+    {\r
+        return juceString (getEnv(), s);\r
+    }\r
+\r
+    inline LocalRef<jstring> javaString (const String& s)\r
+    {\r
+        return LocalRef<jstring> (getEnv()->NewStringUTF (s.toUTF8()));\r
+    }\r
+\r
+    inline LocalRef<jstring> javaStringFromChar (const juce_wchar c)\r
+    {\r
+        char utf8[8] = { 0 };\r
+        CharPointer_UTF8 (utf8).write (c);\r
+        return LocalRef<jstring> (getEnv()->NewStringUTF (utf8));\r
+    }\r
+\r
+    inline LocalRef<jobjectArray> juceStringArrayToJava (const StringArray& juceArray)\r
+    {\r
+        auto* env = getEnv();\r
+\r
+        LocalRef<jobjectArray> result (env->NewObjectArray ((jsize) juceArray.size(),\r
+                                                            JavaString,\r
+                                                            javaString ("").get()));\r
+\r
+        for (int i = 0; i < juceArray.size(); ++i)\r
+            env->SetObjectArrayElement (result, i, javaString (juceArray [i]).get());\r
+\r
+        return result;\r
+    }\r
+\r
+    inline StringArray javaStringArrayToJuce (const LocalRef<jobjectArray>& javaArray)\r
+    {\r
+        if (javaArray.get() == nullptr)\r
+            return {};\r
+\r
+        auto* env = getEnv();\r
+\r
+        StringArray result;\r
+\r
+        for (int i = 0; i < env->GetArrayLength (javaArray.get()); ++i)\r
+        {\r
+            LocalRef<jstring> javaString ((jstring) env->GetObjectArrayElement (javaArray.get(), i));\r
+            result.add (juceString (javaString.get()));\r
+        }\r
+\r
+        return result;\r
+    }\r
+}\r
+\r
 //==============================================================================\r
 class AndroidInterfaceImplementer;\r
 \r
index 3b94618003160dea60da6f4ca32925aa552321d9..339f014064f19cf6a47d5a4ce1050762b5a70352 100644 (file)
@@ -647,7 +647,7 @@ HashMap<String, BackgroundDownloadTask*, DefaultHashFunctions, CriticalSection>
 \r
 URL::DownloadTask* URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool usePostRequest)\r
 {\r
-    ScopedPointer<BackgroundDownloadTask> downloadTask = new BackgroundDownloadTask (*this, targetLocation, extraHeaders, listener, usePostRequest);\r
+    std::unique_ptr<BackgroundDownloadTask> downloadTask (new BackgroundDownloadTask (*this, targetLocation, extraHeaders, listener, usePostRequest));\r
 \r
     if (downloadTask->initOK() && downloadTask->connect())\r
         return downloadTask.release();\r
@@ -1076,7 +1076,7 @@ public:
 private:\r
     WebInputStream& owner;\r
     URL url;\r
-    ScopedPointer<URLConnectionState> connection;\r
+    std::unique_ptr<URLConnectionState> connection;\r
     String headers;\r
     MemoryBlock postData;\r
     int64 position = 0;\r
index b65a7a3c708d1e5f9347364e8361dd27b6e6d06e..30d48007868dc993c8a120f60a944d6572597fdb 100644 (file)
@@ -236,6 +236,15 @@ struct NSObjectRetainer
     ObjectType* object;\r
 };\r
 \r
+//==============================================================================\r
+struct NSObjectDeleter\r
+{\r
+    void operator()(NSObject* object) const\r
+    {\r
+        [object release];\r
+    }\r
+};\r
+\r
 //==============================================================================\r
 template <typename SuperclassType>\r
 struct ObjCClass\r
index 8df4d7d81b13ac26e3fdb93cc91f8638a522cabf..e063c0737b6e12d68db8ed535006491063b1dbc0 100644 (file)
@@ -29,11 +29,7 @@ public:
     Pimpl (const String& pipePath, bool createPipe)\r
        : pipeInName  (pipePath + "_in"),\r
          pipeOutName (pipePath + "_out"),\r
-         pipeIn (-1), pipeOut (-1),\r
-         createdFifoIn (false),\r
-         createdFifoOut (false),\r
-         createdPipe (createPipe),\r
-         stopReadOperation (false)\r
+         createdPipe (createPipe)\r
     {\r
         signal (SIGPIPE, signalHandler);\r
         juce_siginterrupt (SIGPIPE, 1);\r
@@ -53,7 +49,7 @@ public:
 \r
     int read (char* destBuffer, int maxBytesToRead, int timeOutMilliseconds)\r
     {\r
-        const uint32 timeoutEnd = getTimeoutEnd (timeOutMilliseconds);\r
+        auto timeoutEnd = getTimeoutEnd (timeOutMilliseconds);\r
 \r
         if (pipeIn == -1)\r
         {\r
@@ -67,12 +63,12 @@ public:
 \r
         while (bytesRead < maxBytesToRead)\r
         {\r
-            const int bytesThisTime = maxBytesToRead - bytesRead;\r
-            const int numRead = (int) ::read (pipeIn, destBuffer, (size_t) bytesThisTime);\r
+            auto bytesThisTime = maxBytesToRead - bytesRead;\r
+            auto numRead = (int) ::read (pipeIn, destBuffer, (size_t) bytesThisTime);\r
 \r
             if (numRead <= 0)\r
             {\r
-                if (errno != EWOULDBLOCK || stopReadOperation || hasExpired (timeoutEnd))\r
+                if (errno != EWOULDBLOCK || stopReadOperation.load() || hasExpired (timeoutEnd))\r
                     return -1;\r
 \r
                 const int maxWaitingTime = 30;\r
@@ -91,7 +87,7 @@ public:
 \r
     int write (const char* sourceBuffer, int numBytesToWrite, int timeOutMilliseconds)\r
     {\r
-        const uint32 timeoutEnd = getTimeoutEnd (timeOutMilliseconds);\r
+        auto timeoutEnd = getTimeoutEnd (timeOutMilliseconds);\r
 \r
         if (pipeOut == -1)\r
         {\r
@@ -105,8 +101,8 @@ public:
 \r
         while (bytesWritten < numBytesToWrite && ! hasExpired (timeoutEnd))\r
         {\r
-            const int bytesThisTime = numBytesToWrite - bytesWritten;\r
-            const int numWritten = (int) ::write (pipeOut, sourceBuffer, (size_t) bytesThisTime);\r
+            auto bytesThisTime = numBytesToWrite - bytesWritten;\r
+            auto numWritten = (int) ::write (pipeOut, sourceBuffer, (size_t) bytesThisTime);\r
 \r
             if (numWritten <= 0)\r
                 return -1;\r
@@ -132,39 +128,39 @@ public:
     }\r
 \r
     const String pipeInName, pipeOutName;\r
-    int pipeIn, pipeOut;\r
-    bool createdFifoIn, createdFifoOut;\r
+    int pipeIn = -1, pipeOut = -1;\r
+    bool createdFifoIn = false, createdFifoOut = false;\r
 \r
     const bool createdPipe;\r
-    bool stopReadOperation;\r
+    std::atomic<bool> stopReadOperation { false };\r
 \r
 private:\r
     static void signalHandler (int) {}\r
 \r
-    static uint32 getTimeoutEnd (const int timeOutMilliseconds)\r
+    static uint32 getTimeoutEnd (int timeOutMilliseconds)\r
     {\r
         return timeOutMilliseconds >= 0 ? Time::getMillisecondCounter() + (uint32) timeOutMilliseconds : 0;\r
     }\r
 \r
-    static bool hasExpired (const uint32 timeoutEnd)\r
+    static bool hasExpired (uint32 timeoutEnd)\r
     {\r
         return timeoutEnd != 0 && Time::getMillisecondCounter() >= timeoutEnd;\r
     }\r
 \r
-    int openPipe (const String& name, int flags, const uint32 timeoutEnd)\r
+    int openPipe (const String& name, int flags, uint32 timeoutEnd)\r
     {\r
         for (;;)\r
         {\r
-            const int p = ::open (name.toUTF8(), flags);\r
+            auto p = ::open (name.toUTF8(), flags);\r
 \r
-            if (p != -1 || hasExpired (timeoutEnd) || stopReadOperation)\r
+            if (p != -1 || hasExpired (timeoutEnd) || stopReadOperation.load())\r
                 return p;\r
 \r
             Thread::sleep (2);\r
         }\r
     }\r
 \r
-    static void waitForInput (const int handle, const int timeoutMsecs) noexcept\r
+    static void waitForInput (int handle, int timeoutMsecs) noexcept\r
     {\r
         struct timeval timeout;\r
         timeout.tv_sec = timeoutMsecs / 1000;\r
@@ -195,13 +191,13 @@ void NamedPipe::close()
     }\r
 }\r
 \r
-bool NamedPipe::openInternal (const String& pipeName, const bool createPipe, bool mustNotExist)\r
+bool NamedPipe::openInternal (const String& pipeName, bool createPipe, bool mustNotExist)\r
 {\r
    #if JUCE_IOS\r
     pimpl.reset (new Pimpl (File::getSpecialLocation (File::tempDirectory)\r
                              .getChildFile (File::createLegalFileName (pipeName)).getFullPathName(), createPipe));\r
    #else\r
-    String file (pipeName);\r
+    auto file = pipeName;\r
 \r
     if (! File::isAbsolutePath (file))\r
         file = "/tmp/" + File::createLegalFileName (file);\r
index 1ca77c6b3b3fa211e178e776d313078618b2db91..b10a127938fa4e788e543658de56ecaeaa379490 100644 (file)
@@ -41,7 +41,7 @@ bool CriticalSection::tryEnter() const noexcept     { return pthread_mutex_trylo
 void CriticalSection::exit() const noexcept         { pthread_mutex_unlock (&lock); }\r
 \r
 //==============================================================================\r
-WaitableEvent::WaitableEvent (const bool useManualReset) noexcept\r
+WaitableEvent::WaitableEvent (bool useManualReset) noexcept\r
     : triggered (false), manualReset (useManualReset)\r
 {\r
     pthread_cond_init (&condition, 0);\r
@@ -61,7 +61,7 @@ WaitableEvent::~WaitableEvent() noexcept
     pthread_mutex_destroy (&mutex);\r
 }\r
 \r
-bool WaitableEvent::wait (const int timeOutMillisecs) const noexcept\r
+bool WaitableEvent::wait (int timeOutMillisecs) const noexcept\r
 {\r
     pthread_mutex_lock (&mutex);\r
 \r
@@ -152,12 +152,13 @@ void JUCE_CALLTYPE Process::terminate()
 bool Process::setMaxNumberOfFileHandles (int newMaxNumber) noexcept\r
 {\r
     rlimit lim;\r
+\r
     if (getrlimit (RLIMIT_NOFILE, &lim) == 0)\r
     {\r
         if (newMaxNumber <= 0 && lim.rlim_cur == RLIM_INFINITY && lim.rlim_max == RLIM_INFINITY)\r
             return true;\r
 \r
-        if (lim.rlim_cur >= (rlim_t) newMaxNumber)\r
+        if (newMaxNumber > 0 && lim.rlim_cur >= (rlim_t) newMaxNumber)\r
             return true;\r
     }\r
 \r
@@ -201,8 +202,8 @@ File File::getCurrentWorkingDirectory()
 {\r
     HeapBlock<char> heapBuffer;\r
 \r
-    char localBuffer [1024];\r
-    char* cwd = getcwd (localBuffer, sizeof (localBuffer) - 1);\r
+    char localBuffer[1024];\r
+    auto cwd = getcwd (localBuffer, sizeof (localBuffer) - 1);\r
     size_t bufferSize = 4096;\r
 \r
     while (cwd == nullptr && errno == ERANGE)\r
@@ -221,9 +222,9 @@ bool File::setAsCurrentWorkingDirectory() const
 }\r
 \r
 #if JUCE_ANDROID\r
typedef unsigned long juce_sigactionflags_type;\r
using juce_sigactionflags_type = unsigned long;\r
 #else\r
typedef int juce_sigactionflags_type;\r
using juce_sigactionflags_type = int;\r
 #endif\r
 \r
 //==============================================================================\r
@@ -245,11 +246,11 @@ int juce_siginterrupt (int sig, int flag)
 namespace\r
 {\r
    #if JUCE_LINUX || (JUCE_IOS && ! __DARWIN_ONLY_64_BIT_INO_T) // (this iOS stuff is to avoid a simulator bug)\r
-    typedef struct stat64 juce_statStruct;\r
-    #define JUCE_STAT     stat64\r
+    using juce_statStruct = struct stat64;\r
+    #define JUCE_STAT  stat64\r
    #else\r
-    typedef struct stat   juce_statStruct;\r
-    #define JUCE_STAT     stat\r
+    using juce_statStruct = struct stat;\r
+    #define JUCE_STAT  stat\r
    #endif\r
 \r
     bool juce_stat (const String& fileName, juce_statStruct& info)\r
@@ -278,8 +279,8 @@ namespace
     static int64 getCreationTime (const juce_statStruct& s) noexcept     { return (int64) s.st_ctime; }\r
    #endif\r
 \r
-    void updateStatInfoForFile (const String& path, bool* const isDir, int64* const fileSize,\r
-                                Time* const modTime, Time* const creationTime, bool* const isReadOnly)\r
+    void updateStatInfoForFile (const String& path, bool* isDir, int64* fileSize,\r
+                                Time* modTime, Time* creationTime, bool* isReadOnly)\r
     {\r
         if (isDir != nullptr || fileSize != nullptr || modTime != nullptr || creationTime != nullptr)\r
         {\r
@@ -344,7 +345,7 @@ uint64 File::getFileIdentifier() const
 static bool hasEffectiveRootFilePermissions()\r
 {\r
    #if JUCE_LINUX\r
-    return (geteuid() == 0);\r
+    return geteuid() == 0;\r
    #else\r
     return false;\r
    #endif\r
@@ -475,7 +476,7 @@ int64 juce_fileSetPosition (void* handle, int64 pos)
 \r
 void FileInputStream::openHandle()\r
 {\r
-    const int f = open (file.getFullPathName().toUTF8(), O_RDONLY, 00644);\r
+    auto f = open (file.getFullPathName().toUTF8(), O_RDONLY, 00644);\r
 \r
     if (f != -1)\r
         fileHandle = fdToVoidPointer (f);\r
@@ -489,7 +490,7 @@ FileInputStream::~FileInputStream()
         close (getFD (fileHandle));\r
 }\r
 \r
-size_t FileInputStream::readInternal (void* const buffer, const size_t numBytes)\r
+size_t FileInputStream::readInternal (void* buffer, size_t numBytes)\r
 {\r
     ssize_t result = 0;\r
 \r
@@ -512,7 +513,7 @@ void FileOutputStream::openHandle()
 {\r
     if (file.exists())\r
     {\r
-        const int f = open (file.getFullPathName().toUTF8(), O_RDWR, 00644);\r
+        auto f = open (file.getFullPathName().toUTF8(), O_RDWR, 00644);\r
 \r
         if (f != -1)\r
         {\r
@@ -535,7 +536,7 @@ void FileOutputStream::openHandle()
     }\r
     else\r
     {\r
-        const int f = open (file.getFullPathName().toUTF8(), O_RDWR + O_CREAT, 00644);\r
+        auto f = open (file.getFullPathName().toUTF8(), O_RDWR + O_CREAT, 00644);\r
 \r
         if (f != -1)\r
             fileHandle = fdToVoidPointer (f);\r
@@ -553,19 +554,17 @@ void FileOutputStream::closeHandle()
     }\r
 }\r
 \r
-ssize_t FileOutputStream::writeInternal (const void* const data, const size_t numBytes)\r
+ssize_t FileOutputStream::writeInternal (const void* data, size_t numBytes)\r
 {\r
-    ssize_t result = 0;\r
+    if (fileHandle == 0)\r
+        return 0;\r
 \r
-    if (fileHandle != 0)\r
-    {\r
-        result = ::write (getFD (fileHandle), data, numBytes);\r
+    auto result = ::write (getFD (fileHandle), data, numBytes);\r
 \r
-        if (result == -1)\r
-            status = getResultForErrno();\r
-    }\r
+    if (result == -1)\r
+        status = getResultForErrno();\r
 \r
-    return result;\r
+    return (ssize_t) result;\r
 }\r
 \r
 #ifndef JUCE_ANDROID\r
@@ -588,7 +587,7 @@ Result FileOutputStream::truncate()
 //==============================================================================\r
 String SystemStats::getEnvironmentVariable (const String& name, const String& defaultValue)\r
 {\r
-    if (const char* s = ::getenv (name.toUTF8()))\r
+    if (auto s = ::getenv (name.toUTF8()))\r
         return String::fromUTF8 (s);\r
 \r
     return defaultValue;\r
@@ -601,7 +600,7 @@ void MemoryMappedFile::openInternal (const File& file, AccessMode mode, bool exc
 \r
     if (range.getStart() > 0)\r
     {\r
-        const long pageSize = sysconf (_SC_PAGE_SIZE);\r
+        auto pageSize = sysconf (_SC_PAGE_SIZE);\r
         range.setStart (range.getStart() - (range.getStart() % pageSize));\r
     }\r
 \r
@@ -649,7 +648,7 @@ File juce_getExecutableFile()
         {\r
             Dl_info exeInfo;\r
 \r
-            void* localSymbol = (void*) juce_getExecutableFile;\r
+            auto localSymbol = (void*) juce_getExecutableFile;\r
             dladdr (localSymbol, &exeInfo);\r
             return CharPointer_UTF8 (exeInfo.dli_fname);\r
         }\r
@@ -664,6 +663,7 @@ File juce_getExecutableFile()
 int64 File::getBytesFreeOnVolume() const\r
 {\r
     struct statfs buf;\r
+\r
     if (juce_doStatFS (*this, buf))\r
         return (int64) buf.f_bsize * (int64) buf.f_bavail; // Note: this returns space available to non-super user\r
 \r
@@ -673,6 +673,7 @@ int64 File::getBytesFreeOnVolume() const
 int64 File::getVolumeTotalSize() const\r
 {\r
     struct statfs buf;\r
+\r
     if (juce_doStatFS (*this, buf))\r
         return (int64) buf.f_bsize * (int64) buf.f_blocks;\r
 \r
@@ -686,11 +687,11 @@ String File::getVolumeLabel() const
     {\r
         u_int32_t       length;\r
         attrreference_t mountPointRef;\r
-        char            mountPointSpace [MAXPATHLEN];\r
+        char            mountPointSpace[MAXPATHLEN];\r
     } attrBuf;\r
 \r
     struct attrlist attrList;\r
-    zerostruct (attrList); // (can't use "= { 0 }" on this object because it's typedef'ed as a C struct)\r
+    zerostruct (attrList); // (can't use "= {}" on this object because it's a C struct)\r
     attrList.bitmapcount = ATTR_BIT_MAP_COUNT;\r
     attrList.volattr = ATTR_VOL_INFO | ATTR_VOL_NAME;\r
 \r
@@ -702,7 +703,7 @@ String File::getVolumeLabel() const
             return String::fromUTF8 (((const char*) &attrBuf.mountPointRef) + attrBuf.mountPointRef.attr_dataoffset,\r
                                      (int) attrBuf.mountPointRef.attr_length);\r
 \r
-        const File parent (f.getParentDirectory());\r
+        auto parent = f.getParentDirectory();\r
 \r
         if (f == parent)\r
             break;\r
@@ -719,7 +720,7 @@ int File::getVolumeSerialNumber() const
     int result = 0;\r
 /*    int fd = open (getFullPathName().toUTF8(), O_RDONLY | O_NONBLOCK);\r
 \r
-    char info [512];\r
+    char info[512];\r
 \r
     #ifndef HDIO_GET_IDENTITY\r
      #define HDIO_GET_IDENTITY 0x030d\r
@@ -748,12 +749,12 @@ String juce_getOutputFromCommand (const String&);
 String juce_getOutputFromCommand (const String& command)\r
 {\r
     // slight bodge here, as we just pipe the output into a temp file and read it...\r
-    const File tempFile (File::getSpecialLocation (File::tempDirectory)\r
-                           .getNonexistentChildFile (String::toHexString (Random::getSystemRandom().nextInt()), ".tmp", false));\r
+    auto tempFile = File::getSpecialLocation (File::tempDirectory)\r
+                      .getNonexistentChildFile (String::toHexString (Random::getSystemRandom().nextInt()), ".tmp", false);\r
 \r
     juce_runSystemCommand (command + " > " + tempFile.getFullPathName());\r
 \r
-    String result (tempFile.loadFileAsString());\r
+    auto result = tempFile.loadFileAsString();\r
     tempFile.deleteFile();\r
     return result;\r
 }\r
@@ -764,12 +765,9 @@ String juce_getOutputFromCommand (const String& command)
 class InterProcessLock::Pimpl\r
 {\r
 public:\r
-    Pimpl (const String&, int)\r
-        : handle (1), refCount (1) // On iOS just fake success..\r
-    {\r
-    }\r
+    Pimpl (const String&, int)  {}\r
 \r
-    int handle, refCount;\r
+    int handle = 1, refCount = 1;  // On iOS just fake success..\r
 };\r
 \r
 #else\r
@@ -777,8 +775,7 @@ public:
 class InterProcessLock::Pimpl\r
 {\r
 public:\r
-    Pimpl (const String& lockName, const int timeOutMillisecs)\r
-        : handle (0), refCount (1)\r
+    Pimpl (const String& lockName, int timeOutMillisecs)\r
     {\r
        #if JUCE_MAC\r
         if (! createLockFile (File ("~/Library/Caches/com.juce.locks").getChildFile (lockName), timeOutMillisecs))\r
@@ -787,6 +784,7 @@ public:
 \r
        #else\r
         File tempFolder ("/var/tmp");\r
+\r
         if (! tempFolder.isDirectory())\r
             tempFolder = "/tmp";\r
 \r
@@ -799,7 +797,7 @@ public:
         closeFile();\r
     }\r
 \r
-    bool createLockFile (const File& file, const int timeOutMillisecs)\r
+    bool createLockFile (const File& file, int timeOutMillisecs)\r
     {\r
         file.create();\r
         handle = open (file.getFullPathName().toUTF8(), O_RDWR);\r
@@ -812,16 +810,16 @@ public:
             fl.l_whence = SEEK_SET;\r
             fl.l_type = F_WRLCK;\r
 \r
-            const int64 endTime = Time::currentTimeMillis() + timeOutMillisecs;\r
+            auto endTime = Time::currentTimeMillis() + timeOutMillisecs;\r
 \r
             for (;;)\r
             {\r
-                const int result = fcntl (handle, F_SETLK, &fl);\r
+                auto result = fcntl (handle, F_SETLK, &fl);\r
 \r
                 if (result >= 0)\r
                     return true;\r
 \r
-                const int error = errno;\r
+                auto error = errno;\r
 \r
                 if (error != EINTR)\r
                 {\r
@@ -859,7 +857,7 @@ public:
         }\r
     }\r
 \r
-    int handle, refCount;\r
+    int handle = 0, refCount = 1;\r
 };\r
 #endif\r
 \r
@@ -871,7 +869,7 @@ InterProcessLock::~InterProcessLock()
 {\r
 }\r
 \r
-bool InterProcessLock::enter (const int timeOutMillisecs)\r
+bool InterProcessLock::enter (int timeOutMillisecs)\r
 {\r
     const ScopedLock sl (lock);\r
 \r
@@ -964,7 +962,6 @@ void Thread::launchThread()
     if (pthread_attr_init (&attr) == 0)\r
     {\r
         attrPtr = &attr;\r
-\r
         pthread_attr_setstacksize (attrPtr, threadStackSize);\r
     }\r
 \r
@@ -1054,7 +1051,7 @@ void JUCE_CALLTYPE Thread::yield()
  #define SUPPORT_AFFINITIES 1\r
 #endif\r
 \r
-void JUCE_CALLTYPE Thread::setCurrentThreadAffinityMask (const uint32 affinityMask)\r
+void JUCE_CALLTYPE Thread::setCurrentThreadAffinityMask (uint32 affinityMask)\r
 {\r
    #if SUPPORT_AFFINITIES\r
     cpu_set_t affinity;\r
@@ -1109,7 +1106,7 @@ void* DynamicLibrary::getFunction (const String& functionName) noexcept
 \r
 \r
 //==============================================================================\r
-static inline String readPosixConfigFileValue (const char* file, const char* const key)\r
+static inline String readPosixConfigFileValue (const char* file, const char* key)\r
 {\r
     StringArray lines;\r
     File (file).readLines (lines);\r
@@ -1211,7 +1208,7 @@ public:
          #error // some crazy 3rd party headers (e.g. zlib) define this function as NULL!\r
         #endif\r
 \r
-        if (childPID != 0)\r
+        if (readHandle == nullptr && childPID != 0)\r
             readHandle = fdopen (pipeHandle, "r");\r
 \r
         if (readHandle != nullptr)\r
@@ -1267,7 +1264,7 @@ bool ChildProcess::start (const StringArray& args, int streamFlags)
 //==============================================================================\r
 struct HighResolutionTimer::Pimpl\r
 {\r
-    Pimpl (HighResolutionTimer& t)  : owner (t), thread (0), destroyThread (false), isRunning (false)\r
+    Pimpl (HighResolutionTimer& t)  : owner (t)\r
     {\r
         pthread_condattr_t attr;\r
         pthread_condattr_init (&attr);\r
@@ -1338,15 +1335,13 @@ struct HighResolutionTimer::Pimpl
     }\r
 \r
     HighResolutionTimer& owner;\r
-    int volatile periodMs;\r
+    std::atomic<int> periodMs;\r
 \r
 private:\r
-    pthread_t thread;\r
+    pthread_t thread = {};\r
     pthread_cond_t stopCond;\r
     pthread_mutex_t timerMutex;\r
-\r
-    bool volatile destroyThread;\r
-    bool volatile isRunning;\r
+    std::atomic<bool> destroyThread { false }, isRunning { false };\r
 \r
     static void* timerThread (void* param)\r
     {\r
@@ -1369,7 +1364,7 @@ private:
 \r
     void timerThread()\r
     {\r
-        int lastPeriod = periodMs;\r
+        auto lastPeriod = periodMs.load();\r
         Clock clock (lastPeriod);\r
 \r
         pthread_mutex_lock (&timerMutex);\r
@@ -1385,15 +1380,16 @@ private:
             if (isRunning)\r
                 owner.hiResTimerCallback();\r
 \r
-            if (lastPeriod != periodMs)\r
+            auto newPeriod = periodMs.load();\r
+\r
+            if (lastPeriod != newPeriod)\r
             {\r
-                lastPeriod = periodMs;\r
+                lastPeriod = newPeriod;\r
                 clock = Clock (lastPeriod);\r
             }\r
         }\r
 \r
         periodMs = 0;\r
-\r
         pthread_mutex_unlock (&timerMutex);\r
         pthread_exit (nullptr);\r
     }\r
@@ -1421,7 +1417,7 @@ private:
         uint64_t time, delta;\r
         mach_timebase_info_data_t timebase;\r
 \r
-        bool hasExpired(struct timespec& time_left) noexcept\r
+        bool hasExpired (struct timespec& time_left) noexcept\r
         {\r
             uint64_t now = mach_absolute_time();\r
 \r
@@ -1457,11 +1453,11 @@ private:
 \r
         uint64 time, delta;\r
 \r
-        bool hasExpired(struct timespec& expiryTime) noexcept\r
+        bool hasExpired (struct timespec& expiryTime) noexcept\r
         {\r
             struct timespec t;\r
             clock_gettime (CLOCK_MONOTONIC, &t);\r
-            uint64 now = (uint64) (1000000000 * (int64) t.tv_sec + (int64) t.tv_nsec);\r
+            auto now = (uint64) (1000000000 * (int64) t.tv_sec + (int64) t.tv_nsec);\r
 \r
             if (now < time)\r
             {\r
index 42284518634035540c6277c63a267002698a7348..aa826d017df218ac9e95bde3671c3cd1e1ac1977 100644 (file)
@@ -509,7 +509,7 @@ private:
 \r
 bool ChildProcess::start (const String& command, int streamFlags)\r
 {\r
-    activeProcess = new ActiveProcess (command, streamFlags);\r
+    activeProcess.reset (new ActiveProcess (command, streamFlags));\r
 \r
     if (! activeProcess->ok)\r
         activeProcess = nullptr;\r
index 9dbd7680596ed7f93bf474bf66d37006a29e5fd1..67c2cfad9b0c964e04ec56d157e579363e8d0779 100644 (file)
@@ -88,7 +88,7 @@ public:
 private:\r
     //==============================================================================\r
     JUCE_PUBLIC_IN_DLL_BUILD (class Pimpl)\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
     String currentPipeName;\r
     ReadWriteLock lock;\r
 \r
index 4ffcf49f904e32c655ffdc4a26215b7f5c86e0bd..b800fe8e2b02a0a45430eb8641fc1f08a3919c8f 100644 (file)
@@ -94,10 +94,10 @@ namespace SocketHelpers
                                : setOption (handle, IPPROTO_TCP, TCP_NODELAY, (int) 1));\r
     }\r
 \r
-    static void closeSocket (volatile int& handle, CriticalSection& readLock,\r
-                             bool isListener, int portNumber, bool& connected) noexcept\r
+    static void closeSocket (std::atomic<int>& handle, CriticalSection& readLock,\r
+                             bool isListener, int portNumber, std::atomic<bool>& connected) noexcept\r
     {\r
-        const SocketHandle h = handle;\r
+        const SocketHandle h = handle.load();\r
         handle = -1;\r
 \r
        #if JUCE_WINDOWS\r
@@ -187,8 +187,8 @@ namespace SocketHelpers
     }\r
 \r
     static int readSocket (SocketHandle handle,\r
-                           void* const destBuffer, const int maxBytesToRead,\r
-                           bool volatile& connected,\r
+                           void* destBuffer, int maxBytesToRead,\r
+                           std::atomic<bool>& connected,\r
                            bool blockUntilSpecifiedAmountHasArrived,\r
                            CriticalSection& readLock,\r
                            String* senderIP = nullptr,\r
@@ -242,8 +242,8 @@ namespace SocketHelpers
         return (int) bytesRead;\r
     }\r
 \r
-    static int waitForReadiness (const volatile int& handle, CriticalSection& readLock,\r
-                                 const bool forReading, const int timeoutMsecs) noexcept\r
+    static int waitForReadiness (std::atomic<int>& handle, CriticalSection& readLock,\r
+                                 bool forReading, int timeoutMsecs) noexcept\r
     {\r
         // avoid race-condition\r
         CriticalSection::ScopedTryLockType lock (readLock);\r
@@ -251,7 +251,7 @@ namespace SocketHelpers
         if (! lock.isLocked())\r
             return -1;\r
 \r
-        int h = handle;\r
+        int h = handle.load();\r
 \r
         struct timeval timeout;\r
         struct timeval* timeoutp;\r
@@ -293,7 +293,7 @@ namespace SocketHelpers
        #endif\r
 \r
         // we are closing\r
-        if (handle < 0)\r
+        if (handle.load() < 0)\r
             return -1;\r
 \r
         {\r
@@ -308,7 +308,7 @@ namespace SocketHelpers
         return FD_ISSET (h, forReading ? &rset : &wset) ? 1 : 0;\r
     }\r
 \r
-    static bool setSocketBlockingState (SocketHandle handle, const bool shouldBlock) noexcept\r
+    static bool setSocketBlockingState (SocketHandle handle, bool shouldBlock) noexcept\r
     {\r
        #if JUCE_WINDOWS\r
         u_long nonBlocking = shouldBlock ? 0 : (u_long) 1;\r
@@ -328,7 +328,7 @@ namespace SocketHelpers
        #endif\r
     }\r
 \r
-    static addrinfo* getAddressInfo (const bool isDatagram, const String& hostName, int portNumber)\r
+    static addrinfo* getAddressInfo (bool isDatagram, const String& hostName, int portNumber)\r
     {\r
         struct addrinfo hints;\r
         zerostruct (hints);\r
@@ -345,11 +345,11 @@ namespace SocketHelpers
         return nullptr;\r
     }\r
 \r
-    static bool connectSocket (int volatile& handle,\r
+    static bool connectSocket (std::atomic<int>& handle,\r
                                CriticalSection& readLock,\r
                                const String& hostName,\r
-                               const int portNumber,\r
-                               const int timeOutMillisecs) noexcept\r
+                               int portNumber,\r
+                               int timeOutMillisecs) noexcept\r
     {\r
         bool success = false;\r
 \r
@@ -373,7 +373,7 @@ namespace SocketHelpers
                         if (errno == EINPROGRESS)\r
                        #endif\r
                         {\r
-                            const volatile int cvHandle = (int) newHandle;\r
+                            std::atomic<int> cvHandle { (int) newHandle };\r
 \r
                             if (waitForReadiness (cvHandle, readLock, false, timeOutMillisecs) == 1)\r
                                 success = true;\r
@@ -454,14 +454,14 @@ StreamingSocket::~StreamingSocket()
 }\r
 \r
 //==============================================================================\r
-int StreamingSocket::read (void* destBuffer, const int maxBytesToRead, bool shouldBlock)\r
+int StreamingSocket::read (void* destBuffer, int maxBytesToRead, bool shouldBlock)\r
 {\r
     return (connected && ! isListener) ? SocketHelpers::readSocket (handle, destBuffer, maxBytesToRead,\r
                                                                     connected, shouldBlock, readLock)\r
                                        : -1;\r
 }\r
 \r
-int StreamingSocket::write (const void* sourceBuffer, const int numBytesToWrite)\r
+int StreamingSocket::write (const void* sourceBuffer, int numBytesToWrite)\r
 {\r
     if (isListener || ! connected)\r
         return -1;\r
@@ -470,20 +470,19 @@ int StreamingSocket::write (const void* sourceBuffer, const int numBytesToWrite)
 }\r
 \r
 //==============================================================================\r
-int StreamingSocket::waitUntilReady (const bool readyForReading,\r
-                                     const int timeoutMsecs) const\r
+int StreamingSocket::waitUntilReady (bool readyForReading, int timeoutMsecs)\r
 {\r
     return connected ? SocketHelpers::waitForReadiness (handle, readLock, readyForReading, timeoutMsecs)\r
                      : -1;\r
 }\r
 \r
 //==============================================================================\r
-bool StreamingSocket::bindToPort (const int port)\r
+bool StreamingSocket::bindToPort (int port)\r
 {\r
     return bindToPort (port, String());\r
 }\r
 \r
-bool StreamingSocket::bindToPort (const int port, const String& addr)\r
+bool StreamingSocket::bindToPort (int port, const String& addr)\r
 {\r
     jassert (SocketHelpers::isValidPortNumber (port));\r
 \r
@@ -495,9 +494,7 @@ int StreamingSocket::getBoundPort() const noexcept
     return SocketHelpers::getBoundPort (handle);\r
 }\r
 \r
-bool StreamingSocket::connect (const String& remoteHostName,\r
-                               const int remotePortNumber,\r
-                               const int timeOutMillisecs)\r
+bool StreamingSocket::connect (const String& remoteHostName, int remotePortNumber, int timeOutMillisecs)\r
 {\r
     jassert (SocketHelpers::isValidPortNumber (remotePortNumber));\r
 \r
@@ -537,7 +534,7 @@ void StreamingSocket::close()
 }\r
 \r
 //==============================================================================\r
-bool StreamingSocket::createListener (const int newPortNumber, const String& localHostName)\r
+bool StreamingSocket::createListener (int newPortNumber, const String& localHostName)\r
 {\r
     jassert (SocketHelpers::isValidPortNumber (newPortNumber));\r
 \r
@@ -633,18 +630,18 @@ void DatagramSocket::shutdown()
     if (handle < 0)\r
         return;\r
 \r
-    auto copyOfHandle = handle;\r
+    std::atomic<int> handleCopy { handle.load() };\r
     handle = -1;\r
-    bool connected = false;\r
-    SocketHelpers::closeSocket (copyOfHandle, readLock, false, 0, connected);\r
+    std::atomic<bool> connected { false };\r
+    SocketHelpers::closeSocket (handleCopy, readLock, false, 0, connected);\r
 }\r
 \r
-bool DatagramSocket::bindToPort (const int port)\r
+bool DatagramSocket::bindToPort (int port)\r
 {\r
     return bindToPort (port, String());\r
 }\r
 \r
-bool DatagramSocket::bindToPort (const int port, const String& addr)\r
+bool DatagramSocket::bindToPort (int port, const String& addr)\r
 {\r
     jassert (SocketHelpers::isValidPortNumber (port));\r
 \r
@@ -664,8 +661,7 @@ int DatagramSocket::getBoundPort() const noexcept
 }\r
 \r
 //==============================================================================\r
-int DatagramSocket::waitUntilReady (const bool readyForReading,\r
-                                    const int timeoutMsecs) const\r
+int DatagramSocket::waitUntilReady (bool readyForReading, int timeoutMsecs)\r
 {\r
     if (handle < 0)\r
         return -1;\r
@@ -678,7 +674,7 @@ int DatagramSocket::read (void* destBuffer, int maxBytesToRead, bool shouldBlock
     if (handle < 0 || ! isBound)\r
         return -1;\r
 \r
-    bool connected = true;\r
+    std::atomic<bool> connected { true };\r
 \r
     SocketHelpers::setSocketBlockingState (handle, shouldBlock);\r
     return SocketHelpers::readSocket (handle, destBuffer, maxBytesToRead,\r
@@ -690,7 +686,7 @@ int DatagramSocket::read (void* destBuffer, int maxBytesToRead, bool shouldBlock
     if (handle < 0 || ! isBound)\r
         return -1;\r
 \r
-    bool connected = true;\r
+    std::atomic<bool> connected { true };\r
 \r
     SocketHelpers::setSocketBlockingState (handle, shouldBlock);\r
     return SocketHelpers::readSocket (handle, destBuffer, maxBytesToRead, connected,\r
index 3ef49d3731fe9db147c422ae19c94dae67a58975..a1420d0ace53c8baac14b12a5fd0b8c9d0a24755 100644 (file)
@@ -122,8 +122,7 @@ public:
         If the socket is ready on return, this returns 1. If it times-out before\r
         the socket becomes ready, it returns 0. If an error occurs, it returns -1.\r
     */\r
-    int waitUntilReady (bool readyForReading,\r
-                        int timeoutMsecs) const;\r
+    int waitUntilReady (bool readyForReading, int timeoutMsecs);\r
 \r
     /** Reads bytes from the socket.\r
 \r
@@ -177,8 +176,9 @@ public:
 private:\r
     //==============================================================================\r
     String hostName;\r
-    int volatile portNumber = 0, handle = -1;\r
-    bool connected = false, isListener = false;\r
+    std::atomic<int> portNumber { 0 }, handle { -1 };\r
+    std::atomic<bool> connected { false };\r
+    bool isListener = false;\r
     mutable CriticalSection readLock;\r
 \r
     StreamingSocket (const String& hostname, int portNumber, int handle);\r
@@ -263,8 +263,7 @@ public:
         If the socket is ready on return, this returns 1. If it times-out before\r
         the socket becomes ready, it returns 0. If an error occurs, it returns -1.\r
     */\r
-    int waitUntilReady (bool readyForReading,\r
-                        int timeoutMsecs) const;\r
+    int waitUntilReady (bool readyForReading, int timeoutMsecs);\r
 \r
     /** Reads bytes from the socket.\r
 \r
@@ -320,19 +319,16 @@ public:
 \r
     //==============================================================================\r
     /** Join a multicast group.\r
-\r
         @returns true if it succeeds.\r
     */\r
     bool joinMulticast (const String& multicastIPAddress);\r
 \r
     /** Leave a multicast group.\r
-\r
         @returns true if it succeeds.\r
     */\r
     bool leaveMulticast (const String& multicastIPAddress);\r
 \r
     /** Enables or disables multicast loopback.\r
-\r
         @returns true if it succeeds.\r
     */\r
     bool setMulticastLoopbackEnabled (bool enableLoopback);\r
@@ -350,7 +346,7 @@ public:
 \r
 private:\r
     //==============================================================================\r
-    int handle = -1;\r
+    std::atomic<int> handle { -1 };\r
     bool isBound = false;\r
     String lastBindAddress, lastServerHost;\r
     int lastServerPort = -1;\r
index c3322343cd358ec026c2c0e43165ff37704ef14d..75f95b747640f4f626cbb783fca6b88eda6bca59 100644 (file)
@@ -96,8 +96,8 @@ struct FallbackDownloadTask  : public URL::DownloadTask,
     }\r
 \r
     //==============================================================================\r
-    const ScopedPointer<FileOutputStream> fileStream;\r
-    const ScopedPointer<WebInputStream> stream;\r
+    const std::unique_ptr<FileOutputStream> fileStream;\r
+    const std::unique_ptr<WebInputStream> stream;\r
     const size_t bufferSize;\r
     HeapBlock<char> buffer;\r
     URL::DownloadTask::Listener* const listener;\r
@@ -118,11 +118,11 @@ URL::DownloadTask* URL::DownloadTask::createFallbackDownloader (const URL& urlTo
     const size_t bufferSize = 0x8000;\r
     targetFileToUse.deleteFile();\r
 \r
-    ScopedPointer<FileOutputStream> outputStream (targetFileToUse.createOutputStream (bufferSize));\r
+    std::unique_ptr<FileOutputStream> outputStream (targetFileToUse.createOutputStream (bufferSize));\r
 \r
     if (outputStream != nullptr)\r
     {\r
-        ScopedPointer<WebInputStream> stream (new WebInputStream (urlToUse, usePostRequest));\r
+        std::unique_ptr<WebInputStream> stream (new WebInputStream (urlToUse, usePostRequest));\r
         stream->withExtraHeaders (extraHeadersToUse);\r
 \r
         if (stream->connect (nullptr))\r
@@ -148,6 +148,10 @@ URL::URL (File localFile)
     if (localFile == File())\r
         return;\r
 \r
+   #if JUCE_WINDOWS\r
+    bool isUncPath = localFile.getFullPathName().startsWith ("\\\\");\r
+   #endif\r
+\r
     while (! localFile.isRoot())\r
     {\r
         url = "/" + addEscapeChars (localFile.getFileName(), false) + url;\r
@@ -156,8 +160,18 @@ URL::URL (File localFile)
 \r
     url = addEscapeChars (localFile.getFileName(), false) + url;\r
 \r
-    if (! url.startsWithChar (L'/'))\r
-        url = "/" + url;\r
+   #if JUCE_WINDOWS\r
+    if (isUncPath)\r
+    {\r
+        url = url.fromFirstOccurrenceOf ("/", false, false);\r
+    }\r
+    else\r
+   #endif\r
+    {\r
+        if (! url.startsWithChar (L'/'))\r
+            url = "/" + url;\r
+    }\r
+\r
 \r
     url = "file://" + url;\r
 \r
@@ -381,7 +395,9 @@ File URL::fileFromFileSchemeURL (const URL& fileURL)
 \r
     auto path = removeEscapeChars (fileURL.getDomain()).replace ("+", "%2B");\r
 \r
-   #ifndef JUCE_WINDOWS\r
+   #ifdef JUCE_WINDOWS\r
+    bool isUncPath = (! fileURL.url.startsWith ("file:///"));\r
+   #else\r
     path = File::getSeparatorString() + path;\r
    #endif\r
 \r
@@ -390,6 +406,11 @@ File URL::fileFromFileSchemeURL (const URL& fileURL)
     for (auto urlElement : urlElements)\r
         path += File::getSeparatorString() + removeEscapeChars (urlElement.replace ("+", "%2B"));\r
 \r
+   #ifdef JUCE_WINDOWS\r
+    if (isUncPath)\r
+        path = "\\\\" + path;\r
+   #endif\r
+\r
     return path;\r
 }\r
 \r
@@ -653,7 +674,7 @@ InputStream* URL::createInputStream (const bool usePostCommand,
 \r
     }\r
 \r
-    ScopedPointer<WebInputStream> wi (new WebInputStream (*this, usePostCommand));\r
+    std::unique_ptr<WebInputStream> wi (new WebInputStream (*this, usePostCommand));\r
 \r
     struct ProgressCallbackCaller  : public WebInputStream::Listener\r
     {\r
@@ -674,7 +695,7 @@ InputStream* URL::createInputStream (const bool usePostCommand,
         ProgressCallbackCaller& operator= (const ProgressCallbackCaller&) { jassertfalse; return *this; }\r
     };\r
 \r
-    ScopedPointer<ProgressCallbackCaller> callbackCaller\r
+    std::unique_ptr<ProgressCallbackCaller> callbackCaller\r
         (progressCallback != nullptr ? new ProgressCallbackCaller (progressCallback, progressCallbackContext) : nullptr);\r
 \r
     if (headers.isNotEmpty())\r
@@ -728,8 +749,8 @@ OutputStream* URL::createOutputStream() const
 //==============================================================================\r
 bool URL::readEntireBinaryStream (MemoryBlock& destData, bool usePostCommand) const\r
 {\r
-    const ScopedPointer<InputStream> in (isLocalFile() ? getLocalFile().createInputStream()\r
-                                                       : static_cast<InputStream*> (createInputStream (usePostCommand)));\r
+    const std::unique_ptr<InputStream> in (isLocalFile() ? getLocalFile().createInputStream()\r
+                                                         : static_cast<InputStream*> (createInputStream (usePostCommand)));\r
 \r
     if (in != nullptr)\r
     {\r
@@ -742,8 +763,8 @@ bool URL::readEntireBinaryStream (MemoryBlock& destData, bool usePostCommand) co
 \r
 String URL::readEntireTextStream (bool usePostCommand) const\r
 {\r
-    const ScopedPointer<InputStream> in (isLocalFile() ? getLocalFile().createInputStream()\r
-                                                       : static_cast<InputStream*> (createInputStream (usePostCommand)));\r
+    const std::unique_ptr<InputStream> in (isLocalFile() ? getLocalFile().createInputStream()\r
+                                                         : static_cast<InputStream*> (createInputStream (usePostCommand)));\r
 \r
     if (in != nullptr)\r
         return in->readEntireStreamAsString();\r
index 0a8c64b42848a8d6d7f8e90f5691752900cfa8f8..81997f037e8096b3216748b5c7912325c7de5709 100644 (file)
@@ -532,7 +532,7 @@ private:
         Upload (const String&, const String&, const String&, const File&, MemoryBlock*);\r
         String parameterName, filename, mimeType;\r
         File file;\r
-        ScopedPointer<MemoryBlock> data;\r
+        std::unique_ptr<MemoryBlock> data;\r
 \r
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Upload)\r
     };\r
index 6a24702179131801402ed6497bf39004f8faba46..e3ab6a7e69babe19ec20fa88de7dabef8f8ffd48 100644 (file)
@@ -171,20 +171,27 @@ bool OutputStream::writeDoubleBigEndian (double value)
 \r
 bool OutputStream::writeString (const String& text)\r
 {\r
+    auto numBytes = text.getNumBytesAsUTF8() + 1;\r
+\r
    #if (JUCE_STRING_UTF_TYPE == 8)\r
-    return write (text.toRawUTF8(), text.getNumBytesAsUTF8() + 1);\r
+    return write (text.toRawUTF8(), numBytes);\r
    #else\r
     // (This avoids using toUTF8() to prevent the memory bloat that it would leave behind\r
     // if lots of large, persistent strings were to be written to streams).\r
-    const size_t numBytes = text.getNumBytesAsUTF8() + 1;\r
     HeapBlock<char> temp (numBytes);\r
     text.copyToUTF8 (temp, numBytes);\r
     return write (temp, numBytes);\r
    #endif\r
 }\r
 \r
-bool OutputStream::writeText (const String& text, bool asUTF16, bool writeUTF16ByteOrderMark)\r
+bool OutputStream::writeText (const String& text, bool asUTF16, bool writeUTF16ByteOrderMark, const char* lf)\r
 {\r
+    bool replaceLineFeedWithUnix    = lf != nullptr && lf[0] == '\n' && lf[1] == 0;\r
+    bool replaceLineFeedWithWindows = lf != nullptr && lf[0] == '\r' && lf[1] == '\n' && lf[2] == 0;\r
+\r
+    // The line-feed passed in must be either nullptr, or "\n" or "\r\n"\r
+    jassert (lf == nullptr || replaceLineFeedWithWindows || replaceLineFeedWithUnix);\r
+\r
     if (asUTF16)\r
     {\r
         if (writeUTF16ByteOrderMark)\r
@@ -200,10 +207,17 @@ bool OutputStream::writeText (const String& text, bool asUTF16, bool writeUTF16B
             if (c == 0)\r
                 break;\r
 \r
-            if (c == '\n' && ! lastCharWasReturn)\r
-                writeShort ((short) '\r');\r
+            if (replaceLineFeedWithWindows)\r
+            {\r
+                if (c == '\n' && ! lastCharWasReturn)\r
+                    writeShort ((short) '\r');\r
 \r
-            lastCharWasReturn = (c == L'\r');\r
+                lastCharWasReturn = (c == L'\r');\r
+            }\r
+            else if (replaceLineFeedWithUnix && c == '\r')\r
+            {\r
+                continue;\r
+            }\r
 \r
             if (! writeShort ((short) c))\r
                 return false;\r
@@ -211,37 +225,57 @@ bool OutputStream::writeText (const String& text, bool asUTF16, bool writeUTF16B
     }\r
     else\r
     {\r
-        const char* src = text.toUTF8();\r
-        auto* t = src;\r
+        const char* src = text.toRawUTF8();\r
 \r
-        for (;;)\r
+        if (replaceLineFeedWithWindows)\r
         {\r
-            if (*t == '\n')\r
+            for (auto t = src;;)\r
             {\r
-                if (t > src)\r
-                    if (! write (src, (size_t) (t - src)))\r
-                        return false;\r
+                if (*t == '\n')\r
+                {\r
+                    if (t > src)\r
+                        if (! write (src, (size_t) (t - src)))\r
+                            return false;\r
 \r
-                if (! write ("\r\n", 2))\r
-                    return false;\r
+                    if (! write ("\r\n", 2))\r
+                        return false;\r
 \r
-                src = t + 1;\r
+                    src = t + 1;\r
+                }\r
+                else if (*t == '\r')\r
+                {\r
+                    if (t[1] == '\n')\r
+                        ++t;\r
+                }\r
+                else if (*t == 0)\r
+                {\r
+                    if (t > src)\r
+                        if (! write (src, (size_t) (t - src)))\r
+                            return false;\r
+\r
+                    break;\r
+                }\r
+\r
+                ++t;\r
             }\r
-            else if (*t == '\r')\r
-            {\r
-                if (t[1] == '\n')\r
-                    ++t;\r
-            }\r
-            else if (*t == 0)\r
+        }\r
+        else if (replaceLineFeedWithUnix)\r
+        {\r
+            for (;;)\r
             {\r
-                if (t > src)\r
-                    if (! write (src, (size_t) (t - src)))\r
-                        return false;\r
+                auto c = *src++;\r
 \r
-                break;\r
-            }\r
+                if (c == 0)\r
+                    break;\r
 \r
-            ++t;\r
+                if (c != '\r')\r
+                    if (! writeByte (c))\r
+                        return false;\r
+            }\r
+        }\r
+        else\r
+        {\r
+            return write (src, text.getNumBytesAsUTF8());\r
         }\r
     }\r
 \r
@@ -273,9 +307,9 @@ int64 OutputStream::writeFromInputStream (InputStream& source, int64 numBytesToW
 }\r
 \r
 //==============================================================================\r
-void OutputStream::setNewLineString (const String& newLineString_)\r
+void OutputStream::setNewLineString (const String& newLineStringToUse)\r
 {\r
-    newLineString = newLineString_;\r
+    newLineString = newLineStringToUse;\r
 }\r
 \r
 //==============================================================================\r
index 11f3d16a8134ad913163c623c75133c0b05a6b5a..f41cbc1259a7448a6b38900addebeac69c4f0813 100644 (file)
@@ -201,12 +201,15 @@ public:
         bytes (0xff, 0xfe) to indicate the endianness (these should only be used at the start\r
         of a file).\r
 \r
-        The method also replaces '\\n' characters in the text with '\\r\\n'.\r
+        If lineEndings is nullptr, then line endings in the text won't be modified. If you\r
+        pass "\\n" or "\\r\\n" then this function will replace any existing line feeds.\r
+\r
         @returns false if the write operation fails for some reason\r
     */\r
     virtual bool writeText (const String& text,\r
                             bool asUTF16,\r
-                            bool writeUTF16ByteOrderMark);\r
+                            bool writeUTF16ByteOrderMark,\r
+                            const char* lineEndings);\r
 \r
     /** Reads data from an input stream and writes it to this stream.\r
 \r
index 8fed16d5f74bfa38399c0053e75831b6f5c85371..09f6f663d98902783ae47d1267f62eaabff9490a 100644 (file)
@@ -39,8 +39,6 @@
  #endif\r
 \r
  #define JUCE_COMPILER_SUPPORTS_NOEXCEPT 1\r
- #define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1\r
- #define JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT 1\r
 \r
  #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500\r
   #define JUCE_HAS_CONSTEXPR 1\r
    #define JUCE_EXCEPTIONS_DISABLED 1\r
   #endif\r
  #endif\r
+\r
+ #define JUCE_CXX14_IS_AVAILABLE (__cplusplus >= 201402L)\r
+ #define JUCE_CXX17_IS_AVAILABLE (__cplusplus >= 201703L)\r
+\r
 #endif\r
 \r
 //==============================================================================\r
  #define JUCE_COMPILER_SUPPORTS_NOEXCEPT 1\r
  #define JUCE_HAS_CONSTEXPR 1\r
 \r
- #if defined (_LIBCPP_VERSION) || ! (JUCE_MAC || JUCE_IOS)\r
-  #define JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT 1\r
-  #define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1\r
- #endif\r
-\r
  #ifndef JUCE_COMPILER_SUPPORTS_ARC\r
   #define JUCE_COMPILER_SUPPORTS_ARC 1\r
  #endif\r
@@ -79,6 +76,9 @@
   #endif\r
  #endif\r
 \r
+ #define JUCE_CXX14_IS_AVAILABLE (__cplusplus >= 201402L)\r
+ #define JUCE_CXX17_IS_AVAILABLE (__cplusplus >= 201703L)\r
+\r
 #endif\r
 \r
 //==============================================================================\r
@@ -89,9 +89,6 @@
    #error "JUCE requires Visual Studio 2013 or later"\r
  #endif\r
 \r
- #define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1\r
- #define JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT 1\r
-\r
  #if _MSC_VER >= 1900 // VS2015\r
   #define JUCE_COMPILER_SUPPORTS_NOEXCEPT 1\r
   #define JUCE_HAS_CONSTEXPR 1\r
    #define JUCE_EXCEPTIONS_DISABLED 1\r
   #endif\r
  #endif\r
+\r
+  #define JUCE_CXX14_IS_AVAILABLE (_MSVC_LANG >= 201402L)\r
+  #define JUCE_CXX17_IS_AVAILABLE (_MSVC_LANG >= 201703L)\r
+#endif\r
+\r
+//==============================================================================\r
+// C++ library\r
+#if (defined (__GLIBCXX__) && __GLIBCXX__ < 20130322) || (defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION < 3700))\r
+ #error "JUCE requires a C++ library containing std::atomic"\r
 #endif\r
 \r
 //==============================================================================\r
  // These are old flags that are now supported on all compatible build targets\r
  #define JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL 1\r
  #define JUCE_COMPILER_SUPPORTS_VARIADIC_TEMPLATES 1\r
+ #define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1\r
  #define JUCE_DELETED_FUNCTION = delete\r
 #endif\r
-\r
-//==============================================================================\r
-#if JUCE_ANDROID\r
- #define JUCE_ATOMIC_AVAILABLE 1\r
-#elif defined(_LIBCPP_VERSION)\r
- #define JUCE_ATOMIC_AVAILABLE (_LIBCPP_VERSION >= 3700)\r
-#elif defined (__GLIBCXX__)\r
- #define JUCE_ATOMIC_AVAILABLE (__GLIBCXX__ >= 20130322) // GCC versions 4.8 and later\r
-#elif defined (_MSC_VER)\r
- #define JUCE_ATOMIC_AVAILABLE 1 // Visual Studio 2013 and later\r
-#else\r
- #define JUCE_ATOMIC_AVAILABLE 0\r
-#endif\r
index 2c4940e24ef4620ed0f95fe13a47590622c01c34..0666bccf3eed3705978ffe218a5126b5ba257534 100644 (file)
@@ -273,6 +273,28 @@ namespace juce
  #define JUCE_DEPRECATED_WITH_BODY(functionDef, body)   functionDef body\r
 #endif\r
 \r
+#if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
+ #if ! (defined (DOXYGEN) || defined (JUCE_GCC) || (JUCE_MSVC && _MSC_VER <= 1900))\r
+  #define JUCE_DEPRECATED_STATIC(valueDef)       JUCE_DEPRECATED (valueDef)\r
+\r
+  #if JUCE_MSVC\r
+   #define JUCE_DECLARE_DEPRECATED_STATIC(valueDef) \\r
+        __pragma(warning(push)) \\r
+        __pragma(warning(disable:4996)) \\r
+         valueDef \\r
+        __pragma(warning(pop))\r
+  #else\r
+   #define JUCE_DECLARE_DEPRECATED_STATIC(valueDef)   valueDef\r
+  #endif\r
+ #else\r
+  #define JUCE_DEPRECATED_STATIC(valueDef)           valueDef\r
+  #define JUCE_DECLARE_DEPRECATED_STATIC(valueDef)   valueDef\r
+ #endif\r
+#else\r
+ #define JUCE_DEPRECATED_STATIC(valueDef)\r
+ #define JUCE_DECLARE_DEPRECATED_STATIC(valueDef)\r
+#endif\r
+\r
 //==============================================================================\r
 #if JUCE_ANDROID && ! DOXYGEN\r
  #define JUCE_MODAL_LOOPS_PERMITTED 0\r
index f69a0541019071a1af3a16d8ae9849cc9260cded..dc18424577bf27149e07e7fe2024f3700831344a 100644 (file)
@@ -29,7 +29,7 @@
 */\r
 #define JUCE_MAJOR_VERSION      5\r
 #define JUCE_MINOR_VERSION      3\r
-#define JUCE_BUILDNUMBER        1\r
+#define JUCE_BUILDNUMBER        2\r
 \r
 /** Current JUCE version number.\r
 \r
@@ -50,6 +50,7 @@
 #include <functional>\r
 #include <algorithm>\r
 #include <limits>\r
+#include <atomic>\r
 \r
 //==============================================================================\r
 #include "juce_CompilerSupport.h"\r
 #undef minor\r
 #undef KeyPress\r
 \r
-// Include a replacement for std::function on older platforms and the live\r
-// build\r
-#if JUCE_PROJUCER_LIVE_BUILD || ! defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)\r
+// Include a replacement for std::function\r
+#if JUCE_PROJUCER_LIVE_BUILD\r
  #include "../misc/juce_StdFunctionCompat.h"\r
 #endif\r
 \r
-// Include std::atomic if it's supported by the compiler\r
-#if JUCE_ATOMIC_AVAILABLE\r
- #include <atomic>\r
-#endif\r
-\r
 //==============================================================================\r
 // DLL building settings on Windows\r
 #if JUCE_MSVC\r
index 6dd1c36849f9fa59a949d3b7d53ebfaa12648eaa..a89ee81f0e3fca7a6d5792b21401c8bddb110be6 100644 (file)
@@ -37,7 +37,7 @@ namespace juce
 class CharPointer_ASCII  final\r
 {\r
 public:\r
-    typedef char CharType;\r
+    using CharType = char;\r
 \r
     inline explicit CharPointer_ASCII (const CharType* rawPointer) noexcept\r
         : data (const_cast<CharType*> (rawPointer))\r
index 0bff3f35700509c3e9077261fc11cc7b23d11e64..ccffb429501a56e78e55e9709deb0cca690352d0 100644 (file)
@@ -35,9 +35,9 @@ class CharPointer_UTF16  final
 {\r
 public:\r
    #if JUCE_NATIVE_WCHAR_IS_UTF16\r
-    typedef wchar_t CharType;\r
+    using CharType = wchar_t;\r
    #else\r
-    typedef int16 CharType;\r
+    using CharType = int16;\r
    #endif\r
 \r
     inline explicit CharPointer_UTF16 (const CharType* rawPointer) noexcept\r
index e84238949139a8e16b15710932a7298ced78581c..c8c4a19d912e41956bf497260bf4d4ec4b511706 100644 (file)
@@ -34,7 +34,7 @@ namespace juce
 class CharPointer_UTF32  final\r
 {\r
 public:\r
-    typedef juce_wchar CharType;\r
+    using CharType = juce_wchar;\r
 \r
     inline explicit CharPointer_UTF32 (const CharType* rawPointer) noexcept\r
         : data (const_cast<CharType*> (rawPointer))\r
index 09bda467dff5f85fa464b9e30f0800d93f1fcd21..9496dc3a7464d7d0e4b1baaf5b89df04466d7584 100644 (file)
@@ -34,7 +34,7 @@ namespace juce
 class CharPointer_UTF8  final\r
 {\r
 public:\r
-    typedef char CharType;\r
+    using CharType = char;\r
 \r
     inline explicit CharPointer_UTF8 (const CharType* rawPointer) noexcept\r
         : data (const_cast<CharType*> (rawPointer))\r
@@ -122,9 +122,9 @@ public:
 \r
         if (n < 0)\r
         {\r
-            juce_wchar bit = 0x40;\r
+            uint8 bit = 0x40;\r
 \r
-            while ((static_cast<juce_wchar> (n) & bit) != 0 && bit > 0x8)\r
+            while ((static_cast<uint8> (n) & bit) != 0 && bit > 0x8)\r
             {\r
                 ++data;\r
                 bit >>= 1;\r
index e5681ec15083a5f0c9fdf5d51844b086dae60343..7c6e55b5dd904ab7aea007588fe1607ab4c3115b 100644 (file)
@@ -39,9 +39,9 @@ namespace juce
 \r
 #if JUCE_NATIVE_WCHAR_IS_UTF32 || DOXYGEN\r
  /** A platform-independent 32-bit unicode character type. */\r
typedef wchar_t        juce_wchar;\r
using juce_wchar = wchar_t;\r
 #else\r
typedef uint32         juce_wchar;\r
using juce_wchar = uint32;\r
 #endif\r
 \r
 #ifndef DOXYGEN\r
@@ -66,13 +66,13 @@ namespace juce
 // GNU libstdc++ does not have std::make_unsigned\r
 namespace internal\r
 {\r
-    template <typename Type> struct make_unsigned               { typedef Type type; };\r
-    template <> struct make_unsigned<signed char>               { typedef unsigned char      type; };\r
-    template <> struct make_unsigned<char>                      { typedef unsigned char      type; };\r
-    template <> struct make_unsigned<short>                     { typedef unsigned short     type; };\r
-    template <> struct make_unsigned<int>                       { typedef unsigned int       type; };\r
-    template <> struct make_unsigned<long>                      { typedef unsigned long      type; };\r
-    template <> struct make_unsigned<long long>                 { typedef unsigned long long type; };\r
+    template <typename Type> struct make_unsigned               { using type = Type; };\r
+    template <> struct make_unsigned<signed char>               { using type = unsigned char; };\r
+    template <> struct make_unsigned<char>                      { using type = unsigned char; };\r
+    template <> struct make_unsigned<short>                     { using type = unsigned short; };\r
+    template <> struct make_unsigned<int>                       { using type = unsigned int; };\r
+    template <> struct make_unsigned<long>                      { using type = unsigned long; };\r
+    template <> struct make_unsigned<long long>                 { using type = unsigned long long; };\r
 }\r
 \r
 #endif\r
@@ -383,7 +383,7 @@ public:
     template <typename IntType, typename CharPointerType>\r
     static IntType getIntValue (const CharPointerType text) noexcept\r
     {\r
-        typedef typename internal::make_unsigned<IntType>::type UIntType;\r
+        using UIntType = typename internal::make_unsigned<IntType>::type;\r
 \r
         UIntType v = 0;\r
         auto s = text.findEndOfWhitespace();\r
index 0ecfcb310ea60a7742b0c7d96fe986355860b750..d523cd9c86732780f20ba65a25b83f73e73dae4a 100644 (file)
@@ -81,7 +81,7 @@ namespace
     {\r
         LeakAvoidanceTrick()\r
         {\r
-            const ScopedPointer<LocalisedStrings> dummy (new LocalisedStrings (String(), false));\r
+            const std::unique_ptr<LocalisedStrings> dummy (new LocalisedStrings (String(), false));\r
         }\r
     };\r
 \r
@@ -89,7 +89,7 @@ namespace
    #endif\r
 \r
     SpinLock currentMappingsLock;\r
-    ScopedPointer<LocalisedStrings> currentMappings;\r
+    std::unique_ptr<LocalisedStrings> currentMappings;\r
 \r
     static int findCloseQuote (const String& text, int startPos)\r
     {\r
index 87501f9b357196139e940db60c7ed64d54055cdc..70793f645c24a7ff287471dcf1cb987e01ec8825 100644 (file)
@@ -190,7 +190,7 @@ private:
     String languageName;\r
     StringArray countryCodes;\r
     StringPairArray translations;\r
-    ScopedPointer<LocalisedStrings> fallback;\r
+    std::unique_ptr<LocalisedStrings> fallback;\r
     friend struct ContainerDeletePolicy<LocalisedStrings>;\r
 \r
     void loadFromText (const String&, bool ignoreCase);\r
index 5f0c0005a8cc004f2ba544841aa5f9f57b6a7a9e..88d530aec526c2e97e8c030689a707f3eb532f3d 100644 (file)
@@ -35,11 +35,11 @@ NewLine newLine;
 #endif\r
 \r
 #if JUCE_NATIVE_WCHAR_IS_UTF8\r
typedef CharPointer_UTF8          CharPointer_wchar_t;\r
using CharPointer_wchar_t = CharPointer_UTF8;\r
 #elif JUCE_NATIVE_WCHAR_IS_UTF16\r
typedef CharPointer_UTF16         CharPointer_wchar_t;\r
using CharPointer_wchar_t = CharPointer_UTF16;\r
 #else\r
typedef CharPointer_UTF32         CharPointer_wchar_t;\r
using CharPointer_wchar_t = CharPointer_UTF32;\r
 #endif\r
 \r
 static inline CharPointer_wchar_t castToCharPointer_wchar_t (const void* t) noexcept\r
@@ -64,8 +64,8 @@ class StringHolder
 public:\r
     StringHolder() = delete;\r
 \r
-    typedef String::CharPointerType CharPointerType;\r
-    typedef String::CharPointerType::CharType CharType;\r
+    using CharPointerType  = String::CharPointerType;\r
+    using CharType         = String::CharPointerType::CharType;\r
 \r
     //==============================================================================\r
     static CharPointerType createUninitialisedBytes (size_t numBytes)\r
@@ -235,9 +235,7 @@ private:
     }\r
 };\r
 \r
-#if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-const String String::empty;\r
-#endif\r
+JUCE_DECLARE_DEPRECATED_STATIC (const String String::empty);\r
 \r
 //==============================================================================\r
 String::String() noexcept  : text (&(emptyString.text))\r
@@ -768,13 +766,13 @@ void String::appendCharPointer (const CharPointerType startOfTextToAppend,
     }\r
 }\r
 \r
-String& String::operator+= (const wchar_t* const t)\r
+String& String::operator+= (const wchar_t* t)\r
 {\r
     appendCharPointer (castToCharPointer_wchar_t (t));\r
     return *this;\r
 }\r
 \r
-String& String::operator+= (const char* const t)\r
+String& String::operator+= (const char* t)\r
 {\r
     appendCharPointer (CharPointer_UTF8 (t)); // (using UTF8 here triggers a faster code-path than ascii)\r
     return *this;\r
@@ -797,20 +795,20 @@ String& String::operator+= (StringRef other)
     return operator+= (String (other));\r
 }\r
 \r
-String& String::operator+= (const char ch)\r
+String& String::operator+= (char ch)\r
 {\r
     const char asString[] = { ch, 0 };\r
     return operator+= (asString);\r
 }\r
 \r
-String& String::operator+= (const wchar_t ch)\r
+String& String::operator+= (wchar_t ch)\r
 {\r
     const wchar_t asString[] = { ch, 0 };\r
     return operator+= (asString);\r
 }\r
 \r
 #if ! JUCE_NATIVE_WCHAR_IS_UTF32\r
-String& String::operator+= (const juce_wchar ch)\r
+String& String::operator+= (juce_wchar ch)\r
 {\r
     const juce_wchar asString[] = { ch, 0 };\r
     appendCharPointer (CharPointer_UTF32 (asString));\r
@@ -842,42 +840,44 @@ String& String::operator+= (const int64 number)        { return StringHelpers::o
 String& String::operator+= (const uint64 number)       { return StringHelpers::operationAddAssign<uint64>       (*this, number); }\r
 \r
 //==============================================================================\r
-JUCE_API String JUCE_CALLTYPE operator+ (const char* const s1, const String& s2)    { String s (s1); return s += s2; }\r
-JUCE_API String JUCE_CALLTYPE operator+ (const wchar_t* const s1, const String& s2) { String s (s1); return s += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (const char* s1, const String& s2)    { String s (s1); return s += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (const wchar_t* s1, const String& s2) { String s (s1); return s += s2; }\r
 \r
-JUCE_API String JUCE_CALLTYPE operator+ (const char s1, const String& s2)           { return String::charToString ((juce_wchar) (uint8) s1) + s2; }\r
-JUCE_API String JUCE_CALLTYPE operator+ (const wchar_t s1, const String& s2)        { return String::charToString (s1) + s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (char s1, const String& s2)           { return String::charToString ((juce_wchar) (uint8) s1) + s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (wchar_t s1, const String& s2)        { return String::charToString (s1) + s2; }\r
 \r
-JUCE_API String JUCE_CALLTYPE operator+ (String s1, const String& s2)               { return s1 += s2; }\r
-JUCE_API String JUCE_CALLTYPE operator+ (String s1, const char* const s2)           { return s1 += s2; }\r
-JUCE_API String JUCE_CALLTYPE operator+ (String s1, const wchar_t* s2)              { return s1 += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (String s1, const String& s2)         { return s1 += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (String s1, const char* s2)           { return s1 += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (String s1, const wchar_t* s2)        { return s1 += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (String s1, const std::string& s2)    { return s1 += s2.c_str(); }\r
 \r
-JUCE_API String JUCE_CALLTYPE operator+ (String s1, const char s2)                  { return s1 += s2; }\r
-JUCE_API String JUCE_CALLTYPE operator+ (String s1, const wchar_t s2)               { return s1 += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (String s1, char s2)                  { return s1 += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (String s1, wchar_t s2)               { return s1 += s2; }\r
 \r
 #if ! JUCE_NATIVE_WCHAR_IS_UTF32\r
-JUCE_API String JUCE_CALLTYPE operator+ (const juce_wchar s1, const String& s2)     { return String::charToString (s1) + s2; }\r
-JUCE_API String JUCE_CALLTYPE operator+ (String s1, const juce_wchar s2)            { return s1 += s2; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const juce_wchar s2)         { return s1 += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (juce_wchar s1, const String& s2)     { return String::charToString (s1) + s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (String s1, juce_wchar s2)            { return s1 += s2; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, juce_wchar s2)         { return s1 += s2; }\r
 #endif\r
 \r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const char s2)               { return s1 += s2; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const wchar_t s2)            { return s1 += s2; }\r
-\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const char* const s2)        { return s1 += s2; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const wchar_t* const s2)     { return s1 += s2; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const String& s2)            { return s1 += s2; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, StringRef s2)                { return s1 += s2; }\r
-\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, uint8 number)                { return s1 += (int) number; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const short number)          { return s1 += (int) number; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const int number)            { return s1 += number; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const long number)           { return s1 += String (number); }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const unsigned long number)  { return s1 += String (number); }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const int64 number)          { return s1 += String (number); }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const uint64 number)         { return s1 += String (number); }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const float number)          { return s1 += String (number); }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const double number)         { return s1 += String (number); }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, char s2)               { return s1 += s2; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, wchar_t s2)            { return s1 += s2; }\r
+\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const char* s2)        { return s1 += s2; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const wchar_t* s2)     { return s1 += s2; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const String& s2)      { return s1 += s2; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, StringRef s2)          { return s1 += s2; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const std::string& s2) { return s1 += s2.c_str(); }\r
+\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, uint8  number)         { return s1 += (int) number; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, short  number)         { return s1 += (int) number; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, int    number)         { return s1 += number; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, long   number)         { return s1 += String (number); }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, unsigned long number)  { return s1 += String (number); }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, int64  number)         { return s1 += String (number); }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, uint64 number)         { return s1 += String (number); }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, float  number)         { return s1 += String (number); }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, double number)         { return s1 += String (number); }\r
 \r
 JUCE_API OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const String& text)\r
 {\r
@@ -902,12 +902,12 @@ JUCE_API OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, StringRef
 }\r
 \r
 //==============================================================================\r
-int String::indexOfChar (const juce_wchar character) const noexcept\r
+int String::indexOfChar (juce_wchar character) const noexcept\r
 {\r
     return text.indexOf (character);\r
 }\r
 \r
-int String::indexOfChar (const int startIndex, const juce_wchar character) const noexcept\r
+int String::indexOfChar (int startIndex, juce_wchar character) const noexcept\r
 {\r
     auto t = text;\r
 \r
@@ -927,7 +927,7 @@ int String::indexOfChar (const int startIndex, const juce_wchar character) const
     return -1;\r
 }\r
 \r
-int String::lastIndexOfChar (const juce_wchar character) const noexcept\r
+int String::lastIndexOfChar (juce_wchar character) const noexcept\r
 {\r
     auto t = text;\r
     int last = -1;\r
@@ -939,7 +939,7 @@ int String::lastIndexOfChar (const juce_wchar character) const noexcept
     return last;\r
 }\r
 \r
-int String::indexOfAnyOf (StringRef charactersToLookFor, const int startIndex, const bool ignoreCase) const noexcept\r
+int String::indexOfAnyOf (StringRef charactersToLookFor, int startIndex, bool ignoreCase) const noexcept\r
 {\r
     auto t = text;\r
 \r
@@ -969,7 +969,7 @@ int String::indexOfIgnoreCase (StringRef other) const noexcept
     return other.isEmpty() ? 0 : CharacterFunctions::indexOfIgnoreCase (text, other.text);\r
 }\r
 \r
-int String::indexOf (const int startIndex, StringRef other) const noexcept\r
+int String::indexOf (int startIndex, StringRef other) const noexcept\r
 {\r
     if (other.isEmpty())\r
         return -1;\r
@@ -2207,7 +2207,8 @@ StringRef::StringRef (String::CharPointerType stringLiteral) noexcept  : text (s
     jassert (stringLiteral.getAddress() != nullptr); // This must be a valid string literal, not a null pointer!!\r
 }\r
 \r
-StringRef::StringRef (const String& string) noexcept  : text (string.getCharPointer()) {}\r
+StringRef::StringRef (const String& string) noexcept   : text (string.getCharPointer()) {}\r
+StringRef::StringRef (const std::string& string)       : StringRef (string.c_str()) {}\r
 \r
 \r
 //==============================================================================\r
index 1a8c03e8468bab82faaecd7a47348ece21ea8139..a778be1ce5130a0f0ea49aa335b63bf975a47e58 100644 (file)
@@ -1239,8 +1239,7 @@ public:
     int getReferenceCount() const noexcept;\r
 \r
     //==============================================================================\r
-   #if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-    /** This was a static empty string object, but is now deprecated as it's too easy to accidentally\r
+    /*  This was a static empty string object, but is now deprecated as it's too easy to accidentally\r
         use it indirectly during a static constructor, leading to hard-to-find order-of-initialisation\r
         problems.\r
         @deprecated If you need an empty String object, just use String() or {}.\r
@@ -1248,8 +1247,7 @@ public:
         empty string from a function by reference, but if you need to do that, it's easy enough to use\r
         a function-local static String object and return that, avoiding any order-of-initialisation issues.\r
     */\r
-    static const String empty;\r
-   #endif\r
+    JUCE_DEPRECATED_STATIC (static const String empty);\r
 \r
 private:\r
     //==============================================================================\r
@@ -1304,6 +1302,8 @@ JUCE_API String JUCE_CALLTYPE operator+ (String string1, const char* string2);
 /** Concatenates two strings. */\r
 JUCE_API String JUCE_CALLTYPE operator+ (String string1, const wchar_t* string2);\r
 /** Concatenates two strings. */\r
+JUCE_API String JUCE_CALLTYPE operator+ (String string1, const std::string& string2);\r
+/** Concatenates two strings. */\r
 JUCE_API String JUCE_CALLTYPE operator+ (String string1, char characterToAppend);\r
 /** Concatenates two strings. */\r
 JUCE_API String JUCE_CALLTYPE operator+ (String string1, wchar_t characterToAppend);\r
@@ -1330,6 +1330,8 @@ JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const wchar_t* strin
 JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const String& string2);\r
 /** Appends a string to the end of the first one. */\r
 JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, StringRef string2);\r
+/** Appends a string to the end of the first one. */\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const std::string& string2);\r
 \r
 /** Appends a decimal number to the end of a string. */\r
 JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, uint8 number);\r
@@ -1417,7 +1419,7 @@ JUCE_API OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, StringRef
 \r
 } // namespace juce\r
 \r
-#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS && ! DOXYGEN // just used to avoid compiling this under compilers that lack libc++\r
+#if ! DOXYGEN\r
 namespace std\r
 {\r
     template <> struct hash<juce::String>\r
index 7f11498b8b444463373b5fe80cfc963ff111f060..4029231dec1ba9ec52c72915ebc07bc1de2647db 100644 (file)
@@ -67,12 +67,10 @@ StringArray::StringArray (const wchar_t* const* initialStrings, int numberOfStri
     strings.addArray (initialStrings, numberOfStrings);\r
 }\r
 \r
-#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
 StringArray::StringArray (const std::initializer_list<const char*>& stringList)\r
 {\r
     strings.addArray (stringList);\r
 }\r
-#endif\r
 \r
 StringArray& StringArray::operator= (const StringArray& other)\r
 {\r
index b45fd5c0f55ca526e4b4ff61879ce373b9637251..51fdd2478bc25955c52209e08a413a653f573b43 100644 (file)
@@ -51,9 +51,8 @@ public:
     template <typename... OtherElements>\r
     StringArray (StringRef firstValue, OtherElements... otherValues) : strings (firstValue, otherValues...) {}\r
 \r
-   #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
+    /** Creates an array containing a list of strings. */\r
     StringArray (const std::initializer_list<const char*>& strings);\r
-   #endif\r
 \r
     /** Creates an array from a raw array of strings.\r
         @param strings          an array of strings to add\r
index 2c171f4614cb1774481e3e938872128d6cb5a4d0..82bf4982d4a05d32e161e1bab5fbfb744dc1fc70 100644 (file)
@@ -81,6 +81,13 @@ public:
     */\r
     StringRef (const String& string) noexcept;\r
 \r
+    /** Creates a StringRef from a String.\r
+        The StringRef object does NOT take ownership or copy the data from the std::string,\r
+        so you must ensure that the source string object is not modified or deleted during\r
+        the lifetime of the StringRef.\r
+    */\r
+    StringRef (const std::string& string);\r
+\r
     /** Creates a StringRef pointer to an empty string. */\r
     StringRef() noexcept;\r
 \r
index 61e7683c6742d14793a579f02c0a86f43edab8fd..3efbc6ffd10bd377c72426dba747ff7abd8a688a 100644 (file)
@@ -105,7 +105,7 @@ private:
     //==============================================================================\r
     class ActiveProcess;\r
     friend struct ContainerDeletePolicy<ActiveProcess>;\r
-    ScopedPointer<ActiveProcess> activeProcess;\r
+    std::unique_ptr<ActiveProcess> activeProcess;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcess)\r
 };\r
index b771e66d5a17022c6f471d8165b304a9462abe87..b017ea36932bc976dfb546e918d62441a287d399 100644 (file)
@@ -96,7 +96,7 @@ private:
     struct Pimpl;\r
     friend struct Pimpl;\r
     friend struct ContainerDeletePolicy<Pimpl>;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (HighResolutionTimer)\r
 };\r
index 14db4a69a030dc9bd0b1d15a083a9686d236d8c6..6e38766cd7740177dacaa0704e14c0e76d65d463 100644 (file)
@@ -111,7 +111,7 @@ private:
     //==============================================================================\r
     class Pimpl;\r
     friend struct ContainerDeletePolicy<Pimpl>;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     CriticalSection lock;\r
     String name;\r
index a9ea95c843d3caa000027ef71b785f26d15bd1d1..2e7cce85c95d1ae3d8f201e2b5db321ac2cb3af8 100644 (file)
@@ -52,7 +52,7 @@ struct CurrentThreadHolder   : public ReferenceCountedObject
 {\r
     CurrentThreadHolder() noexcept {}\r
 \r
-    typedef ReferenceCountedObjectPtr<CurrentThreadHolder> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<CurrentThreadHolder>;\r
     ThreadLocalValue<Thread*> value;\r
 \r
     JUCE_DECLARE_NON_COPYABLE (CurrentThreadHolder)\r
index ccc66b0990966198f7d31e1cb3f661e43ce21207..373dc1b06a2faa2be51be46da7921b7cb78aff7b 100644 (file)
@@ -176,7 +176,7 @@ public:
 \r
     //==============================================================================\r
     /** Used to receive callbacks for thread exit calls */\r
-    class Listener\r
+    class JUCE_API Listener\r
     {\r
     public:\r
         virtual ~Listener() {}\r
index 0b91231f021161de83518537429fafd6317dbac1..298e98ed86b99ffac4891dcff4409aa593ce5ed3 100644 (file)
@@ -23,9 +23,8 @@
 namespace juce\r
 {\r
 \r
-class ThreadPool::ThreadPoolThread  : public Thread\r
+struct ThreadPool::ThreadPoolThread  : public Thread\r
 {\r
-public:\r
     ThreadPoolThread (ThreadPool& p, size_t stackSize)\r
        : Thread ("Pool", stackSize), pool (p)\r
     {\r
@@ -38,7 +37,7 @@ public:
                 wait (500);\r
     }\r
 \r
-    ThreadPoolJob* volatile currentJob = nullptr;\r
+    std::atomic<ThreadPoolJob*> currentJob { nullptr };\r
     ThreadPool& pool;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ThreadPoolThread)\r
@@ -85,7 +84,7 @@ void ThreadPoolJob::removeListener (Thread::Listener* listener)
 ThreadPoolJob* ThreadPoolJob::getCurrentThreadPoolJob()\r
 {\r
     if (auto* t = dynamic_cast<ThreadPool::ThreadPoolThread*> (Thread::getCurrentThread()))\r
-        return t->currentJob;\r
+        return t->currentJob.load();\r
 \r
     return nullptr;\r
 }\r
index 4612faa51b2e632a18087e95fdd2cdd38cf35ede..68ab02648004419127050ad5adf27b6920d28b57 100644 (file)
@@ -24,8 +24,6 @@ namespace juce
 {\r
 \r
 class ThreadPool;\r
-class ThreadPoolThread;\r
-\r
 \r
 //==============================================================================\r
 /**\r
@@ -134,7 +132,6 @@ public:
     //==============================================================================\r
 private:\r
     friend class ThreadPool;\r
-    friend class ThreadPoolThread;\r
     String jobName;\r
     ThreadPool* pool = nullptr;\r
     bool shouldStop = false, isActive = false, shouldBeDeleted = false;\r
@@ -323,9 +320,9 @@ private:
     //==============================================================================\r
     Array<ThreadPoolJob*> jobs;\r
 \r
-    class ThreadPoolThread;\r
+    struct ThreadPoolThread;\r
     friend class ThreadPoolJob;\r
-    friend class ThreadPoolThread;\r
+    friend struct ThreadPoolThread;\r
     friend struct ContainerDeletePolicy<ThreadPoolThread>;\r
     OwnedArray<ThreadPoolThread> threads;\r
 \r
index 59217e1bdaa0c85c4973292fe06edb09c3f53d52..6dcd518fc620856c18f169239026d15095ead4aa 100644 (file)
@@ -93,7 +93,7 @@ XmlElement* XmlDocument::getDocumentElement (const bool onlyReadOuterDocumentEle
 {\r
     if (originalText.isEmpty() && inputSource != nullptr)\r
     {\r
-        ScopedPointer<InputStream> in (inputSource->createInputStream());\r
+        std::unique_ptr<InputStream> in (inputSource->createInputStream());\r
 \r
         if (in != nullptr)\r
         {\r
@@ -144,7 +144,7 @@ String XmlDocument::getFileContents (const String& filename) const
 {\r
     if (inputSource != nullptr)\r
     {\r
-        ScopedPointer<InputStream> in (inputSource->createInputStreamFor (filename.trim().unquoted()));\r
+        std::unique_ptr<InputStream> in (inputSource->createInputStreamFor (filename.trim().unquoted()));\r
 \r
         if (in != nullptr)\r
             return in->readEntireStreamAsString();\r
@@ -189,7 +189,7 @@ XmlElement* XmlDocument::parseDocumentElement (String::CharPointerType textToPar
     else\r
     {\r
         lastError.clear();\r
-        ScopedPointer<XmlElement> result (readNextElement (! onlyReadOuterDocumentElement));\r
+        std::unique_ptr<XmlElement> result (readNextElement (! onlyReadOuterDocumentElement));\r
 \r
         if (! errorOccurred)\r
             return result.release();\r
index bf380e8a43eb4579fc74d4b3ec908bb76f508d9e..997e16fa39ca4d81fbe602126103613325ff93c1 100644 (file)
@@ -34,7 +34,7 @@ namespace juce
     @code\r
 \r
     XmlDocument myDocument (File ("myfile.xml"));\r
-    ScopedPointer<XmlElement> mainElement (myDocument.getDocumentElement());\r
+    std::unique_ptr<XmlElement> mainElement (myDocument.getDocumentElement());\r
 \r
     if (mainElement == nullptr)\r
     {\r
@@ -50,7 +50,7 @@ namespace juce
     Or you can use the static helper methods for quick parsing..\r
 \r
     @code\r
-    ScopedPointer<XmlElement> xml (XmlDocument::parse (myXmlFile));\r
+    std::unique_ptr<XmlElement> xml (XmlDocument::parse (myXmlFile));\r
 \r
     if (xml != nullptr && xml->hasTagName ("foobar"))\r
     {\r
@@ -151,7 +151,7 @@ private:
     String lastError, dtdText;\r
     StringArray tokenisedDTD;\r
     bool needToLoadDTD = false, ignoreEmptyTextElements = true;\r
-    ScopedPointer<InputSource> inputSource;\r
+    std::unique_ptr<InputSource> inputSource;\r
 \r
     XmlElement* parseDocumentElement (String::CharPointerType, bool outer);\r
     void setLastError (const String&, bool carryOn);\r
index 5755e6f5e6982f79eaf90918d8e2c13a104331c6..4359973eb09e866c385aedefec914de3da14c22b 100644 (file)
@@ -101,7 +101,7 @@ private:
 \r
     class GZIPCompressorHelper;\r
     friend struct ContainerDeletePolicy<GZIPCompressorHelper>;\r
-    ScopedPointer<GZIPCompressorHelper> helper;\r
+    std::unique_ptr<GZIPCompressorHelper> helper;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GZIPCompressorOutputStream)\r
 };\r
index f10f2b62cccc28a3892eca3a50ec0d4731ad8319..4d0b38a75712276ee9d2972facdff8309791f300 100644 (file)
@@ -91,7 +91,7 @@ private:
 \r
     class GZIPDecompressHelper;\r
     friend struct ContainerDeletePolicy<GZIPDecompressHelper>;\r
-    ScopedPointer<GZIPDecompressHelper> helper;\r
+    std::unique_ptr<GZIPDecompressHelper> helper;\r
 \r
    #if JUCE_CATCH_DEPRECATED_CODE_MISUSE\r
     // The arguments to this method have changed! Please pass a Format enum instead of the old dontWrap bool.\r
index 19e96e5f42f63c8a846cb385a04d62988638449f..83d8abc1af63cfaed24309c76522f768cb18d8ba 100644 (file)
@@ -217,7 +217,7 @@ private:
     int64 pos = 0;\r
     int headerSize = 0;\r
     InputStream* inputStream;\r
-    ScopedPointer<InputStream> streamToDelete;\r
+    std::unique_ptr<InputStream> streamToDelete;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ZipInputStream)\r
 };\r
@@ -338,7 +338,7 @@ void ZipFile::sortEntriesByFilename()
 //==============================================================================\r
 void ZipFile::init()\r
 {\r
-    ScopedPointer<InputStream> toDelete;\r
+    std::unique_ptr<InputStream> toDelete;\r
     InputStream* in = inputStream;\r
 \r
     if (inputSource != nullptr)\r
@@ -417,7 +417,7 @@ Result ZipFile::uncompressEntry (int index, const File& targetDirectory, bool sh
     if (entryPath.endsWithChar ('/') || entryPath.endsWithChar ('\\'))\r
         return targetFile.createDirectory(); // (entry is a directory, not a file)\r
 \r
-    ScopedPointer<InputStream> in (createStreamForEntry (index));\r
+    std::unique_ptr<InputStream> in (createStreamForEntry (index));\r
 \r
     if (in == nullptr)\r
         return Result::fail ("Failed to open the zip file for reading");\r
@@ -523,7 +523,7 @@ struct ZipFile::Builder::Item
 \r
 private:\r
     const File file;\r
-    ScopedPointer<InputStream> stream;\r
+    std::unique_ptr<InputStream> stream;\r
     String storedPathname;\r
     Time fileTime;\r
     int64 compressedSize = 0, uncompressedSize = 0, headerStart = 0;\r
@@ -674,7 +674,7 @@ struct ZIPTests   : public UnitTest
         for (auto& entryName : entryNames)\r
         {\r
             auto* entry = zip.getEntry (entryName);\r
-            ScopedPointer<InputStream> input (zip.createStreamForEntry (*entry));\r
+            std::unique_ptr<InputStream> input (zip.createStreamForEntry (*entry));\r
             expectEquals (input->readEntireStreamAsString(), entryName);\r
         }\r
     }\r
index ffb210ed3b053c774fbf6131807ca30ddc8cc66a..8aaae9d830d5a3cfa35073034cd405aa60a4b58d 100644 (file)
@@ -238,8 +238,8 @@ private:
     OwnedArray<ZipEntryHolder> entries;\r
     CriticalSection lock;\r
     InputStream* inputStream = nullptr;\r
-    ScopedPointer<InputStream> streamToDelete;\r
-    ScopedPointer<InputSource> inputSource;\r
+    std::unique_ptr<InputStream> streamToDelete;\r
+    std::unique_ptr<InputSource> inputSource;\r
 \r
    #if JUCE_DEBUG\r
     struct OpenStreamCounter\r
index d6fb7562e580906014c3902a97eee3ffdf894d8b..504d92483bc65d9c93fd070e424b052e8ae3e595 100644 (file)
@@ -35,7 +35,7 @@
 \r
   ID:               juce_cryptography\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE cryptography classes\r
   description:      Classes for various basic cryptography functions, including RSA, Blowfish, MD5, SHA, etc.\r
   website:          http://www.juce.com/juce\r
index 3c7759c5abd07487177a7eca2b6b4087f179a5b2..7d0aadf5ea4652eb84030d0edee77eff6ccadfd5 100644 (file)
@@ -123,7 +123,7 @@ public:
 private:\r
     //==============================================================================\r
     PropertiesFile::Options options;\r
-    ScopedPointer<PropertiesFile> userProps, commonProps;\r
+    std::unique_ptr<PropertiesFile> userProps, commonProps;\r
     int commonSettingsAreReadOnly = 0;\r
 \r
     void openFiles();\r
index 6415f346767feecd58cb8b88347857f62ddf4219..c51d5916cd25907afcc78df313cf94b0f60c84c5 100644 (file)
@@ -184,7 +184,7 @@ bool PropertiesFile::save()
 bool PropertiesFile::loadAsXml()\r
 {\r
     XmlDocument parser (file);\r
-    ScopedPointer<XmlElement> doc (parser.getDocumentElement (true));\r
+    std::unique_ptr<XmlElement> doc (parser.getDocumentElement (true));\r
 \r
     if (doc != nullptr && doc->hasTagName (PropertyFileConstants::fileTag))\r
     {\r
index 83179cb9efaf4286a9335db362f593044fa29a69..aeefba4b6ccf727ccfe19881f517efd26ea285ba 100644 (file)
@@ -239,7 +239,7 @@ private:
     Options options;\r
     bool loadedOk = false, needsWriting = false;\r
 \r
-    typedef const ScopedPointer<InterProcessLock::ScopedLockType> ProcessScopedLock;\r
+    using ProcessScopedLock = const std::unique_ptr<InterProcessLock::ScopedLockType>;\r
     InterProcessLock::ScopedLockType* createProcessLock() const;\r
 \r
     void timerCallback() override;\r
index 7f5a199899760df470df7ef6c7d7cf36a3bce7e0..838d16d871ef2357ab06027056f9243fdaccf440 100644 (file)
@@ -35,7 +35,7 @@
 \r
   ID:               juce_data_structures\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE data model helper classes\r
   description:      Classes for undo/redo management, and smart data structures.\r
   website:          http://www.juce.com/juce\r
index dfdaed0a0553fc62bc8176857fff21c8fdcc4829..c736f0c62b7e7873bb4549b64d2b7eb1babfa311 100644 (file)
@@ -115,7 +115,7 @@ bool UndoManager::perform (UndoableAction* newAction)
 {\r
     if (newAction != nullptr)\r
     {\r
-        ScopedPointer<UndoableAction> action (newAction);\r
+        std::unique_ptr<UndoableAction> action (newAction);\r
 \r
         if (reentrancyCheck)\r
         {\r
index 40d85d71e85f25a4e94a3f421b3d1250730c7882..e40410d93f3675b5b5122b0ee534d9987e652cc2 100644 (file)
@@ -30,7 +30,7 @@ namespace juce
 class ValueTree::SharedObject  : public ReferenceCountedObject\r
 {\r
 public:\r
-    typedef ReferenceCountedObjectPtr<SharedObject> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<SharedObject>;\r
 \r
     explicit SharedObject (const Identifier& t) noexcept  : type (t) {}\r
 \r
@@ -220,7 +220,6 @@ public:
         auto newObject = new SharedObject (typeToMatch);\r
         addChild (newObject, -1, undoManager);\r
         return ValueTree (newObject);\r
-\r
     }\r
 \r
     ValueTree getChildWithProperty (const Identifier& propertyName, const var& propertyValue) const\r
@@ -580,16 +579,13 @@ ValueTree::ValueTree() noexcept
 {\r
 }\r
 \r
-#if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-const ValueTree ValueTree::invalid;\r
-#endif\r
+JUCE_DECLARE_DEPRECATED_STATIC (const ValueTree ValueTree::invalid);\r
 \r
 ValueTree::ValueTree (const Identifier& type)  : object (new ValueTree::SharedObject (type))\r
 {\r
     jassert (type.toString().isNotEmpty()); // All objects must be given a sensible type name!\r
 }\r
 \r
-#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
 ValueTree::ValueTree (const Identifier& type,\r
                       std::initializer_list<std::pair<Identifier, var>> properties,\r
                       std::initializer_list<ValueTree> subTrees)\r
@@ -601,7 +597,6 @@ ValueTree::ValueTree (const Identifier& type,
     for (auto& tree : subTrees)\r
         addChild (tree, -1, nullptr);\r
 }\r
-#endif\r
 \r
 ValueTree::ValueTree (SharedObject* so) noexcept  : object (so)\r
 {\r
@@ -998,7 +993,7 @@ ValueTree ValueTree::fromXml (const XmlElement& xml)
 \r
 String ValueTree::toXmlString() const\r
 {\r
-    ScopedPointer<XmlElement> xml (createXml());\r
+    std::unique_ptr<XmlElement> xml (createXml());\r
 \r
     if (xml != nullptr)\r
         return xml->createDocument ({});\r
@@ -1158,8 +1153,8 @@ public:
             }\r
             expect (v1.isEquivalentTo (ValueTree::readFromGZIPData (zipped.getData(), zipped.getDataSize())));\r
 \r
-            ScopedPointer<XmlElement> xml1 (v1.createXml());\r
-            ScopedPointer<XmlElement> xml2 (v2.createCopy().createXml());\r
+            std::unique_ptr<XmlElement> xml1 (v1.createXml());\r
+            std::unique_ptr<XmlElement> xml2 (v2.createCopy().createXml());\r
             expect (xml1->isEquivalentTo (xml2.get(), false));\r
 \r
             auto v4 = v2.createCopy();\r
index 06505423dca704030cc0328d5298fac44d1abdd2..b1cffbdae88ca7db80db50e8799e333f3c6b17d2 100644 (file)
@@ -88,7 +88,6 @@ public:
     */\r
     explicit ValueTree (const Identifier& type);\r
 \r
-   #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
     /** Creates a value tree from nested lists of properties and ValueTrees.\r
 \r
         This code,\r
@@ -131,7 +130,6 @@ public:
     ValueTree (const Identifier& type,\r
                std::initializer_list<std::pair<Identifier, var>> properties,\r
                std::initializer_list<ValueTree> subTrees = {});\r
-   #endif\r
 \r
     /** Creates a reference to another ValueTree. */\r
     ValueTree (const ValueTree&) noexcept;\r
@@ -591,12 +589,10 @@ public:
     */\r
     int getReferenceCount() const noexcept;\r
 \r
-   #if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-    /** An invalid ValueTree that can be used if you need to return one as an error condition, etc.\r
+    /* An invalid ValueTree that can be used if you need to return one as an error condition, etc.\r
         @deprecated If you need an empty ValueTree object, just use ValueTree() or {}.\r
     */\r
-    static const ValueTree invalid;\r
-   #endif\r
+    JUCE_DEPRECATED_STATIC (static const ValueTree invalid);\r
 \r
 private:\r
     //==============================================================================\r
index aa13b7039b445e0f0a1e4d62b17e4bfa1d90ac9f..36d710daa8cf11a3ffd5f01c9a49b6790e034f50 100644 (file)
@@ -261,6 +261,49 @@ public:
         return *this;\r
     }\r
 \r
+    /** Copy the values from a JUCE's AudioBuffer to the receiver.\r
+\r
+        All indices and sizes are in the receiver's units, i.e. if SampleType is a\r
+        SIMDRegister then incrementing srcPos by one will increase the sample position\r
+        in the AudioBuffer's units by a factor of SIMDRegister<SampleType>::SIMDNumElements.\r
+    */\r
+    forcedinline AudioBlock& copyFrom (const AudioBuffer<NumericType>& src, size_t srcPos = 0, size_t dstPos = 0,\r
+                                       size_t numElements = std::numeric_limits<size_t>::max())\r
+    {\r
+        auto srclen = static_cast<size_t> (src.getNumSamples()) / sizeFactor;\r
+        auto n = static_cast<int> (jmin (srclen - srcPos, numSamples - dstPos, numElements) * sizeFactor);\r
+        auto maxChannels = jmin (static_cast<size_t> (src.getNumChannels()), static_cast<size_t> (numChannels));\r
+\r
+        for (size_t ch = 0; ch < maxChannels; ++ch)\r
+            FloatVectorOperations::copy (channelPtr (ch),\r
+                                         src.getReadPointer (static_cast<int> (ch),\r
+                                                             static_cast<int> (srcPos * sizeFactor)),\r
+                                         n);\r
+\r
+        return *this;\r
+    }\r
+\r
+    /** Copy the values from the receiver to a JUCE's AudioBuffer.\r
+\r
+        All indices and sizes are in the receiver's units, i.e. if SampleType is a\r
+        SIMDRegister then incrementing dstPos by one will increase the sample position\r
+        in the AudioBuffer's units by a factor of SIMDRegister<SampleType>::SIMDNumElements.\r
+    */\r
+    forcedinline const AudioBlock& copyTo (AudioBuffer<NumericType>& dst, size_t srcPos = 0, size_t dstPos = 0,\r
+                                           size_t numElements = std::numeric_limits<size_t>::max()) const\r
+    {\r
+        auto dstlen = static_cast<size_t> (dst.getNumSamples()) / sizeFactor;\r
+        auto n = static_cast<int> (jmin (numSamples - srcPos, dstlen - dstPos, numElements) * sizeFactor);\r
+        auto maxChannels = jmin (static_cast<size_t> (dst.getNumChannels()), static_cast<size_t> (numChannels));\r
+\r
+        for (size_t ch = 0; ch < maxChannels; ++ch)\r
+            FloatVectorOperations::copy (dst.getWritePointer (static_cast<int> (ch),\r
+                                                              static_cast<int> (dstPos * sizeFactor)),\r
+                                         channelPtr (ch), n);\r
+\r
+        return *this;\r
+    }\r
+\r
     /** Move memory within the receiver from the position srcPos to the position dstPos.\r
         If numElements is not specified then move will move the maximum amount of memory.\r
     */\r
index ad9730894ca19c4dfa9e993b1e4ab4483af81d37..23d7d5dc7c5e18120ee082d71b0b1e65a7c94107 100644 (file)
@@ -64,36 +64,40 @@ struct SIMDRegister
 {\r
     //==============================================================================\r
     /** The type that represents the individual constituents of the SIMD Register */\r
-    typedef Type ElementType;\r
+    using ElementType = Type;\r
 \r
     /** STL compatible value_type definition (same as ElementType). */\r
-    typedef ElementType value_type;\r
+    using value_type = ElementType;\r
 \r
     /** The corresponding primitive integer type, for example, this will be int32_t\r
         if type is a float. */\r
-    typedef typename SIMDInternal::MaskTypeFor<ElementType>::type MaskType;\r
+    using MaskType = typename SIMDInternal::MaskTypeFor<ElementType>::type;\r
 \r
     //==============================================================================\r
     // Here are some types which are needed internally\r
 \r
     /** The native primitive type (used internally). */\r
-    typedef typename SIMDInternal::PrimitiveType<ElementType>::type PrimitiveType;\r
+    using PrimitiveType = typename SIMDInternal::PrimitiveType<ElementType>::type;\r
 \r
     /** The native operations for this platform and type combination (used internally) */\r
-    typedef SIMDNativeOps<PrimitiveType> NativeOps;\r
+    using NativeOps = SIMDNativeOps<PrimitiveType>;\r
 \r
     /** The native type (used internally). */\r
-    typedef typename NativeOps::vSIMDType vSIMDType;\r
+    using vSIMDType = typename NativeOps::vSIMDType;\r
 \r
     /** The corresponding integer SIMDRegister type (used internally). */\r
-    typedef SIMDRegister<MaskType> vMaskType;\r
+    using vMaskType = SIMDRegister<MaskType>;\r
 \r
     /** The internal native type for the corresponding mask type (used internally). */\r
-    typedef typename vMaskType::vSIMDType vMaskSIMDType;\r
+    using vMaskSIMDType = typename vMaskType::vSIMDType;\r
 \r
     /** Wrapper for operations which need to be handled differently for complex\r
         and scalar types (used internally). */\r
-    typedef CmplxSIMDOps<ElementType> CmplxOps;\r
+    using CmplxOps = CmplxSIMDOps<ElementType>;\r
+\r
+    /** Type which is returned when using the subscript operator. The returned type\r
+        should be used just like the type ElementType. */\r
+    struct ElementAccess;\r
 \r
     //==============================================================================\r
     /** The size in bytes of this register. */\r
@@ -146,18 +150,34 @@ struct SIMDRegister
     //==============================================================================\r
     /** Returns the idx-th element of the receiver. Note that this does not check if idx\r
         is larger than the native register size. */\r
-    inline ElementType JUCE_VECTOR_CALLTYPE operator[] (size_t idx) const noexcept\r
+    inline ElementType JUCE_VECTOR_CALLTYPE get (size_t idx) const noexcept\r
+    {\r
+        jassert (idx < SIMDNumElements);\r
+        return CmplxOps::get (value, idx);\r
+    }\r
+\r
+    /** Sets the idx-th element of the receiver. Note that this does not check if idx\r
+        is larger than the native register size. */\r
+    inline void JUCE_VECTOR_CALLTYPE set (size_t idx, ElementType v) noexcept\r
     {\r
         jassert (idx < SIMDNumElements);\r
-        return reinterpret_cast<const ElementType*> (&value) [idx];\r
+        value = CmplxOps::set (value, idx, v);\r
     }\r
 \r
+    //==============================================================================\r
     /** Returns the idx-th element of the receiver. Note that this does not check if idx\r
         is larger than the native register size. */\r
-    inline ElementType& JUCE_VECTOR_CALLTYPE operator[] (size_t idx) noexcept\r
+    inline ElementType JUCE_VECTOR_CALLTYPE operator[] (size_t idx) const noexcept\r
+    {\r
+        return get (idx);\r
+    }\r
+\r
+    /** Returns the idx-th element of the receiver. Note that this does not check if idx\r
+        is larger than the native register size. */\r
+    inline ElementAccess JUCE_VECTOR_CALLTYPE operator[] (size_t idx) noexcept\r
     {\r
         jassert (idx < SIMDNumElements);\r
-        return reinterpret_cast<ElementType*> (&value) [idx];\r
+        return ElementAccess (*this, idx);\r
     }\r
 \r
     //==============================================================================\r
@@ -371,114 +391,9 @@ private:
     }\r
 };\r
 \r
-#ifndef DOXYGEN\r
-//==============================================================================\r
-/* This class is used internally by SIMDRegister to abstract away differences\r
-   in operations which are different for complex and pure floating point types. */\r
-\r
-// the pure floating-point version\r
-template <typename Scalar>\r
-struct CmplxSIMDOps\r
-{\r
-    typedef typename SIMDNativeOps<Scalar>::vSIMDType vSIMDType;\r
-\r
-    static inline vSIMDType JUCE_VECTOR_CALLTYPE load (const Scalar* a) noexcept\r
-    {\r
-        return SIMDNativeOps<Scalar>::load (a);\r
-    }\r
-\r
-    static inline void JUCE_VECTOR_CALLTYPE store (vSIMDType value, Scalar* dest) noexcept\r
-    {\r
-        SIMDNativeOps<Scalar>::store (value, dest);\r
-    }\r
-\r
-    static inline vSIMDType JUCE_VECTOR_CALLTYPE expand (Scalar s) noexcept\r
-    {\r
-        return SIMDNativeOps<Scalar>::expand (s);\r
-    }\r
-\r
-    static inline Scalar JUCE_VECTOR_CALLTYPE sum (vSIMDType a)  noexcept\r
-    {\r
-        return SIMDNativeOps<Scalar>::sum (a);\r
-    }\r
-\r
-    static inline vSIMDType JUCE_VECTOR_CALLTYPE mul (vSIMDType a, vSIMDType b) noexcept\r
-    {\r
-        return SIMDNativeOps<Scalar>::mul (a, b);\r
-    }\r
-\r
-    static inline vSIMDType JUCE_VECTOR_CALLTYPE muladd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept\r
-    {\r
-        return SIMDNativeOps<Scalar>::multiplyAdd (a, b, c);\r
-    }\r
-};\r
-\r
-// The pure complex version\r
-template <typename Scalar>\r
-struct CmplxSIMDOps<std::complex<Scalar>>\r
-{\r
-    typedef typename SIMDNativeOps<Scalar>::vSIMDType vSIMDType;\r
-\r
-    static inline vSIMDType JUCE_VECTOR_CALLTYPE load (const std::complex<Scalar>* a) noexcept\r
-    {\r
-        return SIMDNativeOps<Scalar>::load (reinterpret_cast<const Scalar*> (a));\r
-    }\r
-\r
-    static inline void JUCE_VECTOR_CALLTYPE store (vSIMDType value, std::complex<Scalar>* dest) noexcept\r
-    {\r
-        SIMDNativeOps<Scalar>::store (value, reinterpret_cast<Scalar*> (dest));\r
-    }\r
-\r
-    static inline vSIMDType JUCE_VECTOR_CALLTYPE expand (std::complex<Scalar> s) noexcept\r
-    {\r
-        const int n = sizeof (vSIMDType) / sizeof (Scalar);\r
-\r
-        union\r
-        {\r
-            vSIMDType v;\r
-            Scalar floats[n];\r
-        } u;\r
-\r
-        for (int i = 0; i < n; ++i)\r
-            u.floats[i] = (i & 1) == 0 ? s.real() : s.imag();\r
-\r
-        return u.v;\r
-    }\r
-\r
-    static inline std::complex<Scalar> JUCE_VECTOR_CALLTYPE sum (vSIMDType a)  noexcept\r
-    {\r
-        vSIMDType result = SIMDNativeOps<Scalar>::oddevensum (a);\r
-        auto* ptr = reinterpret_cast<const Scalar*> (&result);\r
-        return std::complex<Scalar> (ptr[0], ptr[1]);\r
-    }\r
-\r
-    static inline vSIMDType JUCE_VECTOR_CALLTYPE mul (vSIMDType a, vSIMDType b)  noexcept\r
-    {\r
-        return SIMDNativeOps<Scalar>::cmplxmul (a, b);\r
-    }\r
-\r
-    static inline vSIMDType JUCE_VECTOR_CALLTYPE muladd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept\r
-    {\r
-        return SIMDNativeOps<Scalar>::add (a, SIMDNativeOps<Scalar>::cmplxmul (b, c));\r
-    }\r
-};\r
-#endif\r
+} // namespace dsp\r
+} // namespace juce\r
 \r
-//==============================================================================\r
 #ifndef DOXYGEN\r
- namespace util\r
- {\r
-     template <typename Type>\r
-     inline void snapToZero (SIMDRegister<Type>&) noexcept      {}\r
- }\r
+ #include "juce_SIMDRegister_Impl.h"\r
 #endif\r
-\r
-} // namespace dsp\r
-\r
-// Extend some common used global functions to SIMDRegister types\r
-template <typename Type>\r
-inline dsp::SIMDRegister<Type> JUCE_VECTOR_CALLTYPE jmin (dsp::SIMDRegister<Type> a, dsp::SIMDRegister<Type> b) { return dsp::SIMDRegister<Type>::min (a, b); }\r
-template <typename Type>\r
-inline dsp::SIMDRegister<Type> JUCE_VECTOR_CALLTYPE jmax (dsp::SIMDRegister<Type> a, dsp::SIMDRegister<Type> b) { return dsp::SIMDRegister<Type>::max (a, b); }\r
-\r
-} // namespace juce\r
diff --git a/modules/juce_dsp/containers/juce_SIMDRegister_Impl.h b/modules/juce_dsp/containers/juce_SIMDRegister_Impl.h
new file mode 100644 (file)
index 0000000..0774b1a
--- /dev/null
@@ -0,0 +1,178 @@
+/*\r
+  ==============================================================================\r
+\r
+   This file is part of the JUCE library.\r
+   Copyright (c) 2017 - ROLI Ltd.\r
+\r
+   JUCE is an open source library subject to commercial or open-source\r
+   licensing.\r
+\r
+   By using JUCE, you agree to the terms of both the JUCE 5 End-User License\r
+   Agreement and JUCE 5 Privacy Policy (both updated and effective as of the\r
+   27th April 2017).\r
+\r
+   End User License Agreement: www.juce.com/juce-5-licence\r
+   Privacy Policy: www.juce.com/juce-5-privacy-policy\r
+\r
+   Or: You may also use this code under the terms of the GPL v3 (see\r
+   www.gnu.org/licenses).\r
+\r
+   JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r
+   EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r
+   DISCLAIMED.\r
+\r
+  ==============================================================================\r
+*/\r
+\r
+namespace juce\r
+{\r
+namespace dsp\r
+{\r
+\r
+\r
+//==============================================================================\r
+template <typename Type>\r
+struct SIMDRegister<Type>::ElementAccess\r
+{\r
+    operator Type() const                                { return simd.get (idx); }\r
+    ElementAccess& operator= (Type scalar) noexcept      { simd.set (idx, scalar); return *this; }\r
+    ElementAccess& operator= (ElementAccess& o) noexcept { return operator= ((Type) o); }\r
+\r
+private:\r
+    friend struct SIMDRegister;\r
+    ElementAccess (SIMDRegister& owner, size_t index) noexcept : simd (owner), idx (index) {}\r
+    SIMDRegister& simd;\r
+    size_t idx;\r
+};\r
+\r
+#ifndef DOXYGEN\r
+//==============================================================================\r
+/* This class is used internally by SIMDRegister to abstract away differences\r
+   in operations which are different for complex and pure floating point types. */\r
+\r
+// the pure floating-point version\r
+template <typename Scalar>\r
+struct CmplxSIMDOps\r
+{\r
+    typedef typename SIMDNativeOps<Scalar>::vSIMDType vSIMDType;\r
+\r
+    static inline vSIMDType JUCE_VECTOR_CALLTYPE load (const Scalar* a) noexcept\r
+    {\r
+        return SIMDNativeOps<Scalar>::load (a);\r
+    }\r
+\r
+    static inline void JUCE_VECTOR_CALLTYPE store (vSIMDType value, Scalar* dest) noexcept\r
+    {\r
+        SIMDNativeOps<Scalar>::store (value, dest);\r
+    }\r
+\r
+    static inline vSIMDType JUCE_VECTOR_CALLTYPE expand (Scalar s) noexcept\r
+    {\r
+        return SIMDNativeOps<Scalar>::expand (s);\r
+    }\r
+\r
+    static inline Scalar JUCE_VECTOR_CALLTYPE get (vSIMDType v, std::size_t i) noexcept\r
+    {\r
+        return SIMDNativeOps<Scalar>::get (v, i);\r
+    }\r
+\r
+    static inline vSIMDType JUCE_VECTOR_CALLTYPE set (vSIMDType v, std::size_t i, Scalar s) noexcept\r
+    {\r
+        return SIMDNativeOps<Scalar>::set (v, i, s);\r
+    }\r
+\r
+    static inline Scalar JUCE_VECTOR_CALLTYPE sum (vSIMDType a)  noexcept\r
+    {\r
+        return SIMDNativeOps<Scalar>::sum (a);\r
+    }\r
+\r
+    static inline vSIMDType JUCE_VECTOR_CALLTYPE mul (vSIMDType a, vSIMDType b) noexcept\r
+    {\r
+        return SIMDNativeOps<Scalar>::mul (a, b);\r
+    }\r
+\r
+    static inline vSIMDType JUCE_VECTOR_CALLTYPE muladd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept\r
+    {\r
+        return SIMDNativeOps<Scalar>::multiplyAdd (a, b, c);\r
+    }\r
+};\r
+\r
+// The pure complex version\r
+template <typename Scalar>\r
+struct CmplxSIMDOps<std::complex<Scalar>>\r
+{\r
+    typedef typename SIMDNativeOps<Scalar>::vSIMDType vSIMDType;\r
+\r
+    static inline vSIMDType JUCE_VECTOR_CALLTYPE load (const std::complex<Scalar>* a) noexcept\r
+    {\r
+        return SIMDNativeOps<Scalar>::load (reinterpret_cast<const Scalar*> (a));\r
+    }\r
+\r
+    static inline void JUCE_VECTOR_CALLTYPE store (vSIMDType value, std::complex<Scalar>* dest) noexcept\r
+    {\r
+        SIMDNativeOps<Scalar>::store (value, reinterpret_cast<Scalar*> (dest));\r
+    }\r
+\r
+    static inline vSIMDType JUCE_VECTOR_CALLTYPE expand (std::complex<Scalar> s) noexcept\r
+    {\r
+        const int n = sizeof (vSIMDType) / sizeof (Scalar);\r
+\r
+        union\r
+        {\r
+            vSIMDType v;\r
+            Scalar floats[n];\r
+        } u;\r
+\r
+        for (int i = 0; i < n; ++i)\r
+            u.floats[i] = (i & 1) == 0 ? s.real() : s.imag();\r
+\r
+        return u.v;\r
+    }\r
+\r
+    static inline std::complex<Scalar> JUCE_VECTOR_CALLTYPE get (vSIMDType v, std::size_t i) noexcept\r
+    {\r
+        auto j = i << 1;\r
+        return std::complex<Scalar> (SIMDNativeOps<Scalar>::get (v, j), SIMDNativeOps<Scalar>::get (v, j + 1));\r
+    }\r
+\r
+    static inline vSIMDType JUCE_VECTOR_CALLTYPE set (vSIMDType v, std::size_t i, std::complex<Scalar> s) noexcept\r
+    {\r
+        auto j = i << 1;\r
+        return SIMDNativeOps<Scalar>::set (SIMDNativeOps<Scalar>::set (v, j, s.real()), j + 1, s.imag());\r
+    }\r
+\r
+    static inline std::complex<Scalar> JUCE_VECTOR_CALLTYPE sum (vSIMDType a)  noexcept\r
+    {\r
+        vSIMDType result = SIMDNativeOps<Scalar>::oddevensum (a);\r
+        auto* ptr = reinterpret_cast<const Scalar*> (&result);\r
+        return std::complex<Scalar> (ptr[0], ptr[1]);\r
+    }\r
+\r
+    static inline vSIMDType JUCE_VECTOR_CALLTYPE mul (vSIMDType a, vSIMDType b)  noexcept\r
+    {\r
+        return SIMDNativeOps<Scalar>::cmplxmul (a, b);\r
+    }\r
+\r
+    static inline vSIMDType JUCE_VECTOR_CALLTYPE muladd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept\r
+    {\r
+        return SIMDNativeOps<Scalar>::add (a, SIMDNativeOps<Scalar>::cmplxmul (b, c));\r
+    }\r
+};\r
+#endif\r
+\r
+//==============================================================================\r
+ namespace util\r
+ {\r
+     template <typename Type>\r
+     inline void snapToZero (SIMDRegister<Type>&) noexcept      {}\r
+ }\r
+\r
+} // namespace dsp\r
+\r
+// Extend some common used global functions to SIMDRegister types\r
+template <typename Type>\r
+inline dsp::SIMDRegister<Type> JUCE_VECTOR_CALLTYPE jmin (dsp::SIMDRegister<Type> a, dsp::SIMDRegister<Type> b) { return dsp::SIMDRegister<Type>::min (a, b); }\r
+template <typename Type>\r
+inline dsp::SIMDRegister<Type> JUCE_VECTOR_CALLTYPE jmax (dsp::SIMDRegister<Type> a, dsp::SIMDRegister<Type> b) { return dsp::SIMDRegister<Type>::max (a, b); }\r
+\r
+} // namespace juce\r
index c84e34ed23e94966219e718fe6850f391edb6e34..8213aa3439ca4391ac0845cb952569f24779b1cb 100644 (file)
@@ -31,37 +31,78 @@ namespace dsp
 \r
 namespace SIMDRegister_test_internal\r
 {\r
+    template <typename type, typename = void> struct RandomPrimitive {};\r
+\r
     template <typename type>\r
-    static void fillRandom (type* dst, const int size, Random& random)\r
+    struct RandomPrimitive<type, typename std::enable_if<std::is_floating_point<type>::value>::type>\r
     {\r
-        bool is_signed = std::is_signed<type>::value;\r
+        static type next (Random& random)\r
+        {\r
+            return static_cast<type> (std::is_signed<type>::value ? (random.nextFloat() * 16.0) - 8.0\r
+                                                                  : (random.nextFloat() * 8.0));\r
+\r
+        }\r
+    };\r
 \r
-        for (int i = 0; i < size; ++i)\r
+    template <typename type>\r
+    struct RandomPrimitive<type, typename std::enable_if<std::is_integral<type>::value>::type>\r
+    {\r
+        static type next (Random& random)\r
         {\r
-            if (is_signed)\r
-            {\r
-                *dst++ = static_cast<type> ((random.nextFloat() * 16.0) - 8.0);\r
-            }\r
-            else\r
-            {\r
-                *dst++ = static_cast<type> (random.nextFloat() * 8.0);\r
-            }\r
+            return static_cast<type> (random.nextInt64());\r
+\r
         }\r
-    }\r
+    };\r
 \r
+    template <typename type> struct RandomValue { static type next (Random& random) { return RandomPrimitive<type>::next (random); } };\r
     template <typename type>\r
-    static void fillRandom (std::complex<type>* dst, const int size, Random& random)\r
+    struct RandomValue<std::complex<type>>\r
     {\r
-        for (int i = 0; i < size; ++i)\r
+        static std::complex<type> next (Random& random)\r
         {\r
-            type real, imag;\r
+            return {RandomPrimitive<type>::next (random), RandomPrimitive<type>::next (random)};\r
+        }\r
+    };\r
 \r
-            real = static_cast<type> ((random.nextFloat() * 16.0) - 8.0);\r
-            imag = static_cast<type> ((random.nextFloat() * 16.0) - 8.0);\r
 \r
-            *dst++ = std::complex<type> (real, imag);\r
+    template <typename type>\r
+    struct VecFiller\r
+    {\r
+        static void fill (type* dst, const int size, Random& random)\r
+        {\r
+            for (int i = 0; i < size; ++i)\r
+                dst[i] = RandomValue<type>::next (random);\r
         }\r
-    }\r
+    };\r
+\r
+    // We need to specialise for complex types: otherwise GCC 6 gives\r
+    // us an ICE internal compiler error after which the compiler seg faults.\r
+    template <typename type>\r
+    struct VecFiller<std::complex<type>>\r
+    {\r
+        static void fill (std::complex<type>* dst, const int size, Random& random)\r
+        {\r
+            for (int i = 0; i < size; ++i)\r
+                dst[i] = std::complex<type> (RandomValue<type>::next (random), RandomValue<type>::next (random));\r
+        }\r
+    };\r
+\r
+    template <typename type>\r
+    struct VecFiller<SIMDRegister<type>>\r
+    {\r
+        static SIMDRegister<type> fill(Random& random)\r
+        {\r
+            constexpr int size = (int) SIMDRegister<type>::SIMDNumElements;\r
+           #ifdef _MSC_VER\r
+            __declspec(align(sizeof (SIMDRegister<type>))) type elements[size];\r
+           #else\r
+            type elements[size] __attribute__((aligned(sizeof (SIMDRegister<type>))));\r
+           #endif\r
+\r
+            VecFiller<type>::fill (elements, size, random);\r
+            return SIMDRegister<type>::fromRawArray (elements);\r
+        }\r
+    };\r
 \r
     // Avoid visual studio warning\r
     template <typename type>\r
@@ -102,10 +143,17 @@ public:
     template <typename type>\r
     static bool allValuesEqualTo (const SIMDRegister<type>& vec, const type scalar)\r
     {\r
+       #ifdef _MSC_VER\r
+        __declspec(align(sizeof (SIMDRegister<type>))) type elements[SIMDRegister<type>::SIMDNumElements];\r
+       #else\r
+        type elements[SIMDRegister<type>::SIMDNumElements] __attribute__((aligned(sizeof (SIMDRegister<type>))));\r
+       #endif\r
+\r
+        vec.copyToRawArray (elements);\r
+\r
         // as we do not want to rely on the access operator we cast this to a primitive pointer\r
-        const type* ptr = reinterpret_cast<const type*> (&vec);\r
         for (size_t i = 0; i < SIMDRegister<type>::SIMDNumElements; ++i)\r
-            if (ptr[i] != scalar) return false;\r
+            if (elements[i] != scalar) return false;\r
 \r
         return true;\r
     }\r
@@ -246,12 +294,20 @@ public:
             u.expect (allValuesEqualTo<type> (SIMDRegister<type>::expand (static_cast<type> (23)), 23));\r
 \r
             {\r
-                SIMDRegister<type> a;\r
+               #ifdef _MSC_VER\r
+                __declspec(align(sizeof (SIMDRegister<type>))) type elements[SIMDRegister<type>::SIMDNumElements];\r
+               #else\r
+                type elements[SIMDRegister<type>::SIMDNumElements] __attribute__((aligned(sizeof (SIMDRegister<type>))));\r
+               #endif\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (elements, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister<type> a (SIMDRegister<type>::fromRawArray (elements));\r
+\r
+                u.expect (vecEqualToArray (a, elements));\r
 \r
-                type* ptr = reinterpret_cast<type*>(&a);\r
-                SIMDRegister_test_internal::fillRandom (ptr, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister<type> b (a);\r
+                a *= static_cast<type> (2);\r
 \r
-                u.expect (vecEqualToArray (SIMDRegister<type> (a), ptr));\r
+                u.expect (vecEqualToArray (b, elements));\r
             }\r
         }\r
     };\r
@@ -265,7 +321,7 @@ public:
             SIMDRegister<type> a;\r
             type array [SIMDRegister<type>::SIMDNumElements];\r
 \r
-            SIMDRegister_test_internal::fillRandom (array, SIMDRegister<type>::SIMDNumElements, random);\r
+            SIMDRegister_test_internal::VecFiller<type>::fill (array, SIMDRegister<type>::SIMDNumElements, random);\r
 \r
             // Test non-const access operator\r
             for (size_t i = 0; i < SIMDRegister<type>::SIMDNumElements; ++i)\r
@@ -290,14 +346,17 @@ public:
             for (int n = 0; n < 100; ++n)\r
             {\r
                 // set-up\r
-                SIMDRegister<type> a, b, c;\r
+                SIMDRegister<type> a (static_cast<type> (0));\r
+                SIMDRegister<type> b (static_cast<type> (0));\r
+                SIMDRegister<type> c (static_cast<type> (0));\r
+\r
                 type array_a [SIMDRegister<type>::SIMDNumElements];\r
                 type array_b [SIMDRegister<type>::SIMDNumElements];\r
                 type array_c [SIMDRegister<type>::SIMDNumElements];\r
 \r
-                SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
-                SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
-                SIMDRegister_test_internal::fillRandom (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
 \r
                 copy (a, array_a); copy (b, array_b); copy (c, array_c);\r
 \r
@@ -310,9 +369,9 @@ public:
                 u.expect (vecEqualToArray (a, array_a));\r
                 u.expect (vecEqualToArray (b, array_b));\r
 \r
-                SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
-                SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
-                SIMDRegister_test_internal::fillRandom (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
 \r
                 copy (a, array_a); copy (b, array_b); copy (c, array_c);\r
 \r
@@ -326,9 +385,9 @@ public:
                 u.expect (vecEqualToArray (b, array_b));\r
 \r
                 // set-up again\r
-                SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
-                SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
-                SIMDRegister_test_internal::fillRandom (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
                 copy (a, array_a); copy (b, array_b); copy (c, array_c);\r
 \r
                 // test out-of-place with both params being vectors\r
@@ -363,7 +422,6 @@ public:
             typedef typename SIMDRegister<type>::vMaskType vMaskType;\r
             typedef typename SIMDRegister<type>::MaskType MaskType;\r
 \r
-\r
             for (int n = 0; n < 100; ++n)\r
             {\r
                 // Check flip sign bit and using as a union\r
@@ -372,21 +430,28 @@ public:
 \r
                     union ConversionUnion\r
                     {\r
-                        inline ConversionUnion() {}\r
+                        inline ConversionUnion() : floatVersion (static_cast<type> (0)) {}\r
                         inline ~ConversionUnion() {}\r
                         SIMDRegister<type> floatVersion;\r
                         vMaskType intVersion;\r
                     } a, b;\r
 \r
                     vMaskType bitmask = vMaskType::expand (static_cast<MaskType> (1) << (sizeof (MaskType) - 1));\r
-                    SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+                    SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
                     copy (a.floatVersion, array_a);\r
                     copy (b.floatVersion, array_a);\r
 \r
                     Operation::template inplace<SIMDRegister<type>, vMaskType> (a.floatVersion, bitmask);\r
                     Operation::template inplace<vMaskType, vMaskType> (b.intVersion, bitmask);\r
 \r
-                    u.expect (vecEqualToArray (a.floatVersion, reinterpret_cast<const type*> (&b.floatVersion)));\r
+                   #ifdef _MSC_VER\r
+                    __declspec(align(sizeof (SIMDRegister<type>))) type elements[SIMDRegister<type>::SIMDNumElements];\r
+                   #else\r
+                    type elements[SIMDRegister<type>::SIMDNumElements] __attribute__((aligned(sizeof (SIMDRegister<type>))));\r
+                   #endif\r
+                    b.floatVersion.copyToRawArray (elements);\r
+\r
+                    u.expect (vecEqualToArray (a.floatVersion, elements));\r
                 }\r
 \r
                 // set-up\r
@@ -397,42 +462,51 @@ public:
                 MaskType array_b [SIMDRegister<MaskType>::SIMDNumElements];\r
                 MaskType array_c [SIMDRegister<MaskType>::SIMDNumElements];\r
 \r
-                type* conv_a = reinterpret_cast<type*> (array_a);\r
-                type* conv_c = reinterpret_cast<type*> (array_c);\r
+                type float_a [SIMDRegister<type>::SIMDNumElements];\r
+                type float_c [SIMDRegister<type>::SIMDNumElements];\r
+\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (float_a, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<MaskType>::fill (array_b, SIMDRegister<MaskType>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (float_c, SIMDRegister<type>::SIMDNumElements, random);\r
 \r
-                SIMDRegister_test_internal::fillRandom (conv_a, SIMDRegister<type>::SIMDNumElements, random);\r
-                SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<MaskType>::SIMDNumElements, random);\r
-                SIMDRegister_test_internal::fillRandom (conv_c, SIMDRegister<type>::SIMDNumElements, random);\r
-                copy (a, conv_a); copy (b, array_b); copy (c, conv_c);\r
+                memcpy (array_a, float_a, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+                memcpy (array_c, float_c, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+                copy (a, float_a); copy (b, array_b); copy (c, float_c);\r
 \r
                 // test in-place with both params being vectors\r
                 for (size_t i = 0; i < SIMDRegister<MaskType>::SIMDNumElements; ++i)\r
                     Operation::template inplace<MaskType, MaskType> (array_a[i], array_b[i]);\r
+                memcpy (float_a, array_a, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
 \r
                 Operation::template inplace<SIMDRegister<type>, vMaskType> (a, b);\r
 \r
-                u.expect (vecEqualToArray (a, conv_a));\r
+                u.expect (vecEqualToArray (a, float_a));\r
                 u.expect (vecEqualToArray (b, array_b));\r
 \r
-                SIMDRegister_test_internal::fillRandom (conv_a, SIMDRegister<type>::SIMDNumElements, random);\r
-                SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<MaskType>::SIMDNumElements, random);\r
-                SIMDRegister_test_internal::fillRandom (conv_c, SIMDRegister<type>::SIMDNumElements, random);\r
-                copy (a, conv_a); copy (b, array_b); copy (c, conv_c);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (float_a, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<MaskType>::fill (array_b, SIMDRegister<MaskType>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (float_c, SIMDRegister<type>::SIMDNumElements, random);\r
+                memcpy (array_a, float_a, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+                memcpy (array_c, float_c, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+                copy (a, float_a); copy (b, array_b); copy (c, float_c);\r
 \r
                 // test in-place with one param being scalar\r
                 for (size_t i = 0; i < SIMDRegister<MaskType>::SIMDNumElements; ++i)\r
                     Operation::template inplace<MaskType, MaskType> (array_a[i], static_cast<MaskType> (9));\r
+                memcpy (float_a, array_a, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
 \r
                 Operation::template inplace<SIMDRegister<type>, MaskType> (a, static_cast<MaskType> (9));\r
 \r
-                u.expect (vecEqualToArray (a, conv_a));\r
+                u.expect (vecEqualToArray (a, float_a));\r
                 u.expect (vecEqualToArray (b, array_b));\r
 \r
                 // set-up again\r
-                SIMDRegister_test_internal::fillRandom (conv_a, SIMDRegister<type>::SIMDNumElements, random);\r
-                SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<MaskType>::SIMDNumElements, random);\r
-                SIMDRegister_test_internal::fillRandom (conv_c, SIMDRegister<type>::SIMDNumElements, random);\r
-                copy (a, conv_a); copy (b, array_b); copy (c, conv_c);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (float_a, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<MaskType>::fill (array_b, SIMDRegister<MaskType>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (float_c, SIMDRegister<type>::SIMDNumElements, random);\r
+                memcpy (array_a, float_a, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+                memcpy (array_c, float_c, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+                copy (a, float_a); copy (b, array_b); copy (c, float_c);\r
 \r
                 // test out-of-place with both params being vectors\r
                 for (size_t i = 0; i < SIMDRegister<MaskType>::SIMDNumElements; ++i)\r
@@ -440,22 +514,26 @@ public:
                     array_c[i] =\r
                         Operation::template outofplace<MaskType, MaskType> (array_a[i], array_b[i]);\r
                 }\r
+                memcpy (float_a, array_a, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+                memcpy (float_c, array_c, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
 \r
                 c = Operation::template outofplace<SIMDRegister<type>, vMaskType> (a, b);\r
 \r
-                u.expect (vecEqualToArray (a, conv_a));\r
+                u.expect (vecEqualToArray (a, float_a));\r
                 u.expect (vecEqualToArray (b, array_b));\r
-                u.expect (vecEqualToArray (c, conv_c));\r
+                u.expect (vecEqualToArray (c, float_c));\r
 \r
                 // test out-of-place with one param being scalar\r
                 for (size_t i = 0; i < SIMDRegister<MaskType>::SIMDNumElements; ++i)\r
                     array_c[i] = Operation::template outofplace<MaskType, MaskType> (array_a[i], static_cast<MaskType> (9));\r
+                memcpy (float_a, array_a, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+                memcpy (float_c, array_c, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
 \r
                 c = Operation::template outofplace<SIMDRegister<type>, MaskType> (a, static_cast<MaskType> (9));\r
 \r
-                u.expect (vecEqualToArray (a, conv_a));\r
+                u.expect (vecEqualToArray (a, float_a));\r
                 u.expect (vecEqualToArray (b, array_b));\r
-                u.expect (vecEqualToArray (c, conv_c));\r
+                u.expect (vecEqualToArray (c, float_c));\r
             }\r
         }\r
     };\r
@@ -481,8 +559,8 @@ public:
                 MaskType array_ge  [SIMDRegister<type>::SIMDNumElements];\r
 \r
 \r
-                SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
-                SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
 \r
                 // do check\r
                 for (size_t j = 0; j < SIMDRegister<type>::SIMDNumElements; ++j)\r
@@ -495,7 +573,9 @@ public:
                     array_ge  [j] = (array_a[j] >= array_b[j]) ? static_cast<MaskType> (-1) : 0;\r
                 }\r
 \r
-                SIMDRegister<type> a, b;\r
+                SIMDRegister<type> a (static_cast<type> (0));\r
+                SIMDRegister<type> b (static_cast<type> (0));\r
+\r
                 vMaskType eq, neq, lt, le, gt, ge;\r
 \r
                 copy (a, array_a);\r
@@ -517,8 +597,8 @@ public:
 \r
                 do\r
                 {\r
-                    SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
-                    SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
+                    SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+                    SIMDRegister_test_internal::VecFiller<type>::fill (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
                 } while (std::equal (array_a, array_a + SIMDRegister<type>::SIMDNumElements, array_b));\r
 \r
                 copy (a, array_a);\r
@@ -528,7 +608,7 @@ public:
                 u.expect (! (a == b));\r
                 u.expect (! (b == a));\r
 \r
-                SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+                SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
                 copy (a, array_a);\r
                 copy (b, array_a);\r
 \r
@@ -537,7 +617,7 @@ public:
                 u.expect (! (a != b));\r
                 u.expect (! (b != a));\r
 \r
-                auto scalar = a[0];\r
+                type scalar = a[0];\r
                 a = SIMDRegister<type>::expand (scalar);\r
 \r
                 u.expect (a == scalar);\r
@@ -562,10 +642,10 @@ public:
             type array_c [SIMDRegister<type>::SIMDNumElements];\r
             type array_d [SIMDRegister<type>::SIMDNumElements];\r
 \r
-            SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
-            SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
-            SIMDRegister_test_internal::fillRandom (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
-            SIMDRegister_test_internal::fillRandom (array_d, SIMDRegister<type>::SIMDNumElements, random);\r
+            SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+            SIMDRegister_test_internal::VecFiller<type>::fill (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
+            SIMDRegister_test_internal::VecFiller<type>::fill (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
+            SIMDRegister_test_internal::VecFiller<type>::fill (array_d, SIMDRegister<type>::SIMDNumElements, random);\r
 \r
             // check\r
             for (size_t i = 0; i < SIMDRegister<type>::SIMDNumElements; ++i)\r
@@ -607,7 +687,10 @@ public:
                     array_max[j] = (array_a[j] > array_b[j]) ? array_a[j] : array_b[j];\r
                 }\r
 \r
-                SIMDRegister<type> a, b, vMin, vMax;\r
+                SIMDRegister<type> a (static_cast<type> (0));\r
+                SIMDRegister<type> b (static_cast<type> (0));\r
+                SIMDRegister<type> vMin (static_cast<type> (0));\r
+                SIMDRegister<type> vMax (static_cast<type> (0));\r
 \r
                 copy (a, array_a);\r
                 copy (b, array_b);\r
@@ -638,7 +721,7 @@ public:
             type array [SIMDRegister<type>::SIMDNumElements];\r
             type sumCheck = 0;\r
 \r
-            SIMDRegister_test_internal::fillRandom (array, SIMDRegister<type>::SIMDNumElements, random);\r
+            SIMDRegister_test_internal::VecFiller<type>::fill (array, SIMDRegister<type>::SIMDNumElements, random);\r
 \r
             for (size_t j = 0; j < SIMDRegister<type>::SIMDNumElements; ++j)\r
             {\r
@@ -652,6 +735,43 @@ public:
         }\r
     };\r
 \r
+    struct CheckBoolEquals\r
+    {\r
+        template <typename type>\r
+        static void run (UnitTest& u, Random& random)\r
+        {\r
+            bool is_signed = std::is_signed<type>::value;\r
+            type array [SIMDRegister<type>::SIMDNumElements];\r
+\r
+            auto value = is_signed ? static_cast<type> ((random.nextFloat() * 16.0) - 8.0)\r
+                                   : static_cast<type> (random.nextFloat() * 8.0);\r
+\r
+            std::fill (array, array + SIMDRegister<type>::SIMDNumElements, value);\r
+            SIMDRegister<type> a, b;\r
+            copy (a, array);\r
+\r
+            u.expect (a == value);\r
+            u.expect (! (a != value));\r
+            value += 1;\r
+\r
+            u.expect (a != value);\r
+            u.expect (! (a == value));\r
+\r
+            SIMDRegister_test_internal::VecFiller<type>::fill (array, SIMDRegister<type>::SIMDNumElements, random);\r
+            copy (a, array);\r
+            copy (b, array);\r
+\r
+            u.expect (a == b);\r
+            u.expect (! (a != b));\r
+\r
+            SIMDRegister_test_internal::VecFiller<type>::fill (array, SIMDRegister<type>::SIMDNumElements, random);\r
+            copy (b, array);\r
+\r
+            u.expect (a != b);\r
+            u.expect (! (a == b));\r
+        }\r
+    };\r
+\r
     //==============================================================================\r
     template <class TheTest>\r
     void runTestForAllTypes (const char* unitTestName)\r
@@ -708,6 +828,7 @@ public:
         runTestForAllTypes<BitOperatorTests<BitXOR>> ("BitXOROperators");\r
 \r
         runTestNonComplex<CheckComparisonOps> ("CheckComparisons");\r
+        runTestNonComplex<CheckBoolEquals> ("CheckBoolEquals");\r
         runTestNonComplex<CheckMinMax> ("CheckMinMax");\r
 \r
         runTestForAllTypes<CheckMultiplyAdd> ("CheckMultiplyAdd");\r
index 3c0b60eab023d827d2e3eb9158d578bb75ee6796..469985d8951fd289e2e7a58d1e2607cefc015a79 100644 (file)
@@ -119,7 +119,7 @@ struct ConvolutionEngine
             buffersImpulseSegments.add (newImpulseSegment);\r
         }\r
 \r
-        ScopedPointer<FFT> FFTTempObject = new FFT (roundToInt (std::log2 (FFTSize)));\r
+        std::unique_ptr<FFT> FFTTempObject (new FFT (roundToInt (std::log2 (FFTSize))));\r
 \r
         auto* channelData = info.buffer->getWritePointer (channel);\r
 \r
@@ -312,7 +312,7 @@ struct ConvolutionEngine
     }\r
 \r
     //==============================================================================\r
-    ScopedPointer<FFT> FFTobject;\r
+    std::unique_ptr<FFT> FFTobject;\r
 \r
     size_t FFTSize = 0;\r
     size_t currentSegment = 0, numInputSegments = 0, numSegments = 0, blockSize = 0, inputDataPos = 0;\r
@@ -829,8 +829,9 @@ private:
     {\r
         AudioFormatManager manager;\r
         manager.registerBasicFormats();\r
+        std::unique_ptr<AudioFormatReader> formatReader (manager.createReaderFor (stream));\r
 \r
-        if (ScopedPointer<AudioFormatReader> formatReader = manager.createReaderFor (stream))\r
+        if (formatReader != nullptr)\r
         {\r
             currentInfo.originalNumChannels = formatReader->numChannels > 1 ? 2 : 1;\r
             currentInfo.originalSampleRate = formatReader->sampleRate;\r
index 46e863bcd54e483441f2303aa7585aaaad7047d5..b5891165d4b84b7246917484caddc262af12b302 100644 (file)
@@ -153,7 +153,7 @@ public:
 private:\r
     //==============================================================================\r
     struct Pimpl;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     //==============================================================================\r
     void processSamples (const AudioBlock<float>&, AudioBlock<float>&, bool isBypassed) noexcept;\r
index ea176799601e6f387e0bb2f74be495944a7b25ea..2fb5e4c03bfccbdfdae58200ba9be51f2655ca7f 100644 (file)
@@ -92,8 +92,8 @@ struct FFTFallback  : public FFT::Instance
 \r
     FFTFallback (int order)\r
     {\r
-        configForward = new FFTConfig (1 << order, false);\r
-        configInverse = new FFTConfig (1 << order, true);\r
+        configForward.reset (new FFTConfig (1 << order, false));\r
+        configInverse.reset (new FFTConfig (1 << order, true));\r
 \r
         size = 1 << order;\r
     }\r
@@ -416,7 +416,7 @@ struct FFTFallback  : public FFT::Instance
 \r
     //==============================================================================\r
     SpinLock processLock;\r
-    ScopedPointer<FFTConfig> configForward, configInverse;\r
+    std::unique_ptr<FFTConfig> configForward, configInverse;\r
     int size;\r
 };\r
 \r
index 525e8e578fd7c341d8b1f8d20f9ecd1f2fb9325f..c2669cfdda076dcac898e51cb369666d6f945cdf 100644 (file)
@@ -111,7 +111,7 @@ private:
     //==============================================================================\r
     struct Engine;\r
 \r
-    ScopedPointer<Instance> engine;\r
+    std::unique_ptr<Instance> engine;\r
     int size;\r
 \r
     //==============================================================================\r
index 5b770dfc8c04758624e061ddbdd8361204ff789b..848e792990f78a968271c137fe9f27df832b68fd 100644 (file)
@@ -35,9 +35,9 @@
 \r
 #include "juce_dsp.h"\r
 \r
-#if (! defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)) || (! defined (JUCE_HAS_CONSTEXPR))\r
+#if ! JUCE_HAS_CONSTEXPR\r
  #ifndef JUCE_DEMO_RUNNER\r
-  #error "juce_dsp module requires your compiler to have a newer version of the standard library"\r
+  #error "The juce_dsp module requires a compiler that supports constexpr"\r
  #endif\r
 #else\r
 \r
index 3cdd6c231c733f1a1a0e8e915ef217286642e2ba..f72fd8fc043d7fa5110274c04b19cebc6af26546 100644 (file)
@@ -36,7 +36,7 @@
 \r
   ID:                 juce_dsp\r
   vendor:             juce\r
-  version:            5.3.1\r
+  version:            5.3.2\r
   name:               JUCE DSP classes\r
   description:        Classes for audio buffer manipulation, digital audio processing, filtering, oversampling, fast math functions etc.\r
   website:            http://www.juce.com/juce\r
@@ -59,9 +59,9 @@
 #include <juce_audio_basics/juce_audio_basics.h>\r
 #include <juce_audio_formats/juce_audio_formats.h>\r
 \r
-#if (! defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)) || (! defined (JUCE_HAS_CONSTEXPR))\r
+#if ! JUCE_HAS_CONSTEXPR\r
  #ifndef JUCE_DEMO_RUNNER\r
-  #error "juce_dsp module requires your compiler to have a newer version of the standard library"\r
+  #error "The juce_dsp module requires a compiler that supports constexpr"\r
  #endif\r
 #else\r
 \r
index 696f810e3bcb956ef26a50ec7adde2339aecf807..f9a125dea9928f04ac9ea623654fce66243d87b7 100644 (file)
@@ -31,6 +31,11 @@ namespace dsp
 \r
 #ifndef DOXYGEN\r
 \r
+#if JUCE_GCC && (__GNUC__ >= 6)\r
+ #pragma GCC diagnostic push\r
+ #pragma GCC diagnostic ignored "-Wignored-attributes"\r
+#endif\r
+\r
 #ifdef _MSC_VER\r
  #define DECLARE_AVX_SIMD_CONST(type, name) \\r
     static __declspec(align(32)) const type name[32 / sizeof (type)]\r
@@ -58,7 +63,7 @@ struct SIMDNativeOps;
 template <>\r
 struct SIMDNativeOps<float>\r
 {\r
-    typedef __m256 vSIMDType;\r
+    using vSIMDType = __m256;\r
 \r
     //==============================================================================\r
     DECLARE_AVX_SIMD_CONST (int32_t, kAllBitsSet);\r
@@ -66,11 +71,11 @@ struct SIMDNativeOps<float>
     DECLARE_AVX_SIMD_CONST (float, kOne);\r
 \r
     //==============================================================================\r
-    static forcedinline __m256 JUCE_VECTOR_CALLTYPE vconst (const float* a) noexcept                     { return *reinterpret_cast<const __m256*> (a); }\r
-    static forcedinline __m256 JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept                   { return *reinterpret_cast<const __m256*> (a); }\r
+    static forcedinline __m256 JUCE_VECTOR_CALLTYPE vconst (const float* a) noexcept                     { return load (a); }\r
+    static forcedinline __m256 JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept                   { return _mm256_castsi256_ps (_mm256_load_si256 ((const __m256i*) a)); }\r
     static forcedinline __m256 JUCE_VECTOR_CALLTYPE expand (float s) noexcept                            { return _mm256_broadcast_ss (&s); }\r
     static forcedinline __m256 JUCE_VECTOR_CALLTYPE load (const float* a) noexcept                       { return _mm256_load_ps (a); }\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256 value, float* dest) noexcept             { _mm256_store_ps (dest, value); }\r
+    static forcedinline void   JUCE_VECTOR_CALLTYPE store (__m256 value, float* dest) noexcept           { _mm256_store_ps (dest, value); }\r
     static forcedinline __m256 JUCE_VECTOR_CALLTYPE add (__m256 a, __m256 b) noexcept                    { return _mm256_add_ps (a, b); }\r
     static forcedinline __m256 JUCE_VECTOR_CALLTYPE sub (__m256 a, __m256 b) noexcept                    { return _mm256_sub_ps (a, b); }\r
     static forcedinline __m256 JUCE_VECTOR_CALLTYPE mul (__m256 a, __m256 b) noexcept                    { return _mm256_mul_ps (a, b); }\r
@@ -90,6 +95,8 @@ struct SIMDNativeOps<float>
     static forcedinline __m256 JUCE_VECTOR_CALLTYPE dupeven (__m256 a) noexcept                          { return _mm256_shuffle_ps (a, a, _MM_SHUFFLE (2, 2, 0, 0)); }\r
     static forcedinline __m256 JUCE_VECTOR_CALLTYPE dupodd (__m256 a) noexcept                           { return _mm256_shuffle_ps (a, a, _MM_SHUFFLE (3, 3, 1, 1)); }\r
     static forcedinline __m256 JUCE_VECTOR_CALLTYPE swapevenodd (__m256 a) noexcept                      { return _mm256_shuffle_ps (a, a, _MM_SHUFFLE (2, 3, 0, 1)); }\r
+    static forcedinline float  JUCE_VECTOR_CALLTYPE get (__m256 v, size_t i) noexcept                    { return SIMDFallbackOps<float, __m256>::get (v, i); }\r
+    static forcedinline __m256 JUCE_VECTOR_CALLTYPE set (__m256 v, size_t i, float s) noexcept           { return SIMDFallbackOps<float, __m256>::set (v, i, s); }\r
     static forcedinline __m256 JUCE_VECTOR_CALLTYPE oddevensum (__m256 a) noexcept\r
     {\r
         a = _mm256_add_ps (_mm256_shuffle_ps (a, a, _MM_SHUFFLE (1, 0, 3, 2)), a);\r
@@ -109,7 +116,12 @@ struct SIMDNativeOps<float>
        __m256 retval = _mm256_dp_ps (a, vconst (kOne), 0xff);\r
        __m256 tmp = _mm256_permute2f128_ps (retval, retval, 1);\r
        retval = _mm256_add_ps (retval, tmp);\r
-       return ((float*) &retval)[0];\r
+\r
+      #if JUCE_GCC\r
+       return retval[0];\r
+      #else\r
+       return _mm256_cvtss_f32 (retval);\r
+      #endif\r
     }\r
 };\r
 \r
@@ -121,7 +133,7 @@ struct SIMDNativeOps<float>
 template <>\r
 struct SIMDNativeOps<double>\r
 {\r
-    typedef __m256d vSIMDType;\r
+    using vSIMDType = __m256d;\r
 \r
     //==============================================================================\r
     DECLARE_AVX_SIMD_CONST (int64_t, kAllBitsSet);\r
@@ -129,8 +141,8 @@ struct SIMDNativeOps<double>
     DECLARE_AVX_SIMD_CONST (double, kOne);\r
 \r
     //==============================================================================\r
-    static forcedinline __m256d JUCE_VECTOR_CALLTYPE vconst (const double* a) noexcept                      { return *reinterpret_cast<const __m256d*> (a); }\r
-    static forcedinline __m256d JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept                     { return *reinterpret_cast<const __m256d*> (a); }\r
+    static forcedinline __m256d JUCE_VECTOR_CALLTYPE vconst (const double* a) noexcept                      { return load (a); }\r
+    static forcedinline __m256d JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept                     { return _mm256_castsi256_pd (_mm256_load_si256 ((const __m256i*) a)); }\r
     static forcedinline __m256d JUCE_VECTOR_CALLTYPE expand (double s) noexcept                             { return _mm256_broadcast_sd (&s); }\r
     static forcedinline __m256d JUCE_VECTOR_CALLTYPE load (const double* a) noexcept                        { return _mm256_load_pd (a); }\r
     static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256d value, double* dest) noexcept              { _mm256_store_pd (dest, value); }\r
@@ -148,12 +160,15 @@ struct SIMDNativeOps<double>
     static forcedinline __m256d JUCE_VECTOR_CALLTYPE notEqual (__m256d a, __m256d b) noexcept               { return _mm256_cmp_pd (a, b, _CMP_NEQ_OQ); }\r
     static forcedinline __m256d JUCE_VECTOR_CALLTYPE greaterThan (__m256d a, __m256d b) noexcept            { return _mm256_cmp_pd (a, b, _CMP_GT_OQ); }\r
     static forcedinline __m256d JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256d a, __m256d b) noexcept     { return _mm256_cmp_pd (a, b, _CMP_GE_OQ); }\r
-    static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m256d a, __m256d b) noexcept                { return (_mm256_movemask_pd (equal (a, b)) == 0xf); }\r
+    static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m256d a, __m256d b) noexcept               { return (_mm256_movemask_pd (equal (a, b)) == 0xf); }\r
     static forcedinline __m256d JUCE_VECTOR_CALLTYPE multiplyAdd (__m256d a, __m256d b, __m256d c) noexcept { return _mm256_add_pd (a, _mm256_mul_pd (b, c)); }\r
     static forcedinline __m256d JUCE_VECTOR_CALLTYPE dupeven (__m256d a) noexcept                           { return _mm256_shuffle_pd (a, a, 0); }\r
     static forcedinline __m256d JUCE_VECTOR_CALLTYPE dupodd (__m256d a) noexcept                            { return _mm256_shuffle_pd (a, a, (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3)); }\r
     static forcedinline __m256d JUCE_VECTOR_CALLTYPE swapevenodd (__m256d a) noexcept                       { return _mm256_shuffle_pd (a, a, (1 << 0) | (0 << 1) | (1 << 2) | (0 << 3)); }\r
     static forcedinline __m256d JUCE_VECTOR_CALLTYPE oddevensum (__m256d a) noexcept                        { return _mm256_add_pd (_mm256_permute2f128_pd (a, a, 1), a); }\r
+    static forcedinline double  JUCE_VECTOR_CALLTYPE get (__m256d v, size_t i) noexcept                     { return SIMDFallbackOps<double, __m256d>::get (v, i); }\r
+    static forcedinline __m256d JUCE_VECTOR_CALLTYPE set (__m256d v, size_t i, double s) noexcept           { return SIMDFallbackOps<double, __m256d>::set (v, i, s); }\r
+\r
 \r
     //==============================================================================\r
     static forcedinline __m256d JUCE_VECTOR_CALLTYPE cmplxmul (__m256d a, __m256d b) noexcept\r
@@ -168,7 +183,12 @@ struct SIMDNativeOps<double>
         __m256d retval = _mm256_hadd_pd (a, a);\r
         __m256d tmp = _mm256_permute2f128_pd (retval, retval, 1);\r
         retval = _mm256_add_pd (retval, tmp);\r
-        return ((double*) &retval)[0];\r
+\r
+       #if JUCE_GCC\r
+        return retval[0];\r
+       #else\r
+        return _mm256_cvtsd_f64 (retval);\r
+       #endif\r
     }\r
 };\r
 \r
@@ -180,20 +200,21 @@ struct SIMDNativeOps<double>
 template <>\r
 struct SIMDNativeOps<int8_t>\r
 {\r
-    typedef __m256i vSIMDType;\r
+    using vSIMDType = __m256i;\r
 \r
     //==============================================================================\r
     DECLARE_AVX_SIMD_CONST (int8_t, kAllBitsSet);\r
 \r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const int8_t* a) noexcept                      { return *reinterpret_cast<const __m256i*> (a); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int8_t s) noexcept                             { return _mm256_set1_epi8 (s); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int8_t* p) noexcept                        { return _mm256_load_si256 ((const __m256i*) p); }\r
+    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int8_t* dest) noexcept              { _mm256_store_si256 ((__m256i*) dest, value); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept                    { return _mm256_add_epi8 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept                    { return _mm256_sub_epi8 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept                { return _mm256_and_si256 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or  (__m256i a, __m256i b) noexcept                { return _mm256_or_si256  (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept                { return _mm256_xor_si256 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept             { return _mm256_andnot_si256 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                           { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                           { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept                    { return _mm256_min_epi8 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept                    { return _mm256_max_epi8 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept                  { return _mm256_cmpeq_epi8 (a, b); }\r
@@ -202,22 +223,10 @@ struct SIMDNativeOps<int8_t>
     static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept               { return _mm256_movemask_epi8 (equal (a, b)) == -1; }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept               { return bit_not (equal (a, b)); }\r
+    static forcedinline int8_t  JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept                     { return SIMDFallbackOps<int8_t, __m256i>::get (v, i); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, int8_t s) noexcept           { return SIMDFallbackOps<int8_t, __m256i>::set (v, i, s); }\r
 \r
     //==============================================================================\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int8_t* a) noexcept\r
-    {\r
-        const auto* b = reinterpret_cast<const char*> (a);\r
-        return _mm256_set_epi8 (b[31], b[30], b[29], b[28], b[27], b[26], b[25], b[24],\r
-                                b[23], b[22], b[21], b[20], b[19], b[18], b[17], b[16],\r
-                                b[15], b[14], b[13], b[12], b[11], b[10], b[9],  b[8],\r
-                                b[7],  b[6],  b[5],  b[4],  b[3],  b[2],  b[1],  b[0]);\r
-    }\r
-\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int8_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<int8_t, __m256i>::store (value, dest);\r
-    }\r
-\r
     static forcedinline int8_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
     {\r
         __m256i lo = _mm256_unpacklo_epi8 (a, _mm256_setzero_si256());\r
@@ -229,10 +238,19 @@ struct SIMDNativeOps<int8_t>
             hi = _mm256_hadd_epi16 (hi, hi);\r
         }\r
 \r
-        const int8_t* lo_ptr = reinterpret_cast<const int8_t*> (&lo);\r
-        const int8_t* hi_ptr = reinterpret_cast<const int8_t*> (&hi);\r
+       #if JUCE_GCC\r
+        return (int8_t) ((lo[0] & 0xff) +\r
+                         (hi[0] & 0xff) +\r
+                         (lo[2] & 0xff) +\r
+                         (hi[2] & 0xff));\r
+       #else\r
+        constexpr int mask = (2 << 0) | (3 << 2) | (0 << 4) | (1 << 6);\r
 \r
-        return (int8_t) (lo_ptr[0] + hi_ptr[0] + lo_ptr[16] + hi_ptr[16]);\r
+        return (int8_t) ((_mm256_cvtsi256_si32 (lo) & 0xff) +\r
+                         (_mm256_cvtsi256_si32 (hi) & 0xff) +\r
+                         (_mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (lo, mask)) & 0xff) +\r
+                         (_mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (hi, mask)) & 0xff));\r
+       #endif\r
     }\r
 \r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b)\r
@@ -255,22 +273,23 @@ template <>
 struct SIMDNativeOps<uint8_t>\r
 {\r
     //==============================================================================\r
-    typedef __m256i vSIMDType;\r
+    using vSIMDType = __m256i;\r
 \r
     //==============================================================================\r
     DECLARE_AVX_SIMD_CONST (uint8_t, kHighBit);\r
     DECLARE_AVX_SIMD_CONST (uint8_t, kAllBitsSet);\r
 \r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const uint8_t* a) noexcept                      { return *reinterpret_cast<const __m256i*> (a); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept                              { return _mm256_xor_si256 (a, vconst (kHighBit)); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept                              { return _mm256_xor_si256 (a, load (kHighBit)); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint8_t s) noexcept                             { return _mm256_set1_epi8 ((int8_t) s); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint8_t* p) noexcept                        { return _mm256_load_si256 ((const __m256i*) p); }\r
+    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint8_t* dest) noexcept              { _mm256_store_si256 ((__m256i*) dest, value); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept                     { return _mm256_add_epi8 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept                     { return _mm256_sub_epi8 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept                 { return _mm256_and_si256 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or  (__m256i a, __m256i b) noexcept                 { return _mm256_or_si256  (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept                 { return _mm256_xor_si256 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept              { return _mm256_andnot_si256 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                            { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                            { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept                     { return _mm256_min_epu8 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept                     { return _mm256_max_epu8 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept                   { return _mm256_cmpeq_epi8 (a, b); }\r
@@ -279,22 +298,10 @@ struct SIMDNativeOps<uint8_t>
     static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept                { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept  { return add (a, mul (b, c)); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept                { return bit_not (equal (a, b)); }\r
+    static forcedinline uint8_t JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept                      { return SIMDFallbackOps<uint8_t, __m256i>::get (v, i); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, uint8_t s) noexcept           { return SIMDFallbackOps<uint8_t, __m256i>::set (v, i, s); }\r
 \r
     //==============================================================================\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint8_t* a) noexcept\r
-    {\r
-        const auto* b = reinterpret_cast<const char*> (a);\r
-        return _mm256_set_epi8 (b[31], b[30], b[29], b[28], b[27], b[26], b[25], b[24],\r
-                                b[23], b[22], b[21], b[20], b[19], b[18], b[17], b[16],\r
-                                b[15], b[14], b[13], b[12], b[11], b[10], b[9],  b[8],\r
-                                b[7],  b[6],  b[5],  b[4],  b[3],  b[2],  b[1],  b[0]);\r
-    }\r
-\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint8_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<uint8_t, __m256i>::store (value, dest);\r
-    }\r
-\r
     static forcedinline uint8_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
     {\r
         __m256i lo = _mm256_unpacklo_epi8 (a, _mm256_setzero_si256());\r
@@ -306,10 +313,19 @@ struct SIMDNativeOps<uint8_t>
             hi = _mm256_hadd_epi16 (hi, hi);\r
         }\r
 \r
-        const uint8_t* lo_ptr = reinterpret_cast<const uint8_t*> (&lo);\r
-        const uint8_t* hi_ptr = reinterpret_cast<const uint8_t*> (&hi);\r
+       #if JUCE_GCC\r
+        return (uint8_t) ((static_cast<uint32_t> (lo[0]) & 0xffu) +\r
+                          (static_cast<uint32_t> (hi[0]) & 0xffu) +\r
+                          (static_cast<uint32_t> (lo[2]) & 0xffu) +\r
+                          (static_cast<uint32_t> (hi[2]) & 0xffu));\r
+       #else\r
+        constexpr int mask = (2 << 0) | (3 << 2) | (0 << 4) | (1 << 6);\r
 \r
-        return (uint8_t) (lo_ptr[0] + hi_ptr[0] + lo_ptr[16] + hi_ptr[16]);\r
+        return (uint8_t) ((static_cast<uint32_t> (_mm256_cvtsi256_si32 (lo)) & 0xffu) +\r
+                          (static_cast<uint32_t> (_mm256_cvtsi256_si32 (hi)) & 0xffu) +\r
+                          (static_cast<uint32_t> (_mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (lo, mask))) & 0xffu) +\r
+                          (static_cast<uint32_t> (_mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (hi, mask))) & 0xffu));\r
+       #endif\r
     }\r
 \r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b)\r
@@ -332,14 +348,15 @@ template <>
 struct SIMDNativeOps<int16_t>\r
 {\r
     //==============================================================================\r
-    typedef __m256i vSIMDType;\r
+    using vSIMDType = __m256i;\r
 \r
     //==============================================================================\r
     DECLARE_AVX_SIMD_CONST (int16_t, kAllBitsSet);\r
 \r
     //==============================================================================\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const int16_t* a) noexcept                      { return *reinterpret_cast<const __m256i*> (a); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int16_t s) noexcept                             { return _mm256_set1_epi16 (s); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int16_t* p) noexcept                        { return _mm256_load_si256 ((const __m256i*) p); }\r
+    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int16_t* dest) noexcept              { _mm256_store_si256 ((__m256i*) dest, value); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept                     { return _mm256_add_epi16 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept                     { return _mm256_sub_epi16 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept                     { return _mm256_mullo_epi16 (a, b); }\r
@@ -347,7 +364,7 @@ struct SIMDNativeOps<int16_t>
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or  (__m256i a, __m256i b) noexcept                 { return _mm256_or_si256  (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept                 { return _mm256_xor_si256 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept              { return _mm256_andnot_si256 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                            { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                            { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept                     { return _mm256_min_epi16 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept                     { return _mm256_max_epi16 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept                   { return _mm256_cmpeq_epi16 (a, b); }\r
@@ -356,26 +373,24 @@ struct SIMDNativeOps<int16_t>
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept  { return add (a, mul (b, c)); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept                { return bit_not (equal (a, b)); }\r
     static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept                { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
+    static forcedinline int16_t JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept                      { return SIMDFallbackOps<int16_t, __m256i>::get (v, i); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, int16_t s) noexcept           { return SIMDFallbackOps<int16_t, __m256i>::set (v, i, s); }\r
 \r
     //==============================================================================\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int16_t* a) noexcept\r
-    {\r
-        return _mm256_set_epi16 (a[15], a[14], a[13], a[12], a[11], a[10], a[9], a[8],\r
-                                 a[7],  a[6],  a[5],  a[4],  a[3],  a[2],  a[1], a[0]);\r
-    }\r
-\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int16_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<int16_t, __m256i>::store (value, dest);\r
-    }\r
-\r
     static forcedinline int16_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
     {\r
         __m256i tmp = _mm256_hadd_epi16 (a, a);\r
         tmp = _mm256_hadd_epi16 (tmp, tmp);\r
         tmp = _mm256_hadd_epi16 (tmp, tmp);\r
-        int16_t* ptr = reinterpret_cast<int16_t*> (&tmp);\r
-        return (int16_t) (ptr[0] + ptr[8]);\r
+\r
+       #if JUCE_GCC\r
+        return (int16_t) ((tmp[0] & 0xffff) + (tmp[2] & 0xffff));\r
+       #else\r
+        constexpr int mask = (2 << 0) | (3 << 2) | (0 << 4) | (1 << 6);\r
+\r
+        return (int16_t) ((_mm256_cvtsi256_si32 (tmp) & 0xffff) +\r
+                          (_mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (tmp, mask)) & 0xffff));\r
+       #endif\r
     }\r
 };\r
 \r
@@ -388,53 +403,52 @@ template <>
 struct SIMDNativeOps<uint16_t>\r
 {\r
     //==============================================================================\r
-    typedef __m256i vSIMDType;\r
+    using vSIMDType = __m256i;\r
 \r
     //==============================================================================\r
     DECLARE_AVX_SIMD_CONST (uint16_t, kHighBit);\r
     DECLARE_AVX_SIMD_CONST (uint16_t, kAllBitsSet);\r
 \r
     //==============================================================================\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const uint16_t* a) noexcept                     { return *reinterpret_cast<const __m256i*> (a); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept                              { return _mm256_xor_si256 (a, vconst (kHighBit)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint16_t s) noexcept                            { return _mm256_set1_epi16 ((int16_t) s); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept                     { return _mm256_add_epi16 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept                     { return _mm256_sub_epi16 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept                     { return _mm256_mullo_epi16 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept                 { return _mm256_and_si256 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or  (__m256i a, __m256i b) noexcept                 { return _mm256_or_si256  (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept                 { return _mm256_xor_si256 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept              { return _mm256_andnot_si256 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                            { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept                     { return _mm256_min_epu16 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept                     { return _mm256_max_epu16 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept                   { return _mm256_cmpeq_epi16 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept             { return _mm256_cmpgt_epi16 (ssign (a), ssign (b)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept      { return bit_or (greaterThan (a, b), equal (a,b)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept  { return add (a, mul (b, c)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept                { return bit_not (equal (a, b)); }\r
-    static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept                { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept                              { return _mm256_xor_si256 (a, load (kHighBit)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE expand (uint16_t s) noexcept                            { return _mm256_set1_epi16 ((int16_t) s); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE load (const uint16_t* p) noexcept                       { return _mm256_load_si256 ((const __m256i*) p); }\r
+    static forcedinline void     JUCE_VECTOR_CALLTYPE store (__m256i value, uint16_t* dest) noexcept          { _mm256_store_si256 ((__m256i*) dest, value); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept                     { return _mm256_add_epi16 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept                     { return _mm256_sub_epi16 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept                     { return _mm256_mullo_epi16 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept                 { return _mm256_and_si256 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE bit_or  (__m256i a, __m256i b) noexcept                 { return _mm256_or_si256  (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept                 { return _mm256_xor_si256 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept              { return _mm256_andnot_si256 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                            { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept                     { return _mm256_min_epu16 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept                     { return _mm256_max_epu16 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept                   { return _mm256_cmpeq_epi16 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept             { return _mm256_cmpgt_epi16 (ssign (a), ssign (b)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept      { return bit_or (greaterThan (a, b), equal (a,b)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept  { return add (a, mul (b, c)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept                { return bit_not (equal (a, b)); }\r
+    static forcedinline bool     JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept                { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
+    static forcedinline uint16_t JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept                      { return SIMDFallbackOps<uint16_t, __m256i>::get (v, i); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, uint16_t s) noexcept          { return SIMDFallbackOps<uint16_t, __m256i>::set (v, i, s); }\r
 \r
     //==============================================================================\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint16_t* a) noexcept\r
-    {\r
-        const auto* b = reinterpret_cast<const int16_t*> (a);\r
-        return _mm256_set_epi16 (b[15], b[14], b[13], b[12], b[11], b[10], b[9], b[8],\r
-                                 b[7],  b[6],  b[5],  b[4],  b[3],  b[2],  b[1], b[0]);\r
-    }\r
-\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint16_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<uint16_t, __m256i>::store (value, dest);\r
-    }\r
-\r
     static forcedinline uint16_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
     {\r
         __m256i tmp = _mm256_hadd_epi16 (a, a);\r
         tmp = _mm256_hadd_epi16 (tmp, tmp);\r
         tmp = _mm256_hadd_epi16 (tmp, tmp);\r
-        uint16_t* ptr = reinterpret_cast<uint16_t*> (&tmp);\r
-        return (uint16_t) (ptr[0] + ptr[8]);\r
+\r
+       #if JUCE_GCC\r
+        return (uint16_t) ((static_cast<uint32_t> (tmp[0]) & 0xffffu) +\r
+                           (static_cast<uint32_t> (tmp[2]) & 0xffffu));\r
+       #else\r
+        constexpr int mask = (2 << 0) | (3 << 2) | (0 << 4) | (1 << 6);\r
+\r
+        return (uint16_t) ((static_cast<uint32_t> (_mm256_cvtsi256_si32 (tmp)) & 0xffffu) +\r
+                           (static_cast<uint32_t> (_mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (tmp, mask))) & 0xffffu));\r
+       #endif\r
     }\r
 };\r
 \r
@@ -447,14 +461,15 @@ template <>
 struct SIMDNativeOps<int32_t>\r
 {\r
     //==============================================================================\r
-    typedef __m256i vSIMDType;\r
+    using vSIMDType = __m256i;\r
 \r
     //==============================================================================\r
     DECLARE_AVX_SIMD_CONST (int32_t, kAllBitsSet);\r
 \r
     //==============================================================================\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept                      { return *reinterpret_cast<const __m256i*> (a); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int32_t s) noexcept                             { return _mm256_set1_epi32 (s); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int32_t* p) noexcept                        { return _mm256_load_si256 ((const __m256i*) p); }\r
+    static forcedinline void    JUCE_VECTOR_CALLTYPE store (__m256i value, int32_t* dest) noexcept           { _mm256_store_si256 ((__m256i*) dest, value); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept                     { return _mm256_add_epi32 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept                     { return _mm256_sub_epi32 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept                     { return _mm256_mullo_epi32 (a, b); }\r
@@ -462,7 +477,7 @@ struct SIMDNativeOps<int32_t>
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or  (__m256i a, __m256i b) noexcept                 { return _mm256_or_si256  (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept                 { return _mm256_xor_si256 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept              { return _mm256_andnot_si256 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                            { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                            { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept                     { return _mm256_min_epi32 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept                     { return _mm256_max_epi32 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept                   { return _mm256_cmpeq_epi32 (a, b); }\r
@@ -471,24 +486,22 @@ struct SIMDNativeOps<int32_t>
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept  { return add (a, mul (b, c)); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept                { return bit_not (equal (a, b)); }\r
     static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept                { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
+    static forcedinline int32_t JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept                      { return SIMDFallbackOps<int32_t, __m256i>::get (v, i); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, int32_t s) noexcept           { return SIMDFallbackOps<int32_t, __m256i>::set (v, i, s); }\r
 \r
     //==============================================================================\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int32_t* a) noexcept\r
-    {\r
-        return _mm256_set_epi32 (a[7], a[6], a[5], a[4], a[3], a[2], a[1], a[0]);\r
-    }\r
-\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int32_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<int32_t, __m256i>::store (value, dest);\r
-    }\r
-\r
     static forcedinline int32_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
     {\r
         __m256i tmp = _mm256_hadd_epi32 (a, a);\r
         tmp = _mm256_hadd_epi32 (tmp, tmp);\r
-        int32_t* ptr = reinterpret_cast<int32_t*> (&tmp);\r
-        return ptr[0] + ptr[4];\r
+\r
+       #if JUCE_GCC\r
+        return tmp[0] + tmp[2];\r
+       #else\r
+        constexpr int mask = (2 << 0) | (3 << 2) | (0 << 4) | (1 << 6);\r
+\r
+        return _mm256_cvtsi256_si32 (tmp) + _mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (tmp, mask));\r
+       #endif\r
     }\r
 };\r
 \r
@@ -501,51 +514,50 @@ template <>
 struct SIMDNativeOps<uint32_t>\r
 {\r
     //==============================================================================\r
-    typedef __m256i vSIMDType;\r
+    using vSIMDType = __m256i;\r
 \r
     //==============================================================================\r
     DECLARE_AVX_SIMD_CONST (uint32_t, kAllBitsSet);\r
     DECLARE_AVX_SIMD_CONST (uint32_t, kHighBit);\r
 \r
     //==============================================================================\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const uint32_t* a) noexcept                     { return *reinterpret_cast<const __m256i*> (a); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept                              { return _mm256_xor_si256 (a, vconst (kHighBit)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint32_t s) noexcept                            { return _mm256_set1_epi32 ((int32_t) s); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept                     { return _mm256_add_epi32 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept                     { return _mm256_sub_epi32 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept                     { return _mm256_mullo_epi32 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept                 { return _mm256_and_si256 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or  (__m256i a, __m256i b) noexcept                 { return _mm256_or_si256  (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept                 { return _mm256_xor_si256 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept              { return _mm256_andnot_si256 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                            { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept                     { return _mm256_min_epu32 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept                     { return _mm256_max_epu32 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept                   { return _mm256_cmpeq_epi32 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept             { return _mm256_cmpgt_epi32 (ssign (a), ssign (b)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept      { return bit_or (greaterThan (a, b), equal (a,b)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept  { return add (a, mul (b, c)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept                { return bit_not (equal (a, b)); }\r
-    static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept                { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept                              { return _mm256_xor_si256 (a, load (kHighBit)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE expand (uint32_t s) noexcept                            { return _mm256_set1_epi32 ((int32_t) s); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE load (const uint32_t* p) noexcept                       { return _mm256_load_si256 ((const __m256i*) p); }\r
+    static forcedinline void     JUCE_VECTOR_CALLTYPE store (__m256i value, uint32_t* dest) noexcept          { _mm256_store_si256 ((__m256i*) dest, value); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept                     { return _mm256_add_epi32 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept                     { return _mm256_sub_epi32 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept                     { return _mm256_mullo_epi32 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept                 { return _mm256_and_si256 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE bit_or  (__m256i a, __m256i b) noexcept                 { return _mm256_or_si256  (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept                 { return _mm256_xor_si256 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept              { return _mm256_andnot_si256 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                            { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept                     { return _mm256_min_epu32 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept                     { return _mm256_max_epu32 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept                   { return _mm256_cmpeq_epi32 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept             { return _mm256_cmpgt_epi32 (ssign (a), ssign (b)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept      { return bit_or (greaterThan (a, b), equal (a,b)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept  { return add (a, mul (b, c)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept                { return bit_not (equal (a, b)); }\r
+    static forcedinline bool     JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept                { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
+    static forcedinline uint32_t JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept                      { return SIMDFallbackOps<uint32_t, __m256i>::get (v, i); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, uint32_t s) noexcept          { return SIMDFallbackOps<uint32_t, __m256i>::set (v, i, s); }\r
 \r
     //==============================================================================\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint32_t* a) noexcept\r
-    {\r
-        const auto* b = reinterpret_cast<const int32_t*> (a);\r
-        return _mm256_set_epi32 (b[7], b[6], b[5], b[4], b[3], b[2], b[1], b[0]);\r
-    }\r
-\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint32_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<uint32_t, __m256i>::store (value, dest);\r
-    }\r
-\r
     static forcedinline uint32_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
     {\r
         __m256i tmp = _mm256_hadd_epi32 (a, a);\r
         tmp = _mm256_hadd_epi32 (tmp, tmp);\r
-        uint32_t* ptr = reinterpret_cast<uint32_t*> (&tmp);\r
-        return ptr[0] + ptr[4];\r
+\r
+       #if JUCE_GCC\r
+        return static_cast<uint32_t> (tmp[0]) + static_cast<uint32_t> (tmp[2]);\r
+       #else\r
+        constexpr int mask = (2 << 0) | (3 << 2) | (0 << 4) | (1 << 6);\r
+\r
+        return static_cast<uint32_t> (_mm256_cvtsi256_si32 (tmp))\r
+            + static_cast<uint32_t> (_mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (tmp, mask)));\r
+       #endif\r
     }\r
 };\r
 \r
@@ -558,19 +570,21 @@ template <>
 struct SIMDNativeOps<int64_t>\r
 {\r
     //==============================================================================\r
-    typedef __m256i vSIMDType;\r
+    using vSIMDType = __m256i;\r
 \r
     //==============================================================================\r
     DECLARE_AVX_SIMD_CONST (int64_t, kAllBitsSet);\r
 \r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept                      { return *reinterpret_cast<const __m256i*> (a); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int64_t s) noexcept                             { return _mm256_set1_epi64x ((int64_t) s); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int64_t* p) noexcept                        { return _mm256_load_si256 ((const __m256i*) p); }\r
+    static forcedinline void    JUCE_VECTOR_CALLTYPE store (__m256i value, int64_t* dest) noexcept           { _mm256_store_si256 ((__m256i*) dest, value); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept                     { return _mm256_add_epi64 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept                     { return _mm256_sub_epi64 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept                 { return _mm256_and_si256 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or  (__m256i a, __m256i b) noexcept                 { return _mm256_or_si256  (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept                 { return _mm256_xor_si256 (a, b); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept              { return _mm256_andnot_si256 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                            { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                            { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept                     { __m256i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept                     { __m256i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept                   { return _mm256_cmpeq_epi64 (a, b); }\r
@@ -579,47 +593,10 @@ struct SIMDNativeOps<int64_t>
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept  { return add (a, mul (b, c)); }\r
     static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept                { return bit_not (equal (a, b)); }\r
     static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept                { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
-\r
-    //==============================================================================\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int64_t* a) noexcept\r
-    {\r
-        return _mm256_set_epi64x (a[3], a[2], a[1], a[0]);\r
-    }\r
-\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int64_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<int64_t, __m256i>::store (value, dest);\r
-    }\r
-\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int64_t s) noexcept\r
-    {\r
-       #ifdef _MSC_VER\r
-        __m256d tmp = _mm256_broadcast_sd (reinterpret_cast<const double*> (&s));\r
-        return *reinterpret_cast<const __m256i*> (&tmp);\r
-       #else\r
-        return _mm256_set1_epi64x ((int64_t) s);\r
-       #endif\r
-    }\r
-\r
-    static forcedinline int64_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
-    {\r
-        const int64_t* ptr = reinterpret_cast<const int64_t*> (&a);\r
-        return ptr[0] + ptr[1] + ptr[2] + ptr[3];\r
-    }\r
-\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept\r
-    {\r
-        __m256i retval;\r
-\r
-        const int64_t* aptr = reinterpret_cast<const int64_t*> (&a);\r
-        const int64_t* bptr = reinterpret_cast<const int64_t*> (&b);\r
-        int64_t* dst =  reinterpret_cast<int64_t*> (&retval);\r
-\r
-        for (int i = 0; i < 4; ++i)\r
-            dst[i] = aptr[i] * bptr[i];\r
-\r
-        return retval;\r
-    }\r
+    static forcedinline int64_t JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept                      { return SIMDFallbackOps<int64_t, __m256i>::get (v, i); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, int64_t s) noexcept           { return SIMDFallbackOps<int64_t, __m256i>::set (v, i, s); }\r
+    static forcedinline int64_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept                                { return SIMDFallbackOps<int64_t, __m256i>::sum (a); }\r
+    static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept                     { return SIMDFallbackOps<int64_t, __m256i>::mul (a, b); }\r
 };\r
 \r
 //==============================================================================\r
@@ -631,74 +608,42 @@ template <>
 struct SIMDNativeOps<uint64_t>\r
 {\r
     //==============================================================================\r
-    typedef __m256i vSIMDType;\r
+    using vSIMDType = __m256i;\r
 \r
     //==============================================================================\r
     DECLARE_AVX_SIMD_CONST (uint64_t, kAllBitsSet);\r
     DECLARE_AVX_SIMD_CONST (uint64_t, kHighBit);\r
 \r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const uint64_t* a) noexcept                     { return *reinterpret_cast<const __m256i*> (a); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept                              { return _mm256_xor_si256 (a, vconst (kHighBit)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept                     { return _mm256_add_epi64 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept                     { return _mm256_sub_epi64 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept                 { return _mm256_and_si256 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or  (__m256i a, __m256i b) noexcept                 { return _mm256_or_si256  (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept                 { return _mm256_xor_si256 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept              { return _mm256_andnot_si256 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                            { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept                     { __m256i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept                     { __m256i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept                   { return _mm256_cmpeq_epi64 (a, b); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept             { return _mm256_cmpgt_epi64 (ssign (a), ssign (b)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept      { return bit_or (greaterThan (a, b), equal (a,b)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept  { return add (a, mul (b, c)); }\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept                { return bit_not (equal (a, b)); }\r
-    static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept                { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
-\r
-    //==============================================================================\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint64_t* a) noexcept\r
-    {\r
-        const auto* b = reinterpret_cast<const int64_t*> (a);\r
-        return _mm256_set_epi64x (b[3], b[2], b[1], b[0]);\r
-    }\r
-\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint64_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<uint64_t, __m256i>::store (value, dest);\r
-    }\r
-\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint64_t s) noexcept\r
-    {\r
-       #ifdef _MSC_VER\r
-        __m256d tmp = _mm256_broadcast_sd (reinterpret_cast<const double*> (&s));\r
-        return *reinterpret_cast<const __m256i*> (&tmp);\r
-       #else\r
-        return _mm256_set1_epi64x ((int64_t) s);\r
-       #endif\r
-    }\r
-\r
-    static forcedinline uint64_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
-    {\r
-        const uint64_t* ptr = reinterpret_cast<const uint64_t*> (&a);\r
-        return ptr[0] + ptr[1] + ptr[2] + ptr[3];\r
-    }\r
-\r
-    static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept\r
-    {\r
-        __m256i retval;\r
-\r
-        const uint64_t* aptr = reinterpret_cast<const uint64_t*> (&a);\r
-        const uint64_t* bptr = reinterpret_cast<const uint64_t*> (&b);\r
-        uint64_t* dst =  reinterpret_cast<uint64_t*> (&retval);\r
-\r
-        for (int i = 0; i < 4; ++i)\r
-            dst[i] = aptr[i] * bptr[i];\r
-\r
-        return retval;\r
-    }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE expand (uint64_t s) noexcept                            { return _mm256_set1_epi64x ((int64_t) s); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE load (const uint64_t* p) noexcept                       { return _mm256_load_si256 ((const __m256i*) p); }\r
+    static forcedinline void     JUCE_VECTOR_CALLTYPE store (__m256i value, uint64_t* dest) noexcept          { _mm256_store_si256 ((__m256i*) dest, value); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept                              { return _mm256_xor_si256 (a, load (kHighBit)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept                     { return _mm256_add_epi64 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept                     { return _mm256_sub_epi64 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept                 { return _mm256_and_si256 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE bit_or  (__m256i a, __m256i b) noexcept                 { return _mm256_or_si256  (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept                 { return _mm256_xor_si256 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept              { return _mm256_andnot_si256 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept                            { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept                     { __m256i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept                     { __m256i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept                   { return _mm256_cmpeq_epi64 (a, b); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept             { return _mm256_cmpgt_epi64 (ssign (a), ssign (b)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept      { return bit_or (greaterThan (a, b), equal (a,b)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept  { return add (a, mul (b, c)); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept                { return bit_not (equal (a, b)); }\r
+    static forcedinline bool     JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept                { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
+    static forcedinline uint64_t JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept                      { return SIMDFallbackOps<uint64_t, __m256i>::get (v, i); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, uint64_t s) noexcept          { return SIMDFallbackOps<uint64_t, __m256i>::set (v, i, s); }\r
+    static forcedinline uint64_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept                                { return SIMDFallbackOps<uint64_t, __m256i>::sum (a); }\r
+    static forcedinline __m256i  JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept                     { return SIMDFallbackOps<uint64_t, __m256i>::mul (a, b); }\r
 };\r
 \r
 #endif\r
 \r
+#if JUCE_GCC && (__GNUC__ >= 6)\r
+ #pragma GCC diagnostic pop\r
+#endif\r
+\r
 } // namespace dsp\r
 } // namespace juce\r
index d7336c88181364cb37e1102527dd564ee56e2f83..dad1284093a4d094097eb6fa08db4812d9252a28 100644 (file)
@@ -32,19 +32,19 @@ namespace dsp
 /** A template specialisation to find corresponding mask type for primitives. */\r
 namespace SIMDInternal\r
 {\r
-    template <typename Primitive> struct MaskTypeFor        { typedef Primitive type; };\r
-    template <> struct MaskTypeFor <float>                  { typedef uint32_t  type; };\r
-    template <> struct MaskTypeFor <double>                 { typedef uint64_t  type; };\r
-    template <> struct MaskTypeFor <char>                   { typedef uint8_t   type; };\r
-    template <> struct MaskTypeFor <int8_t>                 { typedef uint8_t   type; };\r
-    template <> struct MaskTypeFor <int16_t>                { typedef uint16_t  type; };\r
-    template <> struct MaskTypeFor <int32_t>                { typedef uint32_t  type; };\r
-    template <> struct MaskTypeFor <int64_t>                { typedef uint64_t  type; };\r
-    template <> struct MaskTypeFor <std::complex<float>>    { typedef uint32_t  type; };\r
-    template <> struct MaskTypeFor <std::complex<double>>   { typedef uint64_t  type; };\r
-\r
-    template <typename Primitive> struct PrimitiveType                           { typedef Primitive type; };\r
-    template <typename Primitive> struct PrimitiveType<std::complex<Primitive>>  { typedef Primitive type; };\r
+    template <typename Primitive> struct MaskTypeFor        { using type = Primitive; };\r
+    template <> struct MaskTypeFor <float>                  { using type = uint32_t; };\r
+    template <> struct MaskTypeFor <double>                 { using type = uint64_t; };\r
+    template <> struct MaskTypeFor <char>                   { using type = uint8_t; };\r
+    template <> struct MaskTypeFor <int8_t>                 { using type = uint8_t; };\r
+    template <> struct MaskTypeFor <int16_t>                { using type = uint16_t; };\r
+    template <> struct MaskTypeFor <int32_t>                { using type = uint32_t; };\r
+    template <> struct MaskTypeFor <int64_t>                { using type = uint64_t; };\r
+    template <> struct MaskTypeFor <std::complex<float>>    { using type = uint32_t; };\r
+    template <> struct MaskTypeFor <std::complex<double>>   { using type = uint64_t; };\r
+\r
+    template <typename Primitive> struct PrimitiveType                           { using type = Primitive; };\r
+    template <typename Primitive> struct PrimitiveType<std::complex<Primitive>>  { using type = Primitive; };\r
 \r
     template <int n>    struct Log2Helper    { enum { value = Log2Helper<n/2>::value + 1 }; };\r
     template <>         struct Log2Helper<1> { enum { value = 0 }; };\r
@@ -63,8 +63,11 @@ struct SIMDFallbackOps
     static constexpr size_t mask = (sizeof (vSIMDType) / sizeof (ScalarType)) - 1;\r
     static constexpr size_t bits = SIMDInternal::Log2Helper<n>::value;\r
 \r
-    // corresponding mask type\r
-    typedef typename SIMDInternal::MaskTypeFor<ScalarType>::type MaskType;\r
+    // helper types\r
+    using MaskType = typename SIMDInternal::MaskTypeFor<ScalarType>::type;\r
+    union UnionType     { vSIMDType v; ScalarType s[n]; };\r
+    union UnionMaskType { vSIMDType v; MaskType   m[n]; };\r
+\r
 \r
     // fallback methods\r
     static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept        { return apply<ScalarAdd> (a, b); }\r
@@ -82,69 +85,80 @@ struct SIMDFallbackOps
     static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept        { return cmp<ScalarGt > (a, b); }\r
     static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return cmp<ScalarGeq> (a, b); }\r
 \r
-    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept\r
+    static forcedinline ScalarType get (vSIMDType v, size_t i) noexcept\r
     {\r
-        vSIMDType retval;\r
-        auto* dst  = reinterpret_cast<MaskType*> (&retval);\r
-        auto* aSrc = reinterpret_cast<const MaskType*> (&a);\r
+        UnionType u {v};\r
+        return u.s[i];\r
+    }\r
+\r
+    static forcedinline vSIMDType set (vSIMDType v, size_t i, ScalarType s) noexcept\r
+    {\r
+        UnionType u {v};\r
+\r
+        u.s[i] = s;\r
+        return u.v;\r
+    }\r
+\r
+    static forcedinline vSIMDType bit_not (vSIMDType av) noexcept\r
+    {\r
+        UnionMaskType a {av};\r
 \r
         for (size_t i = 0; i < n; ++i)\r
-            dst [i] = ~aSrc [i];\r
+            a.m[i] = ~a.m[i];\r
 \r
-        return retval;\r
+        return a.v;\r
     }\r
 \r
-    static forcedinline ScalarType sum (vSIMDType a) noexcept\r
+    static forcedinline ScalarType sum (vSIMDType av) noexcept\r
     {\r
+        UnionType a {av};\r
         auto retval = static_cast<ScalarType> (0);\r
-        auto* aSrc = reinterpret_cast<const ScalarType*> (&a);\r
 \r
         for (size_t i = 0; i < n; ++i)\r
-            retval += aSrc [i];\r
+            retval += a.s[i];\r
 \r
         return retval;\r
     }\r
 \r
-    static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept\r
+    static forcedinline vSIMDType multiplyAdd (vSIMDType av, vSIMDType bv, vSIMDType cv) noexcept\r
     {\r
-        vSIMDType retval;\r
-        auto* dst  = reinterpret_cast<ScalarType*> (&retval);\r
-        auto* aSrc = reinterpret_cast<const ScalarType*> (&a);\r
-        auto* bSrc = reinterpret_cast<const ScalarType*> (&b);\r
-        auto* cSrc = reinterpret_cast<const ScalarType*> (&c);\r
+        UnionType a {av}, b {bv}, c {cv};\r
 \r
         for (size_t i = 0; i < n; ++i)\r
-            dst [i] = aSrc [i] + (bSrc [i] * cSrc [i]);\r
+            a.s[i] += b.s[i] * c.s[i];\r
 \r
-        return retval;\r
+        return a.v;\r
     }\r
 \r
     //==============================================================================\r
-    static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept\r
+    static forcedinline bool allEqual (vSIMDType av, vSIMDType bv) noexcept\r
     {\r
-        auto* aSrc = reinterpret_cast<const ScalarType*> (&a);\r
-        auto* bSrc = reinterpret_cast<const ScalarType*> (&b);\r
+        UnionType a {av}, b {bv};\r
 \r
         for (size_t i = 0; i < n; ++i)\r
-            if (aSrc[i] != bSrc[i])\r
+            if (a.s[i] != b.s[i])\r
                 return false;\r
 \r
         return true;\r
     }\r
 \r
     //==============================================================================\r
-    static forcedinline vSIMDType cmplxmul (vSIMDType a, vSIMDType b) noexcept\r
+    static forcedinline vSIMDType cmplxmul (vSIMDType av, vSIMDType bv) noexcept\r
     {\r
-        vSIMDType retval;\r
-        auto* dst  = reinterpret_cast<std::complex<ScalarType>*> (&retval);\r
-        auto* aSrc = reinterpret_cast<const std::complex<ScalarType>*> (&a);\r
-        auto* bSrc = reinterpret_cast<const std::complex<ScalarType>*> (&b);\r
+        UnionType a {av}, b {bv}, r;\r
 \r
         const int m = n >> 1;\r
         for (int i = 0; i < m; ++i)\r
-            dst [i] = aSrc [i] * bSrc [i];\r
+        {\r
+            std::complex<ScalarType> result\r
+                  = std::complex<ScalarType> (a.s[i<<1], a.s[(i<<1)|1])\r
+                  * std::complex<ScalarType> (b.s[i<<1], b.s[(i<<1)|1]);\r
 \r
-        return retval;\r
+            r.s[i<<1]     = result.real();\r
+            r.s[(i<<1)|1] = result.imag();\r
+        }\r
+\r
+        return r.v;\r
     }\r
 \r
     struct ScalarAdd { static forcedinline ScalarType   op (ScalarType a, ScalarType b)   noexcept { return a + b; } };\r
@@ -163,90 +177,78 @@ struct SIMDFallbackOps
 \r
     // generic apply routines for operations above\r
     template <typename Op>\r
-    static forcedinline vSIMDType apply (vSIMDType a, vSIMDType b) noexcept\r
+    static forcedinline vSIMDType apply (vSIMDType av, vSIMDType bv) noexcept\r
     {\r
-        vSIMDType retval;\r
-        auto* dst  = reinterpret_cast<ScalarType*> (&retval);\r
-        auto* aSrc = reinterpret_cast<const ScalarType*> (&a);\r
-        auto* bSrc = reinterpret_cast<const ScalarType*> (&b);\r
+        UnionType a {av}, b {bv};\r
 \r
         for (size_t i = 0; i < n; ++i)\r
-            dst [i] = Op::op (aSrc [i], bSrc [i]);\r
+            a.s[i] = Op::op (a.s[i], b.s[i]);\r
 \r
-        return retval;\r
+        return a.v;\r
     }\r
 \r
     template <typename Op>\r
-    static forcedinline vSIMDType cmp (vSIMDType a, vSIMDType b) noexcept\r
+    static forcedinline vSIMDType cmp (vSIMDType av, vSIMDType bv) noexcept\r
     {\r
-        vSIMDType retval;\r
-        auto* dst  = reinterpret_cast<MaskType*> (&retval);\r
-        auto* aSrc = reinterpret_cast<const ScalarType*> (&a);\r
-        auto* bSrc = reinterpret_cast<const ScalarType*> (&b);\r
+        UnionType a {av}, b {bv};\r
+        UnionMaskType r;\r
 \r
         for (size_t i = 0; i < n; ++i)\r
-            dst [i] = Op::op (aSrc [i], bSrc [i]) ? static_cast<MaskType> (-1) : static_cast<MaskType> (0);\r
+            r.m[i] = Op::op (a.s[i], b.s[i]) ? static_cast<MaskType> (-1) : static_cast<MaskType> (0);\r
 \r
-        return retval;\r
+        return r.v;\r
     }\r
 \r
     template <typename Op>\r
-    static forcedinline vSIMDType bitapply (vSIMDType a, vSIMDType b) noexcept\r
+    static forcedinline vSIMDType bitapply (vSIMDType av, vSIMDType bv) noexcept\r
     {\r
-        vSIMDType retval;\r
-        auto* dst  = reinterpret_cast<MaskType*> (&retval);\r
-        auto* aSrc = reinterpret_cast<const MaskType*> (&a);\r
-        auto* bSrc = reinterpret_cast<const MaskType*> (&b);\r
+        UnionMaskType a {av}, b {bv};\r
 \r
         for (size_t i = 0; i < n; ++i)\r
-            dst [i] = Op::op (aSrc [i], bSrc [i]);\r
+            a.m[i] = Op::op (a.m[i], b.m[i]);\r
 \r
-        return retval;\r
+        return a.v;\r
     }\r
 \r
     static forcedinline vSIMDType expand (ScalarType s) noexcept\r
     {\r
-        vSIMDType retval;\r
-        auto* dst = reinterpret_cast<ScalarType*> (&retval);\r
+        UnionType r;\r
 \r
         for (size_t i = 0; i < n; ++i)\r
-            dst [i] = s;\r
+            r.s[i] = s;\r
 \r
-        return retval;\r
+        return r.v;\r
     }\r
 \r
     static forcedinline vSIMDType load (const ScalarType* a) noexcept\r
     {\r
-        vSIMDType retval;\r
-        auto* dst = reinterpret_cast<ScalarType*> (&retval);\r
+        UnionType r;\r
 \r
         for (size_t i = 0; i < n; ++i)\r
-            dst [i] = a[i];\r
+            r.s[i] = a[i];\r
 \r
-        return retval;\r
+        return r.v;\r
     }\r
 \r
-    static forcedinline void store (vSIMDType value, ScalarType* dest) noexcept\r
+    static forcedinline void store (vSIMDType av, ScalarType* dest) noexcept\r
     {\r
-        const auto* src = reinterpret_cast<const ScalarType*> (&value);\r
+        UnionType a {av};\r
 \r
         for (size_t i = 0; i < n; ++i)\r
-            dest[i] = src[i];\r
+            dest[i] = a.s[i];\r
     }\r
 \r
     template <unsigned int shuffle_idx>\r
-    static forcedinline vSIMDType shuffle (vSIMDType a) noexcept\r
+    static forcedinline vSIMDType shuffle (vSIMDType av) noexcept\r
     {\r
-        vSIMDType retval;\r
-        auto* dst  = reinterpret_cast<ScalarType*> (&retval);\r
-        auto* aSrc = reinterpret_cast<const ScalarType*> (&a);\r
+        UnionType a {av}, r;\r
 \r
         // the compiler will unroll this loop and the index can\r
         // be computed at compile-time, so this will be super fast\r
         for (size_t i = 0; i < n; ++i)\r
-            dst [i] = aSrc [(shuffle_idx >> (bits * i)) & mask];\r
+            r.s[i] = a.s[(shuffle_idx >> (bits * i)) & mask];\r
 \r
-        return retval;\r
+        return r.v;\r
     }\r
 };\r
 \r
index 2fc7b1ee48767b6e0c8db85a5e00328b5493a747..06d9457e734471642d1d035de1a722d0900ae0e9 100644 (file)
@@ -31,6 +31,11 @@ namespace dsp
 \r
 #ifndef DOXYGEN\r
 \r
+#if JUCE_GCC && (__GNUC__ >= 6)\r
+ #pragma GCC diagnostic push\r
+ #pragma GCC diagnostic ignored "-Wignored-attributes"\r
+#endif\r
+\r
 #ifdef _MSC_VER\r
  #define DECLARE_NEON_SIMD_CONST(type, name) \\r
     static __declspec(align(16)) const type name [16 / sizeof (type)]\r
@@ -59,31 +64,33 @@ template <>
 struct SIMDNativeOps<uint32_t>\r
 {\r
     //==============================================================================\r
-    typedef uint32x4_t vSIMDType;\r
-    typedef SIMDFallbackOps<uint32_t, vSIMDType> fb;\r
+    using vSIMDType = uint32x4_t;\r
+    using fb = SIMDFallbackOps<uint32_t, vSIMDType>;\r
 \r
     //==============================================================================\r
     DECLARE_NEON_SIMD_CONST (uint32_t, kAllBitsSet);\r
 \r
     //==============================================================================\r
-    static forcedinline vSIMDType expand (uint32_t s) noexcept                   { return vdupq_n_u32 (s); }\r
-    static forcedinline vSIMDType load (const uint32_t* a) noexcept              { return vld1q_u32 (a); }\r
-    static forcedinline void store (vSIMDType value, uint32_t* a) noexcept       { vst1q_u32 (a, value); }\r
-    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept        { return vaddq_u32 (a, b); }\r
-    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept        { return vsubq_u32 (a, b); }\r
-    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept        { return vmulq_u32 (a, b); }\r
-    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept    { return vandq_u32 (a, b); }\r
-    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept    { return vorrq_u32  (a, b); }\r
-    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept    { return veorq_u32 (a, b); }\r
-    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u32 (b, a); }\r
-    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                 { return bit_notand (a, vld1q_u32 ((uint32_t*) kAllBitsSet)); }\r
-    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                    { return vminq_u32 (a, b); }\r
-    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                    { return vmaxq_u32 (a, b); }\r
-    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                  { return (vSIMDType) vceqq_u32 (a, b); }\r
-    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept               { return (sum (notEqual (a, b)) == 0); }\r
-    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept               { return bit_not (equal (a, b)); }\r
-    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept            { return (vSIMDType) vcgtq_u32 (a, b); }\r
-    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept     { return (vSIMDType) vcgeq_u32 (a, b); }\r
+    static forcedinline vSIMDType expand (uint32_t s) noexcept                                  { return vdupq_n_u32 (s); }\r
+    static forcedinline vSIMDType load (const uint32_t* a) noexcept                             { return vld1q_u32 (a); }\r
+    static forcedinline void store (vSIMDType value, uint32_t* a) noexcept                      { vst1q_u32 (a, value); }\r
+    static forcedinline uint32_t get (vSIMDType v, size_t i) noexcept                           { return v[i]; }\r
+    static forcedinline vSIMDType set (vSIMDType v, size_t i, uint32_t s) noexcept              { v[i] = s; return v; }\r
+    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept                       { return vaddq_u32 (a, b); }\r
+    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept                       { return vsubq_u32 (a, b); }\r
+    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept                       { return vmulq_u32 (a, b); }\r
+    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept                   { return vandq_u32 (a, b); }\r
+    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept                   { return vorrq_u32  (a, b); }\r
+    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept                   { return veorq_u32 (a, b); }\r
+    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept                { return vbicq_u32 (b, a); }\r
+    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                                { return bit_notand (a, vld1q_u32 ((uint32_t*) kAllBitsSet)); }\r
+    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                       { return vminq_u32 (a, b); }\r
+    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                       { return vmaxq_u32 (a, b); }\r
+    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                     { return (vSIMDType) vceqq_u32 (a, b); }\r
+    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept                  { return (sum (notEqual (a, b)) == 0); }\r
+    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept                  { return bit_not (equal (a, b)); }\r
+    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept               { return (vSIMDType) vcgtq_u32 (a, b); }\r
+    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept        { return (vSIMDType) vcgeq_u32 (a, b); }\r
     static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept  { return vmlaq_u32 (a, b, c); }\r
     static forcedinline uint32_t sum (vSIMDType a) noexcept\r
     {\r
@@ -101,31 +108,33 @@ template <>
 struct SIMDNativeOps<int32_t>\r
 {\r
     //==============================================================================\r
-    typedef int32x4_t vSIMDType;\r
-    typedef SIMDFallbackOps<int32_t, vSIMDType> fb;\r
+    using vSIMDType = int32x4_t;\r
+    using fb = SIMDFallbackOps<int32_t, vSIMDType>;\r
 \r
     //==============================================================================\r
     DECLARE_NEON_SIMD_CONST (int32_t, kAllBitsSet);\r
 \r
     //==============================================================================\r
-    static forcedinline vSIMDType expand (int32_t s) noexcept                    { return vdupq_n_s32 (s); }\r
-    static forcedinline vSIMDType load (const int32_t* a) noexcept               { return vld1q_s32 (a); }\r
-    static forcedinline void store (vSIMDType value, int32_t* a) noexcept        { vst1q_s32 (a, value); }\r
-    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept        { return vaddq_s32 (a, b); }\r
-    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept        { return vsubq_s32 (a, b); }\r
-    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept        { return vmulq_s32 (a, b); }\r
-    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept    { return vandq_s32 (a, b); }\r
-    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept    { return vorrq_s32 (a, b); }\r
-    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept    { return veorq_s32 (a, b); }\r
-    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s32 (b, a); }\r
-    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                 { return bit_notand (a, vld1q_s32 ((int32_t*) kAllBitsSet)); }\r
-    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                    { return vminq_s32 (a, b); }\r
-    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                    { return vmaxq_s32 (a, b); }\r
-    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                  { return (vSIMDType) vceqq_s32 (a, b); }\r
-    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept               { return (sum (notEqual (a, b)) == 0); }\r
-    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept               { return bit_not (equal (a, b)); }\r
-    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept            { return (vSIMDType) vcgtq_s32 (a, b); }\r
-    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept     { return (vSIMDType) vcgeq_s32 (a, b); }\r
+    static forcedinline vSIMDType expand (int32_t s) noexcept                                   { return vdupq_n_s32 (s); }\r
+    static forcedinline vSIMDType load (const int32_t* a) noexcept                              { return vld1q_s32 (a); }\r
+    static forcedinline void store (vSIMDType value, int32_t* a) noexcept                       { vst1q_s32 (a, value); }\r
+    static forcedinline int32_t get (vSIMDType v, size_t i) noexcept                            { return v[i]; }\r
+    static forcedinline vSIMDType set (vSIMDType v, size_t i, int32_t s) noexcept               { v[i] = s; return v; }\r
+    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept                       { return vaddq_s32 (a, b); }\r
+    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept                       { return vsubq_s32 (a, b); }\r
+    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept                       { return vmulq_s32 (a, b); }\r
+    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept                   { return vandq_s32 (a, b); }\r
+    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept                   { return vorrq_s32 (a, b); }\r
+    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept                   { return veorq_s32 (a, b); }\r
+    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept                { return vbicq_s32 (b, a); }\r
+    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                                { return bit_notand (a, vld1q_s32 ((int32_t*) kAllBitsSet)); }\r
+    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                       { return vminq_s32 (a, b); }\r
+    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                       { return vmaxq_s32 (a, b); }\r
+    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                     { return (vSIMDType) vceqq_s32 (a, b); }\r
+    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept                  { return (sum (notEqual (a, b)) == 0); }\r
+    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept                  { return bit_not (equal (a, b)); }\r
+    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept               { return (vSIMDType) vcgtq_s32 (a, b); }\r
+    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept        { return (vSIMDType) vcgeq_s32 (a, b); }\r
     static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept  { return vmlaq_s32 (a, b, c); }\r
     static forcedinline int32_t sum (vSIMDType a) noexcept\r
     {\r
@@ -144,33 +153,35 @@ template <>
 struct SIMDNativeOps<int8_t>\r
 {\r
     //==============================================================================\r
-    typedef int8x16_t vSIMDType;\r
-    typedef SIMDFallbackOps<int8_t, vSIMDType> fb;\r
+    using vSIMDType = int8x16_t;\r
+    using fb = SIMDFallbackOps<int8_t, vSIMDType>;\r
 \r
     //==============================================================================\r
     DECLARE_NEON_SIMD_CONST (int8_t, kAllBitsSet);\r
 \r
     //==============================================================================\r
-    static forcedinline vSIMDType expand (int8_t s) noexcept                     { return vdupq_n_s8 (s); }\r
-    static forcedinline vSIMDType load (const int8_t* a) noexcept                { return vld1q_s8 (a); }\r
-    static forcedinline void store (vSIMDType value, int8_t* a) noexcept         { vst1q_s8 (a, value); }\r
-    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept        { return vaddq_s8 (a, b); }\r
-    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept        { return vsubq_s8 (a, b); }\r
-    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept        { return vmulq_s8 (a, b); }\r
-    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept    { return vandq_s8 (a, b); }\r
-    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept    { return vorrq_s8 (a, b); }\r
-    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept    { return veorq_s8 (a, b); }\r
-    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s8 (b, a); }\r
-    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                 { return bit_notand (a, vld1q_s8 ((int8_t*) kAllBitsSet)); }\r
-    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                    { return vminq_s8 (a, b); }\r
-    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                    { return vmaxq_s8 (a, b); }\r
-    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                  { return (vSIMDType) vceqq_s8 (a, b); }\r
-    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept               { return bit_not (equal (a, b)); }\r
-    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept            { return (vSIMDType) vcgtq_s8 (a, b); }\r
-    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept     { return (vSIMDType) vcgeq_s8 (a, b); }\r
-    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept               { return (SIMDNativeOps<int32_t>::sum (notEqual (a, b)) == 0); }\r
-    static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept  { return vmlaq_s8 (a, b, c); }\r
-    static forcedinline int8_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
+    static forcedinline vSIMDType expand (int8_t s) noexcept                                   { return vdupq_n_s8 (s); }\r
+    static forcedinline vSIMDType load (const int8_t* a) noexcept                              { return vld1q_s8 (a); }\r
+    static forcedinline void store (vSIMDType value, int8_t* a) noexcept                       { vst1q_s8 (a, value); }\r
+    static forcedinline int8_t get (vSIMDType v, size_t i) noexcept                            { return v[i]; }\r
+    static forcedinline vSIMDType set (vSIMDType v, size_t i, int8_t s) noexcept               { v[i] = s; return v; }\r
+    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept                      { return vaddq_s8 (a, b); }\r
+    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept                      { return vsubq_s8 (a, b); }\r
+    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept                      { return vmulq_s8 (a, b); }\r
+    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept                  { return vandq_s8 (a, b); }\r
+    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept                  { return vorrq_s8 (a, b); }\r
+    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept                  { return veorq_s8 (a, b); }\r
+    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept               { return vbicq_s8 (b, a); }\r
+    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                               { return bit_notand (a, vld1q_s8 ((int8_t*) kAllBitsSet)); }\r
+    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                      { return vminq_s8 (a, b); }\r
+    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                      { return vmaxq_s8 (a, b); }\r
+    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                    { return (vSIMDType) vceqq_s8 (a, b); }\r
+    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept                 { return bit_not (equal (a, b)); }\r
+    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept              { return (vSIMDType) vcgtq_s8 (a, b); }\r
+    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept       { return (vSIMDType) vcgeq_s8 (a, b); }\r
+    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept                 { return (SIMDNativeOps<int32_t>::sum ((SIMDNativeOps<int32_t>::vSIMDType) notEqual (a, b)) == 0); }\r
+    static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_s8 (a, b, c); }\r
+    static forcedinline int8_t sum (vSIMDType a) noexcept                                      { return fb::sum (a); }\r
 };\r
 \r
 //==============================================================================\r
@@ -182,33 +193,35 @@ template <>
 struct SIMDNativeOps<uint8_t>\r
 {\r
     //==============================================================================\r
-    typedef uint8x16_t vSIMDType;\r
-    typedef SIMDFallbackOps<uint8_t, vSIMDType> fb;\r
+    using vSIMDType = uint8x16_t;\r
+    using fb = SIMDFallbackOps<uint8_t, vSIMDType>;\r
 \r
     //==============================================================================\r
     DECLARE_NEON_SIMD_CONST (uint8_t, kAllBitsSet);\r
 \r
     //==============================================================================\r
-    static forcedinline vSIMDType expand (uint8_t s) noexcept                    { return vdupq_n_u8 (s); }\r
-    static forcedinline vSIMDType load (const uint8_t* a) noexcept               { return vld1q_u8 (a); }\r
-    static forcedinline void store (vSIMDType value, uint8_t* a) noexcept        { vst1q_u8 (a, value); }\r
-    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept        { return vaddq_u8 (a, b); }\r
-    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept        { return vsubq_u8 (a, b); }\r
-    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept        { return vmulq_u8 (a, b); }\r
-    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept    { return vandq_u8 (a, b); }\r
-    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept    { return vorrq_u8 (a, b); }\r
-    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept    { return veorq_u8 (a, b); }\r
-    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u8 (b, a); }\r
-    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                 { return bit_notand (a, vld1q_u8 ((uint8_t*) kAllBitsSet)); }\r
-    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                    { return vminq_u8 (a, b); }\r
-    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                    { return vmaxq_u8 (a, b); }\r
-    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                  { return (vSIMDType) vceqq_u8 (a, b); }\r
-    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept               { return bit_not (equal (a, b)); }\r
-    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept            { return (vSIMDType) vcgtq_u8 (a, b); }\r
-    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept     { return (vSIMDType) vcgeq_u8 (a, b); }\r
-    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept               { return (SIMDNativeOps<uint32_t>::sum (notEqual (a, b)) == 0); }\r
-    static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept  { return vmlaq_u8 (a, b, c); }\r
-    static forcedinline uint8_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
+    static forcedinline vSIMDType expand (uint8_t s) noexcept                                  { return vdupq_n_u8 (s); }\r
+    static forcedinline vSIMDType load (const uint8_t* a) noexcept                             { return vld1q_u8 (a); }\r
+    static forcedinline void store (vSIMDType value, uint8_t* a) noexcept                      { vst1q_u8 (a, value); }\r
+    static forcedinline uint8_t get (vSIMDType v, size_t i) noexcept                           { return v[i]; }\r
+    static forcedinline vSIMDType set (vSIMDType v, size_t i, uint8_t s) noexcept              { v[i] = s; return v; }\r
+    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept                      { return vaddq_u8 (a, b); }\r
+    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept                      { return vsubq_u8 (a, b); }\r
+    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept                      { return vmulq_u8 (a, b); }\r
+    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept                  { return vandq_u8 (a, b); }\r
+    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept                  { return vorrq_u8 (a, b); }\r
+    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept                  { return veorq_u8 (a, b); }\r
+    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept               { return vbicq_u8 (b, a); }\r
+    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                               { return bit_notand (a, vld1q_u8 ((uint8_t*) kAllBitsSet)); }\r
+    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                      { return vminq_u8 (a, b); }\r
+    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                      { return vmaxq_u8 (a, b); }\r
+    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                    { return (vSIMDType) vceqq_u8 (a, b); }\r
+    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept                 { return bit_not (equal (a, b)); }\r
+    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept              { return (vSIMDType) vcgtq_u8 (a, b); }\r
+    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept       { return (vSIMDType) vcgeq_u8 (a, b); }\r
+    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept                 { return (SIMDNativeOps<uint32_t>::sum ((SIMDNativeOps<uint32_t>::vSIMDType) notEqual (a, b)) == 0); }\r
+    static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_u8 (a, b, c); }\r
+    static forcedinline uint8_t sum (vSIMDType a) noexcept                                     { return fb::sum (a); }\r
 };\r
 \r
 //==============================================================================\r
@@ -220,33 +233,35 @@ template <>
 struct SIMDNativeOps<int16_t>\r
 {\r
     //==============================================================================\r
-    typedef int16x8_t vSIMDType;\r
-    typedef SIMDFallbackOps<int16_t, vSIMDType> fb;\r
+    using vSIMDType = int16x8_t;\r
+    using fb = SIMDFallbackOps<int16_t, vSIMDType>;\r
 \r
     //==============================================================================\r
     DECLARE_NEON_SIMD_CONST (int16_t, kAllBitsSet);\r
 \r
     //==============================================================================\r
-    static forcedinline vSIMDType expand (int16_t s) noexcept                    { return vdupq_n_s16 (s); }\r
-    static forcedinline vSIMDType load (const int16_t* a) noexcept               { return vld1q_s16 (a); }\r
-    static forcedinline void store (vSIMDType value, int16_t* a) noexcept        { vst1q_s16 (a, value); }\r
-    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept        { return vaddq_s16 (a, b); }\r
-    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept        { return vsubq_s16 (a, b); }\r
-    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept        { return vmulq_s16 (a, b); }\r
-    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept    { return vandq_s16 (a, b); }\r
-    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept    { return vorrq_s16 (a, b); }\r
-    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept    { return veorq_s16 (a, b); }\r
-    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s16 (b, a); }\r
-    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                 { return bit_notand (a, vld1q_s16 ((int16_t*) kAllBitsSet)); }\r
-    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                    { return vminq_s16 (a, b); }\r
-    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                    { return vmaxq_s16 (a, b); }\r
-    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                  { return (vSIMDType) vceqq_s16 (a, b); }\r
-    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept               { return bit_not (equal (a, b)); }\r
-    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept            { return (vSIMDType) vcgtq_s16 (a, b); }\r
-    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept     { return (vSIMDType) vcgeq_s16 (a, b); }\r
-    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept               { return (SIMDNativeOps<int32_t>::sum (notEqual (a, b)) == 0); }\r
-    static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept  { return vmlaq_s16 (a, b, c); }\r
-    static forcedinline int16_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
+    static forcedinline vSIMDType expand (int16_t s) noexcept                                  { return vdupq_n_s16 (s); }\r
+    static forcedinline vSIMDType load (const int16_t* a) noexcept                             { return vld1q_s16 (a); }\r
+    static forcedinline void store (vSIMDType value, int16_t* a) noexcept                      { vst1q_s16 (a, value); }\r
+    static forcedinline int16_t get (vSIMDType v, size_t i) noexcept                           { return v[i]; }\r
+    static forcedinline vSIMDType set (vSIMDType v, size_t i, int16_t s) noexcept              { v[i] = s; return v; }\r
+    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept                      { return vaddq_s16 (a, b); }\r
+    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept                      { return vsubq_s16 (a, b); }\r
+    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept                      { return vmulq_s16 (a, b); }\r
+    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept                  { return vandq_s16 (a, b); }\r
+    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept                  { return vorrq_s16 (a, b); }\r
+    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept                  { return veorq_s16 (a, b); }\r
+    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept               { return vbicq_s16 (b, a); }\r
+    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                               { return bit_notand (a, vld1q_s16 ((int16_t*) kAllBitsSet)); }\r
+    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                      { return vminq_s16 (a, b); }\r
+    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                      { return vmaxq_s16 (a, b); }\r
+    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                    { return (vSIMDType) vceqq_s16 (a, b); }\r
+    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept                 { return bit_not (equal (a, b)); }\r
+    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept              { return (vSIMDType) vcgtq_s16 (a, b); }\r
+    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept       { return (vSIMDType) vcgeq_s16 (a, b); }\r
+    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept                 { return (SIMDNativeOps<int32_t>::sum ((SIMDNativeOps<int32_t>::vSIMDType) notEqual (a, b)) == 0); }\r
+    static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_s16 (a, b, c); }\r
+    static forcedinline int16_t sum (vSIMDType a) noexcept                                     { return fb::sum (a); }\r
 };\r
 \r
 \r
@@ -259,33 +274,35 @@ template <>
 struct SIMDNativeOps<uint16_t>\r
 {\r
     //==============================================================================\r
-    typedef uint16x8_t vSIMDType;\r
-    typedef SIMDFallbackOps<uint16_t, vSIMDType> fb;\r
+    using vSIMDType = uint16x8_t;\r
+    using fb = SIMDFallbackOps<uint16_t, vSIMDType>;\r
 \r
     //==============================================================================\r
     DECLARE_NEON_SIMD_CONST (uint16_t, kAllBitsSet);\r
 \r
     //==============================================================================\r
-    static forcedinline vSIMDType expand (uint16_t s) noexcept                   { return vdupq_n_u16 (s); }\r
-    static forcedinline vSIMDType load (const uint16_t* a) noexcept              { return vld1q_u16 (a); }\r
-    static forcedinline void store (vSIMDType value, uint16_t* a) noexcept       { vst1q_u16 (a, value); }\r
-    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept        { return vaddq_u16 (a, b); }\r
-    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept        { return vsubq_u16 (a, b); }\r
-    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept        { return vmulq_u16 (a, b); }\r
-    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept    { return vandq_u16 (a, b); }\r
-    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept    { return vorrq_u16 (a, b); }\r
-    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept    { return veorq_u16 (a, b); }\r
-    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u16 (b, a); }\r
-    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                 { return bit_notand (a, vld1q_u16 ((uint16_t*) kAllBitsSet)); }\r
-    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                    { return vminq_u16 (a, b); }\r
-    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                    { return vmaxq_u16 (a, b); }\r
-    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                  { return (vSIMDType) vceqq_u16 (a, b); }\r
-    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept               { return bit_not (equal (a, b)); }\r
-    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept            { return (vSIMDType) vcgtq_u16 (a, b); }\r
-    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept     { return (vSIMDType) vcgeq_u16 (a, b); }\r
-    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept               { return (SIMDNativeOps<uint32_t>::sum (notEqual (a, b)) == 0); }\r
-    static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept  { return vmlaq_u16 (a, b, c); }\r
-    static forcedinline uint16_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
+    static forcedinline vSIMDType expand (uint16_t s) noexcept                                 { return vdupq_n_u16 (s); }\r
+    static forcedinline vSIMDType load (const uint16_t* a) noexcept                            { return vld1q_u16 (a); }\r
+    static forcedinline void store (vSIMDType value, uint16_t* a) noexcept                     { vst1q_u16 (a, value); }\r
+    static forcedinline uint16_t get (vSIMDType v, size_t i) noexcept                          { return v[i]; }\r
+    static forcedinline vSIMDType set (vSIMDType v, size_t i, uint16_t s) noexcept             { v[i] = s; return v; }\r
+    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept                      { return vaddq_u16 (a, b); }\r
+    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept                      { return vsubq_u16 (a, b); }\r
+    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept                      { return vmulq_u16 (a, b); }\r
+    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept                  { return vandq_u16 (a, b); }\r
+    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept                  { return vorrq_u16 (a, b); }\r
+    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept                  { return veorq_u16 (a, b); }\r
+    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept               { return vbicq_u16 (b, a); }\r
+    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                               { return bit_notand (a, vld1q_u16 ((uint16_t*) kAllBitsSet)); }\r
+    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                      { return vminq_u16 (a, b); }\r
+    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                      { return vmaxq_u16 (a, b); }\r
+    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                    { return (vSIMDType) vceqq_u16 (a, b); }\r
+    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept                 { return bit_not (equal (a, b)); }\r
+    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept              { return (vSIMDType) vcgtq_u16 (a, b); }\r
+    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept       { return (vSIMDType) vcgeq_u16 (a, b); }\r
+    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept                 { return (SIMDNativeOps<uint32_t>::sum ((SIMDNativeOps<uint32_t>::vSIMDType) notEqual (a, b)) == 0); }\r
+    static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_u16 (a, b, c); }\r
+    static forcedinline uint16_t sum (vSIMDType a) noexcept                                    { return fb::sum (a); }\r
 };\r
 \r
 //==============================================================================\r
@@ -297,33 +314,35 @@ template <>
 struct SIMDNativeOps<int64_t>\r
 {\r
     //==============================================================================\r
-    typedef int64x2_t vSIMDType;\r
-    typedef SIMDFallbackOps<int64_t, vSIMDType> fb;\r
+    using vSIMDType = int64x2_t;\r
+    using fb = SIMDFallbackOps<int64_t, vSIMDType>;\r
 \r
     //==============================================================================\r
     DECLARE_NEON_SIMD_CONST (int64_t, kAllBitsSet);\r
 \r
     //==============================================================================\r
-    static forcedinline vSIMDType expand (int64_t s) noexcept                    { return vdupq_n_s64 (s); }\r
-    static forcedinline vSIMDType load (const int64_t* a) noexcept               { return vld1q_s64 (a); }\r
-    static forcedinline void store (vSIMDType value, int64_t* a) noexcept        { vst1q_s64 (a, value); }\r
-    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept        { return vaddq_s64 (a, b); }\r
-    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept        { return vsubq_s64 (a, b); }\r
-    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept        { return fb::mul (a, b); }\r
-    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept    { return vandq_s64 (a, b); }\r
-    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept    { return vorrq_s64 (a, b); }\r
-    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept    { return veorq_s64 (a, b); }\r
-    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s64 (b, a); }\r
-    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                 { return bit_notand (a, vld1q_s64 ((int64_t*) kAllBitsSet)); }\r
-    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                    { return fb::min (a, b); }\r
-    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                    { return fb::max (a, b); }\r
-    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                  { return fb::equal (a, b); }\r
-    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept               { return fb::notEqual (a, b); }\r
-    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept            { return fb::greaterThan (a, b); }\r
-    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept     { return fb::greaterThanOrEqual (a, b); }\r
-    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept               { return (SIMDNativeOps<int32_t>::sum (notEqual (a, b)) == 0); }\r
-    static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept  { return fb::multiplyAdd (a, b, c); }\r
-    static forcedinline int64_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
+    static forcedinline vSIMDType expand (int64_t s) noexcept                                  { return vdupq_n_s64 (s); }\r
+    static forcedinline vSIMDType load (const int64_t* a) noexcept                             { return vld1q_s64 (a); }\r
+    static forcedinline void store (vSIMDType value, int64_t* a) noexcept                      { vst1q_s64 (a, value); }\r
+    static forcedinline int64_t get (vSIMDType v, size_t i) noexcept                           { return v[i]; }\r
+    static forcedinline vSIMDType set (vSIMDType v, size_t i, int64_t s) noexcept              { v[i] = s; return v; }\r
+    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept                      { return vaddq_s64 (a, b); }\r
+    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept                      { return vsubq_s64 (a, b); }\r
+    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept                      { return fb::mul (a, b); }\r
+    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept                  { return vandq_s64 (a, b); }\r
+    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept                  { return vorrq_s64 (a, b); }\r
+    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept                  { return veorq_s64 (a, b); }\r
+    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept               { return vbicq_s64 (b, a); }\r
+    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                               { return bit_notand (a, vld1q_s64 ((int64_t*) kAllBitsSet)); }\r
+    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                      { return fb::min (a, b); }\r
+    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                      { return fb::max (a, b); }\r
+    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                    { return fb::equal (a, b); }\r
+    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept                 { return fb::notEqual (a, b); }\r
+    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept              { return fb::greaterThan (a, b); }\r
+    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept       { return fb::greaterThanOrEqual (a, b); }\r
+    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept                 { return (SIMDNativeOps<int32_t>::sum ((SIMDNativeOps<int32_t>::vSIMDType) notEqual (a, b)) == 0); }\r
+    static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return fb::multiplyAdd (a, b, c); }\r
+    static forcedinline int64_t sum (vSIMDType a) noexcept                                     { return fb::sum (a); }\r
 };\r
 \r
 \r
@@ -336,31 +355,33 @@ template <>
 struct SIMDNativeOps<uint64_t>\r
 {\r
     //==============================================================================\r
-    typedef uint64x2_t vSIMDType;\r
-    typedef SIMDFallbackOps<uint64_t, vSIMDType> fb;\r
+    using vSIMDType = uint64x2_t;\r
+    using fb = SIMDFallbackOps<uint64_t, vSIMDType>;\r
 \r
     //==============================================================================\r
     DECLARE_NEON_SIMD_CONST (uint64_t, kAllBitsSet);\r
 \r
     //==============================================================================\r
-    static forcedinline vSIMDType expand (uint64_t s) noexcept                   { return vdupq_n_u64 (s); }\r
-    static forcedinline vSIMDType load (const uint64_t* a) noexcept              { return vld1q_u64 (a); }\r
-    static forcedinline void store (vSIMDType value, uint64_t* a) noexcept       { vst1q_u64 (a, value); }\r
-    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept        { return vaddq_u64 (a, b); }\r
-    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept        { return vsubq_u64 (a, b); }\r
-    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept        { return fb::mul (a, b); }\r
-    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept    { return vandq_u64 (a, b); }\r
-    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept    { return vorrq_u64 (a, b); }\r
-    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept    { return veorq_u64 (a, b); }\r
-    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u64 (b, a); }\r
-    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                 { return bit_notand (a, vld1q_u64 ((uint64_t*) kAllBitsSet)); }\r
-    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                    { return fb::min (a, b); }\r
-    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                    { return fb::max (a, b); }\r
-    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                  { return fb::equal (a, b); }\r
-    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept               { return fb::notEqual (a, b); }\r
-    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept            { return fb::greaterThan (a, b); }\r
-    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept     { return fb::greaterThanOrEqual (a, b); }\r
-    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept               { return (SIMDNativeOps<uint32_t>::sum (notEqual (a, b)) == 0); }\r
+    static forcedinline vSIMDType expand (uint64_t s) noexcept                                  { return vdupq_n_u64 (s); }\r
+    static forcedinline vSIMDType load (const uint64_t* a) noexcept                             { return vld1q_u64 (a); }\r
+    static forcedinline void store (vSIMDType value, uint64_t* a) noexcept                      { vst1q_u64 (a, value); }\r
+    static forcedinline uint64_t get (vSIMDType v, size_t i) noexcept                           { return v[i]; }\r
+    static forcedinline vSIMDType set (vSIMDType v, size_t i, uint64_t s) noexcept              { v[i] = s; return v; }\r
+    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept                       { return vaddq_u64 (a, b); }\r
+    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept                       { return vsubq_u64 (a, b); }\r
+    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept                       { return fb::mul (a, b); }\r
+    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept                   { return vandq_u64 (a, b); }\r
+    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept                   { return vorrq_u64 (a, b); }\r
+    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept                   { return veorq_u64 (a, b); }\r
+    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept                { return vbicq_u64 (b, a); }\r
+    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                                { return bit_notand (a, vld1q_u64 ((uint64_t*) kAllBitsSet)); }\r
+    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                       { return fb::min (a, b); }\r
+    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                       { return fb::max (a, b); }\r
+    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                     { return fb::equal (a, b); }\r
+    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept                  { return fb::notEqual (a, b); }\r
+    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept               { return fb::greaterThan (a, b); }\r
+    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept        { return fb::greaterThanOrEqual (a, b); }\r
+    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept                  { return (SIMDNativeOps<uint32_t>::sum ((SIMDNativeOps<uint32_t>::vSIMDType) notEqual (a, b)) == 0); }\r
     static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept  { return fb::multiplyAdd (a, b, c); }\r
     static forcedinline uint64_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
 };\r
@@ -374,9 +395,9 @@ template <>
 struct SIMDNativeOps<float>\r
 {\r
     //==============================================================================\r
-    typedef float32x4_t vSIMDType;\r
-    typedef uint32x4_t vMaskType;\r
-    typedef SIMDFallbackOps<float, vSIMDType> fb;\r
+    using vSIMDType = float32x4_t;\r
+    using vMaskType = uint32x4_t;\r
+    using fb = SIMDFallbackOps<float, vSIMDType>;\r
 \r
     //==============================================================================\r
     DECLARE_NEON_SIMD_CONST (int32_t, kAllBitsSet);\r
@@ -384,29 +405,31 @@ struct SIMDNativeOps<float>
     DECLARE_NEON_SIMD_CONST (float, kOne);\r
 \r
     //==============================================================================\r
-    static forcedinline vSIMDType expand (float s) noexcept                          { return vdupq_n_f32 (s); }\r
-    static forcedinline vSIMDType load (const float* a) noexcept                     { return vld1q_f32 (a); }\r
-    static forcedinline void store (vSIMDType value, float* a) noexcept              { vst1q_f32 (a, value); }\r
-    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept        { return vaddq_f32 (a, b); }\r
-    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept        { return vsubq_f32 (a, b); }\r
-    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept        { return vmulq_f32 (a, b); }\r
-    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept    { return (vSIMDType) vandq_u32 ((vMaskType) a, (vMaskType) b); }\r
-    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept    { return (vSIMDType) vorrq_u32 ((vMaskType) a, (vMaskType) b); }\r
-    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept    { return (vSIMDType) veorq_u32 ((vMaskType) a, (vMaskType) b); }\r
-    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vbicq_u32 ((vMaskType) b, (vMaskType) a); }\r
-    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                   { return bit_notand (a, vld1q_f32 ((float*) kAllBitsSet)); }\r
-    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                    { return vminq_f32 (a, b); }\r
-    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                    { return vmaxq_f32 (a, b); }\r
-    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                  { return (vSIMDType) vceqq_f32 (a, b); }\r
-    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept               { return bit_not (equal (a, b)); }\r
-    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept            { return (vSIMDType) vcgtq_f32 (a, b); }\r
-    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept     { return (vSIMDType) vcgeq_f32 (a, b); }\r
-    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept               { return (SIMDNativeOps<uint32_t>::sum (notEqual (a, b)) == 0); }\r
-    static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept  { return vmlaq_f32 (a, b, c); }\r
-    static forcedinline vSIMDType dupeven (vSIMDType a) noexcept { return fb::shuffle<(0 << 0) | (0 << 2) | (2 << 4) | (2 << 6)>     (a); }\r
-    static forcedinline vSIMDType dupodd  (vSIMDType a) noexcept { return fb::shuffle<(1 << 0) | (1 << 2) | (3 << 4) | (3 << 6)>     (a); }\r
-    static forcedinline vSIMDType swapevenodd (vSIMDType a) noexcept { return fb::shuffle<(1 << 0) | (0 << 2) | (3 << 4) | (2 << 6)> (a); }\r
-    static forcedinline vSIMDType oddevensum (vSIMDType a) noexcept { return add (fb::shuffle<(2 << 0) | (3 << 2) | (0 << 4) | (1 << 6)> (a), a); }\r
+    static forcedinline vSIMDType expand (float s) noexcept                                    { return vdupq_n_f32 (s); }\r
+    static forcedinline vSIMDType load (const float* a) noexcept                               { return vld1q_f32 (a); }\r
+    static forcedinline float get (vSIMDType v, size_t i) noexcept                             { return v[i]; }\r
+    static forcedinline vSIMDType set (vSIMDType v, size_t i, float s) noexcept                { v[i] = s; return v; }\r
+    static forcedinline void store (vSIMDType value, float* a) noexcept                        { vst1q_f32 (a, value); }\r
+    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept                      { return vaddq_f32 (a, b); }\r
+    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept                      { return vsubq_f32 (a, b); }\r
+    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept                      { return vmulq_f32 (a, b); }\r
+    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept                  { return (vSIMDType) vandq_u32 ((vMaskType) a, (vMaskType) b); }\r
+    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept                  { return (vSIMDType) vorrq_u32 ((vMaskType) a, (vMaskType) b); }\r
+    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept                  { return (vSIMDType) veorq_u32 ((vMaskType) a, (vMaskType) b); }\r
+    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept               { return (vSIMDType) vbicq_u32 ((vMaskType) b, (vMaskType) a); }\r
+    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                               { return bit_notand (a, vld1q_f32 ((float*) kAllBitsSet)); }\r
+    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                      { return vminq_f32 (a, b); }\r
+    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                      { return vmaxq_f32 (a, b); }\r
+    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                    { return (vSIMDType) vceqq_f32 (a, b); }\r
+    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept                 { return bit_not (equal (a, b)); }\r
+    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept              { return (vSIMDType) vcgtq_f32 (a, b); }\r
+    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept       { return (vSIMDType) vcgeq_f32 (a, b); }\r
+    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept                 { return (SIMDNativeOps<uint32_t>::sum ((SIMDNativeOps<uint32_t>::vSIMDType) notEqual (a, b)) == 0); }\r
+    static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_f32 (a, b, c); }\r
+    static forcedinline vSIMDType dupeven (vSIMDType a) noexcept                               { return fb::shuffle<(0 << 0) | (0 << 2) | (2 << 4) | (2 << 6)>     (a); }\r
+    static forcedinline vSIMDType dupodd  (vSIMDType a) noexcept                               { return fb::shuffle<(1 << 0) | (1 << 2) | (3 << 4) | (3 << 6)>     (a); }\r
+    static forcedinline vSIMDType swapevenodd (vSIMDType a) noexcept                           { return fb::shuffle<(1 << 0) | (0 << 2) | (3 << 4) | (2 << 6)> (a); }\r
+    static forcedinline vSIMDType oddevensum (vSIMDType a) noexcept                            { return add (fb::shuffle<(2 << 0) | (3 << 2) | (0 << 4) | (1 << 6)> (a), a); }\r
 \r
     //==============================================================================\r
     static forcedinline vSIMDType cmplxmul (vSIMDType a, vSIMDType b) noexcept\r
@@ -433,34 +456,40 @@ template <>
 struct SIMDNativeOps<double>\r
 {\r
     //==============================================================================\r
-    typedef struct { double values [2]; } vSIMDType;\r
-    typedef SIMDFallbackOps<double, vSIMDType> fb;\r
-\r
-    static forcedinline vSIMDType expand (double s) noexcept                     { return fb::expand (s); }\r
-    static forcedinline vSIMDType load (const double* a) noexcept                { return fb::load (a); }\r
-    static forcedinline void store (vSIMDType value, double* a) noexcept         { fb::store (value, a); }\r
-    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept        { return fb::add (a, b); }\r
-    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept        { return fb::sub (a, b); }\r
-    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept        { return fb::mul (a, b); }\r
-    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept    { return fb::bit_and (a, b); }\r
-    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept    { return fb::bit_or  (a, b); }\r
-    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept    { return fb::bit_xor (a, b); }\r
-    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return fb::bit_notand (a, b); }\r
-    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                 { return fb::bit_not (a); }\r
-    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                    { return fb::min (a, b); }\r
-    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                    { return fb::max (a, b); }\r
-    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                  { return fb::equal (a, b); }\r
-    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept               { return fb::notEqual (a, b); }\r
-    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept            { return fb::greaterThan (a, b); }\r
-    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept     { return fb::greaterThanOrEqual (a, b); }\r
-    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept               { return fb::allEqual (a, b); }\r
+    using vSIMDType = struct { double v[2]; };\r
+    using fb = SIMDFallbackOps<double, vSIMDType>;\r
+\r
+    static forcedinline vSIMDType expand (double s) noexcept                                   { return {{s, s}}; }\r
+    static forcedinline vSIMDType load (const double* a) noexcept                              { return {{a[0], a[1]}}; }\r
+    static forcedinline void store (vSIMDType v, double* a) noexcept                           { a[0] = v.v[0]; a[1] = v.v[1]; }\r
+    static forcedinline double get (vSIMDType v, size_t i) noexcept                            { return v.v[i]; }\r
+    static forcedinline vSIMDType set (vSIMDType v, size_t i, double s) noexcept               { v.v[i] = s; return v; }\r
+    static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept                      { return {{a.v[0] + b.v[0], a.v[1] + b.v[1]}}; }\r
+    static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept                      { return {{a.v[0] - b.v[0], a.v[1] - b.v[1]}}; }\r
+    static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept                      { return {{a.v[0] * b.v[0], a.v[1] * b.v[1]}}; }\r
+    static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept                  { return fb::bit_and (a, b); }\r
+    static forcedinline vSIMDType bit_or  (vSIMDType a, vSIMDType b) noexcept                  { return fb::bit_or  (a, b); }\r
+    static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept                  { return fb::bit_xor (a, b); }\r
+    static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept               { return fb::bit_notand (a, b); }\r
+    static forcedinline vSIMDType bit_not (vSIMDType a) noexcept                               { return fb::bit_not (a); }\r
+    static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept                      { return fb::min (a, b); }\r
+    static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept                      { return fb::max (a, b); }\r
+    static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept                    { return fb::equal (a, b); }\r
+    static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept                 { return fb::notEqual (a, b); }\r
+    static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept              { return fb::greaterThan (a, b); }\r
+    static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept       { return fb::greaterThanOrEqual (a, b); }\r
+    static forcedinline bool      allEqual (vSIMDType a, vSIMDType b) noexcept                 { return fb::allEqual (a, b); }\r
     static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return fb::multiplyAdd (a, b, c); }\r
-    static forcedinline vSIMDType cmplxmul (vSIMDType a, vSIMDType b) noexcept { return fb::cmplxmul (a, b); }\r
-    static forcedinline double sum (vSIMDType a) noexcept { return fb::sum (a); }\r
-    static forcedinline vSIMDType oddevensum (vSIMDType a) noexcept { return a; }\r
+    static forcedinline vSIMDType cmplxmul (vSIMDType a, vSIMDType b) noexcept                 { return fb::cmplxmul (a, b); }\r
+    static forcedinline double sum (vSIMDType a) noexcept                                      { return fb::sum (a); }\r
+    static forcedinline vSIMDType oddevensum (vSIMDType a) noexcept                            { return a; }\r
 };\r
 \r
 #endif\r
 \r
+#if JUCE_GCC && (__GNUC__ >= 6)\r
+ #pragma GCC diagnostic pop\r
+#endif\r
+\r
 } // namespace dsp\r
 } // namespace juce\r
index a11186abf96518c24344dcfc024e7b3bc1774dca..c4c320e9e1b382f1d855cbc38735ce88c031ccfd 100644 (file)
@@ -31,6 +31,11 @@ namespace dsp
 \r
 #ifndef DOXYGEN\r
 \r
+#if JUCE_GCC && (__GNUC__ >= 6)\r
+ #pragma GCC diagnostic push\r
+ #pragma GCC diagnostic ignored "-Wignored-attributes"\r
+#endif\r
+\r
 #ifdef _MSC_VER\r
  #define DECLARE_SSE_SIMD_CONST(type, name) \\r
     static __declspec(align(16)) const type name [16 / sizeof (type)]\r
@@ -59,7 +64,7 @@ template <>
 struct SIMDNativeOps<float>\r
 {\r
     //==============================================================================\r
-    typedef __m128 vSIMDType;\r
+    using vSIMDType = __m128;\r
 \r
     //==============================================================================\r
     DECLARE_SSE_SIMD_CONST (int32_t, kAllBitsSet);\r
@@ -90,6 +95,8 @@ struct SIMDNativeOps<float>
     static forcedinline __m128 JUCE_VECTOR_CALLTYPE dupodd (__m128 a) noexcept                           { return _mm_shuffle_ps (a, a, _MM_SHUFFLE (3, 3, 1, 1)); }\r
     static forcedinline __m128 JUCE_VECTOR_CALLTYPE swapevenodd (__m128 a) noexcept                      { return _mm_shuffle_ps (a, a, _MM_SHUFFLE (2, 3, 0, 1)); }\r
     static forcedinline __m128 JUCE_VECTOR_CALLTYPE oddevensum (__m128 a) noexcept                       { return _mm_add_ps (_mm_shuffle_ps (a, a, _MM_SHUFFLE (1, 0, 3, 2)), a); }\r
+    static forcedinline float  JUCE_VECTOR_CALLTYPE get (__m128 v, size_t i) noexcept                    { return SIMDFallbackOps<float, __m128>::get (v, i); }\r
+    static forcedinline __m128 JUCE_VECTOR_CALLTYPE set (__m128 v, size_t i, float s) noexcept           { return SIMDFallbackOps<float, __m128>::set (v, i, s); }\r
 \r
     //==============================================================================\r
     static forcedinline __m128 JUCE_VECTOR_CALLTYPE cmplxmul (__m128 a, __m128 b) noexcept\r
@@ -109,7 +116,7 @@ struct SIMDNativeOps<float>
         __m128 retval = _mm_add_ps (_mm_shuffle_ps (a, a, 0x4e), a);\r
         retval = _mm_add_ps (retval, _mm_shuffle_ps (retval, retval, 0xb1));\r
        #endif\r
-        return ((float*) &retval) [0];\r
+        return _mm_cvtss_f32 (retval);\r
     }\r
 };\r
 \r
@@ -122,7 +129,7 @@ template <>
 struct SIMDNativeOps<double>\r
 {\r
     //==============================================================================\r
-    typedef __m128d vSIMDType;\r
+    using vSIMDType = __m128d;\r
 \r
     //==============================================================================\r
     DECLARE_SSE_SIMD_CONST (int64_t, kAllBitsSet);\r
@@ -130,8 +137,8 @@ struct SIMDNativeOps<double>
     DECLARE_SSE_SIMD_CONST (double, kOne);\r
 \r
     //==============================================================================\r
-    static forcedinline __m128d JUCE_VECTOR_CALLTYPE vconst (const double* a) noexcept                       { return *reinterpret_cast<const __m128d*> (a); }\r
-    static forcedinline __m128d JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept                      { return *reinterpret_cast<const __m128d*> (a); }\r
+    static forcedinline __m128d JUCE_VECTOR_CALLTYPE vconst (const double* a) noexcept                       { return load (a); }\r
+    static forcedinline __m128d JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept                      { return _mm_castsi128_pd (_mm_load_si128 ((const __m128i*) a)); }\r
     static forcedinline __m128d JUCE_VECTOR_CALLTYPE expand (double s) noexcept                              { return _mm_load1_pd (&s); }\r
     static forcedinline __m128d JUCE_VECTOR_CALLTYPE load (const double* a) noexcept                         { return _mm_load_pd (a); }\r
     static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128d value, double* dest) noexcept               { _mm_store_pd (dest, value); }\r
@@ -154,7 +161,9 @@ struct SIMDNativeOps<double>
     static forcedinline __m128d JUCE_VECTOR_CALLTYPE dupeven (__m128d a) noexcept                            { return _mm_shuffle_pd (a, a, _MM_SHUFFLE2 (0, 0)); }\r
     static forcedinline __m128d JUCE_VECTOR_CALLTYPE dupodd (__m128d a) noexcept                             { return _mm_shuffle_pd (a, a, _MM_SHUFFLE2 (1, 1)); }\r
     static forcedinline __m128d JUCE_VECTOR_CALLTYPE swapevenodd (__m128d a) noexcept                        { return _mm_shuffle_pd (a, a, _MM_SHUFFLE2 (0, 1)); }\r
-    static forcedinline __m128d oddevensum (__m128d a) noexcept                         { return a; }\r
+    static forcedinline __m128d JUCE_VECTOR_CALLTYPE oddevensum (__m128d a) noexcept                         { return a; }\r
+    static forcedinline double  JUCE_VECTOR_CALLTYPE get (__m128d v, size_t i) noexcept                      { return SIMDFallbackOps<double, __m128d>::get (v, i); }\r
+    static forcedinline __m128d JUCE_VECTOR_CALLTYPE set (__m128d v, size_t i, double s) noexcept            { return SIMDFallbackOps<double, __m128d>::set (v, i, s); }\r
 \r
     //==============================================================================\r
     static forcedinline __m128d JUCE_VECTOR_CALLTYPE cmplxmul (__m128d a, __m128d b) noexcept\r
@@ -173,7 +182,7 @@ struct SIMDNativeOps<double>
        #else\r
         __m128d retval = _mm_add_pd (_mm_shuffle_pd (a, a, 0x01), a);\r
        #endif\r
-        return ((double*) &retval) [0];\r
+        return _mm_cvtsd_f64 (retval);\r
     }\r
 };\r
 \r
@@ -186,12 +195,14 @@ template <>
 struct SIMDNativeOps<int8_t>\r
 {\r
     //==============================================================================\r
-    typedef __m128i vSIMDType;\r
+    using vSIMDType = __m128i;\r
 \r
     //==============================================================================\r
     DECLARE_SSE_SIMD_CONST (int8_t, kAllBitsSet);\r
 \r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int8_t* a) noexcept                       { return *reinterpret_cast<const __m128i*> (a); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int8_t* a) noexcept                       { return load (a); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int8_t* a) noexcept                         { return _mm_load_si128 ((const __m128i*) a); }\r
+    static forcedinline void    JUCE_VECTOR_CALLTYPE store (__m128i v, int8_t* p) noexcept                   { _mm_store_si128 ((__m128i*) p, v); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int8_t s) noexcept                              { return _mm_set1_epi8 (s); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept                     { return _mm_add_epi8 (a, b); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept                     { return _mm_sub_epi8 (a, b); }\r
@@ -213,20 +224,10 @@ struct SIMDNativeOps<int8_t>
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept  { return add (a, mul (b, c)); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept                { return bit_not (equal (a, b)); }\r
     static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept                { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+    static forcedinline int8_t  JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept                      { return SIMDFallbackOps<int8_t, __m128i>::get (v, i); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, int8_t s) noexcept            { return SIMDFallbackOps<int8_t, __m128i>::set (v, i, s); }\r
 \r
     //==============================================================================\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int8_t* a) noexcept\r
-    {\r
-        const auto* b = reinterpret_cast<const char*> (a);\r
-        return _mm_set_epi8 (b[15], b[14], b[13], b[12], b[11], b[10], b[9], b[8],\r
-                             b[7],  b[6],  b[5],  b[4],  b[3],  b[2],  b[1], b[0]);\r
-    }\r
-\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, int8_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<int8_t, __m128i>::store (value, dest);\r
-    }\r
-\r
     static forcedinline int8_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
     {\r
        #ifdef __SSSE3__\r
@@ -239,18 +240,9 @@ struct SIMDNativeOps<int8_t>
             hi = _mm_hadd_epi16 (hi, hi);\r
         }\r
 \r
-        const int8_t* lo_ptr = reinterpret_cast<const int8_t*> (&lo);\r
-        const int8_t* hi_ptr = reinterpret_cast<const int8_t*> (&hi);\r
-\r
-        return lo_ptr[0] + hi_ptr[0];\r
+        return static_cast<int8_t> ((_mm_cvtsi128_si32 (lo) & 0xff) + (_mm_cvtsi128_si32 (hi) & 0xff));\r
        #else\r
-        int8_t sum = 0;\r
-        const int8_t* src = reinterpret_cast<const int8_t*> (&a);\r
-\r
-        for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(int8_t)); ++i)\r
-            sum += src [i];\r
-\r
-        return sum;\r
+        return SIMDFallbackOps<int8_t, __m128i>::sum (a);\r
        #endif\r
     }\r
 \r
@@ -274,14 +266,16 @@ template <>
 struct SIMDNativeOps<uint8_t>\r
 {\r
     //==============================================================================\r
-    typedef __m128i vSIMDType;\r
+    using vSIMDType = __m128i;\r
 \r
     //==============================================================================\r
     DECLARE_SSE_SIMD_CONST (uint8_t, kHighBit);\r
     DECLARE_SSE_SIMD_CONST (uint8_t, kAllBitsSet);\r
 \r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint8_t* a) noexcept                      { return *reinterpret_cast<const __m128i*> (a); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint8_t* a) noexcept                      { return load (a); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept                              { return _mm_xor_si128 (a, vconst (kHighBit)); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint8_t* a) noexcept                        { return _mm_load_si128 ((const __m128i*) a); }\r
+    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, uint8_t* p) noexcept                     { _mm_store_si128 ((__m128i*) p, v); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint8_t s) noexcept                             { return _mm_set1_epi8 ((int8_t) s); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept                     { return _mm_add_epi8 (a, b); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept                     { return _mm_sub_epi8 (a, b); }\r
@@ -298,20 +292,10 @@ struct SIMDNativeOps<uint8_t>
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept  { return add (a, mul (b, c)); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept                { return bit_not (equal (a, b)); }\r
     static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept                { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+    static forcedinline uint8_t JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept                      { return SIMDFallbackOps<uint8_t, __m128i>::get (v, i); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, uint8_t s) noexcept           { return SIMDFallbackOps<uint8_t, __m128i>::set (v, i, s); }\r
 \r
     //==============================================================================\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint8_t* a) noexcept\r
-    {\r
-        const auto* b = reinterpret_cast<const char*> (a);\r
-        return _mm_set_epi8 (b[15], b[14], b[13], b[12], b[11], b[10], b[9], b[8],\r
-                             b[7],  b[6],  b[5],  b[4],  b[3],  b[2],  b[1], b[0]);\r
-    }\r
-\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, uint8_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<uint8_t, __m128i>::store (value, dest);\r
-    }\r
-\r
     static forcedinline uint8_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
     {\r
        #ifdef __SSSE3__\r
@@ -324,18 +308,10 @@ struct SIMDNativeOps<uint8_t>
             hi = _mm_hadd_epi16 (hi, hi);\r
         }\r
 \r
-        const uint8_t* lo_ptr = reinterpret_cast<const uint8_t*> (&lo);\r
-        const uint8_t* hi_ptr = reinterpret_cast<const uint8_t*> (&hi);\r
-\r
-        return lo_ptr[0] + hi_ptr[0];\r
+        return static_cast<uint8_t> ((static_cast<uint32_t> (_mm_cvtsi128_si32 (lo)) & 0xffu)\r
+                                   + (static_cast<uint32_t> (_mm_cvtsi128_si32 (hi)) & 0xffu));\r
        #else\r
-        uint8_t sum = 0;\r
-        const uint8_t* src = reinterpret_cast<const uint8_t*> (&a);\r
-\r
-        for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(int8_t)); ++i)\r
-            sum += src [i];\r
-\r
-        return sum;\r
+        return SIMDFallbackOps<uint8_t, __m128i>::sum (a);\r
        #endif\r
     }\r
 \r
@@ -359,13 +335,15 @@ template <>
 struct SIMDNativeOps<int16_t>\r
 {\r
     //==============================================================================\r
-    typedef __m128i vSIMDType;\r
+    using vSIMDType = __m128i;\r
 \r
     //==============================================================================\r
     DECLARE_SSE_SIMD_CONST (int16_t, kAllBitsSet);\r
 \r
     //==============================================================================\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int16_t* a) noexcept                      { return *reinterpret_cast<const __m128i*> (a); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int16_t* a) noexcept                      { return load (a); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int16_t* a) noexcept                        { return _mm_load_si128 ((const __m128i*) a); }\r
+    static forcedinline void    JUCE_VECTOR_CALLTYPE store (__m128i v, int16_t* p) noexcept                  { _mm_store_si128 ((__m128i*) p, v); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int16_t s) noexcept                             { return _mm_set1_epi16 (s); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept                     { return _mm_add_epi16 (a, b); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept                     { return _mm_sub_epi16 (a, b); }\r
@@ -383,34 +361,20 @@ struct SIMDNativeOps<int16_t>
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept  { return add (a, mul (b, c)); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept                { return bit_not (equal (a, b)); }\r
     static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept                { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+    static forcedinline int16_t JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept                      { return SIMDFallbackOps<int16_t, __m128i>::get (v, i); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, int16_t s) noexcept           { return SIMDFallbackOps<int16_t, __m128i>::set (v, i, s); }\r
 \r
     //==============================================================================\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int16_t* a) noexcept\r
-    {\r
-        return _mm_set_epi16 (a[7], a[6], a[5], a[4], a[3], a[2], a[1], a[0]);\r
-    }\r
-\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, int16_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<int16_t, __m128i>::store (value, dest);\r
-    }\r
-\r
     static forcedinline int16_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
     {\r
        #ifdef __SSSE3__\r
         __m128i tmp = _mm_hadd_epi16 (a, a);\r
         tmp = _mm_hadd_epi16 (tmp, tmp);\r
         tmp = _mm_hadd_epi16 (tmp, tmp);\r
-        return *reinterpret_cast<int16_t*> (&tmp);\r
 \r
+        return static_cast<int16_t> (_mm_cvtsi128_si32 (tmp) & 0xffff);\r
        #else\r
-        int16_t sum = 0;\r
-        const int16_t* src = reinterpret_cast<const int16_t*> (&a);\r
-\r
-        for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(int16_t)); ++i)\r
-            sum += src [i];\r
-\r
-        return sum;\r
+        return SIMDFallbackOps<int16_t, __m128i>::sum (a);\r
        #endif\r
     }\r
 };\r
@@ -424,65 +388,53 @@ template <>
 struct SIMDNativeOps<uint16_t>\r
 {\r
     //==============================================================================\r
-    typedef __m128i vSIMDType;\r
+    using vSIMDType = __m128i;\r
 \r
     //==============================================================================\r
     DECLARE_SSE_SIMD_CONST (uint16_t, kHighBit);\r
     DECLARE_SSE_SIMD_CONST (uint16_t, kAllBitsSet);\r
 \r
     //==============================================================================\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint16_t* a) noexcept                     { return *reinterpret_cast<const __m128i*> (a); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept                              { return _mm_xor_si128 (a, vconst (kHighBit)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint16_t s) noexcept                            { return _mm_set1_epi16 ((int16_t) s); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept                     { return _mm_add_epi16 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept                     { return _mm_sub_epi16 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept                     { return _mm_mullo_epi16 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept                 { return _mm_and_si128 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or  (__m128i a, __m128i b) noexcept                 { return _mm_or_si128  (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept                 { return _mm_xor_si128 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept              { return _mm_andnot_si128 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept                            { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE vconst (const uint16_t* a) noexcept                     { return load (a); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept                              { return _mm_xor_si128 (a, vconst (kHighBit)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE load (const uint16_t* a) noexcept                       { return _mm_load_si128 ((const __m128i*) a); }\r
+    static forcedinline void     JUCE_VECTOR_CALLTYPE store (__m128i v, uint16_t* p) noexcept                    { _mm_store_si128 ((__m128i*) p, v); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE expand (uint16_t s) noexcept                            { return _mm_set1_epi16 ((int16_t) s); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept                     { return _mm_add_epi16 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept                     { return _mm_sub_epi16 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept                     { return _mm_mullo_epi16 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept                 { return _mm_and_si128 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE bit_or  (__m128i a, __m128i b) noexcept                 { return _mm_or_si128  (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept                 { return _mm_xor_si128 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept              { return _mm_andnot_si128 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept                            { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); }\r
    #if defined(__SSE4__)\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept                     { return _mm_min_epu16 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept                     { return _mm_max_epu16 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept                     { return _mm_min_epu16 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept                     { return _mm_max_epu16 (a, b); }\r
    #else\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept                     { __m128i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept                     { __m128i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept                     { __m128i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept                     { __m128i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
    #endif\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept                   { return _mm_cmpeq_epi16 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept             { return _mm_cmpgt_epi16 (ssign (a), ssign (b)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept      { return bit_or (greaterThan (a, b), equal (a,b)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept  { return add (a, mul (b, c)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept                { return bit_not (equal (a, b)); }\r
-    static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept                { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept                   { return _mm_cmpeq_epi16 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept             { return _mm_cmpgt_epi16 (ssign (a), ssign (b)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept      { return bit_or (greaterThan (a, b), equal (a,b)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept  { return add (a, mul (b, c)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept                { return bit_not (equal (a, b)); }\r
+    static forcedinline bool     JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept                { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+    static forcedinline uint16_t JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept                      { return SIMDFallbackOps<uint16_t, __m128i>::get (v, i); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, uint16_t s) noexcept          { return SIMDFallbackOps<uint16_t, __m128i>::set (v, i, s); }\r
 \r
     //==============================================================================\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint16_t* a) noexcept\r
-    {\r
-        const auto* b = reinterpret_cast<const int16_t*> (a);\r
-        return _mm_set_epi16 (b[7], b[6], b[5], b[4], b[3], b[2], b[1], b[0]);\r
-    }\r
-\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, uint16_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<uint16_t, __m128i>::store (value, dest);\r
-    }\r
-\r
     static forcedinline uint16_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
     {\r
        #ifdef __SSSE3__\r
         __m128i tmp = _mm_hadd_epi16 (a, a);\r
         tmp = _mm_hadd_epi16 (tmp, tmp);\r
         tmp = _mm_hadd_epi16 (tmp, tmp);\r
-        return *reinterpret_cast<uint16_t*> (&tmp);\r
-       #else\r
-        uint16_t sum = 0;\r
-        const uint16_t* src = reinterpret_cast<const uint16_t*> (&a);\r
-\r
-        for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(uint16_t)); ++i)\r
-            sum += src [i];\r
 \r
-        return sum;\r
+        return static_cast<uint16_t> (static_cast<uint32_t> (_mm_cvtsi128_si32 (tmp)) & 0xffffu);\r
+       #else\r
+        return SIMDFallbackOps<uint16_t, __m128i>::sum (a);\r
        #endif\r
     }\r
 };\r
@@ -496,15 +448,16 @@ template <>
 struct SIMDNativeOps<int32_t>\r
 {\r
     //==============================================================================\r
-    typedef __m128i vSIMDType;\r
+    using vSIMDType = __m128i;\r
 \r
     //==============================================================================\r
     DECLARE_SSE_SIMD_CONST (int32_t, kAllBitsSet);\r
 \r
     //==============================================================================\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept                      { return *reinterpret_cast<const __m128i*> (a); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept                      { return load (a); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int32_t* a) noexcept                        { return _mm_load_si128 ((const __m128i*) a); }\r
+    static forcedinline void    JUCE_VECTOR_CALLTYPE store (__m128i v, int32_t* p) noexcept                  { _mm_store_si128 ((__m128i*) p, v); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int32_t s) noexcept                             { return _mm_set1_epi32 (s); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int32_t* a) noexcept                        { return _mm_set_epi32 (a[3], a[2], a[1], a[0]); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept                     { return _mm_add_epi32 (a, b); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept                     { return _mm_sub_epi32 (a, b); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept                 { return _mm_and_si128 (a, b); }\r
@@ -518,27 +471,17 @@ struct SIMDNativeOps<int32_t>
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept  { return add (a, mul (b, c)); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept                { return bit_not (equal (a, b)); }\r
     static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept                { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+    static forcedinline int32_t JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept                      { return SIMDFallbackOps<int32_t, __m128i>::get (v, i); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, int32_t s) noexcept           { return SIMDFallbackOps<int32_t, __m128i>::set (v, i, s); }\r
 \r
     //==============================================================================\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, int32_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<int32_t, __m128i>::store (value, dest);\r
-    }\r
-\r
     static forcedinline int32_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
     {\r
        #ifdef __SSSE3__\r
         __m128i tmp = _mm_hadd_epi32 (a, a);\r
-        tmp = _mm_hadd_epi32 (tmp, tmp);\r
-        return *reinterpret_cast<int32_t*> (&tmp);\r
+        return _mm_cvtsi128_si32 (_mm_hadd_epi32 (tmp, tmp));\r
        #else\r
-        int32_t sum = 0;\r
-        const int32_t* src = reinterpret_cast<const int32_t*> (&a);\r
-\r
-        for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(int32_t)); ++i)\r
-            sum += src [i];\r
-\r
-        return sum;\r
+        return SIMDFallbackOps<int32_t, __m128i>::sum (a);\r
        #endif\r
     }\r
 \r
@@ -584,56 +527,42 @@ template <>
 struct SIMDNativeOps<uint32_t>\r
 {\r
     //==============================================================================\r
-    typedef __m128i vSIMDType;\r
+    using vSIMDType = __m128i;\r
 \r
     //==============================================================================\r
     DECLARE_SSE_SIMD_CONST (uint32_t, kAllBitsSet);\r
     DECLARE_SSE_SIMD_CONST (uint32_t, kHighBit);\r
 \r
     //==============================================================================\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint32_t* a) noexcept                     { return *reinterpret_cast<const __m128i*> (a); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept                              { return _mm_xor_si128 (a, vconst (kHighBit)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint32_t s) noexcept                            { return _mm_set1_epi32 ((int32_t) s); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept                     { return _mm_add_epi32 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept                     { return _mm_sub_epi32 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept                 { return _mm_and_si128 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or  (__m128i a, __m128i b) noexcept                 { return _mm_or_si128  (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept                 { return _mm_xor_si128 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept              { return _mm_andnot_si128 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept                            { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept                   { return _mm_cmpeq_epi32 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept             { return _mm_cmpgt_epi32 (ssign (a), ssign (b)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept      { return bit_or (greaterThan (a, b), equal (a,b)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept  { return add (a, mul (b, c)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept                { return bit_not (equal (a, b)); }\r
-    static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept                { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE vconst (const uint32_t* a) noexcept                     { return load (a); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept                              { return _mm_xor_si128 (a, vconst (kHighBit)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE load (const uint32_t* a) noexcept                       { return _mm_load_si128 ((const __m128i*) a); }\r
+    static forcedinline void     JUCE_VECTOR_CALLTYPE store (__m128i v, uint32_t* p) noexcept                    { _mm_store_si128 ((__m128i*) p, v); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE expand (uint32_t s) noexcept                            { return _mm_set1_epi32 ((int32_t) s); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept                     { return _mm_add_epi32 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept                     { return _mm_sub_epi32 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept                 { return _mm_and_si128 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE bit_or  (__m128i a, __m128i b) noexcept                 { return _mm_or_si128  (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept                 { return _mm_xor_si128 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept              { return _mm_andnot_si128 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept                            { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept                   { return _mm_cmpeq_epi32 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept             { return _mm_cmpgt_epi32 (ssign (a), ssign (b)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept      { return bit_or (greaterThan (a, b), equal (a,b)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept  { return add (a, mul (b, c)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept                { return bit_not (equal (a, b)); }\r
+    static forcedinline bool     JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept                { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+    static forcedinline uint32_t JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept                      { return SIMDFallbackOps<uint32_t, __m128i>::get (v, i); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, uint32_t s) noexcept          { return SIMDFallbackOps<uint32_t, __m128i>::set (v, i, s); }\r
 \r
     //==============================================================================\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint32_t* a) noexcept\r
-    {\r
-        const auto* b = reinterpret_cast<const int32_t*> (a);\r
-        return _mm_set_epi32 (b[3], b[2], b[1], b[0]);\r
-    }\r
-\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, uint32_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<uint32_t, __m128i>::store (value, dest);\r
-    }\r
-\r
     static forcedinline uint32_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
     {\r
        #ifdef __SSSE3__\r
         __m128i tmp = _mm_hadd_epi32 (a, a);\r
-        tmp = _mm_hadd_epi32 (tmp, tmp);\r
-        return *reinterpret_cast<uint32_t*> (&tmp);\r
+        return static_cast<uint32_t> (_mm_cvtsi128_si32 (_mm_hadd_epi32 (tmp, tmp)));\r
        #else\r
-        uint32_t sum = 0;\r
-        const uint32_t* src = reinterpret_cast<const uint32_t*> (&a);\r
-\r
-        for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(uint32_t)); ++i)\r
-            sum += src [i];\r
-\r
-        return sum;\r
+        return SIMDFallbackOps<uint32_t, __m128i>::sum (a);\r
        #endif\r
     }\r
 \r
@@ -679,21 +608,15 @@ template <>
 struct SIMDNativeOps<int64_t>\r
 {\r
     //==============================================================================\r
-    typedef __m128i vSIMDType;\r
+    using vSIMDType = __m128i;\r
 \r
     //==============================================================================\r
     DECLARE_SSE_SIMD_CONST (int64_t, kAllBitsSet);\r
 \r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int64_t s) noexcept\r
-    {\r
-        __m128i retval;\r
-        int64_t* ptr = reinterpret_cast<int64_t*> (&retval);\r
-        ptr[0] = ptr[1] = s;\r
-        return retval;\r
-    }\r
-\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int64_t* a) noexcept                        { return _mm_set_epi64x (a[1], a[0]); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept                      { return *reinterpret_cast<const __m128i*> (a); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept                      { return load (a); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int64_t s) noexcept                             { return _mm_set1_epi64x (s); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int64_t* a) noexcept                        { return _mm_load_si128 ((const __m128i*) a); }\r
+    static forcedinline void    JUCE_VECTOR_CALLTYPE store (__m128i v, int64_t* p) noexcept                  { _mm_store_si128 ((__m128i*) p, v); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept                     { return _mm_add_epi64 (a, b); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept                     { return _mm_sub_epi64 (a, b); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept                 { return _mm_and_si128 (a, b); }\r
@@ -703,36 +626,14 @@ struct SIMDNativeOps<int64_t>
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept                            { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept                     { __m128i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept                     { __m128i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
-    static forcedinline __m128i greaterThanOrEqual (__m128i a, __m128i b) noexcept      { return bit_or (greaterThan (a, b), equal (a,b)); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept      { return bit_or (greaterThan (a, b), equal (a,b)); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept  { return add (a, mul (b, c)); }\r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept                { return bit_not (equal (a, b)); }\r
     static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept                { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
-\r
-    //==============================================================================\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, int64_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<int64_t, __m128i>::store (value, dest);\r
-    }\r
-\r
-    static forcedinline int64_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
-    {\r
-        const int64_t* ptr = reinterpret_cast<const int64_t*> (&a);\r
-        return ptr[0] + ptr[1];\r
-    }\r
-\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept\r
-    {\r
-        __m128i retval;\r
-\r
-        const int64_t* aptr = reinterpret_cast<const int64_t*> (&a);\r
-        const int64_t* bptr = reinterpret_cast<const int64_t*> (&b);\r
-        int64_t* dst =  reinterpret_cast<int64_t*> (&retval);\r
-\r
-        dst[0] = aptr[0] * bptr[0];\r
-        dst[1] = aptr[1] * bptr[1];\r
-\r
-        return retval;\r
-    }\r
+    static forcedinline int64_t JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept                      { return SIMDFallbackOps<int64_t, __m128i>::get (v, i); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, int64_t s) noexcept           { return SIMDFallbackOps<int64_t, __m128i>::set (v, i, s); }\r
+    static forcedinline int64_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept                                { return SIMDFallbackOps<int64_t, __m128i>::sum (a); }\r
+    static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept                     { return SIMDFallbackOps<int64_t, __m128i>::mul (a, b); }\r
 \r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept\r
     {\r
@@ -747,19 +648,10 @@ struct SIMDNativeOps<int64_t>
 \r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept\r
     {\r
-       #if defined(__SSE4_1__) && !defined(__clang__)\r
+       #if defined(__SSE4_1__)\r
         return _mm_cmpgt_epi64 (a, b);\r
        #else\r
-        __m128i retval;\r
-\r
-        const int64_t* aptr = reinterpret_cast<const int64_t*> (&a);\r
-        const int64_t* bptr = reinterpret_cast<const int64_t*> (&b);\r
-        int64_t* dst =  reinterpret_cast<int64_t*> (&retval);\r
-\r
-        dst[0] = aptr[0] > bptr[0] ? -1LL : 0;\r
-        dst[1] = aptr[1] > bptr[1] ? -1LL : 0;\r
-\r
-        return retval;\r
+        return SIMDFallbackOps<int64_t, __m128i>::greaterThan (a, b);\r
        #endif\r
     }\r
 };\r
@@ -773,67 +665,34 @@ template <>
 struct SIMDNativeOps<uint64_t>\r
 {\r
     //==============================================================================\r
-    typedef __m128i vSIMDType;\r
+    using vSIMDType = __m128i;\r
 \r
     //==============================================================================\r
     DECLARE_SSE_SIMD_CONST (uint64_t, kAllBitsSet);\r
     DECLARE_SSE_SIMD_CONST (uint64_t, kHighBit);\r
 \r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint64_t s) noexcept\r
-    {\r
-         __m128i retval;\r
-        uint64_t* ptr = reinterpret_cast<uint64_t*> (&retval);\r
-        ptr[0] = ptr[1] = s;\r
-        return retval;\r
-    }\r
-\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint64_t* a) noexcept                     { return *reinterpret_cast<const __m128i*> (a); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept                              { return _mm_xor_si128 (a, vconst (kHighBit)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept                     { return _mm_add_epi64 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept                     { return _mm_sub_epi64 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept                 { return _mm_and_si128 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or  (__m128i a, __m128i b) noexcept                 { return _mm_or_si128  (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept                 { return _mm_xor_si128 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept              { return _mm_andnot_si128 (a, b); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept                            { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept                     { __m128i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept                     { __m128i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept      { return bit_or (greaterThan (a, b), equal (a,b)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept  { return add (a, mul (b, c)); }\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept                { return bit_not (equal (a, b)); }\r
-    static forcedinline bool    JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept                { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
-\r
-    //==============================================================================\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint64_t* a) noexcept\r
-    {\r
-        const auto* b = reinterpret_cast<const int64_t*> (a);\r
-        return _mm_set_epi64x (b[1], b[0]);\r
-    }\r
-\r
-    static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, uint64_t* dest) noexcept\r
-    {\r
-        SIMDFallbackOps<uint64_t, __m128i>::store (value, dest);\r
-    }\r
-\r
-    static forcedinline uint64_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
-    {\r
-        const uint64_t* ptr = reinterpret_cast<const uint64_t*> (&a);\r
-        return ptr[0] + ptr[1];\r
-    }\r
-\r
-    static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept\r
-    {\r
-        __m128i retval;\r
-\r
-        const uint64_t* aptr = reinterpret_cast<const uint64_t*> (&a);\r
-        const uint64_t* bptr = reinterpret_cast<const uint64_t*> (&b);\r
-        uint64_t* dst =  reinterpret_cast<uint64_t*> (&retval);\r
-\r
-        dst[0] = aptr[0] * bptr[0];\r
-        dst[1] = aptr[1] * bptr[1];\r
-\r
-        return retval;\r
-    }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE vconst (const uint64_t* a) noexcept                     { return load (a); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE expand (uint64_t s) noexcept                            { return _mm_set1_epi64x ((int64_t) s); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept                              { return _mm_xor_si128 (a, vconst (kHighBit)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE load (const uint64_t* a) noexcept                       { return _mm_load_si128 ((const __m128i*) a); }\r
+    static forcedinline void     JUCE_VECTOR_CALLTYPE store (__m128i v, uint64_t* p) noexcept                 { _mm_store_si128 ((__m128i*) p, v); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept                     { return _mm_add_epi64 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept                     { return _mm_sub_epi64 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept                 { return _mm_and_si128 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE bit_or  (__m128i a, __m128i b) noexcept                 { return _mm_or_si128  (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept                 { return _mm_xor_si128 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept              { return _mm_andnot_si128 (a, b); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept                            { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept                     { __m128i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept                     { __m128i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept      { return bit_or (greaterThan (a, b), equal (a,b)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept  { return add (a, mul (b, c)); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept                { return bit_not (equal (a, b)); }\r
+    static forcedinline bool     JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept                { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+    static forcedinline uint64_t JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept                      { return SIMDFallbackOps<uint64_t, __m128i>::get (v, i); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, uint64_t s) noexcept          { return SIMDFallbackOps<uint64_t, __m128i>::set (v, i, s); }\r
+    static forcedinline uint64_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept                                { return SIMDFallbackOps<uint64_t, __m128i>::sum (a); }\r
+    static forcedinline __m128i  JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept                     { return SIMDFallbackOps<uint64_t, __m128i>::mul (a, b); }\r
 \r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept\r
     {\r
@@ -848,24 +707,19 @@ struct SIMDNativeOps<uint64_t>
 \r
     static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept\r
     {\r
-       #if defined(__SSE4_1__) && !defined(__clang__)\r
-        return _mm_cmpgt_epi64 (a, b);\r
+       #if defined(__SSE4_1__)\r
+        return _mm_cmpgt_epi64 (ssign (a), ssign (b));\r
        #else\r
-        __m128i retval;\r
-\r
-        const uint64_t* aptr = reinterpret_cast<const uint64_t*> (&a);\r
-        const uint64_t* bptr = reinterpret_cast<const uint64_t*> (&b);\r
-        uint64_t* dst =  reinterpret_cast<uint64_t*> (&retval);\r
-\r
-        dst[0] = aptr[0] > bptr[0] ? (uint64_t) -1LL : 0;\r
-        dst[1] = aptr[1] > bptr[1] ? (uint64_t) -1LL : 0;\r
-\r
-        return retval;\r
+        return SIMDFallbackOps<uint64_t, __m128i>::greaterThan (a, b);\r
        #endif\r
     }\r
 };\r
 \r
 #endif\r
 \r
+#if JUCE_GCC && (__GNUC__ >= 6)\r
+ #pragma GCC diagnostic pop\r
+#endif\r
+\r
 } // namespace dsp\r
 } // namespace juce\r
index 2031a892b41f491a77b5328814cafaf658666bf8..404c76304f26c6375d76015b96a8823f8d68eb73 100644 (file)
@@ -72,7 +72,7 @@ public:
                                                                  MathConstants<NumericType>::pi,\r
                                                                  lookupTableNumPoints);\r
 \r
-            lookupTable = table;\r
+            lookupTable.reset (table);\r
             generator = [table] (NumericType x) { return (*table) (x); };\r
         }\r
         else\r
@@ -233,7 +233,7 @@ public:
 private:\r
     //==============================================================================\r
     std::function<NumericType (NumericType)> generator;\r
-    ScopedPointer<LookupTableTransform<NumericType>> lookupTable;\r
+    std::unique_ptr<LookupTableTransform<NumericType>> lookupTable;\r
     Array<NumericType> rampBuffer;\r
     LinearSmoothedValue<NumericType> frequency { static_cast<NumericType> (440.0) };\r
     NumericType sampleRate = 48000.0;\r
index 693a5d2743b8d7acd58aa2980c619d1e8e2ddb6e..f93151d1a3806c3ccfa093749c03c136c7ce6dfc 100644 (file)
@@ -72,8 +72,15 @@ struct WaveShaper
 };\r
 \r
 //==============================================================================\r
+// Although clang supports C++17, their standard library still has no invoke_result\r
+// support. Remove the "|| JUCE_CLANG" once clang supports this properly!\r
+#if (! JUCE_CXX17_IS_AVAILABLE) || JUCE_CLANG\r
 template <typename Functor>\r
 static WaveShaper<typename std::result_of<Functor>, Functor> CreateWaveShaper (Functor functionToUse)   { return {functionToUse}; }\r
+#else\r
+template <typename Functor>\r
+static WaveShaper<typename std::invoke_result<Functor>, Functor> CreateWaveShaper (Functor functionToUse)   { return {functionToUse}; }\r
+#endif\r
 \r
 } // namespace dsp\r
 } // namespace juce\r
index 138d1e711b898cf92e1b4cb0643af4fb823dc904..0e522e25a6bc8caca695e137ec28a36bf2f6189c 100644 (file)
@@ -106,7 +106,7 @@ private:
     struct Connection;\r
     friend struct Connection;\r
     friend struct ContainerDeletePolicy<Connection>;\r
-    ScopedPointer<Connection> connection;\r
+    std::unique_ptr<Connection> connection;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcessSlave)\r
 };\r
@@ -191,12 +191,12 @@ public:
     bool sendMessageToSlave (const MemoryBlock&);\r
 \r
 private:\r
-    ScopedPointer<ChildProcess> childProcess;\r
+    std::unique_ptr<ChildProcess> childProcess;\r
 \r
     struct Connection;\r
     friend struct Connection;\r
     friend struct ContainerDeletePolicy<Connection>;\r
-    ScopedPointer<Connection> connection;\r
+    std::unique_ptr<Connection> connection;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcessMaster)\r
 };\r
index e639be9c89a732030b2a5b3127f91f6dbd968871..a4c674f9dcfa64d5d7286a37215707fe0ab7c29d 100644 (file)
@@ -50,8 +50,7 @@ InterprocessConnection::~InterprocessConnection()
 \r
 //==============================================================================\r
 bool InterprocessConnection::connectToSocket (const String& hostName,\r
-                                              const int portNumber,\r
-                                              const int timeOutMillisecs)\r
+                                              int portNumber, int timeOutMillisecs)\r
 {\r
     disconnect();\r
 \r
@@ -69,11 +68,11 @@ bool InterprocessConnection::connectToSocket (const String& hostName,
     return false;\r
 }\r
 \r
-bool InterprocessConnection::connectToPipe (const String& pipeName, const int timeoutMs)\r
+bool InterprocessConnection::connectToPipe (const String& pipeName, int timeoutMs)\r
 {\r
     disconnect();\r
 \r
-    ScopedPointer<NamedPipe> newPipe (new NamedPipe());\r
+    std::unique_ptr<NamedPipe> newPipe (new NamedPipe());\r
 \r
     if (newPipe->openExisting (pipeName))\r
     {\r
@@ -86,11 +85,11 @@ bool InterprocessConnection::connectToPipe (const String& pipeName, const int ti
     return false;\r
 }\r
 \r
-bool InterprocessConnection::createPipe (const String& pipeName, const int timeoutMs, bool mustNotExist)\r
+bool InterprocessConnection::createPipe (const String& pipeName, int timeoutMs, bool mustNotExist)\r
 {\r
     disconnect();\r
 \r
-    ScopedPointer<NamedPipe> newPipe (new NamedPipe());\r
+    std::unique_ptr<NamedPipe> newPipe (new NamedPipe());\r
 \r
     if (newPipe->createNewPipe (pipeName, mustNotExist))\r
     {\r
@@ -269,16 +268,27 @@ void InterprocessConnection::deliverDataInt (const MemoryBlock& data)
 }\r
 \r
 //==============================================================================\r
-bool InterprocessConnection::readNextMessageInt()\r
+int InterprocessConnection::readData (void* data, int num)\r
+{\r
+    if (socket != nullptr)\r
+        return socket->read (data, num, true);\r
+\r
+    if (pipe != nullptr)\r
+        return pipe->read (data, num, pipeReceiveMessageTimeout);\r
+\r
+    jassertfalse;\r
+    return -1;\r
+}\r
+\r
+bool InterprocessConnection::readNextMessage()\r
 {\r
     uint32 messageHeader[2];\r
-    const int bytes = socket != nullptr ? socket->read (messageHeader, sizeof (messageHeader), true)\r
-                                        : pipe  ->read (messageHeader, sizeof (messageHeader), -1);\r
+    auto bytes = readData (messageHeader, sizeof (messageHeader));\r
 \r
     if (bytes == sizeof (messageHeader)\r
          && ByteOrder::swapIfBigEndian (messageHeader[0]) == magicMessageHeader)\r
     {\r
-        int bytesInMessage = (int) ByteOrder::swapIfBigEndian (messageHeader[1]);\r
+        auto bytesInMessage = (int) ByteOrder::swapIfBigEndian (messageHeader[1]);\r
 \r
         if (bytesInMessage > 0)\r
         {\r
@@ -290,11 +300,8 @@ bool InterprocessConnection::readNextMessageInt()
                 if (thread->threadShouldExit())\r
                     return false;\r
 \r
-                const int numThisTime = jmin (bytesInMessage, 65536);\r
-                void* const data = addBytesToPointer (messageData.getData(), bytesRead);\r
-\r
-                const int bytesIn = socket != nullptr ? socket->read (data, numThisTime, true)\r
-                                                      : pipe  ->read (data, numThisTime, -1);\r
+                auto numThisTime = jmin (bytesInMessage, 65536);\r
+                auto bytesIn = readData (addBytesToPointer (messageData.getData(), bytesRead), numThisTime);\r
 \r
                 if (bytesIn <= 0)\r
                     break;\r
@@ -306,17 +313,19 @@ bool InterprocessConnection::readNextMessageInt()
             if (bytesRead >= 0)\r
                 deliverDataInt (messageData);\r
         }\r
+\r
+        return true;\r
     }\r
-    else if (bytes < 0)\r
+\r
+    if (bytes < 0)\r
     {\r
         if (socket != nullptr)\r
             deletePipeAndSocket();\r
 \r
         connectionLostInt();\r
-        return false;\r
     }\r
 \r
-    return true;\r
+    return false;\r
 }\r
 \r
 void InterprocessConnection::runThread()\r
@@ -354,7 +363,7 @@ void InterprocessConnection::runThread()
             break;\r
         }\r
 \r
-        if (thread->threadShouldExit() || ! readNextMessageInt())\r
+        if (thread->threadShouldExit() || ! readNextMessage())\r
             break;\r
     }\r
 }\r
index fe10dfe6f114bf31edbf19f070fb7704165006cf..26b723368e0c7ec9db074d383c3898842a693a66 100644 (file)
@@ -179,8 +179,8 @@ public:
 private:\r
     //==============================================================================\r
     CriticalSection pipeAndSocketLock;\r
-    ScopedPointer<StreamingSocket> socket;\r
-    ScopedPointer<NamedPipe> pipe;\r
+    std::unique_ptr<StreamingSocket> socket;\r
+    std::unique_ptr<NamedPipe> pipe;\r
     bool callbackConnectionState = false;\r
     const bool useMessageThread;\r
     const uint32 magicMessageHeader;\r
@@ -193,12 +193,13 @@ private:
     void connectionMadeInt();\r
     void connectionLostInt();\r
     void deliverDataInt (const MemoryBlock&);\r
-    bool readNextMessageInt();\r
+    bool readNextMessage();\r
+    int readData (void*, int);\r
 \r
     struct ConnectionThread;\r
     friend struct ConnectionThread;\r
     friend struct ContainerDeletePolicy<ConnectionThread>;\r
-    ScopedPointer<ConnectionThread> thread;\r
+    std::unique_ptr<ConnectionThread> thread;\r
     void runThread();\r
     int writeData (void*, int);\r
 \r
index 5d1d04373003f7b39073d3504845df07122c4c73..3ceb915dc14e6a5090863726907501913694e4e0 100644 (file)
@@ -69,7 +69,7 @@ void InterprocessConnectionServer::run()
 {\r
     while ((! threadShouldExit()) && socket != nullptr)\r
     {\r
-        ScopedPointer<StreamingSocket> clientSocket (socket->waitForNextConnection());\r
+        std::unique_ptr<StreamingSocket> clientSocket (socket->waitForNextConnection());\r
 \r
         if (clientSocket != nullptr)\r
             if (auto* newConnection = createConnectionObject())\r
index 1654620b8a730e58f6bb323e4a1cf40fc85ddf53..de04682392683b3de5e0500bdaa7c26da97b4305 100644 (file)
@@ -96,7 +96,7 @@ protected:
 \r
 private:\r
     //==============================================================================\r
-    ScopedPointer<StreamingSocket> socket;\r
+    std::unique_ptr<StreamingSocket> socket;\r
 \r
     void run() override;\r
 \r
index 6af8b091c60021d4756d9bb9cec8be7d00062356..52552ce396a5f7353368a9cc536bb4da8ff66ff8 100644 (file)
@@ -31,7 +31,7 @@
 \r
   ID:               juce_events\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE message and event handling classes\r
   description:      Classes for running an application's main event loop and sending/receiving messages, timers, etc.\r
   website:          http://www.juce.com/juce\r
index 432cefd6572c33de77f38c51d219d1c4439e9268..5f8ab68257b247b9b9b7b77f410273a7e5931478 100644 (file)
@@ -53,7 +53,7 @@ void JUCEApplicationBase::appWillTerminateByForce()
     JUCE_AUTORELEASEPOOL\r
     {\r
         {\r
-            const ScopedPointer<JUCEApplicationBase> app (appInstance);\r
+            const std::unique_ptr<JUCEApplicationBase> app (appInstance);\r
 \r
             if (app != nullptr)\r
                 app->shutdownApp();\r
@@ -250,7 +250,7 @@ int JUCEApplicationBase::main()
     ScopedJuceInitialiser_GUI libraryInitialiser;\r
     jassert (createInstance != nullptr);\r
 \r
-    const ScopedPointer<JUCEApplicationBase> app (createInstance());\r
+    const std::unique_ptr<JUCEApplicationBase> app (createInstance());\r
     jassert (app != nullptr);\r
 \r
     if (! app->initialiseApp())\r
index 2aa34f2fcb614c70f177bcf250bb29e7578a88be..6d0f9c562f03ade2a8485b36a3df721d2ebe426d 100644 (file)
@@ -49,7 +49,7 @@ namespace juce
 \r
             void initialise (const String& commandLine) override\r
             {\r
-                myMainWindow = new MyApplicationWindow();\r
+                myMainWindow.reset (new MyApplicationWindow());\r
                 myMainWindow->setBounds (100, 100, 400, 500);\r
                 myMainWindow->setVisible (true);\r
             }\r
@@ -70,7 +70,7 @@ namespace juce
             }\r
 \r
         private:\r
-            ScopedPointer<MyApplicationWindow> myMainWindow;\r
+            std::unique_ptr<MyApplicationWindow> myMainWindow;\r
         };\r
 \r
         // this generates boilerplate code to launch our app class:\r
@@ -104,7 +104,7 @@ public:
 \r
     /** Checks whether multiple instances of the app are allowed.\r
 \r
-        If you application class returns true for this, more than one instance is\r
+        If your application class returns true for this, more than one instance is\r
         permitted to run (except on the Mac where this isn't possible).\r
 \r
         If it's false, the second instance won't start, but it you will still get a\r
@@ -292,7 +292,7 @@ private:
     struct MultipleInstanceHandler;\r
     friend struct MultipleInstanceHandler;\r
     friend struct ContainerDeletePolicy<MultipleInstanceHandler>;\r
-    ScopedPointer<MultipleInstanceHandler> multipleInstanceHandler;\r
+    std::unique_ptr<MultipleInstanceHandler> multipleInstanceHandler;\r
 \r
     JUCE_DECLARE_NON_COPYABLE (JUCEApplicationBase)\r
 };\r
index 49021e52f446273735390313ecbc5e015eb0d2a2..cdd79de331fb35fe4e8497e08721f297d862e917 100644 (file)
@@ -48,7 +48,7 @@ public:
     Message() noexcept;\r
     ~Message();\r
 \r
-    typedef ReferenceCountedObjectPtr<Message> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<Message>;\r
 \r
     //==============================================================================\r
 private:\r
index 247cf343d279657f4feb4257533a7e04de93bea6..320b41aeee8c074d5e2868b2cd0aa1c491c3e6d7 100644 (file)
@@ -155,7 +155,7 @@ public:
     }\r
 \r
     WaitableEvent finished;\r
-    void* volatile result = nullptr;\r
+    std::atomic<void*> result { nullptr };\r
 \r
 private:\r
     MessageCallbackFunction* const func;\r
@@ -177,7 +177,7 @@ void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* cons
     if (message->post())\r
     {\r
         message->finished.wait();\r
-        return message->result;\r
+        return message->result.load();\r
     }\r
 \r
     jassertfalse; // the OS message queue failed to send the message!\r
index 17241ec72d21aa89bf5b7c694e37cce781137019..345b80349e5dba5c9d2c4d751c66e778fb5fccc1 100644 (file)
@@ -182,7 +182,7 @@ public:
         virtual void messageCallback() = 0;\r
         bool post();\r
 \r
-        typedef ReferenceCountedObjectPtr<MessageBase> Ptr;\r
+        using Ptr = ReferenceCountedObjectPtr<MessageBase>;\r
 \r
         JUCE_DECLARE_NON_COPYABLE (MessageBase)\r
     };\r
@@ -319,7 +319,7 @@ private:
     friend class QuitMessage;\r
     friend class MessageManagerLock;\r
 \r
-    ScopedPointer<ActionBroadcaster> broadcaster;\r
+    std::unique_ptr<ActionBroadcaster> broadcaster;\r
     Atomic<int> quitMessagePosted { 0 }, quitMessageReceived { 0 };\r
     Thread::ThreadID messageThreadId;\r
     Atomic<Thread::ThreadID> threadWithLock;\r
index 3d3967b3f6978f5e65a4db10fad03cdd3c45df6e..d9883da2df2b968741fed14eb93da6e137b31470 100644 (file)
@@ -49,7 +49,7 @@ public:
 private:\r
     JUCE_PUBLIC_IN_DLL_BUILD (struct Pimpl)\r
     friend struct ContainerDeletePolicy<Pimpl>;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MountedVolumeListChangeDetector)\r
 };\r
index 3913ed7f813032fc5666ecd744fda771a9e1c70a..abc5e6bcee7f82b6d171d72d2b020da58f3006f0 100644 (file)
 namespace juce\r
 {\r
 \r
-#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
-  METHOD (constructor,           "<init>",           "()V") \\r
-  METHOD (post,                  "post",             "(Ljava/lang/Runnable;)Z") \\r
-\r
-DECLARE_JNI_CLASS (JNIHandler, "android/os/Handler");\r
-#undef JNI_CLASS_MEMBERS\r
-\r
-\r
 //==============================================================================\r
 namespace Android\r
 {\r
@@ -58,14 +50,14 @@ namespace Android
 \r
     struct Handler\r
     {\r
-        Handler() : nativeHandler (getEnv()->NewObject (JNIHandler, JNIHandler.constructor)) {}\r
+        Handler() : nativeHandler (getEnv()->NewObject (AndroidHandler, AndroidHandler.constructor)) {}\r
         ~Handler() { clearSingletonInstance(); }\r
 \r
         JUCE_DECLARE_SINGLETON (Handler, false)\r
 \r
         bool post (jobject runnable)\r
         {\r
-            return (getEnv()->CallBooleanMethod (nativeHandler.get(), JNIHandler.post, runnable) != 0);\r
+            return (getEnv()->CallBooleanMethod (nativeHandler.get(), AndroidHandler.post, runnable) != 0);\r
         }\r
 \r
         GlobalRef nativeHandler;\r
index 50987413791eb71b7e7ff0d0eb57aa04976771f5..bd955d07bb6f7c9bbdd586720fbcf65f82c6727b 100644 (file)
@@ -74,12 +74,12 @@ bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor)
 #endif\r
 \r
 //==============================================================================\r
-static ScopedPointer<MessageQueue> messageQueue;\r
+static std::unique_ptr<MessageQueue> messageQueue;\r
 \r
 void MessageManager::doPlatformSpecificInitialisation()\r
 {\r
     if (messageQueue == nullptr)\r
-        messageQueue = new MessageQueue();\r
+        messageQueue.reset (new MessageQueue());\r
 }\r
 \r
 void MessageManager::doPlatformSpecificShutdown()\r
index bd53abc5343612044010ae1e30409a181500b557..bcb39622d33c97d4403355952a487979cc4a4063 100644 (file)
@@ -57,7 +57,7 @@ public:
 \r
         pfds[INTERNAL_QUEUE_FD].fd = getReadHandle();\r
         pfds[INTERNAL_QUEUE_FD].events = POLLIN;\r
-        readCallback[INTERNAL_QUEUE_FD] = new LinuxEventLoop::CallbackFunction<decltype(internalQueueCb)> (internalQueueCb);\r
+        readCallback[INTERNAL_QUEUE_FD].reset (new LinuxEventLoop::CallbackFunction<decltype(internalQueueCb)> (internalQueueCb));\r
     }\r
 \r
     ~InternalMessageQueue()\r
@@ -96,7 +96,7 @@ public:
         fdCount = 2;\r
         pfds[WINDOW_SYSTEM_FD].fd = _fd;\r
         pfds[WINDOW_SYSTEM_FD].events = POLLIN;\r
-        readCallback[WINDOW_SYSTEM_FD] = _readCallback;\r
+        readCallback[WINDOW_SYSTEM_FD].reset (_readCallback);\r
         readCallback[WINDOW_SYSTEM_FD]->active = true;\r
     }\r
 \r
@@ -139,7 +139,7 @@ private:
     ReferenceCountedArray <MessageManager::MessageBase> queue;\r
     int fd[2];\r
     pollfd pfds[FD_COUNT];\r
-    ScopedPointer<LinuxEventLoop::CallbackFunctionBase> readCallback[FD_COUNT];\r
+    std::unique_ptr<LinuxEventLoop::CallbackFunctionBase> readCallback[FD_COUNT];\r
     int fdCount = 1;\r
     int loopCount = 0;\r
     int bytesInSocket = 0;\r
index e007d6bc55a523dc74023b84098f193f2bd49423..b3760e23a066ef569dbeb3ed40cc3adf7314a727 100644 (file)
@@ -38,7 +38,7 @@ namespace WindowsMessageHelpers
     const unsigned int broadcastMessageMagicNumber = 0xc403;\r
 \r
     const TCHAR messageWindowName[] = _T("JUCEWindow");\r
-    ScopedPointer<HiddenMessageWindow> messageWindow;\r
+    std::unique_ptr<HiddenMessageWindow> messageWindow;\r
 \r
     void dispatchMessageFromLParam (LPARAM lParam)\r
     {\r
@@ -199,7 +199,7 @@ void MessageManager::doPlatformSpecificInitialisation()
     OleInitialize (0);\r
 \r
     using namespace WindowsMessageHelpers;\r
-    messageWindow = new HiddenMessageWindow (messageWindowName, (WNDPROC) messageWndProc);\r
+    messageWindow.reset (new HiddenMessageWindow (messageWindowName, (WNDPROC) messageWndProc));\r
     juce_messageWindowHandle = messageWindow->getHWND();\r
 }\r
 \r
index aa586cf07f0085287d47d885236124fc67d6b35f..85788119fd720192ae112ce9857cc8d0af0cbc35 100644 (file)
@@ -75,7 +75,7 @@ FillType& FillType::operator= (const FillType& other)
 \r
 FillType::FillType (FillType&& other) noexcept\r
     : colour (other.colour),\r
-      gradient (static_cast<ScopedPointer<ColourGradient>&&> (other.gradient)),\r
+      gradient (static_cast<std::unique_ptr<ColourGradient>&&> (other.gradient)),\r
       image (static_cast<Image&&> (other.image)),\r
       transform (other.transform)\r
 {\r
@@ -86,7 +86,7 @@ FillType& FillType::operator= (FillType&& other) noexcept
     jassert (this != &other); // hopefully the compiler should make this situation impossible!\r
 \r
     colour = other.colour;\r
-    gradient = static_cast<ScopedPointer<ColourGradient>&&> (other.gradient);\r
+    gradient = static_cast<std::unique_ptr<ColourGradient>&&> (other.gradient);\r
     image = static_cast<Image&&> (other.image);\r
     transform = other.transform;\r
     return *this;\r
index 9ee12508f4d1e2715e80ebf6958eab1668218214..d210f29c8cbd3712fdda2b1198f53a7049910d2b 100644 (file)
@@ -135,7 +135,7 @@ public:
         If a gradient is active, the overall opacity with which it should be applied\r
         is indicated by the alpha channel of the colour variable.\r
     */\r
-    ScopedPointer<ColourGradient> gradient;\r
+    std::unique_ptr<ColourGradient> gradient;\r
 \r
     /** The image that should be used for tiling.\r
         If an image fill is active, the overall opacity with which it should be applied\r
index 15fed43d6c582071ea19dc35051a620080d9ef8e..570fe8a1a8fb3e87da4ae0957ed32b685fc3be53 100644 (file)
@@ -739,7 +739,7 @@ public:
 private:\r
     //==============================================================================\r
     LowLevelGraphicsContext& context;\r
-    ScopedPointer<LowLevelGraphicsContext> contextToDelete;\r
+    std::unique_ptr<LowLevelGraphicsContext> contextToDelete;\r
 \r
     bool saveStatePending = false;\r
     void saveStateIfPending();\r
index 7ef83461b18ce466d1ee7a9efc689e92c05888ef..9cddd48529fcdd3d163235540ff17015a2a1d070 100644 (file)
@@ -350,8 +350,8 @@ namespace TextLayoutHelpers
             int lineStartPosition = 0;\r
             int runStartPosition = 0;\r
 \r
-            ScopedPointer<TextLayout::Line> currentLine;\r
-            ScopedPointer<TextLayout::Run> currentRun;\r
+            std::unique_ptr<TextLayout::Line> currentLine;\r
+            std::unique_ptr<TextLayout::Run> currentRun;\r
 \r
             bool needToSetLineOrigin = true;\r
 \r
index 8a8e042b376dec9e44a749e883fef0e4c93d6f98..425e2d06bff980fa7bbdecfe5193bc6291289e62 100644 (file)
@@ -49,7 +49,7 @@ class JUCE_API  Typeface  : public ReferenceCountedObject
 public:\r
     //==============================================================================\r
     /** A handy typedef for a pointer to a typeface. */\r
-    typedef ReferenceCountedObjectPtr<Typeface> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<Typeface>;\r
 \r
     //==============================================================================\r
     /** Returns the font family of the typeface.\r
@@ -154,7 +154,7 @@ protected:
 private:\r
     struct HintingParams;\r
     friend struct ContainerDeletePolicy<HintingParams>;\r
-    ScopedPointer<HintingParams> hintingParams;\r
+    std::unique_ptr<HintingParams> hintingParams;\r
     CriticalSection hintingLock;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Typeface)\r
index 6a2574aa897b9a1973d1f7322dcbf3f169ffe3d3..e1c6b3fd558c9f2be73bb93b3ea65a0f4a30149a 100644 (file)
@@ -84,9 +84,7 @@ bool AffineTransform::isIdentity() const noexcept
         && mat11 == 1.0f;\r
 }\r
 \r
-#if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-const AffineTransform AffineTransform::identity;\r
-#endif\r
+JUCE_DECLARE_DEPRECATED_STATIC (const AffineTransform AffineTransform::identity);\r
 \r
 //==============================================================================\r
 AffineTransform AffineTransform::followedBy (const AffineTransform& other) const noexcept\r
index fbf12291bc13d3e00d1cc5fe65ec95b3f7ca35be..e7461bc21f5de9544ec58a06704e881291682302 100644 (file)
@@ -270,12 +270,10 @@ public:
     */\r
     float getScaleFactor() const noexcept;\r
 \r
-   #if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-    /** A ready-to-use identity transform - now depracated.\r
-        @deprecated If you need an identity transform, just use AffineTransform() or {}.\r
+    /* A ready-to-use identity transform - now depracated.\r
+       @deprecated If you need an identity transform, just use AffineTransform() or {}.\r
     */\r
-    static const AffineTransform identity;\r
-   #endif\r
+    JUCE_DEPRECATED_STATIC (static const AffineTransform identity);\r
 \r
     //==============================================================================\r
     /* The transform matrix is:\r
index 80a101e64454a61a76d09016bc3cf9705f180b3d..61b38dce78c795f2d5a58b3add57a28f9ab14234 100644 (file)
@@ -437,7 +437,7 @@ Image GIFImageFormat::decodeImage (InputStream& in)
    #if (JUCE_MAC || JUCE_IOS) && USE_COREGRAPHICS_RENDERING && JUCE_USE_COREIMAGE_LOADER\r
     return juce_loadWithCoreImage (in);\r
    #else\r
-    const ScopedPointer<GIFLoader> loader (new GIFLoader (in));\r
+    const std::unique_ptr<GIFLoader> loader (new GIFLoader (in));\r
     return loader->image;\r
    #endif\r
 }\r
index 0ecbcc91b6a41d07f8d8924edbd0d9f9ec559ae5..6b478349b2b0956af2379cd20a66f62dc2602b89 100644 (file)
@@ -55,7 +55,7 @@ ImageType::~ImageType() {}
 \r
 Image ImageType::convert (const Image& source) const\r
 {\r
-    if (source.isNull() || getTypeID() == (ScopedPointer<ImageType> (source.getPixelData()->createType())->getTypeID()))\r
+    if (source.isNull() || getTypeID() == (std::unique_ptr<ImageType> (source.getPixelData()->createType())->getTypeID()))\r
         return source;\r
 \r
     const Image::BitmapData src (source, Image::BitmapData::readOnly);\r
@@ -181,7 +181,7 @@ public:
     ImagePixelData::Ptr clone() override\r
     {\r
         jassert (getReferenceCount() > 0); // (This method can't be used on an unowned pointer, as it will end up self-deleting)\r
-        const ScopedPointer<ImageType> type (createType());\r
+        const std::unique_ptr<ImageType> type (createType());\r
 \r
         Image newImage (type->create (pixelFormat, area.getWidth(), area.getHeight(), pixelFormat != Image::RGB));\r
 \r
@@ -262,9 +262,7 @@ Image::~Image()
 {\r
 }\r
 \r
-#if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-const Image Image::null;\r
-#endif\r
+JUCE_DECLARE_DEPRECATED_STATIC (const Image Image::null);\r
 \r
 int Image::getReferenceCount() const noexcept           { return image == nullptr ? 0 : image->getSharedCount(); }\r
 int Image::getWidth() const noexcept                    { return image == nullptr ? 0 : image->width; }\r
@@ -300,7 +298,7 @@ Image Image::rescaled (const int newWidth, const int newHeight, const Graphics::
     if (image == nullptr || (image->width == newWidth && image->height == newHeight))\r
         return *this;\r
 \r
-    const ScopedPointer<ImageType> type (image->createType());\r
+    const std::unique_ptr<ImageType> type (image->createType());\r
     Image newImage (type->create (image->pixelFormat, newWidth, newHeight, hasAlphaChannel()));\r
 \r
     Graphics g (newImage);\r
@@ -317,7 +315,7 @@ Image Image::convertedToFormat (PixelFormat newFormat) const
 \r
     const int w = image->width, h = image->height;\r
 \r
-    const ScopedPointer<ImageType> type (image->createType());\r
+    const std::unique_ptr<ImageType> type (image->createType());\r
     Image newImage (type->create (newFormat, w, h, false));\r
 \r
     if (newFormat == SingleChannel)\r
@@ -448,7 +446,7 @@ void Image::clear (const Rectangle<int>& area, Colour colourToClearTo)
 {\r
     if (image != nullptr)\r
     {\r
-        const ScopedPointer<LowLevelGraphicsContext> g (image->createLowLevelContext());\r
+        const std::unique_ptr<LowLevelGraphicsContext> g (image->createLowLevelContext());\r
         g->setFill (colourToClearTo);\r
         g->fillRect (area, true);\r
     }\r
index c4e1c33ff45ff468cc1cd5822ced96d99757dedb..74de5addf57f9e1275394395e5a39d1ae624395a 100644 (file)
@@ -365,7 +365,7 @@ public:
             virtual ~BitmapDataReleaser() {}\r
         };\r
 \r
-        ScopedPointer<BitmapDataReleaser> dataReleaser;\r
+        std::unique_ptr<BitmapDataReleaser> dataReleaser;\r
 \r
     private:\r
         JUCE_DECLARE_NON_COPYABLE (BitmapData)\r
@@ -414,12 +414,10 @@ public:
     /** @internal */\r
     explicit Image (ImagePixelData*) noexcept;\r
 \r
-   #if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-    /** A null Image object that can be used when you need to return an invalid image.\r
+    /* A null Image object that can be used when you need to return an invalid image.\r
         @deprecated If you need a default-constructed var, just use Image() or {}.\r
     */\r
-    static const Image null;\r
-   #endif\r
+    JUCE_DEPRECATED_STATIC (static const Image null);\r
 \r
 private:\r
     //==============================================================================\r
@@ -448,7 +446,7 @@ public:
     ImagePixelData (Image::PixelFormat, int width, int height);\r
     ~ImagePixelData();\r
 \r
-    typedef ReferenceCountedObjectPtr<ImagePixelData> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<ImagePixelData>;\r
 \r
     /** Creates a context that will draw into this image. */\r
     virtual LowLevelGraphicsContext* createLowLevelContext() = 0;\r
index d52ec60cf0d83a282cdf99fbdfc667028c87fb9c..8297e69eb54e7f0cfbaf734ae68a1ddbc0a72bb3 100644 (file)
@@ -35,7 +35,7 @@
 \r
   ID:               juce_graphics\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE graphics classes\r
   description:      Classes for 2D vector graphics, image loading/saving, font handling, etc.\r
   website:          http://www.juce.com/juce\r
index f5d75c7c005a47cf728c516c8158272342d079e4..9ac3ae20b1200b0ec626b0fe0e94e6357f517506 100644 (file)
@@ -309,7 +309,7 @@ public:
     }\r
 \r
     Font font;\r
-    ScopedPointer<EdgeTable> edgeTable;\r
+    std::unique_ptr<EdgeTable> edgeTable;\r
     int glyph = 0, lastAccessCount = 0;\r
     bool snapToIntegerCoordinate = false;\r
 \r
@@ -1632,7 +1632,7 @@ struct ClipRegions
         Base() {}\r
         virtual ~Base() {}\r
 \r
-        typedef ReferenceCountedObjectPtr<Base> Ptr;\r
+        using Ptr = ReferenceCountedObjectPtr<Base>;\r
 \r
         virtual Ptr clone() const = 0;\r
         virtual Ptr applyClipTo (const Ptr& target) const = 0;\r
@@ -1669,7 +1669,7 @@ struct ClipRegions
         EdgeTableRegion (const EdgeTableRegion& other)  : Base(), edgeTable (other.edgeTable) {}\r
         EdgeTableRegion& operator= (const EdgeTableRegion&) = delete;\r
 \r
-        typedef typename Base::Ptr Ptr;\r
+        using Ptr = typename Base::Ptr;\r
 \r
         Ptr clone() const override                           { return new EdgeTableRegion (*this); }\r
         Ptr applyClipTo (const Ptr& target) const override   { return target->clipToEdgeTable (edgeTable); }\r
@@ -1850,7 +1850,7 @@ struct ClipRegions
         RectangleListRegion (const RectangleList<int>& r)  : clip (r) {}\r
         RectangleListRegion (const RectangleListRegion& other) : Base(), clip (other.clip) {}\r
 \r
-        typedef typename Base::Ptr Ptr;\r
+        using Ptr = typename Base::Ptr;\r
 \r
         Ptr clone() const override                           { return new RectangleListRegion (*this); }\r
         Ptr applyClipTo (const Ptr& target) const override   { return target->clipToRectangleList (clip); }\r
@@ -2080,9 +2080,9 @@ template <class SavedStateType>
 class SavedStateBase\r
 {\r
 public:\r
-    typedef typename ClipRegions<SavedStateType>::Base                   BaseRegionType;\r
-    typedef typename ClipRegions<SavedStateType>::EdgeTableRegion        EdgeTableRegionType;\r
-    typedef typename ClipRegions<SavedStateType>::RectangleListRegion    RectangleListRegionType;\r
+    using BaseRegionType           = typename ClipRegions<SavedStateType>::Base;\r
+    using EdgeTableRegionType      = typename ClipRegions<SavedStateType>::EdgeTableRegion;\r
+    using RectangleListRegionType  = typename ClipRegions<SavedStateType>::RectangleListRegion;\r
 \r
     SavedStateBase (Rectangle<int> initialClip)\r
         : clip (new RectangleListRegionType (initialClip)),\r
@@ -2516,7 +2516,7 @@ public:
 //==============================================================================\r
 class SoftwareRendererSavedState  : public SavedStateBase<SoftwareRendererSavedState>\r
 {\r
-    typedef SavedStateBase<SoftwareRendererSavedState> BaseClass;\r
+    using BaseClass = SavedStateBase<SoftwareRendererSavedState>;\r
 \r
 public:\r
     SoftwareRendererSavedState (const Image& im, Rectangle<int> clipBounds)\r
@@ -2558,13 +2558,13 @@ public:
         {\r
             auto layerBounds = clip->getClipBounds();\r
 \r
-            const ScopedPointer<LowLevelGraphicsContext> g (image.createLowLevelContext());\r
+            const std::unique_ptr<LowLevelGraphicsContext> g (image.createLowLevelContext());\r
             g->setOpacity (finishedLayerState.transparencyLayerAlpha);\r
             g->drawImage (finishedLayerState.image, AffineTransform::translation (layerBounds.getPosition()));\r
         }\r
     }\r
 \r
-    typedef GlyphCache<CachedGlyphEdgeTable<SoftwareRendererSavedState>, SoftwareRendererSavedState> GlyphCacheType;\r
+    using GlyphCacheType = GlyphCache<CachedGlyphEdgeTable<SoftwareRendererSavedState>, SoftwareRendererSavedState>;\r
 \r
     static void clearGlyphCache()\r
     {\r
@@ -2607,7 +2607,7 @@ public:
                 auto t = transform.getTransformWith (AffineTransform::scale (fontHeight * font.getHorizontalScale(), fontHeight)\r
                                                                      .followedBy (trans));\r
 \r
-                ScopedPointer<EdgeTable> et (font.getTypeface()->getEdgeTableForGlyph (glyphNumber, t, fontHeight));\r
+                std::unique_ptr<EdgeTable> et (font.getTypeface()->getEdgeTableForGlyph (glyphNumber, t, fontHeight));\r
 \r
                 if (et != nullptr)\r
                     fillShape (new EdgeTableRegionType (*et), false);\r
@@ -2717,13 +2717,13 @@ public:
 \r
     void endTransparencyLayer()\r
     {\r
-        ScopedPointer<StateObjectType> finishedTransparencyLayer (currentState.release());\r
+        std::unique_ptr<StateObjectType> finishedTransparencyLayer (currentState.release());\r
         restore();\r
         currentState->endTransparencyLayer (*finishedTransparencyLayer);\r
     }\r
 \r
 private:\r
-    ScopedPointer<StateObjectType> currentState;\r
+    std::unique_ptr<StateObjectType> currentState;\r
     OwnedArray<StateObjectType> stack;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SavedStateStack)\r
index 992dd414275b2ee27079ef44ed7e6172bc4f6077..e058f87cea0196bd56d2821885287277afbf6bc5 100644 (file)
@@ -176,7 +176,7 @@ public:
 \r
     void initialise (JNIEnv* const env)\r
     {\r
-        rect = GlobalRef (env->NewObject (AndroidRectClass, AndroidRectClass.constructor, 0, 0, 0, 0));\r
+        rect = GlobalRef (env->NewObject (AndroidRect, AndroidRect.constructor, 0, 0, 0, 0));\r
 \r
         paint = GlobalRef (GraphicsHelpers::createPaint (Graphics::highResamplingQuality));\r
         const LocalRef<jobject> ignored (paint.callObjectMethod (AndroidPaint.setTypeface, typeface.get()));\r
@@ -199,7 +199,7 @@ public:
     float getStringWidth (const String& text) override\r
     {\r
         JNIEnv* env = getEnv();\r
-        const int numChars = text.length();\r
+        const int numChars = CharPointer_UTF16::getBytesRequiredFor (text.getCharPointer());\r
         jfloatArray widths = env->NewFloatArray (numChars);\r
 \r
         const int numDone = paint.callIntMethod (AndroidPaint.getTextWidths, javaString (text).get(), widths);\r
@@ -218,12 +218,10 @@ public:
     void getGlyphPositions (const String& text, Array<int>& glyphs, Array<float>& xOffsets) override\r
     {\r
         JNIEnv* env = getEnv();\r
-        auto jtext = javaString (text);\r
-\r
-        const int numChars = env->GetStringLength (jtext.get());\r
+        const int numChars = CharPointer_UTF16::getBytesRequiredFor (text.getCharPointer());\r
         jfloatArray widths = env->NewFloatArray (numChars);\r
 \r
-        const int numDone = paint.callIntMethod (AndroidPaint.getTextWidths, jtext.get(), widths);\r
+        const int numDone = paint.callIntMethod (AndroidPaint.getTextWidths, javaString (text).get(), widths);\r
 \r
         HeapBlock<jfloat> localWidths (static_cast<size_t> (numDone));\r
         env->GetFloatArrayRegion (widths, 0, numDone, localWidths);\r
@@ -300,10 +298,10 @@ public:
 \r
         env->DeleteLocalRef (matrix);\r
 \r
-        const int left   = env->GetIntField (rect.get(), AndroidRectClass.left);\r
-        const int top    = env->GetIntField (rect.get(), AndroidRectClass.top);\r
-        const int right  = env->GetIntField (rect.get(), AndroidRectClass.right);\r
-        const int bottom = env->GetIntField (rect.get(), AndroidRectClass.bottom);\r
+        const int left   = env->GetIntField (rect.get(), AndroidRect.left);\r
+        const int top    = env->GetIntField (rect.get(), AndroidRect.top);\r
+        const int right  = env->GetIntField (rect.get(), AndroidRect.right);\r
+        const int bottom = env->GetIntField (rect.get(), AndroidRect.bottom);\r
 \r
         const Rectangle<int> bounds (left, top, right - left, bottom - top);\r
 \r
index 9da1efc1c1d624635367453e68ea38705323a263..367d3b26bc6049fddba34308ac90ba505af09f61 100644 (file)
@@ -46,7 +46,7 @@ struct FTLibWrapper     : public ReferenceCountedObject
 \r
     FT_Library library;\r
 \r
-    typedef ReferenceCountedObjectPtr<FTLibWrapper> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<FTLibWrapper>;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FTLibWrapper)\r
 };\r
@@ -79,7 +79,7 @@ struct FTFaceWrapper     : public ReferenceCountedObject
     FTLibWrapper::Ptr library;\r
     MemoryBlock savedFaceData;\r
 \r
-    typedef ReferenceCountedObjectPtr<FTFaceWrapper> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<FTFaceWrapper>;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FTFaceWrapper)\r
 };\r
index 06cd9401a623aafaa64546dd1dbfcfc691935cc2..3b356ec53e2ab9afc8da4296b2e6442d3620840f 100644 (file)
@@ -48,7 +48,9 @@ StringArray FTTypefaceList::getDefaultFontDirectories()
 \r
     if (fontDirs.isEmpty())\r
     {\r
-        if (ScopedPointer<XmlElement> fontsInfo = findFontsConfFile())\r
+        std::unique_ptr<XmlElement> fontsInfo (findFontsConfFile());\r
+\r
+        if (fontsInfo != nullptr)\r
         {\r
             forEachXmlChildElementWithTagName (*fontsInfo, e, "dir")\r
             {\r
index 5db04074396718c1807fec816253f9e8d1516c4d..acab04451c845119159954cd3ac0d63c8e47e887 100644 (file)
@@ -97,7 +97,7 @@ private:
         CGGradientRef gradient;\r
     };\r
 \r
-    ScopedPointer<SavedState> state;\r
+    std::unique_ptr<SavedState> state;\r
     OwnedArray<SavedState> stateStack;\r
 \r
     void drawGradient();\r
index 92a5c143a75bf3061e8be57bc55b71a19f216032..3fccb40cb89ce064c77e687110e0bec0deb409ba 100644 (file)
@@ -469,7 +469,7 @@ class OSXTypeface  : public Typeface
 {\r
 public:\r
     OSXTypeface (const Font& font)\r
-        : Typeface (font.getTypefaceName(), font.getTypefaceStyle()), isMemoryFont (false)\r
+        : Typeface (font.getTypefaceName(), font.getTypefaceStyle()), canBeUsedForLayout (true)\r
     {\r
         ctFontRef = CoreTextTypeLayout::createCTFont (font, referenceFontSize, renderingTransform);\r
 \r
@@ -481,7 +481,7 @@ public:
     }\r
 \r
     OSXTypeface (const void* data, size_t dataSize)\r
-        : Typeface ({}, {}), isMemoryFont (true), dataCopy (data, dataSize)\r
+        : Typeface ({}, {}), canBeUsedForLayout (false), dataCopy (data, dataSize)\r
     {\r
         // We can't use CFDataCreate here as this triggers a false positive in ASAN\r
         // so copy the data manually and use CFDataCreateWithBytesNoCopy\r
@@ -502,6 +502,10 @@ public:
 \r
         if (fontRef != nullptr)\r
         {\r
+           #if JUCE_MAC && defined (MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8\r
+            canBeUsedForLayout = CTFontManagerRegisterGraphicsFont (fontRef, nullptr);\r
+           #endif\r
+\r
             ctFontRef = CTFontCreateWithGraphicsFont (fontRef, referenceFontSize, nullptr, nullptr);\r
 \r
             if (ctFontRef != nullptr)\r
@@ -540,16 +544,28 @@ public:
 \r
         CFStringRef keys[] = { kCTFontAttributeName, kCTLigatureAttributeName };\r
         CFTypeRef values[] = { ctFontRef, numberRef };\r
-        attributedStringAtts = CFDictionaryCreate (nullptr, (const void**) &keys, (const void**) &values, numElementsInArray (keys),\r
+        attributedStringAtts = CFDictionaryCreate (nullptr, (const void**) &keys,\r
+                                                   (const void**) &values, numElementsInArray (keys),\r
                                                    &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);\r
         CFRelease (numberRef);\r
     }\r
 \r
     ~OSXTypeface()\r
     {\r
-        if (attributedStringAtts != nullptr)    CFRelease (attributedStringAtts);\r
-        if (fontRef != nullptr)                 CGFontRelease (fontRef);\r
-        if (ctFontRef != nullptr)               CFRelease (ctFontRef);\r
+        if (attributedStringAtts != nullptr)\r
+            CFRelease (attributedStringAtts);\r
+\r
+        if (fontRef != nullptr)\r
+        {\r
+           #if JUCE_MAC && defined (MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8\r
+            CTFontManagerUnregisterGraphicsFont (fontRef, nullptr);\r
+           #endif\r
+\r
+            CGFontRelease (fontRef);\r
+        }\r
+\r
+        if (ctFontRef != nullptr)\r
+            CFRelease (ctFontRef);\r
     }\r
 \r
     float getAscent() const override                 { return ascent; }\r
@@ -650,7 +666,7 @@ public:
     float fontHeightToPointsFactor = 1.0f;\r
     CGAffineTransform renderingTransform = CGAffineTransformIdentity;\r
 \r
-    const bool isMemoryFont;\r
+    bool canBeUsedForLayout;\r
 \r
 private:\r
     MemoryBlock dataCopy;\r
@@ -810,40 +826,20 @@ Typeface::Ptr Font::getDefaultTypefaceForFont (const Font& font)
     return Typeface::createSystemTypefaceFor (newFont);\r
 }\r
 \r
-// Due to an old and unfathomable bug in CoreText which prevents the layout working with\r
-// typefaces that were loaded from memory, this function checks whether we need to use a\r
-// fallback layout algorithm.\r
 static bool canAllTypefacesBeUsedInLayout (const AttributedString& text)\r
 {\r
-   #if JUCE_MAC && defined (MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11\r
-    ignoreUnused (text);\r
-    return true;\r
-   #else\r
-\r
-   #if JUCE_MAC\r
-    if (SystemStats::getOperatingSystemType() >= SystemStats::OperatingSystemType::MacOSX_10_11)\r
-        return true;\r
-   #endif\r
-\r
     auto numCharacterAttributes = text.getNumAttributes();\r
 \r
     for (int i = 0; i < numCharacterAttributes; ++i)\r
     {\r
-        auto* t = text.getAttribute(i).font.getTypeface();\r
+        if (auto tf = dynamic_cast<OSXTypeface*> (text.getAttribute(i).font.getTypeface()))\r
+            if (tf->canBeUsedForLayout)\r
+                continue;\r
 \r
-        if (auto tf = dynamic_cast<OSXTypeface*> (t))\r
-        {\r
-            if (tf->isMemoryFont)\r
-                return false;\r
-        }\r
-        else if (dynamic_cast<CustomTypeface*> (t) != nullptr)\r
-        {\r
-            return false;\r
-        }\r
+        return false;\r
     }\r
 \r
     return true;\r
-   #endif\r
 }\r
 \r
 bool TextLayout::createNativeLayout (const AttributedString& text)\r
@@ -854,7 +850,6 @@ bool TextLayout::createNativeLayout (const AttributedString& text)
         return true;\r
     }\r
 \r
-    ignoreUnused (text);\r
     return false;\r
 }\r
 \r
index fb8714dbf180ca3f26885a72c17a956918b9a00e..473ca1703b35d010fc1f868cff8816ba91051586 100644 (file)
@@ -98,7 +98,7 @@ private:
     struct Pimpl;\r
     friend struct Pimpl;\r
     friend struct ContainerDeletePolicy<Pimpl>;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Direct2DLowLevelGraphicsContext)\r
 };\r
index b6159c3f94df587853bcc291da99e1ff65f8eeef..a62151c3d5085f355add6191c91cc1e44537eca5 100644 (file)
@@ -364,15 +364,14 @@ public:
     {\r
         const CharPointer_UTF16 utf16 (text.toUTF16());\r
         const size_t numChars = utf16.length();\r
-        HeapBlock<int16> results (numChars + 1);\r
-        results[numChars] = -1;\r
+        HeapBlock<uint16> results (numChars);\r
         float x = 0;\r
 \r
         if (GetGlyphIndices (dc, utf16, (int) numChars, reinterpret_cast<WORD*> (results.getData()),\r
                              GGI_MARK_NONEXISTING_GLYPHS) != GDI_ERROR)\r
         {\r
             for (size_t i = 0; i < numChars; ++i)\r
-                x += getKerning (dc, results[i], results[i + 1]);\r
+                x += getKerning (dc, results[i], (i + 1) < numChars ? results[i + 1] : -1);\r
         }\r
 \r
         return x;\r
@@ -382,8 +381,7 @@ public:
     {\r
         const CharPointer_UTF16 utf16 (text.toUTF16());\r
         const size_t numChars = utf16.length();\r
-        HeapBlock<int16> results (numChars + 1);\r
-        results[numChars] = -1;\r
+        HeapBlock<uint16> results (numChars);\r
         float x = 0;\r
 \r
         if (GetGlyphIndices (dc, utf16, (int) numChars, reinterpret_cast<WORD*> (results.getData()),\r
@@ -396,7 +394,7 @@ public:
             {\r
                 resultGlyphs.add (results[i]);\r
                 xOffsets.add (x);\r
-                x += getKerning (dc, results[i], results[i + 1]);\r
+                x += getKerning (dc, results[i], (i + 1) < numChars ? results[i + 1] : -1);\r
             }\r
         }\r
 \r
@@ -628,7 +626,7 @@ Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font)
 \r
     if (factories->systemFonts != nullptr)\r
     {\r
-        ScopedPointer<WindowsDirectWriteTypeface> wtf (new WindowsDirectWriteTypeface (font, factories->systemFonts));\r
+        std::unique_ptr<WindowsDirectWriteTypeface> wtf (new WindowsDirectWriteTypeface (font, factories->systemFonts));\r
 \r
         if (wtf->loadedOk())\r
             return wtf.release();\r
index 792eec71a3e1935371f74ce41f262fd876e57c04..fb4c2981d7e9f2a3a6905781c16d073c58b3ee22 100644 (file)
@@ -56,7 +56,7 @@ namespace juce
 \r
             void initialise (const String& commandLine) override\r
             {\r
-                myMainWindow = new MyApplicationWindow();\r
+                myMainWindow.reset (new MyApplicationWindow());\r
                 myMainWindow->setBounds (100, 100, 400, 500);\r
                 myMainWindow->setVisible (true);\r
             }\r
@@ -77,7 +77,7 @@ namespace juce
             }\r
 \r
         private:\r
-            ScopedPointer<MyApplicationWindow> myMainWindow;\r
+            std::unique_ptr<MyApplicationWindow> myMainWindow;\r
         };\r
 \r
         // this generates boilerplate code to launch our app class:\r
@@ -124,7 +124,7 @@ public:
 \r
     /** Checks whether multiple instances of the app are allowed.\r
 \r
-        If you application class returns true for this, more than one instance is\r
+        If your application class returns true for this, more than one instance is\r
         permitted to run (except on OSX where the OS automatically stops you launching\r
         a second instance of an app without explicitly starting it from the command-line).\r
 \r
index 65684a2d3de2e45b45866ae38b15f7e49e75286d..1e44876f56fbd1d0ebe4230c51f81d702b16e778 100644 (file)
@@ -47,7 +47,7 @@ struct Button::CallbackHelper  : public Timer,
     void valueChanged (Value& value) override\r
     {\r
         if (value.refersToSameSourceAs (button.isOn))\r
-            button.setToggleState (button.isOn.getValue(), dontSendNotification);\r
+            button.setToggleState (button.isOn.getValue(), dontSendNotification, sendNotification);\r
     }\r
 \r
     bool keyPressed (const KeyPress&, Component*) override\r
@@ -132,7 +132,7 @@ void Button::updateAutomaticTooltip (const ApplicationCommandInfo& info)
     }\r
 }\r
 \r
-void Button::setConnectedEdges (const int newFlags)\r
+void Button::setConnectedEdges (int newFlags)\r
 {\r
     if (connectedEdgeFlags != newFlags)\r
     {\r
@@ -142,7 +142,12 @@ void Button::setConnectedEdges (const int newFlags)
 }\r
 \r
 //==============================================================================\r
-void Button::setToggleState (const bool shouldBeOn, const NotificationType notification)\r
+void Button::setToggleState (bool shouldBeOn, NotificationType notification)\r
+{\r
+    setToggleState (shouldBeOn, notification, notification);\r
+}\r
+\r
+void Button::setToggleState (bool shouldBeOn, NotificationType clickNotification, NotificationType stateNotification)\r
 {\r
     if (shouldBeOn != lastToggleState)\r
     {\r
@@ -150,7 +155,7 @@ void Button::setToggleState (const bool shouldBeOn, const NotificationType notif
 \r
         if (shouldBeOn)\r
         {\r
-            turnOffOtherButtonsInGroup (notification);\r
+            turnOffOtherButtonsInGroup (clickNotification, stateNotification);\r
 \r
             if (deletionWatcher == nullptr)\r
                 return;\r
@@ -169,30 +174,30 @@ void Button::setToggleState (const bool shouldBeOn, const NotificationType notif
         lastToggleState = shouldBeOn;\r
         repaint();\r
 \r
-        if (notification != dontSendNotification)\r
+        if (clickNotification != dontSendNotification)\r
         {\r
             // async callbacks aren't possible here\r
-            jassert (notification != sendNotificationAsync);\r
+            jassert (clickNotification != sendNotificationAsync);\r
 \r
-            sendClickMessage (ModifierKeys::getCurrentModifiers());\r
+            sendClickMessage (ModifierKeys::currentModifiers);\r
 \r
             if (deletionWatcher == nullptr)\r
                 return;\r
         }\r
 \r
-        if (notification != dontSendNotification)\r
+        if (stateNotification != dontSendNotification)\r
             sendStateMessage();\r
         else\r
             buttonStateChanged();\r
     }\r
 }\r
 \r
-void Button::setToggleState (const bool shouldBeOn, bool sendChange)\r
+void Button::setToggleState (bool shouldBeOn, bool sendChange)\r
 {\r
     setToggleState (shouldBeOn, sendChange ? sendNotification : dontSendNotification);\r
 }\r
 \r
-void Button::setClickingTogglesState (const bool shouldToggle) noexcept\r
+void Button::setClickingTogglesState (bool shouldToggle) noexcept\r
 {\r
     clickTogglesState = shouldToggle;\r
 \r
@@ -208,18 +213,18 @@ bool Button::getClickingTogglesState() const noexcept
     return clickTogglesState;\r
 }\r
 \r
-void Button::setRadioGroupId (const int newGroupId, NotificationType notification)\r
+void Button::setRadioGroupId (int newGroupId, NotificationType notification)\r
 {\r
     if (radioGroupId != newGroupId)\r
     {\r
         radioGroupId = newGroupId;\r
 \r
         if (lastToggleState)\r
-            turnOffOtherButtonsInGroup (notification);\r
+            turnOffOtherButtonsInGroup (notification, notification);\r
     }\r
 }\r
 \r
-void Button::turnOffOtherButtonsInGroup (const NotificationType notification)\r
+void Button::turnOffOtherButtonsInGroup (NotificationType clickNotification, NotificationType stateNotification)\r
 {\r
     if (auto* p = getParentComponent())\r
     {\r
@@ -235,7 +240,7 @@ void Button::turnOffOtherButtonsInGroup (const NotificationType notification)
                     {\r
                         if (b->getRadioGroupId() == radioGroupId)\r
                         {\r
-                            b->setToggleState (false, notification);\r
+                            b->setToggleState (false, clickNotification, stateNotification);\r
 \r
                             if (deletionWatcher == nullptr)\r
                                 return;\r
@@ -259,7 +264,7 @@ Button::ButtonState Button::updateState()
     return updateState (isMouseOver (true), isMouseButtonDown());\r
 }\r
 \r
-Button::ButtonState Button::updateState (const bool over, const bool down)\r
+Button::ButtonState Button::updateState (bool over, bool down)\r
 {\r
     ButtonState newState = buttonNormal;\r
 \r
@@ -275,7 +280,7 @@ Button::ButtonState Button::updateState (const bool over, const bool down)
     return newState;\r
 }\r
 \r
-void Button::setState (const ButtonState newState)\r
+void Button::setState (ButtonState newState)\r
 {\r
     if (buttonState != newState)\r
     {\r
@@ -303,7 +308,7 @@ uint32 Button::getMillisecondsSinceButtonDown() const noexcept
     return now > buttonPressTime ? now - buttonPressTime : 0;\r
 }\r
 \r
-void Button::setTriggeredOnMouseDown (const bool isTriggeredOnMouseDown) noexcept\r
+void Button::setTriggeredOnMouseDown (bool isTriggeredOnMouseDown) noexcept\r
 {\r
     triggerOnMouseDown = isTriggeredOnMouseDown;\r
 }\r
@@ -363,7 +368,7 @@ void Button::handleCommandMessage (int commandId)
         if (isEnabled())\r
         {\r
             flashButtonState();\r
-            internalClickCallback (ModifierKeys::getCurrentModifiers());\r
+            internalClickCallback (ModifierKeys::currentModifiers);\r
         }\r
     }\r
     else\r
@@ -519,8 +524,8 @@ void Button::parentHierarchyChanged()
 }\r
 \r
 //==============================================================================\r
-void Button::setCommandToTrigger (ApplicationCommandManager* const newCommandManager,\r
-                                  const CommandID newCommandID, const bool generateTip)\r
+void Button::setCommandToTrigger (ApplicationCommandManager* newCommandManager,\r
+                                  CommandID newCommandID, bool generateTip)\r
 {\r
     commandID = newCommandID;\r
     generateTooltip = generateTip;\r
@@ -619,7 +624,7 @@ bool Button::keyStateChangedCallback()
 \r
     if (isEnabled() && wasDown && ! isKeyDown)\r
     {\r
-        internalClickCallback (ModifierKeys::getCurrentModifiers());\r
+        internalClickCallback (ModifierKeys::currentModifiers);\r
 \r
         // (return immediately - this button may now have been deleted)\r
         return true;\r
@@ -640,9 +645,9 @@ bool Button::keyPressed (const KeyPress& key)
 }\r
 \r
 //==============================================================================\r
-void Button::setRepeatSpeed (const int initialDelayMillisecs,\r
-                             const int repeatMillisecs,\r
-                             const int minimumDelayInMillisecs) noexcept\r
+void Button::setRepeatSpeed (int initialDelayMillisecs,\r
+                             int repeatMillisecs,\r
+                             int minimumDelayInMillisecs) noexcept\r
 {\r
     autoRepeatDelay = initialDelayMillisecs;\r
     autoRepeatSpeed = repeatMillisecs;\r
@@ -680,7 +685,7 @@ void Button::repeatTimerCallback()
         lastRepeatTime = now;\r
         callbackHelper->startTimer (repeatSpeed);\r
 \r
-        internalClickCallback (ModifierKeys::getCurrentModifiers());\r
+        internalClickCallback (ModifierKeys::currentModifiers);\r
     }\r
     else if (! needsToRelease)\r
     {\r
index dc1fd00b084f679ceaad4f504548b351d6e2f29a..edea4b7a02d6af75eeefa483399c79dc5caeff5d 100644 (file)
@@ -484,7 +484,7 @@ private:
     struct CallbackHelper;\r
     friend struct CallbackHelper;\r
     friend struct ContainerDeletePolicy<CallbackHelper>;\r
-    ScopedPointer<CallbackHelper> callbackHelper;\r
+    std::unique_ptr<CallbackHelper> callbackHelper;\r
     uint32 buttonPressTime = 0, lastRepeatTime = 0;\r
     ApplicationCommandManager* commandManagerToUse = nullptr;\r
     int autoRepeatDelay = -1, autoRepeatSpeed = 0, autoRepeatMinimumDelay = -1;\r
@@ -509,11 +509,12 @@ private:
     ButtonState updateState();\r
     ButtonState updateState (bool isOver, bool isDown);\r
     bool isShortcutPressed() const;\r
-    void turnOffOtherButtonsInGroup (NotificationType);\r
+    void turnOffOtherButtonsInGroup (NotificationType click, NotificationType state);\r
 \r
     void flashButtonState();\r
     void sendClickMessage (const ModifierKeys&);\r
     void sendStateMessage();\r
+    void setToggleState (bool shouldBeOn, NotificationType click, NotificationType state);\r
 \r
     bool isMouseOrTouchOver (const MouseEvent& e);\r
 \r
index bd27f5a12dcd65ab909a434d44178f56eb61c79f..1cf9acbf882d95a96d105fc16ce964d8e1c6bf49 100644 (file)
@@ -182,7 +182,7 @@ public:
 private:\r
     //==============================================================================\r
     ButtonStyle style;\r
-    ScopedPointer<Drawable> normalImage, overImage, downImage, disabledImage,\r
+    std::unique_ptr<Drawable> normalImage, overImage, downImage, disabledImage,\r
                             normalImageOn, overImageOn, downImageOn, disabledImageOn;\r
     Drawable* currentImage = nullptr;\r
     int edgeIndent = 3;\r
index 08fe92d990bd789892f8d4c13b68c68660a7f959..e18ea02009d3a4fc68be147d4eaa4140f65c5cf1 100644 (file)
@@ -86,7 +86,7 @@ public:
 \r
 private:\r
     //==============================================================================\r
-    ScopedPointer<Drawable> normalImage, toggledOnImage;\r
+    std::unique_ptr<Drawable> normalImage, toggledOnImage;\r
     Drawable* currentImage;\r
 \r
     void updateDrawable();\r
index e08ec2d03994ff43b82835e0f44adc2d488dfa0a..961a5d0f70a5c0e51e7d98d1165393e9737bfa0d 100644 (file)
@@ -305,7 +305,7 @@ private:
     //==============================================================================\r
     OwnedArray<ApplicationCommandInfo> commands;\r
     ListenerList<ApplicationCommandManagerListener> listeners;\r
-    ScopedPointer<KeyPressMappingSet> keyMappings;\r
+    std::unique_ptr<KeyPressMappingSet> keyMappings;\r
     ApplicationCommandTarget* firstTarget = nullptr;\r
 \r
     void sendListenerInvokeCallback (const ApplicationCommandTarget::InvocationInfo&);\r
index cde6a3ddb8a368918afd49393d1bee25ef146844..e4a98891b51b3bcb05eaceed2b841ecb4d53544a 100644 (file)
@@ -257,7 +257,7 @@ bool KeyPressMappingSet::restoreFromXml (const XmlElement& xmlVersion)
 \r
 XmlElement* KeyPressMappingSet::createXml (const bool saveDifferencesFromDefaultSet) const\r
 {\r
-    ScopedPointer<KeyPressMappingSet> defaultSet;\r
+    std::unique_ptr<KeyPressMappingSet> defaultSet;\r
 \r
     if (saveDifferencesFromDefaultSet)\r
     {\r
index 46ccb997baac6b73453db18319edf1062bca176a..501ec4dbbf5db2fc024b7aaf45bf91594f8570ab 100644 (file)
@@ -325,7 +325,7 @@ struct Component::ComponentHelpers
     }\r
 \r
     template <typename PointOrRect>\r
-    static PointOrRect convertFromDistantParentSpace (const Component* parent, const Component& target, const PointOrRect& coordInParent)\r
+    static PointOrRect convertFromDistantParentSpace (const Component* parent, const Component& target, PointOrRect coordInParent)\r
     {\r
         auto* directParent = target.getParentComponent();\r
         jassert (directParent != nullptr);\r
@@ -595,7 +595,7 @@ void Component::addToDesktop (int styleWanted, void* nativeWindowToAttachTo)
 \r
         if (peer != nullptr)\r
         {\r
-            ScopedPointer<ComponentPeer> oldPeerToDelete (peer);\r
+            std::unique_ptr<ComponentPeer> oldPeerToDelete (peer);\r
 \r
             wasFullscreen = peer->isFullScreen();\r
             wasMinimised = peer->isMinimised();\r
@@ -2495,9 +2495,9 @@ void Component::internalMagnifyGesture (MouseInputSource source, Point<float> re
     BailOutChecker checker (this);\r
 \r
     const MouseEvent me (source, relativePos, source.getCurrentModifiers(), MouseInputSource::invalidPressure,\r
-                             MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation,\r
-                             MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY,\r
-                             this, this, time, relativePos, time, 0, false);\r
+                         MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation,\r
+                         MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY,\r
+                         this, this, time, relativePos, time, 0, false);\r
 \r
     if (isCurrentlyBlockedByAnotherModalComponent())\r
     {\r
@@ -2520,7 +2520,7 @@ void Component::internalMagnifyGesture (MouseInputSource source, Point<float> re
 \r
 void Component::sendFakeMouseMove() const\r
 {\r
-    MouseInputSource mainMouse = Desktop::getInstance().getMainMouseSource();\r
+    auto mainMouse = Desktop::getInstance().getMainMouseSource();\r
 \r
     if (! mainMouse.isDragging())\r
         mainMouse.triggerFakeMove();\r
@@ -2705,7 +2705,7 @@ void Component::grabFocusInternal (FocusChangeType cause, bool canTryParent)
             else\r
             {\r
                 // find the default child component..\r
-                ScopedPointer<KeyboardFocusTraverser> traverser (createFocusTraverser());\r
+                std::unique_ptr<KeyboardFocusTraverser> traverser (createFocusTraverser());\r
 \r
                 if (traverser != nullptr)\r
                 {\r
@@ -2753,7 +2753,7 @@ void Component::moveKeyboardFocusToSibling (bool moveToNext)
 \r
     if (parentComponent != nullptr)\r
     {\r
-        ScopedPointer<KeyboardFocusTraverser> traverser (createFocusTraverser());\r
+        std::unique_ptr<KeyboardFocusTraverser> traverser (createFocusTraverser());\r
 \r
         if (traverser != nullptr)\r
         {\r
@@ -2862,20 +2862,25 @@ bool Component::isMouseOver (bool includeChildren) const
     {\r
         auto* c = ms.getComponentUnderMouse();\r
 \r
-        if ((c == this || (includeChildren && isParentOf (c)))\r
-             && c->reallyContains (c->getLocalPoint (nullptr, ms.getScreenPosition().roundToInt()), false)\r
-             && ((! ms.isTouch()) || ms.isDragging()))\r
-            return true;\r
+        if (c == this || (includeChildren && isParentOf (c)))\r
+            if (ms.isDragging() || ! ms.isTouch())\r
+                if (c->reallyContains (c->getLocalPoint (nullptr, ms.getScreenPosition()).roundToInt(), false))\r
+                    return true;\r
     }\r
 \r
     return false;\r
 }\r
 \r
-bool Component::isMouseButtonDown() const\r
+bool Component::isMouseButtonDown (bool includeChildren) const\r
 {\r
     for (auto& ms : Desktop::getInstance().getMouseSources())\r
-        if (ms.isDragging() && ms.getComponentUnderMouse() == this)\r
-            return true;\r
+    {\r
+        auto* c = ms.getComponentUnderMouse();\r
+\r
+        if (c == this || (includeChildren && isParentOf (c)))\r
+            if (ms.isDragging())\r
+                return true;\r
+    }\r
 \r
     return false;\r
 }\r
@@ -2886,9 +2891,9 @@ bool Component::isMouseOverOrDragging (bool includeChildren) const
     {\r
         auto* c = ms.getComponentUnderMouse();\r
 \r
-        if ((c == this || (includeChildren && isParentOf (c)))\r
-              && ((! ms.isTouch()) || ms.isDragging()))\r
-            return true;\r
+        if (c == this || (includeChildren && isParentOf (c)))\r
+            if (ms.isDragging() || ! ms.isTouch())\r
+                return true;\r
     }\r
 \r
     return false;\r
@@ -2896,7 +2901,7 @@ bool Component::isMouseOverOrDragging (bool includeChildren) const
 \r
 bool JUCE_CALLTYPE Component::isMouseButtonDownAnywhere() noexcept\r
 {\r
-    return ModifierKeys::getCurrentModifiers().isAnyMouseButtonDown();\r
+    return ModifierKeys::currentModifiers.isAnyMouseButtonDown();\r
 }\r
 \r
 Point<int> Component::getMouseXYRelative() const\r
@@ -2919,8 +2924,8 @@ void Component::removeKeyListener (KeyListener* listenerToRemove)
         keyListeners->removeFirstMatchingValue (listenerToRemove);\r
 }\r
 \r
-bool Component::keyPressed (const KeyPress&)                { return false; }\r
-bool Component::keyStateChanged (const bool /*isKeyDown*/)  { return false; }\r
+bool Component::keyPressed (const KeyPress&)            { return false; }\r
+bool Component::keyStateChanged (bool /*isKeyDown*/)    { return false; }\r
 \r
 void Component::modifierKeysChanged (const ModifierKeys& modifiers)\r
 {\r
@@ -2931,7 +2936,7 @@ void Component::modifierKeysChanged (const ModifierKeys& modifiers)
 void Component::internalModifierKeysChanged()\r
 {\r
     sendFakeMouseMove();\r
-    modifierKeysChanged (ModifierKeys::getCurrentModifiers());\r
+    modifierKeysChanged (ModifierKeys::currentModifiers);\r
 }\r
 \r
 //==============================================================================\r
index 9b0df8b45c2bb0f719314c4a746b4e9b36e0222c..5265b94a78cd75fb22af1cc787e88ac0c9445dde 100644 (file)
@@ -56,7 +56,7 @@ public:
         Note that when a component is deleted, any child components it contains are NOT\r
         automatically deleted. It's your responsibilty to manage their lifespan - you\r
         may want to use helper methods like deleteAllChildren(), or less haphazard\r
-        approaches like using ScopedPointers or normal object aggregation to manage them.\r
+        approaches like using std::unique_ptrs or normal object aggregation to manage them.\r
 \r
         If the component being deleted is currently the child of another one, then during\r
         deletion, it will be removed from its parent, and the parent will receive a childrenChanged()\r
@@ -763,8 +763,8 @@ public:
         backwards-compatibility with legacy code, and should be viewed with extreme\r
         suspicion by anyone attempting to write modern C++. In almost all cases, it's much\r
         smarter to manage the lifetimes of your child components via modern RAII techniques\r
-        such as simply making them member variables, or using ScopedPointer, OwnedArray, etc\r
-        to manage their lifetimes appropriately.\r
+        such as simply making them member variables, or using std::unique_ptr, OwnedArray,\r
+        etc to manage their lifetimes appropriately.\r
         @see removeAllChildren\r
     */\r
     void deleteAllChildren();\r
@@ -1791,7 +1791,7 @@ public:
 \r
         @see isMouseButtonDownAnywhere, isMouseOver, isMouseOverOrDragging\r
     */\r
-    bool isMouseButtonDown() const;\r
+    bool isMouseButtonDown (bool includeChildren = false) const;\r
 \r
     /** True if the mouse is over this component, or if it's being dragged in this component.\r
         This is a handy equivalent to (isMouseOver() || isMouseButtonDown()).\r
@@ -2271,19 +2271,19 @@ private:
     String componentName, componentID;\r
     Component* parentComponent = nullptr;\r
     Rectangle<int> boundsRelativeToParent;\r
-    ScopedPointer<Positioner> positioner;\r
-    ScopedPointer<AffineTransform> affineTransform;\r
+    std::unique_ptr<Positioner> positioner;\r
+    std::unique_ptr<AffineTransform> affineTransform;\r
     Array<Component*> childComponentList;\r
     WeakReference<LookAndFeel> lookAndFeel;\r
     MouseCursor cursor;\r
     ImageEffectFilter* effect = nullptr;\r
-    ScopedPointer<CachedComponentImage> cachedImage;\r
+    std::unique_ptr<CachedComponentImage> cachedImage;\r
 \r
     class MouseListenerList;\r
     friend class MouseListenerList;\r
     friend struct ContainerDeletePolicy<MouseListenerList>;\r
-    ScopedPointer<MouseListenerList> mouseListeners;\r
-    ScopedPointer<Array<KeyListener*>> keyListeners;\r
+    std::unique_ptr<MouseListenerList> mouseListeners;\r
+    std::unique_ptr<Array<KeyListener*>> keyListeners;\r
     ListenerList<ComponentListener> componentListeners;\r
     NamedValueSet properties;\r
 \r
index fe7f2cbc11aad932a44ee330e0f6762e39ae5535..bfa356420001dd7d00543a2fba0bed9e3878440a 100644 (file)
@@ -247,7 +247,7 @@ void Desktop::sendMouseMove()
             auto pos = target->getLocalPoint (nullptr, lastFakeMouseMove);\r
             auto now = Time::getCurrentTime();\r
 \r
-            const MouseEvent me (getMainMouseSource(), pos, ModifierKeys::getCurrentModifiers(), MouseInputSource::invalidPressure,\r
+            const MouseEvent me (getMainMouseSource(), pos, ModifierKeys::currentModifiers, MouseInputSource::invalidPressure,\r
                                  MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation,\r
                                  MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY,\r
                                  target, target, now, pos, now, 0, false);\r
index 8aac3ee599e6097d99220ce7c6c3ada500b5bfad..e8a72f8e63192daf847e67ed25373f9edb9057d4 100644 (file)
@@ -422,7 +422,7 @@ private:
     friend class DeletedAtShutdown;\r
     friend class TopLevelWindowManager;\r
 \r
-    ScopedPointer<MouseInputSource::SourceList> mouseSources;\r
+    std::unique_ptr<MouseInputSource::SourceList> mouseSources;\r
 \r
     ListenerList<MouseListener> mouseListeners;\r
     ListenerList<FocusChangeListener> focusListeners;\r
@@ -430,7 +430,7 @@ private:
     Array<Component*> desktopComponents;\r
     Array<ComponentPeer*> peers;\r
 \r
-    ScopedPointer<Displays> displays;\r
+    std::unique_ptr<Displays> displays;\r
 \r
     Point<float> lastFakeMouseMove;\r
     void sendMouseMove();\r
@@ -439,7 +439,7 @@ private:
     void incrementMouseClickCounter() noexcept;\r
     void incrementMouseWheelCounter() noexcept;\r
 \r
-    ScopedPointer<LookAndFeel> defaultLookAndFeel;\r
+    std::unique_ptr<LookAndFeel> defaultLookAndFeel;\r
     WeakReference<LookAndFeel> currentLookAndFeel;\r
 \r
     Component* kioskModeComponent = nullptr;\r
index 4dc9a3cddc46f0d3f4dfbb67e31e05934ecf9745..ce5e1ac71ea8f606afa7628f65e8a60763a0fcca 100644 (file)
@@ -104,7 +104,7 @@ void ModalComponentManager::attachCallback (Component* component, Callback* call
 {\r
     if (callback != nullptr)\r
     {\r
-        ScopedPointer<Callback> callbackDeleter (callback);\r
+        std::unique_ptr<Callback> callbackDeleter (callback);\r
 \r
         for (int i = stack.size(); --i >= 0;)\r
         {\r
@@ -194,7 +194,7 @@ void ModalComponentManager::handleAsyncUpdate()
 \r
         if (! item->isActive)\r
         {\r
-            ScopedPointer<ModalItem> deleter (stack.removeAndReturn (i));\r
+            std::unique_ptr<ModalItem> deleter (stack.removeAndReturn (i));\r
             Component::SafePointer<Component> compToDelete (item->autoDelete ? item->component : nullptr);\r
 \r
             for (int j = item->callbacks.size(); --j >= 0;)\r
index 935e7a9c04dcd23525cbccdd9772b90d2290f488..382fef01156aa1ba70c7cbb05dcc009b9d1db059 100644 (file)
@@ -183,11 +183,11 @@ Drawable* Drawable::createFromImageData (const void* data, const size_t numBytes
         auto asString = String::createStringFromData (data, (int) numBytes);\r
 \r
         XmlDocument doc (asString);\r
-        ScopedPointer<XmlElement> outer (doc.getDocumentElement (true));\r
+        std::unique_ptr<XmlElement> outer (doc.getDocumentElement (true));\r
 \r
         if (outer != nullptr && outer->hasTagName ("svg"))\r
         {\r
-            ScopedPointer<XmlElement> svg (doc.getDocumentElement());\r
+            std::unique_ptr<XmlElement> svg (doc.getDocumentElement());\r
 \r
             if (svg != nullptr)\r
                 result = Drawable::createFromSVG (*svg);\r
index a4172070a31315d9585152c0e959333f2c23be6b..1c86c6f60d96fb9675d5e51322aa3f473dec8292 100644 (file)
@@ -204,7 +204,7 @@ protected:
     void applyDrawableClipPath (Graphics&);\r
 \r
     Point<int> originRelativeToComponent;\r
-    ScopedPointer<Drawable> drawableClipPath;\r
+    std::unique_ptr<Drawable> drawableClipPath;\r
 \r
     void nonConstDraw (Graphics&, float opacity, const AffineTransform&);\r
 \r
index 5ca2686ef631a4dc2ec1e3a1970e5208261639da..c26db225e5c0cb181d5f5e8f483ccc5296a44c41 100644 (file)
@@ -802,7 +802,7 @@ private:
     {\r
         if (xmlPath->hasTagNameIgnoringNamespace ("clipPath"))\r
         {\r
-            ScopedPointer<DrawableComposite> drawableClipPath (new DrawableComposite());\r
+            std::unique_ptr<DrawableComposite> drawableClipPath (new DrawableComposite());\r
 \r
             parseSubElements (xmlPath, *drawableClipPath, false);\r
 \r
@@ -1163,7 +1163,7 @@ private:
 \r
         auto link = xml->getStringAttribute ("xlink:href");\r
 \r
-        ScopedPointer<InputStream> inputStream;\r
+        std::unique_ptr<InputStream> inputStream;\r
         MemoryOutputStream imageStream;\r
 \r
         if (link.startsWith ("data:"))\r
@@ -1703,11 +1703,11 @@ Drawable* Drawable::createFromSVG (const XmlElement& svgDocument)
 Drawable* Drawable::createFromSVGFile (const File& svgFile)\r
 {\r
     XmlDocument doc (svgFile);\r
-    ScopedPointer<XmlElement> outer (doc.getDocumentElement (true));\r
+    std::unique_ptr<XmlElement> outer (doc.getDocumentElement (true));\r
 \r
     if (outer != nullptr && outer->hasTagName ("svg"))\r
     {\r
-        ScopedPointer<XmlElement> svgDocument (doc.getDocumentElement());\r
+        std::unique_ptr<XmlElement> svgDocument (doc.getDocumentElement());\r
 \r
         if (svgDocument != nullptr)\r
         {\r
index c889e7363e7d2a031f55205b5ee6560fc2b7c24a..dcd368b7de8ee828dd01da49174e1a07d4a6f061 100644 (file)
@@ -63,7 +63,7 @@ private:
             if (! tempFile.create().wasOk())\r
                 break;\r
 \r
-            ScopedPointer<FileOutputStream> outputStream = tempFile.createOutputStream();\r
+            std::unique_ptr<FileOutputStream> outputStream (tempFile.createOutputStream());\r
 \r
             if (outputStream == nullptr)\r
                 break;\r
@@ -82,7 +82,7 @@ private:
 \r
     ContentSharer& owner;\r
     const Array<Image> images;\r
-    ScopedPointer<ImageFileFormat> imageFileFormat;\r
+    std::unique_ptr<ImageFileFormat> imageFileFormat;\r
     String extension;\r
 };\r
 \r
@@ -111,7 +111,7 @@ private:
 \r
         if (tempFile.create().wasOk())\r
         {\r
-            ScopedPointer<FileOutputStream> outputStream = tempFile.createOutputStream();\r
+            std::unique_ptr<FileOutputStream> outputStream (tempFile.createOutputStream());\r
 \r
             if (outputStream != nullptr)\r
             {\r
@@ -214,7 +214,7 @@ void ContentSharer::shareImages (const Array<Image>& images,
 {\r
   #if JUCE_IOS || JUCE_ANDROID\r
     startNewShare (callbackToUse);\r
-    prepareImagesThread = new PrepareImagesThread (*this, images, imageFileFormatToUse);\r
+    prepareImagesThread.reset (new PrepareImagesThread (*this, images, imageFileFormatToUse));\r
   #else\r
     ignoreUnused (images, imageFileFormatToUse);\r
 \r
@@ -246,7 +246,7 @@ void ContentSharer::shareData (const MemoryBlock& mb,
 {\r
   #if JUCE_IOS || JUCE_ANDROID\r
     startNewShare (callbackToUse);\r
-    prepareDataThread = new PrepareDataThread (*this, mb);\r
+    prepareDataThread.reset (new PrepareDataThread (*this, mb));\r
   #else\r
     ignoreUnused (mb);\r
 \r
index 5da3972efbd3d64fb6639523fe24b6a9df0303d1..8a0026a7fc88c76f9db78cfc8302d5d68bbea371 100644 (file)
@@ -118,7 +118,7 @@ private:
         virtual void shareText (const String& text) = 0;\r
     };\r
 \r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
     Pimpl* createPimpl();\r
 \r
     void startNewShare (std::function<void (bool, const String&)>);\r
@@ -128,11 +128,11 @@ private:
 \r
     class PrepareImagesThread;\r
     friend class PrepareImagesThread;\r
-    ScopedPointer<PrepareImagesThread> prepareImagesThread;\r
+    std::unique_ptr<PrepareImagesThread> prepareImagesThread;\r
 \r
     class PrepareDataThread;\r
     friend class PrepareDataThread;\r
-    ScopedPointer<PrepareDataThread> prepareDataThread;\r
+    std::unique_ptr<PrepareDataThread> prepareDataThread;\r
 \r
     void filesToSharePrepared();\r
   #endif\r
index 37447794e1b5aa85ac146a9df96abaa2d3a022c9..28a38ba76db98a081171fa0e6584f7778f7dc18a 100644 (file)
@@ -234,7 +234,7 @@ bool DirectoryContentsList::addFile (const File& file, const bool isDir,
          || ((! isDir) && fileFilter->isFileSuitable (file))\r
          || (isDir && fileFilter->isDirectorySuitable (file)))\r
     {\r
-        ScopedPointer<FileInfo> info (new FileInfo());\r
+        std::unique_ptr<FileInfo> info (new FileInfo());\r
 \r
         info->filename = file.getFileName();\r
         info->fileSize = fileSize;\r
index 20ce76f60de9fe6ca85c822649e423c65ae5d7d4..81664b167d9bc6fb19452d1af742afa94d13d5f0 100644 (file)
@@ -208,7 +208,7 @@ private:
     CriticalSection fileListLock;\r
     OwnedArray<FileInfo> files;\r
 \r
-    ScopedPointer<DirectoryIterator> fileFindHandle;\r
+    std::unique_ptr<DirectoryIterator> fileFindHandle;\r
     bool volatile shouldStop;\r
 \r
     int useTimeSlice() override;\r
index de338a6ca43c2929d8500515ca35fe2bdbabc604..fe98a9f242a53c8c5a7be88a32bfece427823445 100644 (file)
@@ -267,7 +267,7 @@ protected:
 \r
 private:\r
     //==============================================================================\r
-    ScopedPointer<DirectoryContentsList> fileList;\r
+    std::unique_ptr<DirectoryContentsList> fileList;\r
     const FileFilter* fileFilter;\r
 \r
     int flags;\r
@@ -275,12 +275,12 @@ private:
     Array<File> chosenFiles;\r
     ListenerList<FileBrowserListener> listeners;\r
 \r
-    ScopedPointer<DirectoryContentsDisplayComponent> fileListComponent;\r
+    std::unique_ptr<DirectoryContentsDisplayComponent> fileListComponent;\r
     FilePreviewComponent* previewComp;\r
     ComboBox currentPathBox;\r
     TextEditor filenameBox;\r
     Label fileLabel;\r
-    ScopedPointer<Button> goUpButton;\r
+    std::unique_ptr<Button> goUpButton;\r
     TimeSliceThread thread;\r
     bool wasProcessActive;\r
 \r
index e07736923eceb78cbe1abc3cdc3fc4530a52dd08..59497f2714a16adedf967fd259f7e8293660ab5c 100644 (file)
@@ -317,7 +317,7 @@ private:
         virtual void runModally() = 0;\r
     };\r
 \r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     //==============================================================================\r
     Pimpl* createPimpl (int, FilePreviewComponent*);\r
index ce50b4e195a4dbc5bb791e801a8eddbd83e00801..4a21a573b136992ec8845196dc88c09f344fc08b 100644 (file)
@@ -219,7 +219,7 @@ private:
     //==============================================================================\r
     ComboBox filenameBox;\r
     String lastFilename;\r
-    ScopedPointer<Button> browseButton;\r
+    std::unique_ptr<Button> browseButton;\r
     int maxRecentFiles = 30;\r
     bool isDir, isSaving, isFileDragOver = false;\r
     String wildcard, enforcedSuffix, browseButtonText;\r
index 0de138337c6b3bbb6f2cdd894af5428de9233eb6..17c564cce3d9d7dcb611dd9f1edc99f998eb08d1 100644 (file)
@@ -66,7 +66,7 @@ void ImagePreviewComponent::timerCallback()
     currentDetails.clear();\r
     repaint();\r
 \r
-    ScopedPointer<FileInputStream> in (fileToLoad.createInputStream());\r
+    std::unique_ptr<FileInputStream> in (fileToLoad.createInputStream());\r
 \r
     if (in != nullptr && in->getFile().existsAsFile())\r
     {\r
index b8148e76f60233dda24b4215733eec17d98494be..4c6dc5b315b54c2a5bdf8e9fdbe5f02034e5c621 100644 (file)
@@ -267,15 +267,12 @@ namespace juce
 #include "misc/juce_DropShadower.cpp"\r
 #include "misc/juce_JUCESplashScreen.cpp"\r
 \r
-// these classes are C++11-only\r
-#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
- #include "layout/juce_FlexBox.cpp"\r
- #if JUCE_HAS_CONSTEXPR\r
-  #include "layout/juce_GridItem.cpp"\r
-  #include "layout/juce_Grid.cpp"\r
-  #if JUCE_UNIT_TESTS\r
-   #include "layout/juce_GridUnitTests.cpp"\r
-  #endif\r
+#include "layout/juce_FlexBox.cpp"\r
+#if JUCE_HAS_CONSTEXPR\r
+ #include "layout/juce_GridItem.cpp"\r
+ #include "layout/juce_Grid.cpp"\r
+ #if JUCE_UNIT_TESTS\r
+  #include "layout/juce_GridUnitTests.cpp"\r
  #endif\r
 #endif\r
 \r
index 7103564f5c8082027fb4d520af7440b6c7324f84..e756f154198720b62f76d06bdfff3ce05b050f1d 100644 (file)
@@ -35,7 +35,7 @@
 \r
   ID:               juce_gui_basics\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE GUI core classes\r
   description:      Basic user-interface components and related classes.\r
   website:          http://www.juce.com/juce\r
@@ -149,12 +149,10 @@ namespace juce
     class ApplicationCommandManagerListener;\r
     class DrawableButton;\r
 \r
-   #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
     class FlexBox;\r
     #if JUCE_HAS_CONSTEXPR\r
      class Grid;\r
     #endif\r
-   #endif\r
 }\r
 \r
 #include "mouse/juce_MouseCursor.h"\r
@@ -294,13 +292,10 @@ namespace juce
  #include "native/juce_linux_X11.h"\r
 #endif\r
 \r
-// these classes are C++11-only\r
-#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
- #include "layout/juce_FlexItem.h"\r
- #include "layout/juce_FlexBox.h"\r
+#include "layout/juce_FlexItem.h"\r
+#include "layout/juce_FlexBox.h"\r
 \r
- #if JUCE_HAS_CONSTEXPR\r
-  #include "layout/juce_GridItem.h"\r
-  #include "layout/juce_Grid.h"\r
- #endif\r
+#if JUCE_HAS_CONSTEXPR\r
+ #include "layout/juce_GridItem.h"\r
+ #include "layout/juce_Grid.h"\r
 #endif\r
index 63ed2aa892e69484bc28112a7483d6b66960baf1..af1c4da752cbc0fa767ed90101db663c8c7ec7ad 100644 (file)
@@ -77,7 +77,7 @@ bool KeyPress::operator!= (int otherKeyCode) const noexcept         { return ! o
 bool KeyPress::isCurrentlyDown() const\r
 {\r
     return isKeyCurrentlyDown (keyCode)\r
-            && (ModifierKeys::getCurrentModifiers().getRawFlags() & ModifierKeys::allKeyboardModifiers)\r
+            && (ModifierKeys::currentModifiers.getRawFlags() & ModifierKeys::allKeyboardModifiers)\r
                   == (mods.getRawFlags() & ModifierKeys::allKeyboardModifiers);\r
 }\r
 \r
index 5133ed23c6a692fad1d234e36d968663996103be..ec6f5d9a81dcf22eb14a0ef8ac043048ad39b650 100644 (file)
 namespace juce\r
 {\r
 \r
-ModifierKeys::ModifierKeys() noexcept  : flags (0) {}\r
-ModifierKeys::ModifierKeys (int rawFlags) noexcept  : flags (rawFlags) {}\r
+ModifierKeys ModifierKeys::currentModifiers;\r
+\r
+ModifierKeys::ModifierKeys() noexcept                            : flags (0)           {}\r
+ModifierKeys::ModifierKeys (int rawFlags) noexcept               : flags (rawFlags)    {}\r
 ModifierKeys::ModifierKeys (const ModifierKeys& other) noexcept  : flags (other.flags) {}\r
 \r
 ModifierKeys& ModifierKeys::operator= (const ModifierKeys other) noexcept\r
@@ -37,13 +39,6 @@ ModifierKeys& ModifierKeys::operator= (const ModifierKeys other) noexcept
     return *this;\r
 }\r
 \r
-ModifierKeys ModifierKeys::currentModifiers;\r
-\r
-ModifierKeys ModifierKeys::getCurrentModifiers() noexcept\r
-{\r
-    return currentModifiers;\r
-}\r
-\r
 int ModifierKeys::getNumMouseButtonsDown() const noexcept\r
 {\r
     int num = 0;\r
@@ -55,4 +50,9 @@ int ModifierKeys::getNumMouseButtonsDown() const noexcept
     return num;\r
 }\r
 \r
+ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept\r
+{\r
+    return ComponentPeer::getCurrentModifiersRealtime();\r
+}\r
+\r
 } // namespace juce\r
index 951503101ff32ab96b9b10f9f7c4f92f1d1cbb6a..4c75078ba22288a9a255a98330a31c24cdaf4b54 100644 (file)
@@ -186,40 +186,27 @@ public:
     int getNumMouseButtonsDown() const noexcept;\r
 \r
     //==============================================================================\r
+    /** This object represents the last-known state of the keyboard and mouse buttons. */\r
+    static ModifierKeys currentModifiers;\r
+\r
     /** Creates a ModifierKeys object to represent the last-known state of the\r
         keyboard and mouse buttons.\r
 \r
-        @see getCurrentModifiersRealtime\r
-    */\r
-    static ModifierKeys getCurrentModifiers() noexcept;\r
+        This method is here for backwards compatibility and there's no need to call it anymore,\r
+        you should use the public currentModifiers member directly.\r
+     */\r
+    static ModifierKeys getCurrentModifiers() noexcept                  { return currentModifiers; }\r
 \r
     /** Creates a ModifierKeys object to represent the current state of the\r
         keyboard and mouse buttons.\r
 \r
-        This isn't often needed and isn't recommended, but will actively check all the\r
-        mouse and key states rather than just returning their last-known state like\r
-        getCurrentModifiers() does.\r
-\r
-        This is only needed in special circumstances for up-to-date modifier information\r
-        at times when the app's event loop isn't running normally.\r
-\r
-        Another reason to avoid this method is that it's not stateless, and calling it may\r
-        update the value returned by getCurrentModifiers(), which could cause subtle changes\r
-        in the behaviour of some components.\r
+        This method is here for backwards compatibility and you should call ComponentPeer::getCurrentModifiersRealtime()\r
+        instead (which is what this method now does).\r
     */\r
     static ModifierKeys getCurrentModifiersRealtime() noexcept;\r
 \r
-\r
 private:\r
-    //==============================================================================\r
     int flags;\r
-\r
-    friend class ComponentPeer;\r
-    friend class MouseInputSource;\r
-    friend class MouseInputSourceInternal;\r
-\r
-    static ModifierKeys currentModifiers;\r
-    static void updateCurrentModifiers() noexcept;\r
 };\r
 \r
 } // namespace juce\r
index 68b500452f30b8fdc105c8c2fd83e910de50a2d8..c3a105bb8c72d69c9cfcf41591c6d06c4f2dd635 100644 (file)
@@ -182,7 +182,7 @@ public:
     };\r
 \r
     WeakReference<Component> component;\r
-    ScopedPointer<Component> proxy;\r
+    std::unique_ptr<Component> proxy;\r
 \r
     Rectangle<int> destination;\r
     double destAlpha;\r
index 3fd09041a5f808e2250f231518c906f017afe2a3..dd8acc37f253f4a3f74878d98d203760d14ca196 100644 (file)
@@ -230,7 +230,7 @@ public:
 private:\r
     //==============================================================================\r
     OwnedArray<TypeHandler> types;\r
-    ScopedPointer<Component> component;\r
+    std::unique_ptr<Component> component;\r
     ImageProvider* imageProvider;\r
    #if JUCE_DEBUG\r
     WeakReference<Component> componentRef;\r
index eae4e5497d7a5bc98b122f0e8420ce809034e79c..6ab189b56af8152b6c7ce4a744e17a6971bb0a98 100644 (file)
@@ -130,7 +130,7 @@ private:
     friend struct ContainerDeletePolicy<PanelSizes>;\r
     friend struct ContainerDeletePolicy<PanelHolder>;\r
 \r
-    ScopedPointer<PanelSizes> currentSizes;\r
+    std::unique_ptr<PanelSizes> currentSizes;\r
     OwnedArray<PanelHolder> holders;\r
     ComponentAnimator animator;\r
     int headerHeight;\r
index 721441cf264c8fd2241b57a29a431589a07027ed..2c9361c63cba37a2663eab0bece0a779462135a1 100644 (file)
@@ -313,8 +313,12 @@ struct Grid::PlacementHelpers
             strings.add (juce::StringArray::fromTokens (areaString, false));\r
 \r
         if (strings.size() > 0)\r
+        {\r
             for (auto s : strings)\r
+            {\r
                 jassert (s.size() == strings[0].size()); // all rows must have the same number of columns\r
+            }\r
+        }\r
 \r
         return strings;\r
     }\r
index 6400fc1730863eeebb591995f2dfa52a07b3748e..6988e43a5e48a1b6f2cf246858506cb475a17900 100644 (file)
@@ -240,7 +240,7 @@ bool MultiDocumentPanel::closeDocument (Component* component,
                 {\r
                     if (dw->getContentComponent() == component)\r
                     {\r
-                        ScopedPointer<MultiDocumentPanelWindow> (dw)->clearContentComponent();\r
+                        std::unique_ptr<MultiDocumentPanelWindow> (dw)->clearContentComponent();\r
                         break;\r
                     }\r
                 }\r
@@ -255,7 +255,7 @@ bool MultiDocumentPanel::closeDocument (Component* component,
             {\r
                 for (int i = getNumChildComponents(); --i >= 0;)\r
                 {\r
-                    ScopedPointer<MultiDocumentPanelWindow> dw (dynamic_cast<MultiDocumentPanelWindow*> (getChildComponent (i)));\r
+                    std::unique_ptr<MultiDocumentPanelWindow> dw (dynamic_cast<MultiDocumentPanelWindow*> (getChildComponent (i)));\r
 \r
                     if (dw != nullptr)\r
                         dw->clearContentComponent();\r
@@ -394,7 +394,7 @@ void MultiDocumentPanel::setLayoutMode (const LayoutMode newLayoutMode)
         {\r
             for (int i = getNumChildComponents(); --i >= 0;)\r
             {\r
-                ScopedPointer<MultiDocumentPanelWindow> dw (dynamic_cast<MultiDocumentPanelWindow*> (getChildComponent (i)));\r
+                std::unique_ptr<MultiDocumentPanelWindow> dw (dynamic_cast<MultiDocumentPanelWindow*> (getChildComponent (i)));\r
 \r
                 if (dw != nullptr)\r
                 {\r
index b848c478af9d52b257b3a741d2531b8c902596f9..454480d56b59e047e371d3045aed0fbdb5916b38 100644 (file)
@@ -291,7 +291,7 @@ private:
     //==============================================================================\r
     LayoutMode mode = MaximisedWindowsWithTabs;\r
     Array<Component*> components;\r
-    ScopedPointer<TabbedComponent> tabComponent;\r
+    std::unique_ptr<TabbedComponent> tabComponent;\r
     Colour backgroundColour { Colours::lightblue };\r
     int maximumNumDocuments = 0, numDocsBeforeTabsUsed = 0;\r
 \r
index 53118bd3989724a477afb5387fa7d4aa03ca6384..15e5825a8f7c1f1473a86063b9ac5384221bf736 100644 (file)
@@ -421,7 +421,7 @@ private:
     bool vertical, isDraggingThumb = false, autohides = true, userVisibilityFlag = false;\r
     class ScrollbarButton;\r
     friend struct ContainerDeletePolicy<ScrollbarButton>;\r
-    ScopedPointer<ScrollbarButton> upButton, downButton;\r
+    std::unique_ptr<ScrollbarButton> upButton, downButton;\r
     ListenerList<Listener> listeners;\r
 \r
     void handleAsyncUpdate() override;\r
index d3c9a167a00ff579052ab07ecd6a5ecebb16654e..1fc8ec3b0e851b7c2e96314ac3f82b5856433caa 100644 (file)
@@ -124,7 +124,7 @@ protected:
     TabbedButtonBar& owner;\r
     int overlapPixels = 0;\r
 \r
-    ScopedPointer<Component> extraComponent;\r
+    std::unique_ptr<Component> extraComponent;\r
     ExtraComponentPlacement extraCompPlacement = afterText;\r
 \r
 private:\r
@@ -347,7 +347,7 @@ protected:
 private:\r
     struct TabInfo\r
     {\r
-        ScopedPointer<TabBarButton> button;\r
+        std::unique_ptr<TabBarButton> button;\r
         String name;\r
         Colour colour;\r
     };\r
@@ -361,8 +361,8 @@ private:
     class BehindFrontTabComp;\r
     friend class BehindFrontTabComp;\r
     friend struct ContainerDeletePolicy<BehindFrontTabComp>;\r
-    ScopedPointer<BehindFrontTabComp> behindFrontTab;\r
-    ScopedPointer<Button> extraTabsButton;\r
+    std::unique_ptr<BehindFrontTabComp> behindFrontTab;\r
+    std::unique_ptr<Button> extraTabsButton;\r
 \r
     void showExtraItemsMenu();\r
     static void extraItemsMenuCallback (int, TabbedButtonBar*);\r
index ec0ba1b942a10470b53ecf9a2d86b8228c7218fc..383ab340377f8df919b92fb4d5dd1661fbf273d5 100644 (file)
@@ -209,7 +209,7 @@ protected:
     virtual TabBarButton* createTabButton (const String& tabName, int tabIndex);\r
 \r
     /** @internal */\r
-    ScopedPointer<TabbedButtonBar> tabs;\r
+    std::unique_ptr<TabbedButtonBar> tabs;\r
 \r
 private:\r
     //==============================================================================\r
index 7e04b3152f93c6023d2928192d6cb11c1993989c..67ee38e27d1d91bb923b7d098d3316efe08214d1 100644 (file)
@@ -66,7 +66,7 @@ void Viewport::deleteOrRemoveContentComp()
         {\r
             // This sets the content comp to a null pointer before deleting the old one, in case\r
             // anything tries to use the old one while it's in mid-deletion..\r
-            ScopedPointer<Component> oldCompDeleter (contentComp);\r
+            std::unique_ptr<Component> oldCompDeleter (contentComp);\r
             contentComp = nullptr;\r
         }\r
         else\r
@@ -217,6 +217,7 @@ struct Viewport::DragToScrollListener   : private MouseListener,
     ~DragToScrollListener()\r
     {\r
         viewport.contentHolder.removeMouseListener (this);\r
+        Desktop::getInstance().removeGlobalMouseListener (this);\r
     }\r
 \r
     void positionChanged (ViewportDragPosition&, double) override\r
@@ -227,14 +228,23 @@ struct Viewport::DragToScrollListener   : private MouseListener,
 \r
     void mouseDown (const MouseEvent&) override\r
     {\r
-        offsetX.setPosition (offsetX.getPosition());\r
-        offsetY.setPosition (offsetY.getPosition());\r
-        ++numTouches;\r
+        if (! isGlobalMouseListener)\r
+        {\r
+            offsetX.setPosition (offsetX.getPosition());\r
+            offsetY.setPosition (offsetY.getPosition());\r
+\r
+            // switch to a global mouse listener so we still receive mouseUp events\r
+            // if the original event component is deleted\r
+            viewport.contentHolder.removeMouseListener (this);\r
+            Desktop::getInstance().addGlobalMouseListener (this);\r
+\r
+            isGlobalMouseListener = true;\r
+        }\r
     }\r
 \r
     void mouseDrag (const MouseEvent& e) override\r
     {\r
-        if (numTouches == 1 && ! doesMouseEventComponentBlockViewportDrag (e.eventComponent))\r
+        if (Desktop::getInstance().getNumDraggingMouseSources() == 1 && ! doesMouseEventComponentBlockViewportDrag (e.eventComponent))\r
         {\r
             auto totalOffset = e.getOffsetFromDragStart().toFloat();\r
 \r
@@ -259,13 +269,20 @@ struct Viewport::DragToScrollListener   : private MouseListener,
 \r
     void mouseUp (const MouseEvent&) override\r
     {\r
-        if (--numTouches <= 0)\r
-        {\r
-            offsetX.endDrag();\r
-            offsetY.endDrag();\r
-            isDragging = false;\r
-            numTouches = 0;\r
-        }\r
+        if (isGlobalMouseListener && Desktop::getInstance().getNumDraggingMouseSources() == 0)\r
+            endDragAndClearGlobalMouseListener();\r
+    }\r
+\r
+    void endDragAndClearGlobalMouseListener()\r
+    {\r
+        offsetX.endDrag();\r
+        offsetY.endDrag();\r
+        isDragging = false;\r
+\r
+        viewport.contentHolder.addMouseListener (this, true);\r
+        Desktop::getInstance().removeGlobalMouseListener (this);\r
+\r
+        isGlobalMouseListener = false;\r
     }\r
 \r
     bool doesMouseEventComponentBlockViewportDrag (const Component* eventComp)\r
@@ -280,8 +297,8 @@ struct Viewport::DragToScrollListener   : private MouseListener,
     Viewport& viewport;\r
     ViewportDragPosition offsetX, offsetY;\r
     Point<int> originalViewPos;\r
-    int numTouches = 0;\r
     bool isDragging = false;\r
+    bool isGlobalMouseListener = false;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DragToScrollListener)\r
 };\r
index f28a85a3d82cce77606880e6e3ac5ba7346f72e0..7f7e7176e03d150f8d905d764aa247d055a8b533 100644 (file)
@@ -310,7 +310,7 @@ protected:
 \r
 private:\r
     //==============================================================================\r
-    ScopedPointer<ScrollBar> verticalScrollBar, horizontalScrollBar;\r
+    std::unique_ptr<ScrollBar> verticalScrollBar, horizontalScrollBar;\r
     Component contentHolder;\r
     WeakReference<Component> contentComp;\r
     Rectangle<int> lastVisibleArea;\r
@@ -324,7 +324,7 @@ private:
     struct DragToScrollListener;\r
     friend struct DragToScrollListener;\r
     friend struct ContainerDeletePolicy<DragToScrollListener>;\r
-    ScopedPointer<DragToScrollListener> dragToScrollListener;\r
+    std::unique_ptr<DragToScrollListener> dragToScrollListener;\r
 \r
     Point<int> viewportPosToCompPos (Point<int>) const;\r
 \r
index df592b9f44bb064ee54aa6b5a06dff667c3c2a45..d9a56af513f73fd6b4e4e0732460a26ddee7f04d 100644 (file)
@@ -2624,7 +2624,7 @@ void LookAndFeel_V2::layoutFileBrowserComponent (FileBrowserComponent& browserCo
 //==============================================================================\r
 static Drawable* createDrawableFromSVG (const char* data)\r
 {\r
-    ScopedPointer<XmlElement> xml (XmlDocument::parse (data));\r
+    std::unique_ptr<XmlElement> xml (XmlDocument::parse (data));\r
     jassert (xml != nullptr);\r
     return Drawable::createFromSVG (*xml);\r
 }\r
index 805e1af0e5127213fbdc88f5d0d9d9930d24044b..7bc3c25a5a8288661924599fc320f5ab28c4b122 100644 (file)
@@ -369,7 +369,7 @@ public:
 \r
 private:\r
     //==============================================================================\r
-    ScopedPointer<Drawable> folderImage, documentImage;\r
+    std::unique_ptr<Drawable> folderImage, documentImage;\r
 \r
     void drawShinyButtonShape (Graphics&,\r
                                float x, float y, float w, float h, float maxCornerSize,\r
index efcf09c880ce3af476ed0fe13259026bb677920d..7acacad3e329a038855cd26b21ddbbefded4ac0e 100644 (file)
@@ -993,7 +993,7 @@ public:
     bool dismissOnMouseUp, hideOnExit = false, disableMouseMoves = false, hasAnyJuceCompHadFocus = false;\r
     int numColumns = 0, contentHeight = 0, childYOffset = 0;\r
     Component::SafePointer<ItemComponent> currentChild;\r
-    ScopedPointer<MenuWindow> activeSubMenu;\r
+    std::unique_ptr<MenuWindow> activeSubMenu;\r
     Array<int> columnWidths;\r
     uint32 windowCreationTime, lastFocusedTime, timeEnteredCurrentChildComp;\r
     OwnedArray<MouseSourceState> mouseSourceStates;\r
@@ -1076,8 +1076,8 @@ private:
                            const bool wasDown, const bool overScrollArea, const bool isOverAny)\r
     {\r
         isDown = window.hasBeenOver\r
-                    && (ModifierKeys::getCurrentModifiers().isAnyMouseButtonDown()\r
-                         || ModifierKeys::getCurrentModifiersRealtime().isAnyMouseButtonDown());\r
+                    && (ModifierKeys::currentModifiers.isAnyMouseButtonDown()\r
+                         || ComponentPeer::getCurrentModifiersRealtime().isAnyMouseButtonDown());\r
 \r
         if (! window.doesAnyJuceCompHaveFocus())\r
         {\r
@@ -1593,7 +1593,7 @@ Component* PopupMenu::createWindow (const Options& options,
     return items.isEmpty() ? nullptr\r
                            : new HelperClasses::MenuWindow (*this, nullptr, options,\r
                                                             ! options.getTargetScreenArea().isEmpty(),\r
-                                                            ModifierKeys::getCurrentModifiers().isAnyMouseButtonDown(),\r
+                                                            ModifierKeys::currentModifiers.isAnyMouseButtonDown(),\r
                                                             managerOfChosenCommand);\r
 }\r
 \r
@@ -1632,7 +1632,7 @@ struct PopupMenuCompletionCallback  : public ModalComponentManager::Callback
     }\r
 \r
     ApplicationCommandManager* managerOfChosenCommand = nullptr;\r
-    ScopedPointer<Component> component;\r
+    std::unique_ptr<Component> component;\r
     WeakReference<Component> prevFocused, prevTopLevel;\r
 \r
     JUCE_DECLARE_NON_COPYABLE (PopupMenuCompletionCallback)\r
@@ -1641,8 +1641,8 @@ struct PopupMenuCompletionCallback  : public ModalComponentManager::Callback
 int PopupMenu::showWithOptionalCallback (const Options& options, ModalComponentManager::Callback* const userCallback,\r
                                          const bool canBeModal)\r
 {\r
-    ScopedPointer<ModalComponentManager::Callback> userCallbackDeleter (userCallback);\r
-    ScopedPointer<PopupMenuCompletionCallback> callback (new PopupMenuCompletionCallback());\r
+    std::unique_ptr<ModalComponentManager::Callback> userCallbackDeleter (userCallback);\r
+    std::unique_ptr<PopupMenuCompletionCallback> callback (new PopupMenuCompletionCallback());\r
 \r
     if (auto* window = createWindow (options, &(callback->managerOfChosenCommand)))\r
     {\r
index fefe2e3180aeb6721d76e6885285262ce0cb458b..54f3bf39e7bca0cece37c00180dd36a88fe8e080 100644 (file)
@@ -131,10 +131,10 @@ public:
         int itemID = 0;\r
 \r
         /** A sub-menu, or nullptr if there isn't one. */\r
-        ScopedPointer<PopupMenu> subMenu;\r
+        std::unique_ptr<PopupMenu> subMenu;\r
 \r
         /** A drawable to use as an icon, or nullptr if there isn't one. */\r
-        ScopedPointer<Drawable> image;\r
+        std::unique_ptr<Drawable> image;\r
 \r
         /** A custom component for the item to display, or nullptr if there isn't one. */\r
         ReferenceCountedObjectPtr<CustomComponent> customComponent;\r
index 97b483e1dda68890facf600708bfdd497d5c839e..3bffb8ef458910198c43299ca79a308d61a318bd 100644 (file)
@@ -79,7 +79,7 @@ struct ReportingThreadContainer  : public ChangeListener,
     void sendReport (String, String&, StringPairArray&);\r
     void changeListenerCallback (ChangeBroadcaster*) override;\r
 \r
-    ScopedPointer<ReportingThread> reportingThread;\r
+    std::unique_ptr<ReportingThread> reportingThread;\r
 \r
     JUCE_DECLARE_SINGLETON_SINGLETHREADED_MINIMAL (ReportingThreadContainer)\r
 };\r
@@ -132,7 +132,7 @@ private:
     ReportingThreadContainer& threadContainer;\r
     URL url;\r
     String headers;\r
-    ScopedPointer<WebInputStream> webStream;\r
+    std::unique_ptr<WebInputStream> webStream;\r
 };\r
 \r
 //==============================================================================\r
@@ -257,7 +257,7 @@ JUCESplashScreen::~JUCESplashScreen()
 {\r
 }\r
 \r
-Drawable* JUCESplashScreen::getSplashScreenLogo()\r
+std::unique_ptr<Drawable> JUCESplashScreen::getSplashScreenLogo()\r
 {\r
     const char* svgData = R"JUCESPLASHSCREEN(\r
       <?xml version="1.0" encoding="UTF-8"?>\r
@@ -294,8 +294,8 @@ Drawable* JUCESplashScreen::getSplashScreenLogo()
     </svg>\r
     )JUCESPLASHSCREEN";\r
 \r
-    ScopedPointer<XmlElement> svgXml (XmlDocument::parse (svgData));\r
-    return Drawable::createFromSVG (*svgXml);\r
+    std::unique_ptr<XmlElement> svgXml (XmlDocument::parse (svgData));\r
+    return std::unique_ptr<Drawable> (Drawable::createFromSVG (*svgXml));\r
 }\r
 \r
 void JUCESplashScreen::paint (Graphics& g)\r
index 5f9b04bc23ab5c8e61a5e8456ad44b4269c0e128..6f16ff4c2a58bb77d63c8fffdd093f5b3bec0987 100644 (file)
@@ -55,7 +55,7 @@ public:
     JUCESplashScreen (Component& parentToAddTo);\r
     ~JUCESplashScreen();\r
 \r
-    static Drawable* getSplashScreenLogo();\r
+    static std::unique_ptr<Drawable> getSplashScreenLogo();\r
 \r
 private:\r
     void paint (Graphics&) override;\r
@@ -65,7 +65,7 @@ private:
     bool hitTest (int, int) override;\r
     void mouseUp (const MouseEvent&) override;\r
 \r
-    ScopedPointer<Drawable> content;\r
+    std::unique_ptr<Drawable> content;\r
     CriticalSection appUsageReporting;\r
     ComponentAnimator fader;\r
     bool hasStartedFading = false;\r
index ea4e509512d8ba745707f676641ee84b1139ac74..5bff2bb74fc08f4222c03bae4b4f982eb20b68f4 100644 (file)
@@ -316,7 +316,7 @@ private:
             {\r
                 hasCheckedForExternalDrag = true;\r
 \r
-                if (ModifierKeys::getCurrentModifiersRealtime().isAnyMouseButtonDown())\r
+                if (ComponentPeer::getCurrentModifiersRealtime().isAnyMouseButtonDown())\r
                 {\r
                     StringArray files;\r
                     auto canMoveFiles = false;\r
index 4a3e0b52644faa34c27d3bea3831003fffb5bd27..efe7654ce0ef1070535de0e607111635328421c0 100644 (file)
@@ -47,7 +47,7 @@ public:
 \r
     ModifierKeys getCurrentModifiers() const noexcept\r
     {\r
-        return ModifierKeys::getCurrentModifiers().withoutMouseButtons().withFlags (buttonState.getRawFlags());\r
+        return ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (buttonState.getRawFlags());\r
     }\r
 \r
     ComponentPeer* getPeer() noexcept\r
@@ -255,8 +255,6 @@ public:
 \r
     void setPeer (ComponentPeer& newPeer, Point<float> screenPos, Time time)\r
     {\r
-        ModifierKeys::updateCurrentModifiers();\r
-\r
         if (&newPeer != lastPeer)\r
         {\r
             setComponentUnderMouse (nullptr, screenPos, time);\r
@@ -760,7 +758,7 @@ struct MouseInputSource::SourceList  : public Timer
         {\r
             // NB: when doing auto-repeat, we need to force an update of the current position and button state,\r
             // because on some OSes the queue can get overloaded with messages so that mouse-events don't get through..\r
-            if (s->isDragging() && ModifierKeys::getCurrentModifiersRealtime().isAnyMouseButtonDown())\r
+            if (s->isDragging() && ComponentPeer::getCurrentModifiersRealtime().isAnyMouseButtonDown())\r
             {\r
                 s->lastScreenPos = s->getRawScreenPosition();\r
                 s->triggerFakeMove();\r
index e29fc0fa1ee025867750e5673c4747ac97b20b05..15b18d8fc041609e11ac1c3442ad3630af6357c2 100644 (file)
@@ -420,7 +420,7 @@ public:
             owner.sharingFinished (false, {});\r
         }\r
 \r
-        prepareFilesThread = new AndroidContentSharerPrepareFilesThread (*this, files, packageName, uriBase);\r
+        prepareFilesThread.reset (new AndroidContentSharerPrepareFilesThread (*this, files, packageName, uriBase));\r
     }\r
 \r
     void shareText (const String& text) override\r
@@ -486,7 +486,7 @@ public:
     {\r
         ignoreUnused (selection, selectionArgs, sortOrder);\r
 \r
-        StringArray requestedColumns = javaStringArrayToJuceStringArray (projection);\r
+        StringArray requestedColumns = javaStringArrayToJuce (projection);\r
         StringArray supportedColumns = getSupportedColumns();\r
 \r
         StringArray resultColumns;\r
@@ -501,7 +501,7 @@ public:
         if (resultColumns.isEmpty())\r
             return nullptr;\r
 \r
-        auto resultJavaColumns = juceStringArrayToJavaStringArray (resultColumns);\r
+        auto resultJavaColumns = juceStringArrayToJava (resultColumns);\r
 \r
         auto* env = getEnv();\r
 \r
@@ -550,7 +550,7 @@ public:
         if (extension.isEmpty())\r
             return nullptr;\r
 \r
-        return juceStringArrayToJavaStringArray (filterMimeTypes (getMimeTypesForFileExtension (extension),\r
+        return juceStringArrayToJava (filterMimeTypes (getMimeTypesForFileExtension (extension),\r
                                                                   juceString (mimeTypeFilter.get())));\r
     }\r
 \r
@@ -683,40 +683,6 @@ private:
         return { index, filename, prepareFilesThread->getFilePaths()[index.getIntValue()] };\r
     }\r
 \r
-    static LocalRef<jobjectArray> juceStringArrayToJavaStringArray (const StringArray& juceArray)\r
-    {\r
-        auto* env = getEnv();\r
-\r
-        auto javaArray = LocalRef<jobjectArray> (env->NewObjectArray ((jsize) juceArray.size(),\r
-                                                                      JavaString,\r
-                                                                      javaString ("").get()));\r
-\r
-        for (int i = 0; i < juceArray.size(); ++i)\r
-            env->SetObjectArrayElement (javaArray, i, javaString (juceArray [i]).get());\r
-\r
-        return javaArray;\r
-    }\r
-\r
-    static StringArray javaStringArrayToJuceStringArray (const LocalRef<jobjectArray>& javaArray)\r
-    {\r
-        if (javaArray.get() == 0)\r
-            return {};\r
-\r
-        auto* env = getEnv();\r
-\r
-        const int size = env->GetArrayLength (javaArray.get());\r
-\r
-        StringArray juceArray;\r
-\r
-        for (int i = 0; i < size; ++i)\r
-        {\r
-            auto javaString = LocalRef<jstring> ((jstring) env->GetObjectArrayElement (javaArray.get(), i));\r
-            juceArray.add (juceString (javaString.get()));\r
-        }\r
-\r
-        return juceArray;\r
-    }\r
-\r
     static StringArray getSupportedColumns()\r
     {\r
         return StringArray ("_display_name", "_size");\r
@@ -774,7 +740,7 @@ private:
     String packageName;\r
     String uriBase;\r
 \r
-    ScopedPointer<AndroidContentSharerPrepareFilesThread> prepareFilesThread;\r
+    std::unique_ptr<AndroidContentSharerPrepareFilesThread> prepareFilesThread;\r
 \r
     bool succeeded = false;\r
     String errorDescription;\r
index 0c5614cb9469058317e677d24c6ec74c407596bc..34b71143bc5939e6c720167a7d94a4302542d42b 100644 (file)
@@ -502,7 +502,7 @@ public:
         lastMousePos = localToGlobal (pos);\r
 \r
         // this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before.\r
-        handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, currentModifiers.withoutMouseButtons(),\r
+        handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, ModifierKeys::currentModifiers.withoutMouseButtons(),\r
                           MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, time, {}, index);\r
 \r
         if (isValidPeer (this))\r
@@ -516,8 +516,8 @@ public:
 \r
         jassert (index < 64);\r
         touchesDown = (touchesDown | (1 << (index & 63)));\r
-        currentModifiers = currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
-        handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier),\r
+        ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
+        handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier),\r
                           MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, time, {}, index);\r
     }\r
 \r
@@ -530,9 +530,9 @@ public:
         touchesDown = (touchesDown & ~(1 << (index & 63)));\r
 \r
         if (touchesDown == 0)\r
-            currentModifiers = currentModifiers.withoutMouseButtons();\r
+            ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons();\r
 \r
-        handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, currentModifiers.withoutMouseButtons(), MouseInputSource::invalidPressure,\r
+        handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, ModifierKeys::currentModifiers.withoutMouseButtons(), MouseInputSource::invalidPressure,\r
                           MouseInputSource::invalidOrientation, time, {}, index);\r
     }\r
 \r
@@ -560,6 +560,8 @@ public:
         Component::unfocusAllComponents();\r
     }\r
 \r
+    void handleAppPausedCallback() {}\r
+\r
     void handleAppResumedCallback()\r
     {\r
         if (Component* kiosk = Desktop::getInstance().getKioskModeComponent())\r
@@ -630,10 +632,10 @@ public:
     void handlePaintCallback (JNIEnv* env, jobject canvas, jobject paint)\r
     {\r
         jobject rect = env->CallObjectMethod (canvas, CanvasMinimal.getClipBounds);\r
-        const int left   = env->GetIntField (rect, AndroidRectClass.left);\r
-        const int top    = env->GetIntField (rect, AndroidRectClass.top);\r
-        const int right  = env->GetIntField (rect, AndroidRectClass.right);\r
-        const int bottom = env->GetIntField (rect, AndroidRectClass.bottom);\r
+        const int left   = env->GetIntField (rect, AndroidRect.left);\r
+        const int top    = env->GetIntField (rect, AndroidRect.top);\r
+        const int right  = env->GetIntField (rect, AndroidRect.right);\r
+        const int bottom = env->GetIntField (rect, AndroidRect.bottom);\r
         env->DeleteLocalRef (rect);\r
 \r
         const Rectangle<int> clip (left, top, right - left, bottom - top);\r
@@ -718,7 +720,6 @@ public:
     }\r
 \r
     //==============================================================================\r
-    static ModifierKeys currentModifiers;\r
     static Point<float> lastMousePos;\r
     static int64 touchesDown;\r
 \r
@@ -786,7 +787,6 @@ private:
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AndroidComponentPeer)\r
 };\r
 \r
-ModifierKeys AndroidComponentPeer::currentModifiers = 0;\r
 Point<float> AndroidComponentPeer::lastMousePos;\r
 int64 AndroidComponentPeer::touchesDown = 0;\r
 AndroidComponentPeer* AndroidComponentPeer::frontWindow = nullptr;\r
@@ -810,6 +810,7 @@ JUCE_VIEW_CALLBACK (void, handleKeyDown,        (JNIEnv* env, jobject /*view*/,
 JUCE_VIEW_CALLBACK (void, handleKeyUp,          (JNIEnv* env, jobject /*view*/, jlong host, jint k, jint kc),                         handleKeyUpCallback ((int) k, (int) kc))\r
 JUCE_VIEW_CALLBACK (void, handleBackButton,     (JNIEnv* env, jobject /*view*/, jlong host),                                          handleBackButtonCallback())\r
 JUCE_VIEW_CALLBACK (void, handleKeyboardHidden, (JNIEnv* env, jobject /*view*/, jlong host),                                          handleKeyboardHiddenCallback())\r
+JUCE_VIEW_CALLBACK (void, handleAppPaused,      (JNIEnv* env, jobject /*view*/, jlong host),                                          handleAppPausedCallback())\r
 JUCE_VIEW_CALLBACK (void, handleAppResumed,     (JNIEnv* env, jobject /*view*/, jlong host),                                          handleAppResumedCallback())\r
 \r
 //==============================================================================\r
@@ -819,18 +820,6 @@ ComponentPeer* Component::createNewPeer (int styleFlags, void*)
 }\r
 \r
 //==============================================================================\r
-#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
- METHOD (getRotation, "getRotation", "()I")\r
-\r
-DECLARE_JNI_CLASS (Display, "android/view/Display");\r
-#undef JNI_CLASS_MEMBERS\r
-\r
-#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
- METHOD (getDefaultDisplay, "getDefaultDisplay", "()Landroid/view/Display;")\r
-\r
-DECLARE_JNI_CLASS (WindowManager, "android/view/WindowManager");\r
-#undef JNI_CLASS_MEMBERS\r
-\r
 bool Desktop::canUseSemiTransparentWindows() noexcept\r
 {\r
     return true;\r
@@ -857,11 +846,11 @@ Desktop::DisplayOrientation Desktop::getCurrentOrientation() const
 \r
     if (windowManager.get() != 0)\r
     {\r
-        LocalRef<jobject> display = LocalRef<jobject> (env->CallObjectMethod (windowManager, WindowManager.getDefaultDisplay));\r
+        LocalRef<jobject> display = LocalRef<jobject> (env->CallObjectMethod (windowManager, AndroidWindowManager.getDefaultDisplay));\r
 \r
         if (display.get() != 0)\r
         {\r
-            int rotation = env->CallIntMethod (display, Display.getRotation);\r
+            int rotation = env->CallIntMethod (display, AndroidDisplay.getRotation);\r
 \r
             switch (rotation)\r
             {\r
@@ -905,16 +894,6 @@ bool KeyPress::isKeyCurrentlyDown (const int /*keyCode*/)
     return false;\r
 }\r
 \r
-void ModifierKeys::updateCurrentModifiers() noexcept\r
-{\r
-    currentModifiers = AndroidComponentPeer::currentModifiers;\r
-}\r
-\r
-ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept\r
-{\r
-    return AndroidComponentPeer::currentModifiers;\r
-}\r
-\r
 JUCE_API void JUCE_CALLTYPE Process::hide()\r
 {\r
     if (android.activity.callBooleanMethod (JuceAppActivity.moveTaskToBack, true) == 0)\r
index c626835a4232e56aeceac1be56d7abe012bd07d0..13ac6d5578e9a0d33e26697f211fe4759b2e0a19 100644 (file)
 namespace juce\r
 {\r
 \r
-template <> struct ContainerDeletePolicy<UIActivityViewController>                          { static void destroy (NSObject* o) { [o release]; } };\r
-template <> struct ContainerDeletePolicy<NSObject<UIPopoverPresentationControllerDelegate>> { static void destroy (NSObject* o) { [o release]; } };\r
-\r
-//==============================================================================\r
 class ContentSharer::ContentSharerNativeImpl    : public ContentSharer::Pimpl,\r
                                                   private Component\r
 {\r
@@ -39,7 +35,7 @@ public:
         : owner (cs)\r
     {\r
         static PopoverDelegateClass cls;\r
-        popoverDelegate = [cls.createInstance() init];\r
+        popoverDelegate.reset ([cls.createInstance() init]);\r
     }\r
 \r
     ~ContentSharerNativeImpl()\r
@@ -104,8 +100,8 @@ private:
             return;\r
         }\r
 \r
-        controller = [[UIActivityViewController alloc] initWithActivityItems: items\r
-                                                       applicationActivities: nil];\r
+        controller.reset ([[UIActivityViewController alloc] initWithActivityItems: items\r
+                                                            applicationActivities: nil]);\r
 \r
         controller.get().excludedActivityTypes = nil;\r
 \r
@@ -167,7 +163,7 @@ private:
             }\r
 \r
             if (auto* parentController = peer->controller)\r
-                [parentController showViewController: controller sender: parentController];\r
+                [parentController showViewController: controller.get() sender: parentController];\r
 \r
             if (peer->view.window != nil)\r
                 peer->view.window.autoresizesSubviews = YES;\r
@@ -198,8 +194,8 @@ private:
 \r
     ContentSharer& owner;\r
     UIViewComponentPeer* peer = nullptr;\r
-    ScopedPointer<UIActivityViewController> controller;\r
-    ScopedPointer<NSObject<UIPopoverPresentationControllerDelegate>> popoverDelegate;\r
+    std::unique_ptr<UIActivityViewController, NSObjectDeleter> controller;\r
+    std::unique_ptr<NSObject<UIPopoverPresentationControllerDelegate>, NSObjectDeleter> popoverDelegate;\r
 \r
     bool succeeded = false;\r
     String errorDescription;\r
index 9d90290955920f47ee1dd21cba4793a494806a5a..8304895483224048350fdacde2eb8dc92e173958 100644 (file)
 namespace juce\r
 {\r
 \r
-//==============================================================================\r
-template <> struct ContainerDeletePolicy<UIDocumentPickerViewController>     { static void destroy (NSObject* o) { [o release]; } };\r
-template <> struct ContainerDeletePolicy<NSObject<UIDocumentPickerDelegate>> { static void destroy (NSObject* o) { [o release]; } };\r
-\r
 class FileChooser::Native    : private Component,\r
                                public FileChooser::Pimpl\r
 {\r
@@ -41,8 +37,8 @@ public:
         String firstFileExtension;\r
 \r
         static FileChooserDelegateClass cls;\r
-        delegate = [cls.createInstance() init];\r
-        FileChooserDelegateClass::setOwner (delegate, this);\r
+        delegate.reset ([cls.createInstance() init]);\r
+        FileChooserDelegateClass::setOwner (delegate.get(), this);\r
 \r
         auto utTypeArray = createNSArrayFromStringArray (getUTTypesForWildcards (owner.filters, firstFileExtension));\r
 \r
@@ -74,18 +70,18 @@ public:
             }\r
 \r
             auto url = [[NSURL alloc] initFileURLWithPath: juceStringToNS (currentFileOrDirectory.getFullPathName())];\r
-            controller = [[UIDocumentPickerViewController alloc] initWithURL: url\r
-                                                                      inMode: pickerMode];\r
+            controller.reset ([[UIDocumentPickerViewController alloc] initWithURL: url\r
+                                                                           inMode: pickerMode]);\r
             [url release];\r
         }\r
         else\r
         {\r
-            controller = [[UIDocumentPickerViewController alloc] initWithDocumentTypes: utTypeArray\r
-                                                                                inMode: UIDocumentPickerModeOpen];\r
+            controller.reset ([[UIDocumentPickerViewController alloc] initWithDocumentTypes: utTypeArray\r
+                                                                                      inMode: UIDocumentPickerModeOpen]);\r
         }\r
 \r
-        [controller setDelegate: delegate];\r
-        [controller setModalTransitionStyle: UIModalTransitionStyleCrossDissolve];\r
+        [controller.get() setDelegate: delegate.get()];\r
+        [controller.get() setModalTransitionStyle: UIModalTransitionStyleCrossDissolve];\r
 \r
         setOpaque (false);\r
 \r
@@ -124,7 +120,7 @@ private:
             peer = newPeer;\r
 \r
             if (auto* parentController = peer->controller)\r
-                [parentController showViewController: controller sender: parentController];\r
+                [parentController showViewController: controller.get() sender: parentController];\r
 \r
             if (peer->view.window != nil)\r
                 peer->view.window.autoresizesSubviews = YES;\r
@@ -296,8 +292,8 @@ private:
 \r
     //==============================================================================\r
     FileChooser& owner;\r
-    ScopedPointer<NSObject<UIDocumentPickerDelegate>> delegate;\r
-    ScopedPointer<UIDocumentPickerViewController> controller;\r
+    std::unique_ptr<NSObject<UIDocumentPickerDelegate>, NSObjectDeleter> delegate;\r
+    std::unique_ptr<UIDocumentPickerViewController,     NSObjectDeleter> controller;\r
     UIViewComponentPeer* peer = nullptr;\r
 \r
     static FileChooserDelegateClass fileChooserDelegateClass;\r
index 2e910821fb0a3d7c7ca6b3b7bb0f267bc1f0058c..dc2499a82d6f2fe6ded42cc528728a7bdab8e40e 100644 (file)
@@ -220,7 +220,6 @@ public:
     JuceUIView* view;\r
     JuceUIViewController* controller;\r
     bool isSharedWindow, fullScreen, insideDrawRect, isAppex;\r
-    static ModifierKeys currentModifiers;\r
 \r
     static int64 getMouseTime (UIEvent* e) noexcept\r
     {\r
@@ -536,18 +535,6 @@ bool KeyPress::isKeyCurrentlyDown (int)
     return false;\r
 }\r
 \r
-ModifierKeys UIViewComponentPeer::currentModifiers;\r
-\r
-ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept\r
-{\r
-    return UIViewComponentPeer::currentModifiers;\r
-}\r
-\r
-void ModifierKeys::updateCurrentModifiers() noexcept\r
-{\r
-    currentModifiers = UIViewComponentPeer::currentModifiers;\r
-}\r
-\r
 Point<float> juce_lastMousePos;\r
 \r
 //==============================================================================\r
@@ -844,15 +831,15 @@ void UIViewComponentPeer::handleTouches (UIEvent* event, const bool isDown, cons
         const int64 time = getMouseTime (event);\r
         const int touchIndex = currentTouches.getIndexOfTouch (this, touch);\r
 \r
-        ModifierKeys modsToSend (currentModifiers);\r
+        ModifierKeys modsToSend (ModifierKeys::currentModifiers);\r
 \r
         if (isDown)\r
         {\r
             if ([touch phase] != UITouchPhaseBegan)\r
                 continue;\r
 \r
-            currentModifiers = currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
-            modsToSend = currentModifiers;\r
+            ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
+            modsToSend = ModifierKeys::currentModifiers;\r
 \r
             // this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before.\r
             handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, modsToSend.withoutMouseButtons(),\r
@@ -876,7 +863,7 @@ void UIViewComponentPeer::handleTouches (UIEvent* event, const bool isDown, cons
         if (isCancel)\r
         {\r
             currentTouches.clearTouch (touchIndex);\r
-            modsToSend = currentModifiers = currentModifiers.withoutMouseButtons();\r
+            modsToSend = ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons();\r
         }\r
 \r
         // NB: some devices return 0 or 1.0 if pressure is unknown, so we'll clip our value to a believable range:\r
index 546f40c71a9a69650d92b00cf0e29d8e7f3de56f..ce7135f2576e459754d3263d8fe8bdaf80468e6c 100644 (file)
@@ -135,7 +135,7 @@ namespace juce
             }\r
         }];\r
 \r
-        MessageManager::callAsync ([self,application,app]  { app->suspended(); });\r
+        MessageManager::callAsync ([app] { app->suspended(); });\r
        #else\r
         ignoreUnused (application);\r
         app->suspended();\r
@@ -536,7 +536,7 @@ public:
 private:\r
     int result;\r
     bool resultReceived;\r
-    ScopedPointer<ModalComponentManager::Callback> callback;\r
+    std::unique_ptr<ModalComponentManager::Callback> callback;\r
     const bool isAsync;\r
 \r
    #if JUCE_USE_NEW_IOS_ALERTWINDOW\r
@@ -601,8 +601,8 @@ bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType
                                                       Component* /*associatedComponent*/,\r
                                                       ModalComponentManager::Callback* callback)\r
 {\r
-    ScopedPointer<iOSMessageBox> mb (new iOSMessageBox (title, message, @"Cancel", @"OK",\r
-                                                        nil, callback, callback != nullptr));\r
+    std::unique_ptr<iOSMessageBox> mb (new iOSMessageBox (title, message, @"Cancel", @"OK",\r
+                                                          nil, callback, callback != nullptr));\r
 \r
     if (callback == nullptr)\r
         return mb->getResult() == 1;\r
@@ -616,7 +616,7 @@ int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconTy
                                                         Component* /*associatedComponent*/,\r
                                                         ModalComponentManager::Callback* callback)\r
 {\r
-    ScopedPointer<iOSMessageBox> mb (new iOSMessageBox (title, message, @"Cancel", @"Yes", @"No", callback, callback != nullptr));\r
+    std::unique_ptr<iOSMessageBox> mb (new iOSMessageBox (title, message, @"Cancel", @"Yes", @"No", callback, callback != nullptr));\r
 \r
     if (callback == nullptr)\r
         return mb->getResult();\r
@@ -630,7 +630,7 @@ int JUCE_CALLTYPE NativeMessageBox::showYesNoBox (AlertWindow::AlertIconType /*i
                                                   Component* /*associatedComponent*/,\r
                                                   ModalComponentManager::Callback* callback)\r
 {\r
-    ScopedPointer<iOSMessageBox> mb (new iOSMessageBox (title, message, @"No", @"Yes", nil, callback, callback != nullptr));\r
+    std::unique_ptr<iOSMessageBox> mb (new iOSMessageBox (title, message, @"No", @"Yes", nil, callback, callback != nullptr));\r
 \r
     if (callback == nullptr)\r
         return mb->getResult();\r
index 6a5975e45580bc4e1955d6c83a21595bc44a391b..d6dc752ffdf5835e8fe725dcf7f094e3ff76c0ab 100644 (file)
@@ -1169,14 +1169,16 @@ private:
             {\r
                 XRandrWrapper& xrandr = XRandrWrapper::getInstance();\r
 \r
-                ScopedPointer<XRRScreenResources> screens;\r
+                std::unique_ptr<XRRScreenResources> screens;\r
 \r
                 const int numMonitors = ScreenCount (display);\r
                 RROutput mainDisplay = xrandr.getOutputPrimary (display, RootWindow (display, 0));\r
 \r
                 for (int i = 0; i < numMonitors; ++i)\r
                 {\r
-                    if ((screens = xrandr.getScreenResources (display, RootWindow (display, i))).get())\r
+                    screens.reset (xrandr.getScreenResources (display, RootWindow (display, i)));\r
+\r
+                    if (screens != nullptr)\r
                     {\r
                         for (int j = 0; j < screens->noutput; ++j)\r
                         {\r
@@ -1188,16 +1190,16 @@ private:
                             if (! mainDisplay)\r
                                 mainDisplay = screens->outputs[j];\r
 \r
-                            ScopedPointer<XRROutputInfo> output;\r
+                            std::unique_ptr<XRROutputInfo> output (xrandr.getOutputInfo (display, screens.get(), screens->outputs[j]));\r
 \r
-                            if ((output = xrandr.getOutputInfo (display, screens.get(), screens->outputs[j])).get())\r
+                            if (output != nullptr)\r
                             {\r
                                 if (! output->crtc)\r
                                     continue;\r
 \r
-                                ScopedPointer<XRRCrtcInfo> crtc;\r
+                                std::unique_ptr<XRRCrtcInfo> crtc (xrandr.getCrtcInfo (display, screens.get(), output->crtc));\r
 \r
-                                if ((crtc = xrandr.getCrtcInfo (display, screens.get(), output->crtc)).get())\r
+                                if (crtc != nullptr)\r
                                 {\r
                                     ExtendedInfo e;\r
                                     e.totalBounds = Rectangle<int> (crtc->x, crtc->y,\r
@@ -1471,9 +1473,9 @@ public:
 \r
         display = XWindowSystem::getInstance()->displayRef();\r
 \r
-        atoms = new Atoms (display);\r
-        dragState = new DragState (display);\r
-        repainter = new LinuxRepaintManager (*this, display);\r
+        atoms.reset (new Atoms (display));\r
+        dragState.reset (new DragState (display));\r
+        repainter.reset (new LinuxRepaintManager (*this, display));\r
 \r
         if (isAlwaysOnTop)\r
             ++numAlwaysOnTopPeers;\r
@@ -1481,6 +1483,33 @@ public:
         createWindow (parentToAddTo);\r
 \r
         setTitle (component.getName());\r
+\r
+        getNativeRealtimeModifiers = []\r
+        {\r
+            ScopedXDisplay xDisplay;\r
+\r
+            if (auto display = xDisplay.display)\r
+            {\r
+                Window root, child;\r
+                int x, y, winx, winy;\r
+                unsigned int mask;\r
+                int mouseMods = 0;\r
+\r
+                ScopedXLock xlock (display);\r
+\r
+                if (XQueryPointer (display, RootWindow (display, DefaultScreen (display)),\r
+                                   &root, &child, &x, &y, &winx, &winy, &mask) != False)\r
+                {\r
+                    if ((mask & Button1Mask) != 0)  mouseMods |= ModifierKeys::leftButtonModifier;\r
+                    if ((mask & Button2Mask) != 0)  mouseMods |= ModifierKeys::middleButtonModifier;\r
+                    if ((mask & Button3Mask) != 0)  mouseMods |= ModifierKeys::rightButtonModifier;\r
+                }\r
+\r
+                ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (mouseMods);\r
+            }\r
+\r
+            return ModifierKeys::currentModifiers;\r
+        };\r
     }\r
 \r
     ~LinuxComponentPeer()\r
@@ -2032,7 +2061,7 @@ public:
 \r
     void handleKeyPressEvent (XKeyEvent& keyEvent)\r
     {\r
-        auto oldMods = currentModifiers;\r
+        auto oldMods = ModifierKeys::currentModifiers;\r
 \r
         char utf8 [64] = { 0 };\r
         juce_wchar unicodeChar = 0;\r
@@ -2055,7 +2084,7 @@ public:
             keyCode = (int) unicodeChar;\r
 \r
             if (keyCode < 0x20)\r
-                keyCode = (int) XkbKeycodeToKeysym (display, (::KeyCode) keyEvent.keycode, 0, currentModifiers.isShiftDown() ? 1 : 0);\r
+                keyCode = (int) XkbKeycodeToKeysym (display, (::KeyCode) keyEvent.keycode, 0, ModifierKeys::currentModifiers.isShiftDown() ? 1 : 0);\r
 \r
             keyDownChange = (sym != NoSymbol) && ! updateKeyModifiersFromSym (sym, true);\r
         }\r
@@ -2139,7 +2168,7 @@ public:
         if (utf8[0] != 0 || ((sym & 0xff00) == 0 && sym >= 8))\r
             keyPressed = true;\r
 \r
-        if (oldMods != currentModifiers)\r
+        if (oldMods != ModifierKeys::currentModifiers)\r
             handleModifierKeysChange();\r
 \r
         if (keyDownChange)\r
@@ -2177,10 +2206,10 @@ public:
                 sym = XkbKeycodeToKeysym (display, (::KeyCode) keyEvent.keycode, 0, 0);\r
             }\r
 \r
-            auto oldMods = currentModifiers;\r
+            auto oldMods = ModifierKeys::currentModifiers;\r
             const bool keyDownChange = (sym != NoSymbol) && ! updateKeyModifiersFromSym (sym, false);\r
 \r
-            if (oldMods != currentModifiers)\r
+            if (oldMods != ModifierKeys::currentModifiers)\r
                 handleModifierKeysChange();\r
 \r
             if (keyDownChange)\r
@@ -2209,9 +2238,9 @@ public:
 \r
     void handleButtonPressEvent (const XButtonPressedEvent& buttonPressEvent, int buttonModifierFlag)\r
     {\r
-        currentModifiers = currentModifiers.withFlags (buttonModifierFlag);\r
+        ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withFlags (buttonModifierFlag);\r
         toFront (true);\r
-        handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (buttonPressEvent), currentModifiers,\r
+        handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (buttonPressEvent), ModifierKeys::currentModifiers,\r
                           MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, getEventTime (buttonPressEvent), {});\r
     }\r
 \r
@@ -2250,9 +2279,9 @@ public:
         {\r
             switch (pointerMap[mapIndex])\r
             {\r
-                case Keys::LeftButton:      currentModifiers = currentModifiers.withoutFlags (ModifierKeys::leftButtonModifier); break;\r
-                case Keys::RightButton:     currentModifiers = currentModifiers.withoutFlags (ModifierKeys::rightButtonModifier); break;\r
-                case Keys::MiddleButton:    currentModifiers = currentModifiers.withoutFlags (ModifierKeys::middleButtonModifier); break;\r
+                case Keys::LeftButton:      ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutFlags (ModifierKeys::leftButtonModifier); break;\r
+                case Keys::RightButton:     ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutFlags (ModifierKeys::rightButtonModifier); break;\r
+                case Keys::MiddleButton:    ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutFlags (ModifierKeys::middleButtonModifier); break;\r
                 default: break;\r
             }\r
         }\r
@@ -2260,7 +2289,7 @@ public:
         if (dragState->dragging)\r
             handleExternalDragButtonReleaseEvent();\r
 \r
-        handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (buttonRelEvent), currentModifiers,\r
+        handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (buttonRelEvent), ModifierKeys::currentModifiers,\r
                           MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, getEventTime (buttonRelEvent));\r
 \r
         clearLastMousePos();\r
@@ -2275,7 +2304,7 @@ public:
         if (dragState->dragging)\r
             handleExternalDragMotionNotify();\r
 \r
-        handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (movedEvent), currentModifiers,\r
+        handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (movedEvent), ModifierKeys::currentModifiers,\r
                           MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, getEventTime (movedEvent));\r
     }\r
 \r
@@ -2286,10 +2315,10 @@ public:
 \r
         clearLastMousePos();\r
 \r
-        if (! currentModifiers.isAnyMouseButtonDown())\r
+        if (! ModifierKeys::currentModifiers.isAnyMouseButtonDown())\r
         {\r
             updateKeyModifiers ((int) enterEvent.state);\r
-            handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (enterEvent), currentModifiers,\r
+            handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (enterEvent), ModifierKeys::currentModifiers,\r
                               MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, getEventTime (enterEvent));\r
         }\r
     }\r
@@ -2299,11 +2328,11 @@ public:
         // Suppress the normal leave if we've got a pointer grab, or if\r
         // it's a bogus one caused by clicking a mouse button when running\r
         // in a Window manager\r
-        if (((! currentModifiers.isAnyMouseButtonDown()) && leaveEvent.mode == NotifyNormal)\r
+        if (((! ModifierKeys::currentModifiers.isAnyMouseButtonDown()) && leaveEvent.mode == NotifyNormal)\r
              || leaveEvent.mode == NotifyUngrab)\r
         {\r
             updateKeyModifiers ((int) leaveEvent.state);\r
-            handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (leaveEvent), currentModifiers,\r
+            handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (leaveEvent), ModifierKeys::currentModifiers,\r
                               MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, getEventTime (leaveEvent));\r
         }\r
     }\r
@@ -2592,8 +2621,6 @@ public:
 \r
     //==============================================================================\r
     bool dontRepaint;\r
-\r
-    static ModifierKeys currentModifiers;\r
     static bool isActiveApplication;\r
 \r
 private:\r
@@ -2689,8 +2716,8 @@ private:
                         image.clear (i - totalArea.getPosition());\r
 \r
                 {\r
-                    ScopedPointer<LowLevelGraphicsContext> context (peer.getComponent().getLookAndFeel()\r
-                                                                      .createGraphicsContext (image, -totalArea.getPosition(), adjustedList));\r
+                    std::unique_ptr<LowLevelGraphicsContext> context (peer.getComponent().getLookAndFeel()\r
+                                                                          .createGraphicsContext (image, -totalArea.getPosition(), adjustedList));\r
                     context->addTransform (AffineTransform::scale ((float) peer.currentScaleFactor));\r
                     peer.handlePaint (*context);\r
                 }\r
@@ -2737,8 +2764,8 @@ private:
         JUCE_DECLARE_NON_COPYABLE (LinuxRepaintManager)\r
     };\r
 \r
-    ScopedPointer<Atoms> atoms;\r
-    ScopedPointer<LinuxRepaintManager> repainter;\r
+    std::unique_ptr<Atoms> atoms;\r
+    std::unique_ptr<LinuxRepaintManager> repainter;\r
 \r
     friend class LinuxRepaintManager;\r
     Window windowH = {}, parentWindow = {}, keyProxy = {};\r
@@ -2782,7 +2809,7 @@ private:
         if ((status & ControlMask) != 0)   keyMods |= ModifierKeys::ctrlModifier;\r
         if ((status & Keys::AltMask) != 0) keyMods |= ModifierKeys::altModifier;\r
 \r
-        currentModifiers = currentModifiers.withOnlyMouseButtons().withFlags (keyMods);\r
+        ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withOnlyMouseButtons().withFlags (keyMods);\r
 \r
         Keys::numLock  = ((status & Keys::NumLockMask) != 0);\r
         Keys::capsLock = ((status & LockMask) != 0);\r
@@ -2824,8 +2851,8 @@ private:
                 break;\r
         }\r
 \r
-        currentModifiers = press ? currentModifiers.withFlags (modifier)\r
-                                 currentModifiers.withoutFlags (modifier);\r
+        ModifierKeys::currentModifiers = press ? ModifierKeys::currentModifiers.withFlags (modifier)\r
+                                               : ModifierKeys::currentModifiers.withoutFlags (modifier);\r
 \r
         return isModifier;\r
     }\r
@@ -3216,7 +3243,7 @@ private:
 \r
     void resetExternalDragState()\r
     {\r
-        dragState = new DragState (display);\r
+        dragState.reset (new DragState (display));\r
     }\r
 \r
     void sendDragAndDropMessage (XClientMessageEvent& msg)\r
@@ -3685,7 +3712,7 @@ private:
         resetExternalDragState();\r
     }\r
 \r
-    ScopedPointer<DragState> dragState;\r
+    std::unique_ptr<DragState> dragState;\r
     DragInfo dragInfo;\r
     Atom dragAndDropCurrentMimeType;\r
     Window dragAndDropSourceWindow;\r
@@ -3729,7 +3756,6 @@ private:
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LinuxComponentPeer)\r
 };\r
 \r
-ModifierKeys LinuxComponentPeer::currentModifiers;\r
 bool LinuxComponentPeer::isActiveApplication = false;\r
 Point<int> LinuxComponentPeer::lastMousePos;\r
 ::Display* LinuxComponentPeer::display = nullptr;\r
@@ -3777,40 +3803,6 @@ JUCE_API bool JUCE_CALLTYPE Process::isForegroundProcess()
 JUCE_API void JUCE_CALLTYPE Process::makeForegroundProcess() {}\r
 JUCE_API void JUCE_CALLTYPE Process::hide() {}\r
 \r
-//==============================================================================\r
-void ModifierKeys::updateCurrentModifiers() noexcept\r
-{\r
-    currentModifiers = LinuxComponentPeer::currentModifiers;\r
-}\r
-\r
-ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept\r
-{\r
-    ScopedXDisplay xDisplay;\r
-\r
-    if (auto display = xDisplay.display)\r
-    {\r
-        Window root, child;\r
-        int x, y, winx, winy;\r
-        unsigned int mask;\r
-        int mouseMods = 0;\r
-\r
-        ScopedXLock xlock (display);\r
-\r
-        if (XQueryPointer (display, RootWindow (display, DefaultScreen (display)),\r
-                           &root, &child, &x, &y, &winx, &winy, &mask) != False)\r
-        {\r
-            if ((mask & Button1Mask) != 0)  mouseMods |= ModifierKeys::leftButtonModifier;\r
-            if ((mask & Button2Mask) != 0)  mouseMods |= ModifierKeys::middleButtonModifier;\r
-            if ((mask & Button3Mask) != 0)  mouseMods |= ModifierKeys::rightButtonModifier;\r
-        }\r
-\r
-        LinuxComponentPeer::currentModifiers = LinuxComponentPeer::currentModifiers.withoutMouseButtons().withFlags (mouseMods);\r
-    }\r
-\r
-    return LinuxComponentPeer::currentModifiers;\r
-}\r
-\r
-\r
 //==============================================================================\r
 void Desktop::setKioskComponent (Component* comp, bool enableOrDisable, bool /* allowMenusAndBars */)\r
 {\r
index 853687b8baebdafeff911f4e8971bd3e46b6a063..3fcc32eed829aa94ca06e66d2a8d1ffd6c02f21c 100644 (file)
@@ -56,8 +56,6 @@ static NSMutableArray* createAllowedTypesArray (const StringArray& filters)
 }\r
 \r
 //==============================================================================\r
-template <> struct ContainerDeletePolicy<NSSavePanel>    { static void destroy (NSObject* o) { [o release]; } };\r
-\r
 class FileChooser::Native     : public Component,\r
                                 public FileChooser::Pimpl\r
 {\r
@@ -174,7 +172,7 @@ public:
 \r
     void runModally() override\r
     {\r
-        ScopedPointer<TemporaryMainMenuWithStandardCommands> tempMenu;\r
+        std::unique_ptr<TemporaryMainMenuWithStandardCommands> tempMenu;\r
 \r
         if (JUCEApplicationBase::isStandaloneApp())\r
             tempMenu.reset (new TemporaryMainMenuWithStandardCommands());\r
@@ -184,7 +182,7 @@ public:
         auto result = [panel runModal];\r
        #else\r
         auto result = [panel runModalForDirectory: juceStringToNS (startingDirectory)\r
-                                              file: juceStringToNS (filename)];\r
+                                             file: juceStringToNS (filename)];\r
        #endif\r
 \r
         finished (result);\r
index 662e55e1a8bbedb14f288f7b4950c2ac86cbf98c..c41fe5b30adeb8ddbf614de00d22d023c0b2b5df 100644 (file)
@@ -345,7 +345,7 @@ public:
     static JuceMainMenuHandler* instance;\r
 \r
     MenuBarModel* currentModel = nullptr;\r
-    ScopedPointer<PopupMenu> extraAppleMenuItems;\r
+    std::unique_ptr<PopupMenu> extraAppleMenuItems;\r
     uint32 lastUpdateTime = 0;\r
     NSObject* callback = nil;\r
     String recentItemsMenuName;\r
@@ -403,7 +403,7 @@ private:
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (RecentFilesMenuItem)\r
     };\r
 \r
-    ScopedPointer<RecentFilesMenuItem> recent;\r
+    std::unique_ptr<RecentFilesMenuItem> recent;\r
 \r
     //==============================================================================\r
     static NSMenuItem* findMenuItemWithCommandID (NSMenu* const menu, int commandID)\r
@@ -625,7 +625,7 @@ public:
 \r
 private:\r
     MenuBarModel* const oldMenu;\r
-    ScopedPointer<PopupMenu> oldAppleMenu;\r
+    std::unique_ptr<PopupMenu> oldAppleMenu;\r
     String oldRecentItems;\r
     NSInteger editMenuIndex;\r
 \r
index 1d2e91531e1997485f276e3487102b7dc434e24e..520cb77b8069ec11d582dcc32af48f5f61b013c9 100644 (file)
@@ -175,6 +175,16 @@ public:
             setAlpha (alpha);\r
 \r
         setTitle (component.getName());\r
+\r
+        getNativeRealtimeModifiers = []\r
+        {\r
+           #if defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6\r
+            if ([NSEvent respondsToSelector: @selector (modifierFlags)])\r
+                NSViewComponentPeer::updateModifiers ([NSEvent modifierFlags]);\r
+           #endif\r
+\r
+            return ModifierKeys::currentModifiers;\r
+        };\r
     }\r
 \r
     ~NSViewComponentPeer()\r
@@ -569,26 +579,26 @@ public:
         if (! Process::isForegroundProcess())\r
             Process::makeForegroundProcess();\r
 \r
-        currentModifiers = currentModifiers.withFlags (getModifierForButtonNumber ([ev buttonNumber]));\r
+        ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withFlags (getModifierForButtonNumber ([ev buttonNumber]));\r
         sendMouseEvent (ev);\r
     }\r
 \r
     void redirectMouseUp (NSEvent* ev)\r
     {\r
-        currentModifiers = currentModifiers.withoutFlags (getModifierForButtonNumber ([ev buttonNumber]));\r
+        ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutFlags (getModifierForButtonNumber ([ev buttonNumber]));\r
         sendMouseEvent (ev);\r
         showArrowCursorIfNeeded();\r
     }\r
 \r
     void redirectMouseDrag (NSEvent* ev)\r
     {\r
-        currentModifiers = currentModifiers.withFlags (getModifierForButtonNumber ([ev buttonNumber]));\r
+        ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withFlags (getModifierForButtonNumber ([ev buttonNumber]));\r
         sendMouseEvent (ev);\r
     }\r
 \r
     void redirectMouseMove (NSEvent* ev)\r
     {\r
-        currentModifiers = currentModifiers.withoutMouseButtons();\r
+        ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons();\r
 \r
         NSPoint windowPos = [ev locationInWindow];\r
 \r
@@ -602,7 +612,7 @@ public:
             sendMouseEvent (ev);\r
         else\r
             // moved into another window which overlaps this one, so trigger an exit\r
-            handleMouseEvent (MouseInputSource::InputSourceType::mouse, { -1.0f, -1.0f }, currentModifiers,\r
+            handleMouseEvent (MouseInputSource::InputSourceType::mouse, { -1.0f, -1.0f }, ModifierKeys::currentModifiers,\r
                               getMousePressure (ev), MouseInputSource::invalidOrientation, getMouseTime (ev));\r
 \r
         showArrowCursorIfNeeded();\r
@@ -611,13 +621,13 @@ public:
     void redirectMouseEnter (NSEvent* ev)\r
     {\r
         Desktop::getInstance().getMainMouseSource().forceMouseCursorUpdate();\r
-        currentModifiers = currentModifiers.withoutMouseButtons();\r
+        ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons();\r
         sendMouseEvent (ev);\r
     }\r
 \r
     void redirectMouseExit (NSEvent* ev)\r
     {\r
-        currentModifiers = currentModifiers.withoutMouseButtons();\r
+        ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons();\r
         sendMouseEvent (ev);\r
     }\r
 \r
@@ -706,7 +716,7 @@ public:
     void sendMouseEvent (NSEvent* ev)\r
     {\r
         updateModifiers (ev);\r
-        handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (ev, view), currentModifiers,\r
+        handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (ev, view), ModifierKeys::currentModifiers,\r
                           getMousePressure (ev), MouseInputSource::invalidOrientation, getMouseTime (ev));\r
     }\r
 \r
@@ -889,8 +899,8 @@ public:
                     if (intScale != 1)\r
                         clip.scaleAll (intScale);\r
 \r
-                    ScopedPointer<LowLevelGraphicsContext> context (component.getLookAndFeel()\r
-                                                                      .createGraphicsContext (temp, offset * intScale, clip));\r
+                    std::unique_ptr<LowLevelGraphicsContext> context (component.getLookAndFeel()\r
+                                                                        .createGraphicsContext (temp, offset * intScale, clip));\r
 \r
                     if (intScale != 1)\r
                         context->addTransform (AffineTransform::scale (displayScale));\r
@@ -1118,7 +1128,7 @@ public:
         if ((flags & NSEventModifierFlagOption) != 0)       m |= ModifierKeys::altModifier;\r
         if ((flags & NSEventModifierFlagCommand) != 0)      m |= ModifierKeys::commandModifier;\r
 \r
-        currentModifiers = currentModifiers.withOnlyMouseButtons().withFlags (m);\r
+        ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withOnlyMouseButtons().withFlags (m);\r
     }\r
 \r
     static void updateKeysDown (NSEvent* ev, bool isKeyDown)\r
@@ -1388,7 +1398,6 @@ public:
     RectangleList<float> deferredRepaints;\r
     uint32 lastRepaintTime;\r
 \r
-    static ModifierKeys currentModifiers;\r
     static ComponentPeer* currentlyFocusedPeer;\r
     static Array<int> keysCurrentlyDown;\r
     static int insideToFrontCall;\r
@@ -2042,7 +2051,6 @@ NSWindow* NSViewComponentPeer::createWindowInstance()
 \r
 \r
 //==============================================================================\r
-ModifierKeys NSViewComponentPeer::currentModifiers;\r
 ComponentPeer* NSViewComponentPeer::currentlyFocusedPeer = nullptr;\r
 Array<int> NSViewComponentPeer::keysCurrentlyDown;\r
 \r
@@ -2063,23 +2071,6 @@ bool KeyPress::isKeyCurrentlyDown (int keyCode)
     return false;\r
 }\r
 \r
-\r
-ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept\r
-{\r
-   #if defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6\r
-    if ([NSEvent respondsToSelector: @selector (modifierFlags)])\r
-        NSViewComponentPeer::updateModifiers ((NSUInteger) [NSEvent modifierFlags]);\r
-   #endif\r
-\r
-    return NSViewComponentPeer::currentModifiers;\r
-}\r
-\r
-void ModifierKeys::updateCurrentModifiers() noexcept\r
-{\r
-    currentModifiers = NSViewComponentPeer::currentModifiers;\r
-}\r
-\r
-\r
 //==============================================================================\r
 bool MouseInputSource::SourceList::addSource()\r
 {\r
index b33d736effe1336ec6f91e7f560c213cd0cdfd02..dc77f04c12417a83ab20580aa94e2691dcba0415 100644 (file)
@@ -60,8 +60,8 @@ public:
                      ModalComponentManager::Callback* callback, const char* b1, const char* b2, const char* b3,\r
                      bool runAsync)\r
     {\r
-        ScopedPointer<OSXMessageBox> mb (new OSXMessageBox (iconType, title, message, b1, b2, b3,\r
-                                                            callback, runAsync));\r
+        std::unique_ptr<OSXMessageBox> mb (new OSXMessageBox (iconType, title, message, b1, b2, b3,\r
+                                                              callback, runAsync));\r
         if (! runAsync)\r
             return mb->getResult();\r
 \r
@@ -72,7 +72,7 @@ public:
 private:\r
     AlertWindow::AlertIconType iconType;\r
     String title, message;\r
-    ScopedPointer<ModalComponentManager::Callback> callback;\r
+    std::unique_ptr<ModalComponentManager::Callback> callback;\r
     const char* button1;\r
     const char* button2;\r
     const char* button3;\r
@@ -392,7 +392,7 @@ public:
         IOPMAssertionID assertionID;\r
     };\r
 \r
-    ScopedPointer<PMAssertion> assertion;\r
+    std::unique_ptr<PMAssertion> assertion;\r
    #else\r
     ScreenSaverDefeater()\r
     {\r
@@ -408,7 +408,7 @@ public:
    #endif\r
 };\r
 \r
-static ScopedPointer<ScreenSaverDefeater> screenSaverDefeater;\r
+static std::unique_ptr<ScreenSaverDefeater> screenSaverDefeater;\r
 \r
 void Desktop::setScreenSaverEnabled (const bool isEnabled)\r
 {\r
index 281e876111596ee4f77bc2211b37703dda85f186..dea82eb6b93896daa746e86a8f961a6b665e1f4f 100644 (file)
@@ -39,7 +39,7 @@ class Win32NativeFileChooser  : public ReferenceCountedObject,
                                 private Thread\r
 {\r
 public:\r
-    typedef ReferenceCountedObjectPtr<Win32NativeFileChooser> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<Win32NativeFileChooser>;\r
 \r
     enum { charsAvailableForResult = 32768 };\r
 \r
@@ -74,7 +74,7 @@ public:
         if (! selectsDirectories)\r
         {\r
             if (previewComp != nullptr)\r
-                customComponent = new CustomComponentHolder (previewComp);\r
+                customComponent.reset (new CustomComponentHolder (previewComp));\r
 \r
             setupFilters();\r
         }\r
@@ -153,7 +153,7 @@ private:
     //==============================================================================\r
     Component::SafePointer<Component> owner;\r
     String title, filtersString;\r
-    ScopedPointer<CustomComponentHolder> customComponent;\r
+    std::unique_ptr<CustomComponentHolder> customComponent;\r
     String initialPath, returnedString, defaultExtension;\r
 \r
     WaitableEvent threadHasReference;\r
@@ -357,7 +357,7 @@ private:
 \r
             if (customComponent)\r
             {\r
-                Component::SafePointer<Component> custom (customComponent);\r
+                Component::SafePointer<Component> custom (customComponent.get());\r
 \r
                 RECT r, cr;\r
                 GetWindowRect (hdlg, &r);\r
index 87515e116dfa38b164dda41d6325f1ad71938bd0..84bb8ce84cd868799dd6d18810d00b4ebc161955 100644 (file)
@@ -1003,7 +1003,7 @@ public:
         if ((windowStyleFlags & windowHasDropShadow) != 0\r
              && ((! hasTitleBar()) || SystemStats::getOperatingSystemType() < SystemStats::WinVista))\r
         {\r
-            shadower = component.getLookAndFeel().createDropShadowerForComponent (&component);\r
+            shadower.reset (component.getLookAndFeel().createDropShadowerForComponent (&component));\r
 \r
             if (shadower != nullptr)\r
                 shadower->setOwner (&component);\r
@@ -1011,6 +1011,20 @@ public:
 \r
         // make sure that the on-screen keyboard code is loaded\r
         OnScreenKeyboard::getInstance();\r
+\r
+        getNativeRealtimeModifiers = []\r
+        {\r
+            HWNDComponentPeer::updateKeyModifiers();\r
+\r
+            int mouseMods = 0;\r
+            if (HWNDComponentPeer::isKeyDown (VK_LBUTTON))  mouseMods |= ModifierKeys::leftButtonModifier;\r
+            if (HWNDComponentPeer::isKeyDown (VK_RBUTTON))  mouseMods |= ModifierKeys::rightButtonModifier;\r
+            if (HWNDComponentPeer::isKeyDown (VK_MBUTTON))  mouseMods |= ModifierKeys::middleButtonModifier;\r
+\r
+            ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (mouseMods);\r
+\r
+            return ModifierKeys::currentModifiers;\r
+        };\r
     }\r
 \r
     ~HWNDComponentPeer()\r
@@ -1389,7 +1403,7 @@ public:
             keyMods = (keyMods & ~ModifierKeys::ctrlModifier) | ModifierKeys::altModifier;\r
         }\r
 \r
-        currentModifiers = currentModifiers.withOnlyMouseButtons().withFlags (keyMods);\r
+        ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withOnlyMouseButtons().withFlags (keyMods);\r
     }\r
 \r
     static void updateModifiersFromWParam (const WPARAM wParam)\r
@@ -1399,14 +1413,12 @@ public:
         if (wParam & MK_RBUTTON)   mouseMods |= ModifierKeys::rightButtonModifier;\r
         if (wParam & MK_MBUTTON)   mouseMods |= ModifierKeys::middleButtonModifier;\r
 \r
-        currentModifiers = currentModifiers.withoutMouseButtons().withFlags (mouseMods);\r
+        ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (mouseMods);\r
         updateKeyModifiers();\r
     }\r
 \r
     //==============================================================================\r
     bool dontRepaint;\r
-\r
-    static ModifierKeys currentModifiers;\r
     static ModifierKeys modifiersAtLastCallback;\r
 \r
     //==============================================================================\r
@@ -1564,10 +1576,10 @@ public:
 \r
 private:\r
     HWND hwnd, parentToAddTo;\r
-    ScopedPointer<DropShadower> shadower;\r
+    std::unique_ptr<DropShadower> shadower;\r
     RenderingEngineType currentRenderingEngine;\r
    #if JUCE_DIRECT2D\r
-    ScopedPointer<Direct2DLowLevelGraphicsContext> direct2DContext;\r
+    std::unique_ptr<Direct2DLowLevelGraphicsContext> direct2DContext;\r
    #endif\r
     uint32 lastPaintTime = 0;\r
     ULONGLONG lastMagnifySize = 0;\r
@@ -2079,7 +2091,7 @@ private:
                         offscreenImage.clear (i);\r
 \r
                 {\r
-                    ScopedPointer<LowLevelGraphicsContext> context (component.getLookAndFeel()\r
+                    std::unique_ptr<LowLevelGraphicsContext> context (component.getLookAndFeel()\r
                                                                         .createGraphicsContext (offscreenImage, Point<int> (-x, -y), contextClip));\r
                     handlePaint (*context);\r
                 }\r
@@ -2094,7 +2106,7 @@ private:
     }\r
 \r
     //==============================================================================\r
-    void doMouseEvent (Point<float> position, float pressure, float orientation = 0.0f, ModifierKeys mods = currentModifiers)\r
+    void doMouseEvent (Point<float> position, float pressure, float orientation = 0.0f, ModifierKeys mods = ModifierKeys::currentModifiers)\r
     {\r
         handleMouseEvent (MouseInputSource::InputSourceType::mouse, position, mods, pressure, orientation, getMouseEventTime());\r
     }\r
@@ -2119,7 +2131,7 @@ private:
         if (currentRenderingEngine != direct2DRenderingEngine)\r
             direct2DContext = nullptr;\r
         else if (direct2DContext == nullptr)\r
-            direct2DContext = new Direct2DLowLevelGraphicsContext (hwnd);\r
+            direct2DContext.reset (new Direct2DLowLevelGraphicsContext (hwnd));\r
     }\r
    #endif\r
 \r
@@ -2169,7 +2181,7 @@ private:
 \r
     void doMouseMove (Point<float> position, bool isMouseDownEvent)\r
     {\r
-        ModifierKeys modsToSend (currentModifiers);\r
+        ModifierKeys modsToSend (ModifierKeys::currentModifiers);\r
 \r
         // this will be handled by WM_TOUCH\r
         if (isTouchEvent() || areOtherTouchSourcesActive())\r
@@ -2182,14 +2194,14 @@ private:
             // This avoids a rare stuck-button problem when focus is lost unexpectedly, but must\r
             // not be called as part of a move, in case it's actually a mouse-drag from another\r
             // app which ends up here when we get focus before the mouse is released..\r
-            if (isMouseDownEvent)\r
-                ModifierKeys::getCurrentModifiersRealtime();\r
+            if (isMouseDownEvent && getNativeRealtimeModifiers != nullptr)\r
+                getNativeRealtimeModifiers();\r
 \r
             updateKeyModifiers();\r
 \r
            #if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client\r
             if (modProvider != nullptr)\r
-                currentModifiers = currentModifiers.withFlags (modProvider->getWin32Modifiers());\r
+                ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withFlags (modProvider->getWin32Modifiers());\r
            #endif\r
 \r
             TRACKMOUSEEVENT tme;\r
@@ -2241,7 +2253,7 @@ private:
 \r
           #if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client\r
             if (modProvider != nullptr)\r
-                currentModifiers = currentModifiers.withFlags (modProvider->getWin32Modifiers());\r
+                ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withFlags (modProvider->getWin32Modifiers());\r
           #endif\r
 \r
             isDragging = true;\r
@@ -2260,7 +2272,7 @@ private:
 \r
        #if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client\r
         if (modProvider != nullptr)\r
-            currentModifiers = currentModifiers.withFlags (modProvider->getWin32Modifiers());\r
+            ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withFlags (modProvider->getWin32Modifiers());\r
        #endif\r
 \r
         const bool wasDragging = isDragging;\r
@@ -2421,12 +2433,12 @@ private:
         const auto time = getMouseEventTime();\r
         const auto pos = globalToLocal ({ touch.x / 100.0f, touch.y / 100.0f });\r
         const auto pressure = touchPressure;\r
-        auto modsToSend = currentModifiers;\r
+        auto modsToSend = ModifierKeys::currentModifiers;\r
 \r
         if (isDown)\r
         {\r
-            currentModifiers = currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
-            modsToSend = currentModifiers;\r
+            ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
+            modsToSend = ModifierKeys::currentModifiers;\r
 \r
             // this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before.\r
             handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, modsToSend.withoutMouseButtons(),\r
@@ -2438,7 +2450,7 @@ private:
         else if (isUp)\r
         {\r
             modsToSend = modsToSend.withoutMouseButtons();\r
-            currentModifiers = modsToSend;\r
+            ModifierKeys::currentModifiers = modsToSend;\r
             currentTouches.clearTouch (touchIndex);\r
 \r
             if (! currentTouches.areAnyTouchesActive())\r
@@ -2446,7 +2458,7 @@ private:
         }\r
         else\r
         {\r
-            modsToSend = currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
+            modsToSend = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
         }\r
 \r
         handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, modsToSend,\r
@@ -2457,7 +2469,7 @@ private:
 \r
         if (isUp)\r
         {\r
-            handleMouseEvent (MouseInputSource::InputSourceType::touch, { -10.0f, -10.0f }, currentModifiers.withoutMouseButtons(),\r
+            handleMouseEvent (MouseInputSource::InputSourceType::touch, { -10.0f, -10.0f }, ModifierKeys::currentModifiers.withoutMouseButtons(),\r
                               pressure, orientation, time, {}, touchIndex);\r
 \r
             if (! isValidPeer (this))\r
@@ -2466,7 +2478,7 @@ private:
             if (isCancel)\r
             {\r
                 currentTouches.clear();\r
-                currentModifiers = currentModifiers.withoutMouseButtons();\r
+                ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons();\r
             }\r
         }\r
 \r
@@ -2530,7 +2542,7 @@ private:
     bool handlePenInput (POINTER_PEN_INFO penInfo, Point<float> pos, const float pressure, bool isDown, bool isUp)\r
     {\r
         const auto time = getMouseEventTime();\r
-        ModifierKeys modsToSend (currentModifiers);\r
+        ModifierKeys modsToSend (ModifierKeys::currentModifiers);\r
         PenDetails penDetails;\r
 \r
         penDetails.rotation = (penInfo.penMask & PEN_MASK_ROTATION) ? degreesToRadians (static_cast<float> (penInfo.rotation)) : MouseInputSource::invalidRotation;\r
@@ -2540,13 +2552,13 @@ private:
         auto pInfoFlags = penInfo.pointerInfo.pointerFlags;\r
 \r
         if ((pInfoFlags & POINTER_FLAG_FIRSTBUTTON) != 0)\r
-            currentModifiers = currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
+            ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
         else if ((pInfoFlags & POINTER_FLAG_SECONDBUTTON) != 0)\r
-            currentModifiers = currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::rightButtonModifier);\r
+            ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::rightButtonModifier);\r
 \r
         if (isDown)\r
         {\r
-            modsToSend = currentModifiers;\r
+            modsToSend = ModifierKeys::currentModifiers;\r
 \r
             // this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before.\r
             handleMouseEvent (MouseInputSource::InputSourceType::pen, pos, modsToSend.withoutMouseButtons(),\r
@@ -2558,7 +2570,7 @@ private:
         else if (isUp || ! (pInfoFlags & POINTER_FLAG_INCONTACT))\r
         {\r
             modsToSend = modsToSend.withoutMouseButtons();\r
-            currentModifiers = currentModifiers.withoutMouseButtons();\r
+            ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons();\r
         }\r
 \r
         handleMouseEvent (MouseInputSource::InputSourceType::pen, pos, modsToSend, pressure,\r
@@ -2569,7 +2581,7 @@ private:
 \r
         if (isUp)\r
         {\r
-            handleMouseEvent (MouseInputSource::InputSourceType::pen, { -10.0f, -10.0f }, currentModifiers,\r
+            handleMouseEvent (MouseInputSource::InputSourceType::pen, { -10.0f, -10.0f }, ModifierKeys::currentModifiers,\r
                               pressure, MouseInputSource::invalidOrientation, time, penDetails);\r
 \r
             if (! isValidPeer (this))\r
@@ -2582,9 +2594,9 @@ private:
     //==============================================================================\r
     void sendModifierKeyChangeIfNeeded()\r
     {\r
-        if (modifiersAtLastCallback != currentModifiers)\r
+        if (modifiersAtLastCallback != ModifierKeys::currentModifiers)\r
         {\r
-            modifiersAtLastCallback = currentModifiers;\r
+            modifiersAtLastCallback = ModifierKeys::currentModifiers;\r
             handleModifierKeysChange();\r
         }\r
     }\r
@@ -2747,7 +2759,7 @@ private:
                 key = (int) keyChar;\r
 \r
             // avoid sending junk text characters for some control-key combinations\r
-            if (textChar < ' ' && currentModifiers.testFlags (ModifierKeys::ctrlModifier | ModifierKeys::altModifier))\r
+            if (textChar < ' ' && ModifierKeys::currentModifiers.testFlags (ModifierKeys::ctrlModifier | ModifierKeys::altModifier))\r
                 textChar = 0;\r
         }\r
 \r
@@ -3633,10 +3645,8 @@ private:
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (HWNDComponentPeer)\r
 };\r
 \r
-ModifierKeys HWNDComponentPeer::currentModifiers;\r
-ModifierKeys HWNDComponentPeer::modifiersAtLastCallback;\r
-\r
 MultiTouchMapper<DWORD> HWNDComponentPeer::currentTouches;\r
+ModifierKeys HWNDComponentPeer::modifiersAtLastCallback;\r
 \r
 ComponentPeer* Component::createNewPeer (int styleFlags, void* parentHWND)\r
 {\r
@@ -3649,30 +3659,8 @@ JUCE_API ComponentPeer* createNonRepaintingEmbeddedWindowsPeer (Component& compo
                                   (HWND) parentHWND, true);\r
 }\r
 \r
-\r
 JUCE_IMPLEMENT_SINGLETON (HWNDComponentPeer::WindowClassHolder)\r
 \r
-//==============================================================================\r
-void ModifierKeys::updateCurrentModifiers() noexcept\r
-{\r
-    currentModifiers = HWNDComponentPeer::currentModifiers;\r
-}\r
-\r
-ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept\r
-{\r
-    HWNDComponentPeer::updateKeyModifiers();\r
-\r
-    int mouseMods = 0;\r
-    if (HWNDComponentPeer::isKeyDown (VK_LBUTTON))  mouseMods |= ModifierKeys::leftButtonModifier;\r
-    if (HWNDComponentPeer::isKeyDown (VK_RBUTTON))  mouseMods |= ModifierKeys::rightButtonModifier;\r
-    if (HWNDComponentPeer::isKeyDown (VK_MBUTTON))  mouseMods |= ModifierKeys::middleButtonModifier;\r
-\r
-    HWNDComponentPeer::currentModifiers\r
-        = HWNDComponentPeer::currentModifiers.withoutMouseButtons().withFlags (mouseMods);\r
-\r
-    return HWNDComponentPeer::currentModifiers;\r
-}\r
-\r
 //==============================================================================\r
 bool KeyPress::isKeyCurrentlyDown (const int keyCode)\r
 {\r
@@ -3791,7 +3779,7 @@ private:
     UINT flags;\r
     HWND owner;\r
     String title, message;\r
-    ScopedPointer<ModalComponentManager::Callback> callback;\r
+    std::unique_ptr<ModalComponentManager::Callback> callback;\r
 \r
     static UINT getMessageBoxFlags (AlertWindow::AlertIconType iconType) noexcept\r
     {\r
@@ -3837,8 +3825,8 @@ bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType
                                                       Component* associatedComponent,\r
                                                       ModalComponentManager::Callback* callback)\r
 {\r
-    ScopedPointer<WindowsMessageBox> mb (new WindowsMessageBox (iconType, title, message, associatedComponent,\r
-                                                                MB_OKCANCEL, callback, callback != nullptr));\r
+    std::unique_ptr<WindowsMessageBox> mb (new WindowsMessageBox (iconType, title, message, associatedComponent,\r
+                                                                  MB_OKCANCEL, callback, callback != nullptr));\r
     if (callback == nullptr)\r
         return mb->getResult() != 0;\r
 \r
@@ -3851,8 +3839,8 @@ int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconTy
                                                         Component* associatedComponent,\r
                                                         ModalComponentManager::Callback* callback)\r
 {\r
-    ScopedPointer<WindowsMessageBox> mb (new WindowsMessageBox (iconType, title, message, associatedComponent,\r
-                                                                MB_YESNOCANCEL, callback, callback != nullptr));\r
+    std::unique_ptr<WindowsMessageBox> mb (new WindowsMessageBox (iconType, title, message, associatedComponent,\r
+                                                                  MB_YESNOCANCEL, callback, callback != nullptr));\r
     if (callback == nullptr)\r
         return mb->getResult();\r
 \r
@@ -3865,8 +3853,8 @@ int JUCE_CALLTYPE NativeMessageBox::showYesNoBox (AlertWindow::AlertIconType ico
                                                   Component* associatedComponent,\r
                                                   ModalComponentManager::Callback* callback)\r
 {\r
-    ScopedPointer<WindowsMessageBox> mb (new WindowsMessageBox (iconType, title, message, associatedComponent,\r
-                                                                MB_YESNO, callback, callback != nullptr));\r
+    std::unique_ptr<WindowsMessageBox> mb (new WindowsMessageBox (iconType, title, message, associatedComponent,\r
+                                                                  MB_YESNO, callback, callback != nullptr));\r
     if (callback == nullptr)\r
         return mb->getResult();\r
 \r
@@ -3930,14 +3918,14 @@ public:
     }\r
 };\r
 \r
-static ScopedPointer<ScreenSaverDefeater> screenSaverDefeater;\r
+static std::unique_ptr<ScreenSaverDefeater> screenSaverDefeater;\r
 \r
 void Desktop::setScreenSaverEnabled (const bool isEnabled)\r
 {\r
     if (isEnabled)\r
         screenSaverDefeater = nullptr;\r
     else if (screenSaverDefeater == nullptr)\r
-        screenSaverDefeater = new ScreenSaverDefeater();\r
+        screenSaverDefeater.reset (new ScreenSaverDefeater());\r
 }\r
 \r
 bool Desktop::isScreenSaverEnabled()\r
index 0d1526a6cfb182780f1b6b6eb2f19d931bde7601..d9c314bda0cfa27027f260b1af1c291e75a8d790 100644 (file)
@@ -273,7 +273,7 @@ void MultiChoicePropertyComponent::paint (Graphics& g)
 \r
     if (! expanded)\r
     {\r
-        g.setColour (findColour (PropertyComponent::labelTextColourId).withAlpha (0.4f));\r
+        g.setColour (findColour (TextEditor::backgroundColourId).contrasting().withAlpha (0.4f));\r
         g.drawFittedText ("+ " + String (numHidden) + " more", getLookAndFeel().getPropertyComponentContentPosition (*this)\r
                                                                                .removeFromBottom (20).withTrimmedLeft (10),\r
                           Justification::centredLeft, 1);\r
@@ -333,7 +333,7 @@ void MultiChoicePropertyComponent::setExpanded (bool isExpanded) noexcept
 //==============================================================================\r
 void MultiChoicePropertyComponent::lookAndFeelChanged()\r
 {\r
-    auto iconColour = findColour (PropertyComponent::labelTextColourId);\r
+    auto iconColour = findColour (TextEditor::backgroundColourId).contrasting();\r
     expandButton.setColours (iconColour, iconColour.darker(), iconColour.darker());\r
 }\r
 \r
index 54a03a8d57036c3daa39dc08d9d4f411befd1429..e8ee51b6cf1e745a8601cb989009d3ed64130611 100644 (file)
@@ -175,7 +175,7 @@ private:
     class LabelComp;\r
     friend class LabelComp;\r
 \r
-    ScopedPointer<LabelComp> textEditor;\r
+    std::unique_ptr<LabelComp> textEditor;\r
     ListenerList<Listener> listenerList;\r
 \r
     void callListeners();\r
index b83023d8711fc51638d0ecdc523b50507fd50f39..c7bec333327155709768f370d602b4eb5a6b64c3 100644 (file)
@@ -407,7 +407,7 @@ void ComboBox::lookAndFeelChanged()
     repaint();\r
 \r
     {\r
-        ScopedPointer<Label> newLabel (getLookAndFeel().createComboBoxTextBox (*this));\r
+        std::unique_ptr<Label> newLabel (getLookAndFeel().createComboBoxTextBox (*this));\r
         jassert (newLabel != nullptr);\r
 \r
         if (label != nullptr)\r
index 016ac03a4be5dbe4922158548a42298626c1ff8f..68cd9c0914167280c9af5f10ffd589f29693b0f4 100644 (file)
@@ -435,7 +435,7 @@ private:
     bool isButtonDown = false, menuActive = false, scrollWheelEnabled = false;\r
     float mouseWheelAccumulator = 0;\r
     ListenerList<Listener> listeners;\r
-    ScopedPointer<Label> label;\r
+    std::unique_ptr<Label> label;\r
     String textWhenNothingSelected, noChoicesMessage;\r
     EditableState labelEditableState = editableUnknown;\r
 \r
index bafa26144ea0074b7676c2cc5282ef68a790e5e4..c353a773bb57d859772bac87698750a6645f698f 100644 (file)
@@ -266,7 +266,7 @@ void Label::hideEditor (bool discardCurrentEditorContents)
     if (editor != nullptr)\r
     {\r
         WeakReference<Component> deletionChecker (this);\r
-        ScopedPointer<TextEditor> outgoingEditor;\r
+        std::unique_ptr<TextEditor> outgoingEditor;\r
         std::swap (outgoingEditor, editor);\r
 \r
         editorAboutToBeHidden (outgoingEditor.get());\r
index 6bcfad8554def832dcdfd362ed588cd87a568306..084bbe3e18783d98453df8e1a506a204a3057e01 100644 (file)
@@ -345,7 +345,7 @@ private:
     String lastTextValue;\r
     Font font { 15.0f };\r
     Justification justification = Justification::centredLeft;\r
-    ScopedPointer<TextEditor> editor;\r
+    std::unique_ptr<TextEditor> editor;\r
     ListenerList<Listener> listeners;\r
     WeakReference<Component> ownerComponent;\r
     BorderSize<int> border { 1, 5, 1, 5 };\r
index 1130dc4f0e14e3de5c1d31523807464cf1f58d13..d2c4d75a57f7a7848c8456de57b0e1776691bc4e 100644 (file)
@@ -152,7 +152,7 @@ public:
     }\r
 \r
     ListBox& owner;\r
-    ScopedPointer<Component> customComponent;\r
+    std::unique_ptr<Component> customComponent;\r
     int row = -1;\r
     bool selected = false, isDragging = false, isDraggingToScroll = false, selectRowOnMouseUp = false;\r
 \r
index 45804b39363df0db7584bc0f7fc6c292818ea41a..6dc7f606ecd440b93393357d3410f74eec6019e2 100644 (file)
@@ -580,9 +580,9 @@ private:
     friend class ListViewport;\r
     friend class TableListBox;\r
     ListBoxModel* model;\r
-    ScopedPointer<ListViewport> viewport;\r
-    ScopedPointer<Component> headerComponent;\r
-    ScopedPointer<MouseListener> mouseMoveSelector;\r
+    std::unique_ptr<ListViewport> viewport;\r
+    std::unique_ptr<Component> headerComponent;\r
+    std::unique_ptr<MouseListener> mouseMoveSelector;\r
     SparseSet<int> selected;\r
     int totalItems = 0, rowHeight = 22, minimumRowWidth = 0;\r
     int outlineThickness = 0;\r
index 03f1ca15d908b7b0c2e4aff0144a1f0623f6bb9a..504b0db615780c6a42555ea811ddc0666f154725 100644 (file)
@@ -113,7 +113,7 @@ public:
         {\r
             int v = std::abs (roundToInt (normRange.interval * 10000000));\r
 \r
-            while ((v % 10) == 0)\r
+            while ((v % 10) == 0 && numDecimalPlaces > 0)\r
             {\r
                 --numDecimalPlaces;\r
                 v /= 10;\r
@@ -136,7 +136,8 @@ public:
 \r
     void setRange (double newMin, double newMax, double newInt)\r
     {\r
-        normRange = NormalisableRange<double> (newMin, newMax, newInt);\r
+        normRange = NormalisableRange<double> (newMin, newMax, newInt,\r
+                                               normRange.skew, normRange.symmetricSkew);\r
         updateRange();\r
     }\r
 \r
@@ -1241,7 +1242,7 @@ public:
     int pixelsForFullDragExtent = 250;\r
     Time lastMouseWheelTime;\r
     Rectangle<int> sliderRect;\r
-    ScopedPointer<DragInProgress> currentDrag;\r
+    std::unique_ptr<DragInProgress> currentDrag;\r
 \r
     TextEntryBoxPosition textBoxPos;\r
     String textSuffix;\r
@@ -1267,8 +1268,8 @@ public:
     int popupHoverTimeout = 2000;\r
     double lastPopupDismissal = 0.0;\r
 \r
-    ScopedPointer<Label> valueBox;\r
-    ScopedPointer<Button> incButton, decButton;\r
+    std::unique_ptr<Label> valueBox;\r
+    std::unique_ptr<Button> incButton, decButton;\r
 \r
     //==============================================================================\r
     struct PopupDisplayComponent  : public BubbleComponent,\r
@@ -1322,7 +1323,7 @@ public:
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PopupDisplayComponent)\r
     };\r
 \r
-    ScopedPointer<PopupDisplayComponent> popupDisplay;\r
+    std::unique_ptr<PopupDisplayComponent> popupDisplay;\r
     Component* parentForPopupDisplay = nullptr;\r
 \r
     //==============================================================================\r
index bae589fc2a998aa8d0a4bec237b30f2e5e50c9a4..c759b45a3cd239f967f01f63dd7fec2b59c80199 100644 (file)
@@ -975,7 +975,7 @@ private:
     JUCE_PUBLIC_IN_DLL_BUILD (class Pimpl)\r
     friend class Pimpl;\r
     friend struct ContainerDeletePolicy<Pimpl>;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     void init (SliderStyle, TextEntryBoxPosition);\r
 \r
index db60622fd428e2be70feee44b9d54aa9f41aca68..fdf3c7f6992588f9ff34db1354450551a248ba04 100644 (file)
@@ -436,7 +436,7 @@ String TableHeaderComponent::toString() const
 \r
 void TableHeaderComponent::restoreFromString (const String& storedVersion)\r
 {\r
-    ScopedPointer<XmlElement> storedXml (XmlDocument::parse (storedVersion));\r
+    std::unique_ptr<XmlElement> storedXml (XmlDocument::parse (storedVersion));\r
     int index = 0;\r
 \r
     if (storedXml != nullptr && storedXml->hasTagName ("TABLELAYOUT"))\r
index 18185561fd34f9ea1a572928b46092c4e1ab14ed..f606a77da8cfcb5ad8f1e7808dd25a69c0a3d1b9 100644 (file)
@@ -433,7 +433,7 @@ private:
 \r
     OwnedArray<ColumnInfo> columns;\r
     Array<Listener*> listeners;\r
-    ScopedPointer<Component> dragOverlayComp;\r
+    std::unique_ptr<Component> dragOverlayComp;\r
     class DragOverlayComp;\r
 \r
     bool columnsChanged = false, columnsResized = false, sortChanged = false;\r
index 20fa4332399bdac6f89f81d00be38de9e453a757..f7363eb6c8ad8df6942e892cdc67a039002fcb47 100644 (file)
@@ -2057,7 +2057,7 @@ bool TextEditor::keyStateChanged (const bool isKeyDown)
         return false;\r
 \r
     // (overridden to avoid forwarding key events to the parent)\r
-    return ! ModifierKeys::getCurrentModifiers().isCommandDown();\r
+    return ! ModifierKeys::currentModifiers.isCommandDown();\r
 }\r
 \r
 //==============================================================================\r
index 517f1884390f9f60939ca8bed097dfb2782cf439..d2fa0b1cbcce503ca3461bd2b4c1690687004a4e 100644 (file)
@@ -704,7 +704,7 @@ private:
     struct InsertAction;\r
     struct RemoveAction;\r
 \r
-    ScopedPointer<Viewport> viewport;\r
+    std::unique_ptr<Viewport> viewport;\r
     TextHolderComponent* textHolder;\r
     BorderSize<int> borderSize { 1, 1, 1, 3 };\r
     Justification justification { Justification::left };\r
@@ -725,7 +725,7 @@ private:
     bool consumeEscAndReturnKeys = true;\r
 \r
     UndoManager undoManager;\r
-    ScopedPointer<CaretComponent> caret;\r
+    std::unique_ptr<CaretComponent> caret;\r
     Range<int> selection;\r
     int leftIndent = 4, topIndent = 4;\r
     unsigned int lastTransactionTime = 0;\r
index b6a1544289b69039c22b86358d15806897b8a6f1..fb7cc23c3080dc6a2eb5a5a0df478dc4f578d51d 100644 (file)
@@ -312,7 +312,7 @@ public:
 \r
 private:\r
     //==============================================================================\r
-    ScopedPointer<Button> missingItemsButton;\r
+    std::unique_ptr<Button> missingItemsButton;\r
     bool vertical = false, isEditingActive = false;\r
     ToolbarItemStyle toolbarStyle = iconsOnly;\r
     class MissingItemsComponent;\r
index 4fe8d4a2567f03644a51c1bb8167454349377244..f09df8273406e150b23e7d4a87f70353c09b5367 100644 (file)
@@ -196,7 +196,7 @@ private:
     const int itemId;\r
     ToolbarEditingMode mode;\r
     Toolbar::ToolbarItemStyle toolbarStyle;\r
-    ScopedPointer<Component> overlayComp;\r
+    std::unique_ptr<Component> overlayComp;\r
     int dragOffsetX, dragOffsetY;\r
     bool isActive, isBeingDragged, isBeingUsedAsAButton;\r
     Rectangle<int> contentArea;\r
index 48e2da07de4f514ed93342328464416261330bdf..c0f39d4ff6442888b595b065793a6798a32f0bc6 100644 (file)
@@ -484,7 +484,7 @@ void TreeView::setRootItem (TreeViewItem* const newRootItem)
 \r
 void TreeView::deleteRootItem()\r
 {\r
-    const ScopedPointer<TreeViewItem> deleter (rootItem);\r
+    const std::unique_ptr<TreeViewItem> deleter (rootItem);\r
     setRootItem (nullptr);\r
 }\r
 \r
index 8ff8f85a3d1929766ce3daaa915638a950995656..53dba843fdb4ef483131447583ac5ecbe9eb73d7 100644 (file)
@@ -574,7 +574,7 @@ public:
 \r
     private:\r
         TreeViewItem& treeViewItem;\r
-        ScopedPointer<XmlElement> oldOpenness;\r
+        std::unique_ptr<XmlElement> oldOpenness;\r
 \r
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OpennessRestorer)\r
     };\r
@@ -910,11 +910,11 @@ private:
     friend struct ContainerDeletePolicy<InsertPointHighlight>;\r
     friend struct ContainerDeletePolicy<TargetGroupHighlight>;\r
 \r
-    ScopedPointer<TreeViewport> viewport;\r
+    std::unique_ptr<TreeViewport> viewport;\r
     CriticalSection nodeAlterationLock;\r
     TreeViewItem* rootItem = nullptr;\r
-    ScopedPointer<InsertPointHighlight> dragInsertPointHighlight;\r
-    ScopedPointer<TargetGroupHighlight> dragTargetGroupHighlight;\r
+    std::unique_ptr<InsertPointHighlight> dragInsertPointHighlight;\r
+    std::unique_ptr<TargetGroupHighlight> dragTargetGroupHighlight;\r
     int indentSize = -1;\r
     bool defaultOpenness = false, needsRecalculating = true, rootItemVisible = true;\r
     bool multiSelectEnabled = false, openCloseButtonsVisible = true;\r
index a4a94194e2b06654f7e00217f0a68222759b08db..c55c7aa8f8fa4352da70c9099156d4e97e4c6f2d 100644 (file)
@@ -523,7 +523,7 @@ bool AlertWindow::keyPressed (const KeyPress& key)
         }\r
     }\r
 \r
-    if (key.isKeyCode (KeyPress::escapeKey) && escapeKeyCancels && buttons.size() == 0)\r
+    if (key.isKeyCode (KeyPress::escapeKey) && escapeKeyCancels)\r
     {\r
         exitModalState (0);\r
         return true;\r
@@ -584,8 +584,8 @@ private:
         auto& lf = associatedComponent != nullptr ? associatedComponent->getLookAndFeel()\r
                                                   : LookAndFeel::getDefaultLookAndFeel();\r
 \r
-        ScopedPointer<Component> alertBox (lf.createAlertWindow (title, message, button1, button2, button3,\r
-                                                                 iconType, numButtons, associatedComponent));\r
+        std::unique_ptr<Component> alertBox (lf.createAlertWindow (title, message, button1, button2, button3,\r
+                                                                   iconType, numButtons, associatedComponent));\r
 \r
         jassert (alertBox != nullptr); // you have to return one of these!\r
 \r
index 0fa102f0082603f85d20f8c0fb03baf1b881281a..f637acca25620723764b55a05d908f61cf069aa5 100644 (file)
@@ -78,7 +78,7 @@ public:
             callout.dismiss();\r
     }\r
 \r
-    ScopedPointer<Component> content;\r
+    std::unique_ptr<Component> content;\r
     CallOutBox callout;\r
 \r
     JUCE_DECLARE_NON_COPYABLE (CallOutBoxCallback)\r
index 55b8bd2e7be9e746dfbb552cce41d8f84415f0b2..11ce90757497c3779b10f9113cad0db452c17e64 100644 (file)
@@ -103,8 +103,6 @@ void ComponentPeer::handleMagnifyGesture (MouseInputSource::InputSourceType type
 //==============================================================================\r
 void ComponentPeer::handlePaint (LowLevelGraphicsContext& contextToPaintTo)\r
 {\r
-    ModifierKeys::updateCurrentModifiers();\r
-\r
     Graphics g (contextToPaintTo);\r
 \r
     if (component.isTransformed())\r
@@ -173,10 +171,8 @@ Component* ComponentPeer::getTargetForKeyPress()
 \r
 bool ComponentPeer::handleKeyPress (const int keyCode, const juce_wchar textCharacter)\r
 {\r
-    ModifierKeys::updateCurrentModifiers();\r
-\r
     return handleKeyPress (KeyPress (keyCode,\r
-                                     ModifierKeys::getCurrentModifiers().withoutMouseButtons(),\r
+                                     ModifierKeys::currentModifiers.withoutMouseButtons(),\r
                                      textCharacter));\r
 }\r
 \r
@@ -228,7 +224,6 @@ bool ComponentPeer::handleKeyPress (const KeyPress& keyInfo)
 \r
 bool ComponentPeer::handleKeyUpOrDown (const bool isKeyDown)\r
 {\r
-    ModifierKeys::updateCurrentModifiers();\r
     bool keyWasUsed = false;\r
 \r
     for (auto* target = getTargetForKeyPress(); target != nullptr; target = target->getParentComponent())\r
@@ -259,8 +254,6 @@ bool ComponentPeer::handleKeyUpOrDown (const bool isKeyDown)
 \r
 void ComponentPeer::handleModifierKeysChange()\r
 {\r
-    ModifierKeys::updateCurrentModifiers();\r
-\r
     auto* target = Desktop::getInstance().getMainMouseSource().getComponentUnderMouse();\r
 \r
     if (target == nullptr)\r
@@ -289,7 +282,6 @@ void ComponentPeer::dismissPendingTextInput() {}
 //==============================================================================\r
 void ComponentPeer::handleBroughtToFront()\r
 {\r
-    ModifierKeys::updateCurrentModifiers();\r
     component.internalBroughtToFront();\r
 }\r
 \r
@@ -300,8 +292,6 @@ void ComponentPeer::setConstrainer (ComponentBoundsConstrainer* const newConstra
 \r
 void ComponentPeer::handleMovedOrResized()\r
 {\r
-    ModifierKeys::updateCurrentModifiers();\r
-\r
     const bool nowMinimised = isMinimised();\r
 \r
     if (component.flags.hasHeavyweightPeerFlag && ! nowMinimised)\r
@@ -341,8 +331,6 @@ void ComponentPeer::handleMovedOrResized()
 \r
 void ComponentPeer::handleFocusGain()\r
 {\r
-    ModifierKeys::updateCurrentModifiers();\r
-\r
     if (component.isParentOf (lastFocusedComponent)\r
           && lastFocusedComponent->isShowing()\r
           && lastFocusedComponent->getWantsKeyboardFocus())\r
@@ -362,8 +350,6 @@ void ComponentPeer::handleFocusGain()
 \r
 void ComponentPeer::handleFocusLoss()\r
 {\r
-    ModifierKeys::updateCurrentModifiers();\r
-\r
     if (component.hasKeyboardFocus (true))\r
     {\r
         lastFocusedComponent = Component::currentlyFocusedComponent;\r
@@ -386,8 +372,6 @@ Component* ComponentPeer::getLastFocusedSubcomponent() const noexcept
 \r
 void ComponentPeer::handleScreenSizeChange()\r
 {\r
-    ModifierKeys::updateCurrentModifiers();\r
-\r
     component.parentSizeChanged();\r
     handleMovedOrResized();\r
 }\r
@@ -453,8 +437,6 @@ namespace DragHelpers
 \r
 bool ComponentPeer::handleDragMove (const ComponentPeer::DragInfo& info)\r
 {\r
-    ModifierKeys::updateCurrentModifiers();\r
-\r
     auto* compUnderMouse = component.getComponentAt (info.position);\r
     auto* lastTarget = dragAndDropTargetComponent.get();\r
     Component* newTarget = nullptr;\r
@@ -562,7 +544,6 @@ bool ComponentPeer::handleDragDrop (const ComponentPeer::DragInfo& info)
 //==============================================================================\r
 void ComponentPeer::handleUserClosingWindow()\r
 {\r
-    ModifierKeys::updateCurrentModifiers();\r
     component.userTriedToCloseWindow();\r
 }\r
 \r
@@ -579,4 +560,16 @@ void ComponentPeer::setRepresentedFile (const File&)
 int ComponentPeer::getCurrentRenderingEngine() const            { return 0; }\r
 void ComponentPeer::setCurrentRenderingEngine (int index)       { jassert (index == 0); ignoreUnused (index); }\r
 \r
+//==============================================================================\r
+std::function<ModifierKeys()> ComponentPeer::getNativeRealtimeModifiers = nullptr;\r
+\r
+ModifierKeys ComponentPeer::getCurrentModifiersRealtime() noexcept\r
+{\r
+    if (getNativeRealtimeModifiers != nullptr)\r
+        return getNativeRealtimeModifiers();\r
+\r
+    return ModifierKeys::currentModifiers;\r
+}\r
+\r
+\r
 } // namespace juce\r
index 49384e5070cbf8fb5b921d43b3914293d6b43d3d..1440597d89ad3fc095f176f2816abea04e617846 100644 (file)
@@ -364,12 +364,26 @@ public:
     virtual int getCurrentRenderingEngine() const;\r
     virtual void setCurrentRenderingEngine (int index);\r
 \r
+    //==============================================================================\r
+    /** On desktop platforms this method will check all the mouse and key states and return\r
+        a ModifierKeys object representing them.\r
+\r
+        This isn't recommended and is only needed in special circumstances for up-to-date\r
+        modifier information at times when the app's event loop isn't running normally.\r
+\r
+        Another reason to avoid this method is that it's not stateless and calling it may\r
+        update the ModifierKeys::currentModifiers object, which could cause subtle changes\r
+        in the behaviour of some components.\r
+    */\r
+    static ModifierKeys getCurrentModifiersRealtime() noexcept;\r
+\r
 protected:\r
     //==============================================================================\r
     Component& component;\r
     const int styleFlags;\r
     Rectangle<int> lastNonFullscreenBounds;\r
     ComponentBoundsConstrainer* constrainer = nullptr;\r
+    static std::function<ModifierKeys()> getNativeRealtimeModifiers;\r
 \r
 private:\r
     //==============================================================================\r
index 75be25ae98e283a748ee2724166c1c2d7c460974..dd7b4c8169ad34cb8a5f3d36d5c77d6e866c0913 100644 (file)
@@ -280,14 +280,14 @@ private:
     //==============================================================================\r
     int titleBarHeight = 26, menuBarHeight = 24, requiredButtons;\r
     bool positionTitleBarButtonsOnLeft, drawTitleTextCentred = true;\r
-    ScopedPointer<Button> titleBarButtons [3];\r
+    std::unique_ptr<Button> titleBarButtons [3];\r
     Image titleBarIcon;\r
-    ScopedPointer<Component> menuBar;\r
+    std::unique_ptr<Component> menuBar;\r
     MenuBarModel* menuBarModel = nullptr;\r
 \r
     class ButtonListenerProxy;\r
     friend struct ContainerDeletePolicy<ButtonListenerProxy>;\r
-    ScopedPointer<ButtonListenerProxy> buttonListener;\r
+    std::unique_ptr<ButtonListenerProxy> buttonListener;\r
 \r
     void repaintTitleBar();\r
 \r
index e3f55217059df8cae33484fe7e3bda46982602fc..26add9d7972555d546245cf7443f89db4bb1b16b 100644 (file)
@@ -379,8 +379,8 @@ protected:
     void addAndMakeVisible (Component*, int zOrder = -1);\r
    #endif\r
 \r
-    ScopedPointer<ResizableCornerComponent> resizableCorner;\r
-    ScopedPointer<ResizableBorderComponent> resizableBorder;\r
+    std::unique_ptr<ResizableCornerComponent> resizableCorner;\r
+    std::unique_ptr<ResizableBorderComponent> resizableBorder;\r
 \r
 private:\r
     //==============================================================================\r
index 6133fd4698cefe89fcbf88a0d7d0c001e83954be..f9055693186963f1117c7b1367be42a9a5a18be8 100644 (file)
@@ -164,7 +164,7 @@ private:
     void timerCallback() override;\r
 \r
     double progress;\r
-    ScopedPointer<AlertWindow> alertWindow;\r
+    std::unique_ptr<AlertWindow> alertWindow;\r
     String message;\r
     CriticalSection messageLock;\r
     const int timeOutMsWhenCancelling;\r
index cf863fe2d15098a56a6ca534c4c10c62aac9f928..8bd5d8e9f35fb83477c46c1fcbc87095ec8317f1 100644 (file)
@@ -122,7 +122,7 @@ void TooltipWindow::displayTip (Point<int> screenPos, const String& tip)
 String TooltipWindow::getTipFor (Component& c)\r
 {\r
     if (Process::isForegroundProcess()\r
-         && ! ModifierKeys::getCurrentModifiers().isAnyMouseButtonDown())\r
+         && ! ModifierKeys::currentModifiers.isAnyMouseButtonDown())\r
     {\r
         if (auto* ttc = dynamic_cast<TooltipClient*> (&c))\r
             if (! c.isCurrentlyBlockedByAnotherModalComponent())\r
index 613fe64e867866532914ad0dce1e30b2ea015e3b..1c0b0ac505a05a2c12db0626b5b846b3c23452d0 100644 (file)
@@ -271,7 +271,6 @@ void TopLevelWindow::addToDesktop (int windowStyleFlags, void* nativeWindowToAtt
        method. If you do this, it's best to call the base class's getDesktopWindowStyleFlags()\r
        method, then add or remove whatever flags are necessary from this value before returning it.\r
     */\r
-\r
     jassert ((windowStyleFlags & ~ComponentPeer::windowIsSemiTransparent)\r
                == (getDesktopWindowStyleFlags() & ~ComponentPeer::windowIsSemiTransparent));\r
 \r
index 22ec8a0e328fddc3477169d82b2749e34a35dad0..44674aaa13212a3131141e4ad910b43ff1af18a2 100644 (file)
@@ -156,7 +156,7 @@ private:
     friend class TopLevelWindowManager;\r
     friend class ResizableWindow;\r
     bool useDropShadow = true, useNativeTitleBar = false, isCurrentlyActive = false;\r
-    ScopedPointer<DropShadower> shadower;\r
+    std::unique_ptr<DropShadower> shadower;\r
 \r
     void setWindowActive (bool);\r
 \r
index 03781883cade29b6d47d0916f8595eeaac19c784..c171a6bc5fdd51cf19d6bbbe8bfdef40734f5f1a 100644 (file)
@@ -377,19 +377,19 @@ private:
     double xOffset = 0;\r
     CodeDocument::Position caretPos, selectionStart, selectionEnd;\r
 \r
-    ScopedPointer<CaretComponent> caret;\r
+    std::unique_ptr<CaretComponent> caret;\r
     ScrollBar verticalScrollBar { true }, horizontalScrollBar { false };\r
     ApplicationCommandManager* appCommandManager = nullptr;\r
 \r
     class Pimpl;\r
     friend class Pimpl;\r
     friend struct ContainerDeletePolicy<Pimpl>;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     class GutterComponent;\r
     friend class GutterComponent;\r
     friend struct ContainerDeletePolicy<GutterComponent>;\r
-    ScopedPointer<GutterComponent> gutter;\r
+    std::unique_ptr<GutterComponent> gutter;\r
 \r
     enum DragType\r
     {\r
index c3c81fc88266f49db1d7eee202cb791f6e401e87..0bf9ef51a7e9c969b167fbc2d31b48312dc3355c 100644 (file)
@@ -119,7 +119,7 @@ public:
 private:\r
     class Pimpl;\r
     friend struct ContainerDeletePolicy<Pimpl>;\r
-    ScopedPointer<Pimpl> control;\r
+    std::unique_ptr<Pimpl> control;\r
     bool mouseEventsAllowed = true;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ActiveXControlComponent)\r
index bc3ba52c45e8b636833f395a1b9b6032e9a0e99f..e9244deb9c8c483f80abb81bd4e30449e18308f8 100644 (file)
@@ -46,8 +46,12 @@ class JUCE_API  AndroidViewComponent   : public Component
 {\r
 public:\r
     //==============================================================================\r
-    /** Create an initially-empty container. */\r
-    AndroidViewComponent();\r
+    /** Create an initially-empty container. The optional flag should be left as\r
+        false in most of the cases. Currently it is only set to true as a workaround\r
+        for a web browser bug, where scrolling would be very slow and it would\r
+        randomly scroll in an opposite direction of scrolling.\r
+     */\r
+    AndroidViewComponent (bool embedAsSiblingRatherThanChild = false);\r
 \r
     /** Destructor. */\r
     ~AndroidViewComponent();\r
@@ -71,7 +75,9 @@ public:
 \r
 private:\r
     class Pimpl;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
+\r
+    bool embedAsSiblingRatherThanChild;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AndroidViewComponent)\r
 };\r
index 7a98d627768a5be0d62bbf486d2eaa41ddd396d3..cb34180fc98812cf6cd5d1c34531a7b71dd0723b 100644 (file)
@@ -81,7 +81,7 @@ public:
 private:\r
     class Pimpl;\r
     friend class Pimpl;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UIViewComponent)\r
 };\r
index 98c21c63e97d1878bfa7cb398acb4c29dfdce194..cc2f6c4fa6d57e595391e71e71a4206f1be328c5 100644 (file)
@@ -108,7 +108,7 @@ private:
 \r
     class Pimpl;\r
     friend struct ContainerDeletePolicy<Pimpl>;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 };\r
 \r
 #endif\r
index c58ebf62cbca71a13c4aa952dfca381c8fa8c92e..c637f4c7a5ba966893e15a102df19b69d6d39976 100644 (file)
@@ -35,7 +35,7 @@
 \r
   ID:               juce_gui_extra\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE extended GUI classes\r
   description:      Miscellaneous GUI classes for specialised tasks.\r
   website:          http://www.juce.com/juce\r
index 39b153115a04cbae7432be951db4a848d089baad..24b8a6a1ebe1342842c5cd2960fb689f8acfb454 100644 (file)
@@ -149,9 +149,9 @@ private:
 \r
     Colour colour;\r
     float h, s, v;\r
-    ScopedPointer<Slider> sliders[4];\r
-    ScopedPointer<ColourSpaceView> colourSpace;\r
-    ScopedPointer<HueSelectorComp> hueSelector;\r
+    std::unique_ptr<Slider> sliders[4];\r
+    std::unique_ptr<ColourSpaceView> colourSpace;\r
+    std::unique_ptr<HueSelectorComp> hueSelector;\r
     OwnedArray<SwatchComponent> swatchComponents;\r
     const int flags;\r
     int edgeGap;\r
index fb7172b28257cf387d32caf92924a521ee16ecac..00dcd926deba22a16024c5603381f38221cc0b97 100644 (file)
@@ -203,7 +203,7 @@ private:
     KeyMappingEditorComponent& owner;\r
     const CommandID commandID;\r
     const int keyNum;\r
-    ScopedPointer<KeyEntryWindow> currentKeyEntryWindow;\r
+    std::unique_ptr<KeyEntryWindow> currentKeyEntryWindow;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChangeKeyButton)\r
 };\r
index b9d5d1be055079cb8098523bfe8a2218f6b1625c..2bae03212d80c29e1608d9aa375211e849396aab 100644 (file)
@@ -128,7 +128,7 @@ private:
     friend class TopLevelItem;\r
     friend struct ContainerDeletePolicy<ChangeKeyButton>;\r
     friend struct ContainerDeletePolicy<TopLevelItem>;\r
-    ScopedPointer<TopLevelItem> treeItem;\r
+    std::unique_ptr<TopLevelItem> treeItem;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (KeyMappingEditorComponent)\r
 };\r
index 5bfcce166e86d552f297fb08b014beb9a5feca76..a0a483946b1d95d5930e967ab10963178e2ed2c5 100644 (file)
@@ -125,7 +125,7 @@ namespace LiveConstantEditor
         CPlusPlusCodeTokeniser tokeniser;\r
         CodeEditorComponent sourceEditor;\r
         CodeDocument::Position valueStart, valueEnd;\r
-        ScopedPointer<Component> customComp;\r
+        std::unique_ptr<Component> customComp;\r
         bool wasHex = false;\r
 \r
         JUCE_DECLARE_NON_COPYABLE (LivePropertyEditorBase)\r
index 9ac4b39714c51dd23012ef52e1115c5ddea327e0..d7d5ec571ccd7c2ab9ed4842d2f27096fa8ec823 100644 (file)
@@ -136,7 +136,7 @@ public:
 private:\r
     //==============================================================================\r
     String currentPageName;\r
-    ScopedPointer<Component> currentPage;\r
+    std::unique_ptr<Component> currentPage;\r
     OwnedArray<DrawableButton> buttons;\r
     int buttonSize;\r
 \r
index 5b004949f338feafa90809ae5dbbd1b903876950..e6f781504a83e41351e0c7213191053c1abf7340 100644 (file)
@@ -241,10 +241,10 @@ public:
 \r
         LockScreenAppearance lockScreenAppearance = showPartially;  /**< Optional. */\r
 \r
-        ScopedPointer<Notification> publicVersion; /**< Optional: if you set lockScreenAppearance to showPartially,\r
-                                                        then you can provide "public version" of your notification\r
-                                                        that will be displayed on the lock screen. This way you can\r
-                                                        control what information is visible when the screen is locked. */\r
+        std::unique_ptr<Notification> publicVersion; /**< Optional: if you set lockScreenAppearance to showPartially,\r
+                                                          then you can provide "public version" of your notification\r
+                                                          that will be displayed on the lock screen. This way you can\r
+                                                          control what information is visible when the screen is locked. */\r
 \r
         String groupSortKey;         /**< Optional: Used to order notifications within the same group. Available from Android API 20 or above. */\r
         bool groupSummary = false;   /**< Optional: if true, then this notification will be a group summary of the group set with groupId.\r
@@ -711,7 +711,7 @@ private:
     struct Pimpl;\r
     friend struct Pimpl;\r
 \r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
   #endif\r
 };\r
 \r
index eecd15bcbb6b755fa8b86a8e6552381abd1482ae..3f7b4d125b7d3ddf5fbebb1034b25d474d9dc9bc 100644 (file)
@@ -96,7 +96,7 @@ public:
 private:\r
     //==============================================================================\r
     JUCE_PUBLIC_IN_DLL_BUILD (class Pimpl)\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SystemTrayIconComponent)\r
 };\r
index 36cf53954eaaab326723d76c07f64a5eb2b8d76a..12c2db79499f4120b8e4005ab7c98d7de0cb5233 100644 (file)
@@ -138,7 +138,7 @@ public:
 private:\r
     //==============================================================================\r
     class Pimpl;\r
-    ScopedPointer<Pimpl> browser;\r
+    std::unique_ptr<Pimpl> browser;\r
     bool blankPageShown = false, unloadPageWhenBrowserIsHidden;\r
     String lastURL;\r
     StringArray lastHeaders;\r
index ca23529720310f589d811f0550f8690273acf370..42cfc352b762047a401ae4d5509e808c2c5db107 100644 (file)
@@ -30,10 +30,11 @@ namespace juce
 class AndroidViewComponent::Pimpl  : public ComponentMovementWatcher\r
 {\r
 public:\r
-    Pimpl (jobject v, Component& comp)\r
+    Pimpl (jobject v, Component& comp, bool makeSiblingRatherThanChild = false)\r
         : ComponentMovementWatcher (&comp),\r
           view (v),\r
-          owner (comp)\r
+          owner (comp),\r
+          embedAsSiblingRatherThanChild (makeSiblingRatherThanChild)\r
     {\r
         if (owner.isShowing())\r
             componentPeerChanged();\r
@@ -87,6 +88,15 @@ public:
         componentPeerChanged();\r
     }\r
 \r
+    void componentBroughtToFront (Component& comp) override\r
+    {\r
+        ComponentMovementWatcher::componentBroughtToFront (comp);\r
+\r
+        // Ensure that the native component doesn't get obscured.\r
+        if (embedAsSiblingRatherThanChild)\r
+            getEnv()->CallVoidMethod (view, AndroidView.bringToFront);\r
+    }\r
+\r
     Rectangle<int> getViewBounds() const\r
     {\r
         auto* env = getEnv();\r
@@ -106,11 +116,22 @@ private:
         {\r
             jobject peerView = (jobject) currentPeer->getNativeHandle();\r
 \r
+            // NB: Assuming a parent is always of ViewGroup type\r
             auto* env = getEnv();\r
-            auto parentView = env->CallObjectMethod (peerView, AndroidView.getParent);\r
 \r
-            // Assuming a parent is always of ViewGroup type\r
-            env->CallVoidMethod (parentView, AndroidViewGroup.addView, view.get());\r
+            if (embedAsSiblingRatherThanChild)\r
+            {\r
+                // This is a workaround for a bug in a web browser component where\r
+                // scrolling would be very slow and occassionally would scroll in\r
+                // opposite direction to dragging direction. In normal circumstances,\r
+                // the native view should be a child of peerView instead.\r
+                auto parentView = LocalRef<jobject> (env->CallObjectMethod (peerView, AndroidView.getParent));\r
+                env->CallVoidMethod (parentView, AndroidViewGroup.addView, view.get());\r
+            }\r
+            else\r
+            {\r
+                env->CallVoidMethod (peerView, AndroidViewGroup.addView, view.get());\r
+            }\r
 \r
             componentMovedOrResized (false, false);\r
         }\r
@@ -129,13 +150,18 @@ private:
     }\r
 \r
     Component& owner;\r
+    bool embedAsSiblingRatherThanChild;\r
     ComponentPeer* currentPeer = nullptr;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl)\r
 };\r
 \r
 //==============================================================================\r
-AndroidViewComponent::AndroidViewComponent() {}\r
+AndroidViewComponent::AndroidViewComponent (bool makeSiblingRatherThanChild)\r
+    : embedAsSiblingRatherThanChild (makeSiblingRatherThanChild)\r
+{\r
+}\r
+\r
 AndroidViewComponent::~AndroidViewComponent() {}\r
 \r
 void AndroidViewComponent::setView (void* view)\r
@@ -145,7 +171,7 @@ void AndroidViewComponent::setView (void* view)
         pimpl.reset();\r
 \r
         if (view != nullptr)\r
-            pimpl.reset (new Pimpl ((jobject) view, *this));\r
+            pimpl.reset (new Pimpl ((jobject) view, *this, embedAsSiblingRatherThanChild));\r
     }\r
 }\r
 \r
index 458edfd73f89b1abfe6352f0d83e4fd3e2bd6f07..b6d6217db02892b2fa1f27f0318dc1246baf8bbb 100644 (file)
@@ -1427,8 +1427,8 @@ struct PushNotifications::Pimpl
             propertiesDynamicObject->setProperty ("clickAction",           juceString (clickAction.get()));\r
             propertiesDynamicObject->setProperty ("bodyLocalizationKey",   juceString (bodyLocalizationKey.get()));\r
             propertiesDynamicObject->setProperty ("titleLocalizationKey",  juceString (titleLocalizationKey.get()));\r
-            propertiesDynamicObject->setProperty ("bodyLocalizationArgs",  jobjectArrayToStringArray (bodyLocalizationArgs));\r
-            propertiesDynamicObject->setProperty ("titleLocalizationArgs", jobjectArrayToStringArray (titleLocalizationArgs));\r
+            propertiesDynamicObject->setProperty ("bodyLocalizationArgs",  javaStringArrayToJuce (bodyLocalizationArgs));\r
+            propertiesDynamicObject->setProperty ("titleLocalizationArgs", javaStringArrayToJuce (titleLocalizationArgs));\r
             propertiesDynamicObject->setProperty ("link",                  link.get() != 0 ? juceString ((jstring) env->CallObjectMethod (link, AndroidUri.toString)) : String());\r
         }\r
 \r
@@ -1436,23 +1436,6 @@ struct PushNotifications::Pimpl
 \r
         return n;\r
     }\r
-\r
-    static StringArray jobjectArrayToStringArray (const LocalRef<jobjectArray>& array)\r
-    {\r
-        if (array == 0)\r
-            return {};\r
-\r
-        auto* env = getEnv();\r
-\r
-        const int size = env->GetArrayLength (array.get());\r
-\r
-        StringArray stringArray;\r
-\r
-        for (int i = 0; i < size; ++i)\r
-            stringArray.add (juceString ((jstring) env->GetObjectArrayElement (array.get(), (jsize) i)));\r
-\r
-        return stringArray;\r
-    }\r
   #endif\r
 \r
     void setupChannels (const Array<ChannelGroup>& groups, const Array<Channel>& channels)\r
index a3b2bca5219ef8e8237da7b575899b560be3359a..736efa04562795dd6f512527d7944854629b9a37 100644 (file)
@@ -101,7 +101,8 @@ class WebBrowserComponent::Pimpl    : public AndroidViewComponent,
 {\r
 public:\r
     Pimpl (WebBrowserComponent& o)\r
-        : owner (o)\r
+        : AndroidViewComponent (true),\r
+          owner (o)\r
     {\r
         auto* env = getEnv();\r
 \r
@@ -193,9 +194,7 @@ public:
             // we need to open URL manually.\r
 \r
             URL urlToUse = URL (url).withPOSTData (*postData);\r
-\r
-            connectionThread = nullptr;\r
-            connectionThread = new ConnectionThread (*this, urlToUse, *headers);\r
+            connectionThread.reset (new ConnectionThread (*this, urlToUse, *headers));\r
         }\r
     }\r
 \r
@@ -358,7 +357,7 @@ private:
         }\r
 \r
         Pimpl& owner;\r
-        ScopedPointer<WebInputStream> webInputStream;\r
+        std::unique_ptr<WebInputStream> webInputStream;\r
         Result result;\r
     };\r
 \r
@@ -366,7 +365,7 @@ private:
     WebBrowserComponent& owner;\r
     GlobalRef juceWebChromeClient;\r
     GlobalRef juceWebViewClient;\r
-    ScopedPointer<ConnectionThread> connectionThread;\r
+    std::unique_ptr<ConnectionThread> connectionThread;\r
     WaitableEvent responseReadyEvent;\r
 \r
     WeakReference<Pimpl>::Master masterReference;\r
@@ -380,7 +379,8 @@ WebBrowserComponent::WebBrowserComponent (const bool unloadWhenHidden)
 {\r
     setOpaque (true);\r
 \r
-    addAndMakeVisible (browser = new Pimpl (*this));\r
+    browser.reset (new Pimpl (*this));\r
+    addAndMakeVisible (browser.get());\r
 }\r
 \r
 WebBrowserComponent::~WebBrowserComponent()\r
index caaab34ace8a1d3ca4b05970a6ab52d5f9793a21..0f6288c5196ab0936205c883f83c874b9403aa37 100644 (file)
 namespace juce\r
 {\r
 \r
-#if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
-template <> struct ContainerDeletePolicy<NSObject<UIApplicationDelegate, UNUserNotificationCenterDelegate>> { static void destroy (NSObject* o) { [o release]; } };\r
-#endif\r
-\r
 namespace PushNotificationsDelegateDetails\r
 {\r
     //==============================================================================\r
@@ -58,7 +54,7 @@ namespace PushNotificationsDelegateDetails
         }\r
         else\r
         {\r
-          #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+           #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
             if (a.style == Action::text)\r
             {\r
                 return [UNTextInputNotificationAction actionWithIdentifier: juceStringToNS (a.identifier)\r
@@ -71,9 +67,9 @@ namespace PushNotificationsDelegateDetails
             return [UNNotificationAction actionWithIdentifier: juceStringToNS (a.identifier)\r
                                                         title: juceStringToNS (a.title)\r
                                                       options: NSUInteger (a.destructive << 1 | (! a.triggerInBackground) << 2)];\r
-          #else\r
+           #else\r
             return nullptr;\r
-          #endif\r
+           #endif\r
         }\r
     }\r
 \r
@@ -101,7 +97,7 @@ namespace PushNotificationsDelegateDetails
         }\r
         else\r
         {\r
-          #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+           #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
             auto* actions = [NSMutableArray arrayWithCapacity: (NSUInteger) c.actions.size()];\r
 \r
             for (const auto& a : c.actions)\r
@@ -114,9 +110,9 @@ namespace PushNotificationsDelegateDetails
                                                           actions: actions\r
                                                 intentIdentifiers: @[]\r
                                                           options: c.sendDismissAction ? UNNotificationCategoryOptionCustomDismissAction : 0];\r
-          #else\r
+           #else\r
             return nullptr;\r
-          #endif\r
+           #endif\r
         }\r
     }\r
 \r
@@ -144,7 +140,7 @@ namespace PushNotificationsDelegateDetails
         return notification;\r
     }\r
 \r
-  #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+   #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
     UNNotificationRequest* juceNotificationToUNNotificationRequest (const PushNotifications::Notification& n)\r
     {\r
         // content\r
@@ -188,7 +184,7 @@ namespace PushNotificationsDelegateDetails
 \r
         return request;\r
     }\r
-  #endif\r
+   #endif\r
 \r
     String getUserResponseFromNSDictionary (NSDictionary* dictionary)\r
     {\r
@@ -237,7 +233,7 @@ namespace PushNotificationsDelegateDetails
     }\r
 \r
     //==============================================================================\r
-  #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+   #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
     double getIntervalSecFromUNNotificationTrigger (UNNotificationTrigger* t)\r
     {\r
         if (t != nil)\r
@@ -292,7 +288,7 @@ namespace PushNotificationsDelegateDetails
     {\r
         return unNotificationRequestToJuceNotification (n.request);\r
     }\r
-  #endif\r
+   #endif\r
 \r
     PushNotifications::Notification uiLocalNotificationToJuceNotification (UILocalNotification* n)\r
     {\r
@@ -343,7 +339,7 @@ namespace PushNotificationsDelegateDetails
         return category;\r
     }\r
 \r
-  #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+   #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
     Action unNotificationActionToAction (UNNotificationAction* a)\r
     {\r
         Action action;\r
@@ -381,7 +377,7 @@ namespace PushNotificationsDelegateDetails
 \r
         return category;\r
     }\r
-  #endif\r
+   #endif\r
 \r
     PushNotifications::Notification nsDictionaryToJuceNotification (NSDictionary* dictionary)\r
     {\r
@@ -421,14 +417,14 @@ struct PushNotificationsDelegate
 {\r
     PushNotificationsDelegate() : delegate ([getClass().createInstance() init])\r
     {\r
-        Class::setThis (delegate, this);\r
+        Class::setThis (delegate.get(), this);\r
 \r
         id<UIApplicationDelegate> appDelegate = [[UIApplication sharedApplication] delegate];\r
 \r
         SEL selector = NSSelectorFromString (@"setPushNotificationsDelegateToUse:");\r
 \r
         if ([appDelegate respondsToSelector: selector])\r
-            [appDelegate performSelector: selector withObject: delegate];\r
+            [appDelegate performSelector: selector withObject: delegate.get()];\r
     }\r
 \r
     virtual ~PushNotificationsDelegate() {}\r
@@ -460,32 +456,32 @@ struct PushNotificationsDelegate
                                                                                 NSDictionary* responseInfo,\r
                                                                                 void (^completionHandler)()) = 0;\r
 \r
-  #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+   #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
     virtual void willPresentNotificationWithCompletionHandler (UNNotification* notification,\r
                                                                void (^completionHandler)(UNNotificationPresentationOptions options)) = 0;\r
 \r
     virtual void didReceiveNotificationResponseWithCompletionHandler (UNNotificationResponse* response,\r
                                                                       void (^completionHandler)()) = 0;\r
-  #endif\r
+   #endif\r
 \r
 protected:\r
-  #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
-    ScopedPointer<NSObject<UIApplicationDelegate, UNUserNotificationCenterDelegate>> delegate;\r
-  #else\r
-    ScopedPointer<NSObject<UIApplicationDelegate>> delegate;\r
-  #endif\r
+   #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+    std::unique_ptr<NSObject<UIApplicationDelegate, UNUserNotificationCenterDelegate>, NSObjectDeleter> delegate;\r
+   #else\r
+    std::unique_ptr<NSObject<UIApplicationDelegate>, NSObjectDeleter> delegate;\r
+   #endif\r
 \r
 private:\r
     //==============================================================================\r
-  #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+   #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
     struct Class    : public ObjCClass<NSObject<UIApplicationDelegate, UNUserNotificationCenterDelegate>>\r
     {\r
         Class() : ObjCClass<NSObject<UIApplicationDelegate, UNUserNotificationCenterDelegate>> ("JucePushNotificationsDelegate_")\r
-  #else\r
+   #else\r
     struct Class    : public ObjCClass<NSObject<UIApplicationDelegate>>\r
     {\r
         Class() : ObjCClass<NSObject<UIApplicationDelegate>> ("JucePushNotificationsDelegate_")\r
-  #endif\r
+   #endif\r
         {\r
             addIvar<PushNotificationsDelegate*> ("self");\r
 \r
@@ -499,10 +495,10 @@ private:
             addMethod (@selector (application:handleActionWithIdentifier:forLocalNotification:completionHandler:),                   handleActionForLocalNotificationCompletionHandler,              "v@:@@@@");\r
             addMethod (@selector (application:handleActionWithIdentifier:forLocalNotification:withResponseInfo:completionHandler:),  handleActionForLocalNotificationWithResponseCompletionHandler,  "v@:@@@@@");\r
 \r
-          #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+           #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
             addMethod (@selector (userNotificationCenter:willPresentNotification:withCompletionHandler:),                            willPresentNotificationWithCompletionHandler,                   "v@:@@@");\r
             addMethod (@selector (userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:),                     didReceiveNotificationResponseWithCompletionHandler,            "v@:@@@");\r
-          #endif\r
+           #endif\r
 \r
             registerClass();\r
         }\r
@@ -547,7 +543,7 @@ private:
                                                                                    NSDictionary* responseInfo,\r
                                                                                    void (^completionHandler)())                                 { getThis (self). handleActionForLocalNotificationWithResponseCompletionHandler (actionIdentifier, notification, responseInfo, completionHandler); }\r
 \r
-      #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+       #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
         static void willPresentNotificationWithCompletionHandler        (id self, SEL, UNUserNotificationCenter*,\r
                                                                          UNNotification* notification,\r
                                                                          void (^completionHandler)(UNNotificationPresentationOptions options))  { getThis (self).willPresentNotificationWithCompletionHandler (notification, completionHandler); }\r
@@ -555,7 +551,7 @@ private:
         static void didReceiveNotificationResponseWithCompletionHandler (id self, SEL, UNUserNotificationCenter*,\r
                                                                          UNNotificationResponse* response,\r
                                                                          void (^completionHandler)())                                           { getThis (self).didReceiveNotificationResponseWithCompletionHandler (response, completionHandler); }\r
-      #endif\r
+       #endif\r
     };\r
 \r
     //==============================================================================\r
@@ -923,7 +919,7 @@ struct PushNotifications::Pimpl : private PushNotificationsDelegate
         completionHandler();\r
     }\r
 \r
-  #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+   #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
     void willPresentNotificationWithCompletionHandler (UNNotification* notification,\r
                                                        void (^completionHandler)(UNNotificationPresentationOptions options)) override\r
     {\r
@@ -961,7 +957,7 @@ struct PushNotifications::Pimpl : private PushNotificationsDelegate
         owner.listeners.call ([&] (Listener& l) { l.handleNotificationAction (! remote, n, actionString, responseString); });\r
         completionHandler();\r
     }\r
-  #endif\r
+   #endif\r
 \r
     void subscribeToTopic (const String& topic)     { ignoreUnused (topic); }\r
     void unsubscribeFromTopic (const String& topic) { ignoreUnused (topic); }\r
index edeb9dd33bd8cf7ba41b34d389198bdb0efb9904..d6eef2726f1c57bbe0c230f331f7ebe782841273 100644 (file)
@@ -449,17 +449,18 @@ public:
 \r
         unsigned long windowHandle;\r
         ssize_t actual = read (inChannel, &windowHandle, sizeof (windowHandle));\r
+\r
         if (actual != sizeof (windowHandle))\r
         {\r
             killChild();\r
             return;\r
         }\r
 \r
-        receiver = new CommandReceiver (this, inChannel);\r
+        receiver.reset (new CommandReceiver (this, inChannel));\r
         startThread();\r
 \r
-        xembed = new XEmbedComponent (windowHandle);\r
-        owner.addAndMakeVisible (xembed);\r
+        xembed.reset (new XEmbedComponent (windowHandle));\r
+        owner.addAndMakeVisible (xembed.get());\r
     }\r
 \r
     void quit()\r
@@ -696,10 +697,10 @@ private:
 \r
 private:\r
     WebBrowserComponent& owner;\r
-    ScopedPointer<CommandReceiver> receiver;\r
+    std::unique_ptr<CommandReceiver> receiver;\r
     int childProcess = 0, inChannel = 0, outChannel = 0;\r
     int threadControl[2];\r
-    ScopedPointer<XEmbedComponent> xembed;\r
+    std::unique_ptr<XEmbedComponent> xembed;\r
     WaitableEvent threadBlocker;\r
 };\r
 \r
index 82333141aed6d96061eceff52c7edf763ab27bb4..ec05152e2a6655122e53866a5634c9ee0221e810 100644 (file)
@@ -76,7 +76,7 @@ public:
     class SharedKeyWindow : public ReferenceCountedObject\r
     {\r
     public:\r
-        typedef ReferenceCountedObjectPtr<SharedKeyWindow> Ptr;\r
+        using Ptr = ReferenceCountedObjectPtr<SharedKeyWindow>;\r
 \r
         //==============================================================================\r
         Window getHandle()    { return keyProxy; }\r
index 47dc7e87e353ff3e3f3eee3d938e219599095b58..ce43a60acaa5451026df8628d35833425bbc1236 100644 (file)
@@ -82,7 +82,7 @@ private:
     private:\r
         static void frameChanged (id self, SEL, NSNotification*)\r
         {\r
-            if (NSViewResizeWatcher* const target = getIvar<NSViewResizeWatcher*> (self, "target"))\r
+            if (auto* target = getIvar<NSViewResizeWatcher*> (self, "target"))\r
                 target->viewResized();\r
         }\r
 \r
@@ -98,7 +98,7 @@ class NSViewAttachment  : public ReferenceCountedObject,
                           private NSViewResizeWatcher\r
 {\r
 public:\r
-    NSViewAttachment (NSView* const v, Component& comp)\r
+    NSViewAttachment (NSView* v, Component& comp)\r
         : ComponentMovementWatcher (&comp),\r
           view (v), owner (comp),\r
           currentPeer (nullptr)\r
@@ -134,9 +134,9 @@ public:
 \r
     void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override\r
     {\r
-        if (ComponentPeer* const peer = owner.getTopLevelComponent()->getPeer())\r
+        if (auto* peer = owner.getTopLevelComponent()->getPeer())\r
         {\r
-            NSRect r = makeNSRect (peer->getAreaCoveredBy (owner));\r
+            auto r = makeNSRect (peer->getAreaCoveredBy (owner));\r
             r.origin.y = [[view superview] frame].size.height - (r.origin.y + r.size.height);\r
             [view setFrame: r];\r
         }\r
@@ -144,7 +144,7 @@ public:
 \r
     void componentPeerChanged() override\r
     {\r
-        ComponentPeer* const peer = owner.getPeer();\r
+        auto* peer = owner.getPeer();\r
 \r
         if (currentPeer != peer)\r
         {\r
@@ -152,7 +152,7 @@ public:
 \r
             if (peer != nullptr)\r
             {\r
-                NSView* const peerView = (NSView*) peer->getNativeHandle();\r
+                auto peerView = (NSView*) peer->getNativeHandle();\r
                 [peerView addSubview: view];\r
                 componentMovedOrResized (false, false);\r
             }\r
@@ -182,7 +182,8 @@ public:
 \r
     NSView* const view;\r
 \r
-    typedef ReferenceCountedObjectPtr<NSViewAttachment> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<NSViewAttachment>;\r
+\r
 private:\r
     Component& owner;\r
     ComponentPeer* currentPeer;\r
@@ -201,11 +202,11 @@ private:
 NSViewComponent::NSViewComponent() {}\r
 NSViewComponent::~NSViewComponent() {}\r
 \r
-void NSViewComponent::setView (void* const view)\r
+void NSViewComponent::setView (void* view)\r
 {\r
     if (view != getView())\r
     {\r
-        NSViewAttachment::Ptr old = attachment;\r
+        auto old = attachment;\r
 \r
         attachment = nullptr;\r
 \r
@@ -226,7 +227,7 @@ void NSViewComponent::resizeToFitView()
 {\r
     if (attachment != nullptr)\r
     {\r
-        NSRect r = [static_cast<NSViewAttachment*> (attachment.get())->view frame];\r
+        auto r = [static_cast<NSViewAttachment*> (attachment.get())->view frame];\r
         setBounds (Rectangle<int> ((int) r.size.width, (int) r.size.height));\r
     }\r
 }\r
@@ -239,7 +240,7 @@ void NSViewComponent::alphaChanged()
         (static_cast<NSViewAttachment*> (attachment.get()))->updateAlpha();\r
 }\r
 \r
-ReferenceCountedObject* NSViewComponent::attachViewToComponent (Component& comp, void* const view)\r
+ReferenceCountedObject* NSViewComponent::attachViewToComponent (Component& comp, void* view)\r
 {\r
     return new NSViewAttachment ((NSView*) view, comp);\r
 }\r
index 2b3673c84e057590b48be6278988328dfcb55d7d..90943fe34695d6abf9177257a5e8edd890f8ec34 100644 (file)
@@ -27,8 +27,6 @@
 namespace juce\r
 {\r
 \r
-template <> struct ContainerDeletePolicy<NSObject<NSApplicationDelegate, NSUserNotificationCenterDelegate>> { static void destroy (NSObject* o) { [o release]; } };\r
-\r
 namespace PushNotificationsDelegateDetailsOsx\r
 {\r
     using Action = PushNotifications::Notification::Action;\r
@@ -267,16 +265,16 @@ struct PushNotificationsDelegate
 {\r
     PushNotificationsDelegate() : delegate ([getClass().createInstance() init])\r
     {\r
-        Class::setThis (delegate, this);\r
+        Class::setThis (delegate.get(), this);\r
 \r
         id<NSApplicationDelegate> appDelegate = [[NSApplication sharedApplication] delegate];\r
 \r
         SEL selector = NSSelectorFromString (@"setPushNotificationsDelegate:");\r
 \r
         if ([appDelegate respondsToSelector: selector])\r
-            [appDelegate performSelector: selector withObject: delegate];\r
+            [appDelegate performSelector: selector withObject: delegate.get()];\r
 \r
-        [NSUserNotificationCenter defaultUserNotificationCenter].delegate = delegate;\r
+        [NSUserNotificationCenter defaultUserNotificationCenter].delegate = delegate.get();\r
     }\r
 \r
     virtual ~PushNotificationsDelegate()\r
@@ -297,7 +295,7 @@ struct PushNotificationsDelegate
     virtual bool shouldPresentNotification (NSUserNotification* notification) = 0;\r
 \r
 protected:\r
-    ScopedPointer<NSObject<NSApplicationDelegate, NSUserNotificationCenterDelegate>> delegate;\r
+    std::unique_ptr<NSObject<NSApplicationDelegate, NSUserNotificationCenterDelegate>, NSObjectDeleter> delegate;\r
 \r
 private:\r
     struct Class    : public ObjCClass<NSObject<NSApplicationDelegate, NSUserNotificationCenterDelegate>>\r
index c228c3d304ac912b1c94177365bc3e3a29516567..b49f9060ff6050edf3b199d80fc56081da17c081 100644 (file)
@@ -95,7 +95,7 @@ public:
         }\r
         else\r
         {\r
-            auto eventMods = ModifierKeys::getCurrentModifiersRealtime();\r
+            auto eventMods = ComponentPeer::getCurrentModifiersRealtime();\r
 \r
             if (([e modifierFlags] & NSEventModifierFlagCommand) != 0)\r
                 eventMods = eventMods.withFlags (ModifierKeys::commandModifier);\r
index f0eec0ea44912681fcca1f70f81c432804932faa..98ead940941e3eeaac9da3734dda6d06a283bb19 100644 (file)
@@ -216,7 +216,7 @@ namespace ActiveXHelpers
                 peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse,\r
                                         { (float) (GET_X_LPARAM (lParam) + activeXRect.left - peerRect.left),\r
                                           (float) (GET_Y_LPARAM (lParam) + activeXRect.top  - peerRect.top) },\r
-                                        ModifierKeys::getCurrentModifiersRealtime(),\r
+                                        ComponentPeer::getCurrentModifiersRealtime(),\r
                                         MouseInputSource::invalidPressure,\r
                                         MouseInputSource::invalidOrientation,\r
                                         getMouseEventTime());\r
@@ -360,7 +360,7 @@ bool ActiveXControlComponent::createControl (const void* controlIID)
         auto controlBounds = peer->getAreaCoveredBy (*this);\r
         auto hwnd = (HWND) peer->getNativeHandle();\r
 \r
-        ScopedPointer<Pimpl> newControl (new Pimpl (hwnd, *this));\r
+        std::unique_ptr<Pimpl> newControl (new Pimpl (hwnd, *this));\r
 \r
         HRESULT hr = OleCreate (*(const IID*) controlIID, __uuidof (IOleObject), 1 /*OLERENDER_DRAW*/, 0,\r
                                 newControl->clientSite, newControl->storage,\r
@@ -380,7 +380,7 @@ bool ActiveXControlComponent::createControl (const void* controlIID)
 \r
                 if (newControl->control->DoVerb (OLEIVERB_SHOW, 0, newControl->clientSite, 0, hwnd, &rect) == S_OK)\r
                 {\r
-                    control = newControl;\r
+                    control.reset (newControl.release());\r
                     control->controlHWND = ActiveXHelpers::getHWND (this);\r
 \r
                     if (control->controlHWND != 0)\r
index 5795b62fe16b03e1b940af500b81d430dd9c58d1..66b540a40012ce1171afe5e5d78e1925cd1b2ed7 100644 (file)
@@ -104,7 +104,7 @@ public:
         }\r
         else\r
         {\r
-            ModifierKeys eventMods (ModifierKeys::getCurrentModifiersRealtime());\r
+            ModifierKeys eventMods (ComponentPeer::getCurrentModifiersRealtime());\r
 \r
             if (lParam == WM_LBUTTONDOWN || lParam == WM_LBUTTONDBLCLK)\r
                 eventMods = eventMods.withFlags (ModifierKeys::leftButtonModifier);\r
@@ -146,7 +146,7 @@ public:
         if (JuceWindowIdentifier::isJUCEWindow (hwnd))\r
             if (ComponentPeer* peer = (ComponentPeer*) GetWindowLongPtr (hwnd, 8))\r
                 if (SystemTrayIconComponent* const iconComp = dynamic_cast<SystemTrayIconComponent*> (&(peer->getComponent())))\r
-                    return iconComp->pimpl;\r
+                    return iconComp->pimpl.get();\r
 \r
         return nullptr;\r
     }\r
index 399a5c76a099e2785e355f4cbc1c93574d90d143..e9910736cb62a7a79dc44313c251db6b9c4541ff 100644 (file)
@@ -246,7 +246,7 @@ WebBrowserComponent::WebBrowserComponent (const bool unloadPageWhenBrowserIsHidd
       unloadPageWhenBrowserIsHidden (unloadPageWhenBrowserIsHidden_)\r
 {\r
     setOpaque (true);\r
-    addAndMakeVisible (browser);\r
+    addAndMakeVisible (browser.get());\r
 }\r
 \r
 WebBrowserComponent::~WebBrowserComponent()\r
index ccad03a8978a01c0001072fed4689674cc812d2b..9869b2bd8431a878ba4d8c8eec24d19416d35f36 100644 (file)
@@ -36,8 +36,8 @@ namespace juce
 class Draggable3DOrientation\r
 {\r
 public:\r
-    typedef Vector3D<float> VectorType;\r
-    typedef Quaternion<float> QuaternionType;\r
+    using VectorType      = Vector3D<float>;\r
+    using QuaternionType  = Quaternion<float>;\r
 \r
     /** Creates a Draggable3DOrientation, initially set up to be aligned along the X axis. */\r
     Draggable3DOrientation (float objectRadius = 0.5f) noexcept\r
@@ -65,7 +65,7 @@ public:
         rectangle is assumed to be the centre of the object that will be rotated, and\r
         the size of the rectangle will be used to scale the object radius - see setRadius().\r
     */\r
-    void setViewport (const Rectangle<int>& newArea) noexcept\r
+    void setViewport (Rectangle<int> newArea) noexcept\r
     {\r
         area = newArea;\r
     }\r
@@ -95,9 +95,9 @@ public:
     template <typename Type>\r
     void mouseDrag (Point<Type> mousePos) noexcept\r
     {\r
-        const VectorType oldPos (projectOnSphere (lastMouse));\r
+        auto oldPos = projectOnSphere (lastMouse);\r
         lastMouse = mousePosToProportion (mousePos.toFloat());\r
-        const VectorType newPos (projectOnSphere (lastMouse));\r
+        auto newPos = projectOnSphere (lastMouse);\r
 \r
         quaternion *= rotationFromMove (oldPos, newPos);\r
     }\r
@@ -122,36 +122,36 @@ private:
     QuaternionType quaternion;\r
     Point<float> lastMouse;\r
 \r
-    Point<float> mousePosToProportion (const Point<float> mousePos) const noexcept\r
+    Point<float> mousePosToProportion (Point<float> mousePos) const noexcept\r
     {\r
-        const int scale = (jmin (area.getWidth(), area.getHeight()) / 2);\r
+        auto scale = jmin (area.getWidth(), area.getHeight()) / 2;\r
 \r
         // You must call setViewport() to give this object a valid window size before\r
         // calling any of the mouse input methods!\r
         jassert (scale > 0);\r
 \r
-        return Point<float> ((mousePos.x - (float) area.getCentreX()) / (float) scale,\r
-                             ((float) area.getCentreY() - mousePos.y) / (float) scale);\r
+        return (mousePos.x - (float) area.getCentreX()) / (float) scale,\r
+                 ((float) area.getCentreY() - mousePos.y) / (float) scale };\r
     }\r
 \r
-    VectorType projectOnSphere (const Point<float> pos) const noexcept\r
+    VectorType projectOnSphere (Point<float> pos) const noexcept\r
     {\r
-        const float radiusSquared = radius * radius;\r
-        const float xySquared = pos.x * pos.x + pos.y * pos.y;\r
+        auto radiusSquared = radius * radius;\r
+        auto xySquared = pos.x * pos.x + pos.y * pos.y;\r
 \r
-        return VectorType (pos.x, pos.y,\r
-                           xySquared < radiusSquared * 0.5f ? std::sqrt (radiusSquared - xySquared)\r
-                                                            : (radiusSquared / (2.0f * std::sqrt (xySquared))));\r
+        return pos.x, pos.y,\r
+                 xySquared < radiusSquared * 0.5f ? std::sqrt (radiusSquared - xySquared)\r
+                                                  : (radiusSquared / (2.0f * std::sqrt (xySquared))) };\r
     }\r
 \r
     QuaternionType rotationFromMove (const VectorType& from, const VectorType& to) const noexcept\r
     {\r
-        VectorType rotationAxis (to ^ from);\r
+        auto rotationAxis = (to ^ from);\r
 \r
         if (rotationAxis.lengthIsBelowEpsilon())\r
             rotationAxis = VectorType::xAxis();\r
 \r
-        const float d = jlimit (-1.0f, 1.0f, (from - to).length() / (2.0f * radius));\r
+        auto d = jlimit (-1.0f, 1.0f, (from - to).length() / (2.0f * radius));\r
 \r
         return QuaternionType::fromAngle (2.0f * std::asin (d), rotationAxis);\r
     }\r
index 3f6825db8d2ec468448047703169db10e7b3912d..663d85b110d8d5113d83889964d17d581befb79b 100644 (file)
@@ -35,7 +35,7 @@
 \r
   ID:               juce_opengl\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE OpenGL classes\r
   description:      Classes for rendering OpenGL in a JUCE window.\r
   website:          http://www.juce.com/juce\r
index 748567554527827d4a9f8a4714c9f48fde6e3204..1672c452bb9d0c69273686397456ed16ed58d689 100644 (file)
@@ -39,7 +39,7 @@ public:
                    bool /*useMultisampling*/,\r
                    OpenGLVersion)\r
     {\r
-        dummyComponent = new DummyComponent (*this);\r
+        dummyComponent.reset (new DummyComponent (*this));\r
         createNativeWindow (component);\r
 \r
         PIXELFORMATDESCRIPTOR pfd;\r
@@ -145,8 +145,8 @@ private:
         NativeContext& context;\r
     };\r
 \r
-    ScopedPointer<DummyComponent> dummyComponent;\r
-    ScopedPointer<ComponentPeer> nativeWindow;\r
+    std::unique_ptr<DummyComponent> dummyComponent;\r
+    std::unique_ptr<ComponentPeer> nativeWindow;\r
     HGLRC renderContext;\r
     HDC dc;\r
     OpenGLContext* context = {};\r
@@ -171,7 +171,7 @@ private:
     void createNativeWindow (Component& component)\r
     {\r
         auto* topComp = component.getTopLevelComponent();\r
-        nativeWindow = createNonRepaintingEmbeddedWindowsPeer (*dummyComponent, topComp->getWindowHandle());\r
+        nativeWindow.reset (createNonRepaintingEmbeddedWindowsPeer (*dummyComponent, topComp->getWindowHandle()));\r
 \r
         if (auto* peer = topComp->getPeer())\r
             updateWindowPosition (peer->getAreaCoveredBy (component));\r
index a8e3b70951b3ed70c18e61917dfbef37b6325bf1..85d69eb91f02dabea7f55ea4ba9fc9339c93151e 100644 (file)
@@ -337,7 +337,7 @@ public:
             clearRegionInFrameBuffer (invalid);\r
 \r
             {\r
-                ScopedPointer<LowLevelGraphicsContext> g (createOpenGLGraphicsContext (context, cachedImageFrameBuffer));\r
+                std::unique_ptr<LowLevelGraphicsContext> g (createOpenGLGraphicsContext (context, cachedImageFrameBuffer));\r
                 g->clipToRectangleList (invalid);\r
                 g->addTransform (transform);\r
 \r
@@ -614,7 +614,7 @@ public:
 \r
     //==============================================================================\r
     friend class NativeContext;\r
-    ScopedPointer<NativeContext> nativeContext;\r
+    std::unique_ptr<NativeContext> nativeContext;\r
 \r
     OpenGLContext& context;\r
     Component& component;\r
@@ -641,7 +641,7 @@ public:
     Atomic<int> needsUpdate { 1 }, destroying;\r
     uint32 lastMMLockReleaseTime = 0;\r
 \r
-    ScopedPointer<ThreadPool> renderThread;\r
+    std::unique_ptr<ThreadPool> renderThread;\r
     ReferenceCountedArray<OpenGLContext::AsyncWorker, CriticalSection> workQueue;\r
     MessageManager::Lock messageManagerLock;\r
 \r
index 4f72e4cc691bdcdd0962c52d3656fd84feb3e6e6..ef5e15edf0866150f3a50902c2f97757f7300e5e 100644 (file)
@@ -323,7 +323,7 @@ private:
     NativeContext* nativeContext = nullptr;\r
     OpenGLRenderer* renderer = nullptr;\r
     double currentRenderScale = 1.0;\r
-    ScopedPointer<Attachment> attachment;\r
+    std::unique_ptr<Attachment> attachment;\r
     OpenGLPixelFormat openGLPixelFormat;\r
     void* contextToShareWith = nullptr;\r
     OpenGLVersion versionRequired = defaultGLVersion;\r
@@ -334,7 +334,7 @@ private:
     //==============================================================================\r
     struct AsyncWorker  : public ReferenceCountedObject\r
     {\r
-        typedef ReferenceCountedObjectPtr<AsyncWorker> Ptr;\r
+        using Ptr = ReferenceCountedObjectPtr<AsyncWorker>;\r
         virtual void operator() (OpenGLContext&) = 0;\r
         virtual ~AsyncWorker() {}\r
     };\r
index 49ee9c0ba301a6abe340a0ef59bbdc31357d34a9..824fbb81895cca9ad198ec1da73f01df2c5f3ee8 100644 (file)
@@ -251,7 +251,7 @@ bool OpenGLFrameBuffer::reloadSavedCopy (OpenGLContext& context)
 {\r
     if (savedState != nullptr)\r
     {\r
-        ScopedPointer<SavedState> state;\r
+        std::unique_ptr<SavedState> state;\r
         std::swap (state, savedState);\r
 \r
         if (state->restore (context, *this))\r
index 11c294a2e209ddb43e5c0b16168f74cca20e226d..bd661e8901bb5f759d5f9bf0e10b58d427049a6b 100644 (file)
@@ -124,11 +124,11 @@ public:
 private:\r
     class Pimpl;\r
     friend struct ContainerDeletePolicy<Pimpl>;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     class SavedState;\r
     friend struct ContainerDeletePolicy<SavedState>;\r
-    ScopedPointer<SavedState> savedState;\r
+    std::unique_ptr<SavedState> savedState;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OpenGLFrameBuffer)\r
 };\r
index 847c17fe3077d3d90ad03c2cfff96124bcc4e149..4d49340a86a890d9988162717e38ad7519de88ae 100644 (file)
@@ -46,12 +46,12 @@ struct CachedImageList  : public ReferenceCountedObject,
                           private ImagePixelData::Listener\r
 {\r
     CachedImageList (OpenGLContext& c) noexcept\r
-        : context (c), totalSize (0), maxCacheSize (c.getImageCacheSize()) {}\r
+        : context (c), maxCacheSize (c.getImageCacheSize()) {}\r
 \r
     static CachedImageList* get (OpenGLContext& c)\r
     {\r
         const char cacheValueID[] = "CachedImages";\r
-        CachedImageList* list = static_cast<CachedImageList*> (c.getAssociatedObject (cacheValueID));\r
+        auto list = static_cast<CachedImageList*> (c.getAssociatedObject (cacheValueID));\r
 \r
         if (list == nullptr)\r
         {\r
@@ -64,13 +64,12 @@ struct CachedImageList  : public ReferenceCountedObject,
 \r
     TextureInfo getTextureFor (const Image& image)\r
     {\r
-        ImagePixelData* const pixelData = image.getPixelData();\r
-\r
-        CachedImage* c = findCachedImage (pixelData);\r
+        auto pixelData = image.getPixelData();\r
+        auto* c = findCachedImage (pixelData);\r
 \r
         if (c == nullptr)\r
         {\r
-            if (OpenGLFrameBuffer* const fb = OpenGLImageType::getFrameBufferFrom (image))\r
+            if (auto fb = OpenGLImageType::getFrameBufferFrom (image))\r
             {\r
                 TextureInfo t;\r
                 t.textureID = fb->getTextureID();\r
@@ -97,8 +96,7 @@ struct CachedImageList  : public ReferenceCountedObject,
         CachedImage (CachedImageList& list, ImagePixelData* im)\r
             : owner (list), pixelData (im),\r
               lastUsed (Time::getCurrentTime()),\r
-              imageSize ((size_t) (im->width * im->height)),\r
-              textureNeedsReloading (true)\r
+              imageSize ((size_t) (im->width * im->height))\r
         {\r
             pixelData->listeners.add (&owner);\r
         }\r
@@ -126,7 +124,6 @@ struct CachedImageList  : public ReferenceCountedObject,
             t.fullHeightProportion = t.imageHeight / (float) texture.getHeight();\r
 \r
             lastUsed = Time::getCurrentTime();\r
-\r
             return t;\r
         }\r
 \r
@@ -135,17 +132,18 @@ struct CachedImageList  : public ReferenceCountedObject,
         OpenGLTexture texture;\r
         Time lastUsed;\r
         const size_t imageSize;\r
-        bool textureNeedsReloading;\r
+        bool textureNeedsReloading = true;\r
 \r
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CachedImage)\r
     };\r
 \r
-    typedef ReferenceCountedObjectPtr<CachedImageList> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<CachedImageList>;\r
 \r
 private:\r
     OpenGLContext& context;\r
     OwnedArray<CachedImage> images;\r
-    size_t totalSize, maxCacheSize;\r
+    size_t totalSize = 0;\r
+    const size_t maxCacheSize;\r
 \r
     bool canUseContext() const noexcept\r
     {\r
@@ -154,7 +152,7 @@ private:
 \r
     void imageDataChanged (ImagePixelData* im) override\r
     {\r
-        if (CachedImage* c = findCachedImage (im))\r
+        if (auto* c = findCachedImage (im))\r
             c->textureNeedsReloading = true;\r
     }\r
 \r
@@ -162,7 +160,7 @@ private:
     {\r
         for (int i = images.size(); --i >= 0;)\r
         {\r
-            CachedImage& ci = *images.getUnchecked(i);\r
+            auto& ci = *images.getUnchecked(i);\r
 \r
             if (ci.pixelData == im)\r
             {\r
@@ -181,30 +179,22 @@ private:
         }\r
     }\r
 \r
-    CachedImage* findCachedImage (ImagePixelData* const pixelData) const\r
+    CachedImage* findCachedImage (ImagePixelData* pixelData) const\r
     {\r
-        for (int i = 0; i < images.size(); ++i)\r
-        {\r
-            CachedImage* c = images.getUnchecked(i);\r
-\r
-            if (c->pixelData == pixelData)\r
-                return c;\r
-        }\r
+        for (auto& i : images)\r
+            if (i->pixelData == pixelData)\r
+                return i;\r
 \r
-        return nullptr;\r
+        return {};\r
     }\r
 \r
     void removeOldestItem()\r
     {\r
         CachedImage* oldest = nullptr;\r
 \r
-        for (int i = 0; i < images.size(); ++i)\r
-        {\r
-            CachedImage* c = images.getUnchecked(i);\r
-\r
-            if (oldest == nullptr || c->lastUsed < oldest->lastUsed)\r
-                oldest = c;\r
-        }\r
+        for (auto& i : images)\r
+            if (oldest == nullptr || i->lastUsed < oldest->lastUsed)\r
+                oldest = i;\r
 \r
         if (oldest != nullptr)\r
         {\r
@@ -375,7 +365,7 @@ struct ShaderPrograms  : public ReferenceCountedObject
           maskTexture (context)\r
     {}\r
 \r
-    typedef ReferenceCountedObjectPtr<ShaderPrograms> Ptr;\r
+    using Ptr = ReferenceCountedObjectPtr<ShaderPrograms>;\r
 \r
     //==============================================================================\r
     struct ShaderProgramHolder\r
@@ -445,9 +435,8 @@ struct ShaderPrograms  : public ReferenceCountedObject
         }\r
 \r
         OpenGLShaderProgram::Attribute positionAttribute, colourAttribute;\r
-\r
-    private:\r
         OpenGLShaderProgram::Uniform screenBounds;\r
+        std::function<void(OpenGLShaderProgram&)> onShaderActivated;\r
     };\r
 \r
     struct MaskedShaderParams\r
@@ -831,9 +820,7 @@ struct StateHelpers
 {\r
     struct BlendingMode\r
     {\r
-        BlendingMode() noexcept\r
-            : blendingEnabled (false), srcFunction (0), dstFunction (0)\r
-        {}\r
+        BlendingMode() noexcept {}\r
 \r
         void resync() noexcept\r
         {\r
@@ -887,8 +874,8 @@ struct StateHelpers
         }\r
 \r
     private:\r
-        bool blendingEnabled;\r
-        GLenum srcFunction, dstFunction;\r
+        bool blendingEnabled = false;\r
+        GLenum srcFunction = 0, dstFunction = 0;\r
     };\r
 \r
     //==============================================================================\r
@@ -975,8 +962,7 @@ struct StateHelpers
     //==============================================================================\r
     struct ActiveTextures\r
     {\r
-        ActiveTextures (const OpenGLContext& c) noexcept\r
-            : texturesEnabled (0), currentActiveTexture (-1), context (c)\r
+        ActiveTextures (const OpenGLContext& c) noexcept  : context (c)\r
         {}\r
 \r
         void clear() noexcept\r
@@ -1048,6 +1034,7 @@ struct StateHelpers
                 setActiveTexture (0);\r
                 bindTexture (texture1);\r
             }\r
+\r
             JUCE_CHECK_OPENGL_ERROR\r
         }\r
 \r
@@ -1083,7 +1070,7 @@ struct StateHelpers
 \r
     private:\r
         GLuint currentTextureID[3];\r
-        int texturesEnabled, currentActiveTexture;\r
+        int texturesEnabled = 0, currentActiveTexture = -1;\r
         const OpenGLContext& context;\r
 \r
         ActiveTextures& operator= (const ActiveTextures&);\r
@@ -1330,6 +1317,9 @@ struct StateHelpers
                 shader.program.use();\r
                 shader.bindAttributes (context);\r
 \r
+                if (shader.onShaderActivated)\r
+                    shader.onShaderActivated (shader.program);\r
+\r
                 currentBounds = bounds;\r
                 shader.set2DBounds (bounds.toFloat());\r
 \r
@@ -1579,7 +1569,7 @@ private:
 //==============================================================================\r
 struct SavedState  : public RenderingHelpers::SavedStateBase<SavedState>\r
 {\r
-    typedef RenderingHelpers::SavedStateBase<SavedState> BaseClass;\r
+    using BaseClass = RenderingHelpers::SavedStateBase<SavedState>;\r
 \r
     SavedState (GLState* s)  : BaseClass (s->target.bounds), state (s)\r
     {}\r
@@ -1630,7 +1620,7 @@ struct SavedState  : public RenderingHelpers::SavedStateBase<SavedState>
         }\r
     }\r
 \r
-    typedef RenderingHelpers::GlyphCache<RenderingHelpers::CachedGlyphEdgeTable<SavedState>, SavedState> GlyphCacheType;\r
+    using GlyphCacheType = RenderingHelpers::GlyphCache<RenderingHelpers::CachedGlyphEdgeTable<SavedState>, SavedState>;\r
 \r
     void drawGlyph (int glyphNumber, const AffineTransform& trans)\r
     {\r
@@ -1667,7 +1657,7 @@ struct SavedState  : public RenderingHelpers::SavedStateBase<SavedState>
                 auto t = transform.getTransformWith (AffineTransform::scale (fontHeight * font.getHorizontalScale(), fontHeight)\r
                                                                      .followedBy (trans));\r
 \r
-                const ScopedPointer<EdgeTable> et (font.getTypeface()->getEdgeTableForGlyph (glyphNumber, t, fontHeight));\r
+                const std::unique_ptr<EdgeTable> et (font.getTypeface()->getEdgeTableForGlyph (glyphNumber, t, fontHeight));\r
 \r
                 if (et != nullptr)\r
                     fillShape (new EdgeTableRegionType (*et), false);\r
@@ -1742,7 +1732,7 @@ struct SavedState  : public RenderingHelpers::SavedStateBase<SavedState>
 \r
 private:\r
     Image transparencyLayer;\r
-    ScopedPointer<Target> previousTarget;\r
+    std::unique_ptr<Target> previousTarget;\r
 \r
     SavedState& operator= (const SavedState&);\r
 };\r
@@ -1860,7 +1850,8 @@ struct CustomProgram  : public ReferenceCountedObject,
         return nullptr;\r
     }\r
 \r
-    static CustomProgram* getOrCreate (LowLevelGraphicsContext& gc, const String& hashName, const String& code, String& errorMessage)\r
+    static CustomProgram* getOrCreate (LowLevelGraphicsContext& gc, const String& hashName,\r
+                                       const String& code, String& errorMessage)\r
     {\r
         if (auto* c = get (hashName))\r
             return c;\r
@@ -1872,7 +1863,7 @@ struct CustomProgram  : public ReferenceCountedObject,
 \r
             if (errorMessage.isEmpty())\r
             {\r
-                if (OpenGLContext* context = OpenGLContext::getCurrentContext())\r
+                if (auto context = OpenGLContext::getCurrentContext())\r
                 {\r
                     context->setAssociatedObject (hashName.toRawUTF8(), c);\r
                     return c;\r
@@ -1904,19 +1895,24 @@ OpenGLShaderProgram* OpenGLGraphicsContextCustomShader::getProgram (LowLevelGrap
 {\r
     String errorMessage;\r
 \r
-    if (CustomProgram* c = CustomProgram::getOrCreate (gc, hashName, code, errorMessage))\r
+    if (auto c = CustomProgram::getOrCreate (gc, hashName, code, errorMessage))\r
         return &(c->program);\r
 \r
-    return nullptr;\r
+    return {};\r
 }\r
 \r
 void OpenGLGraphicsContextCustomShader::fillRect (LowLevelGraphicsContext& gc, Rectangle<int> area) const\r
 {\r
     String errorMessage;\r
 \r
-    if (OpenGLRendering::ShaderContext* sc = dynamic_cast<OpenGLRendering::ShaderContext*> (&gc))\r
-        if (CustomProgram* c = CustomProgram::getOrCreate (gc, hashName, code, errorMessage))\r
+    if (auto sc = dynamic_cast<OpenGLRendering::ShaderContext*> (&gc))\r
+    {\r
+        if (auto c = CustomProgram::getOrCreate (gc, hashName, code, errorMessage))\r
+        {\r
+            c->onShaderActivated = onShaderActivated;\r
             sc->fillRectWithCustomShader (*c, area);\r
+        }\r
+    }\r
 }\r
 \r
 Result OpenGLGraphicsContextCustomShader::checkCompilation (LowLevelGraphicsContext& gc)\r
index 8e927f8c8293516d6232fd5e212e693356db3cd2..25b0187b459c2f3994d0512d15842d34262ee2e8 100644 (file)
@@ -30,19 +30,18 @@ namespace juce
 /** Creates a graphics context object that will render into the given OpenGL target.\r
     The caller is responsible for deleting this object when no longer needed.\r
 */\r
-LowLevelGraphicsContext* createOpenGLGraphicsContext (OpenGLContext& target,\r
-                                                      int width, int height);\r
+LowLevelGraphicsContext* createOpenGLGraphicsContext (OpenGLContext&, int width, int height);\r
 \r
-/** Creates a graphics context object that will render into the given OpenGL target.\r
+/** Creates a graphics context object that will render into the given OpenGL framebuffer.\r
     The caller is responsible for deleting this object when no longer needed.\r
 */\r
-LowLevelGraphicsContext* createOpenGLGraphicsContext (OpenGLContext& context,\r
-                                                      OpenGLFrameBuffer& target);\r
+LowLevelGraphicsContext* createOpenGLGraphicsContext (OpenGLContext&, OpenGLFrameBuffer&);\r
 \r
-/** Creates a graphics context object that will render into the given OpenGL target.\r
+/** Creates a graphics context object that will render into the given OpenGL framebuffer,\r
+    with the given size.\r
     The caller is responsible for deleting this object when no longer needed.\r
 */\r
-LowLevelGraphicsContext* createOpenGLGraphicsContext (OpenGLContext& context,\r
+LowLevelGraphicsContext* createOpenGLGraphicsContext (OpenGLContext&,\r
                                                       unsigned int frameBufferID,\r
                                                       int width, int height);\r
 \r
@@ -89,6 +88,11 @@ struct JUCE_API  OpenGLGraphicsContextCustomShader
     /** Returns the code that was used to create this object. */\r
     const String& getFragmentShaderCode() const noexcept           { return code; }\r
 \r
+    /** Optional lambda that will be called when the shader is activated, to allow\r
+        user code to do setup tasks.\r
+    */\r
+    std::function<void(OpenGLShaderProgram&)> onShaderActivated;\r
+\r
 private:\r
     String code, hashName;\r
 \r
index 5396c4f3e7111cd8ad82f28978b133f963f35c8e..44e5fcc0e9c51e04e9dd6b4f64a1b66aa6455c6a 100644 (file)
@@ -187,7 +187,7 @@ ImagePixelData::Ptr OpenGLImageType::create (Image::PixelFormat, int width, int
     OpenGLContext* currentContext = OpenGLContext::getCurrentContext();\r
     jassert (currentContext != nullptr); // an OpenGL image can only be created when a valid context is active!\r
 \r
-    ScopedPointer<OpenGLFrameBufferImage> im (new OpenGLFrameBufferImage (*currentContext, width, height));\r
+    std::unique_ptr<OpenGLFrameBufferImage> im (new OpenGLFrameBufferImage (*currentContext, width, height));\r
 \r
     if (! im->initialise())\r
         return ImagePixelData::Ptr();\r
index 3a7ebf9cd0124a93305aa88be50b8b3c8e96e837..6e026de4dfebca6ae35754854953e7c1717159cc 100644 (file)
 \r
 #include "juce_osc.h"\r
 \r
-#ifndef JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT\r
- #ifndef JUCE_DEMO_RUNNER\r
-  #error "juce_osc module requires your compiler to have a newer version of the standard library"\r
- #endif\r
-#else\r
-\r
 #include "osc/juce_OSCTypes.cpp"\r
 #include "osc/juce_OSCTimeTag.cpp"\r
 #include "osc/juce_OSCArgument.cpp"\r
@@ -49,5 +43,3 @@
 #include "osc/juce_OSCBundle.cpp"\r
 #include "osc/juce_OSCReceiver.cpp"\r
 #include "osc/juce_OSCSender.cpp"\r
-\r
-#endif\r
index 3acfe178a6b0618f77fb9c19ef1db17c5881cfbc..9b077eb7f52584c71fb116e17fd99858970fdf55 100644 (file)
@@ -35,7 +35,7 @@
 \r
   ID:               juce_osc\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE OSC classes\r
   description:      Open Sound Control implementation.\r
   website:          http://www.juce.com/juce\r
 #include <juce_core/juce_core.h>\r
 #include <juce_events/juce_events.h>\r
 \r
-#ifndef JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT\r
- #ifndef JUCE_DEMO_RUNNER\r
-  #error "juce_osc module requires your compiler to have a newer version of the standard library"\r
- #endif\r
-#else\r
-\r
 //==============================================================================\r
 #include "osc/juce_OSCTypes.h"\r
 #include "osc/juce_OSCTimeTag.h"\r
@@ -69,5 +63,3 @@
 #include "osc/juce_OSCBundle.h"\r
 #include "osc/juce_OSCReceiver.h"\r
 #include "osc/juce_OSCSender.h"\r
-\r
-#endif\r
index b2e36b05121b888d705346a9387f67ad4dcff552..9af4bd27abc633d12d38b70a2e2f633a0706ac7d 100644 (file)
@@ -33,7 +33,7 @@ namespace
     template <typename CharPointerType>\r
     class OSCPatternMatcherImpl\r
     {\r
-        typedef CharPointerType CharPtr;\r
+        using CharPtr = CharPointerType;\r
 \r
     public:\r
         //==============================================================================\r
@@ -266,7 +266,7 @@ namespace
     template <typename OSCAddressType>\r
     struct OSCAddressTokeniser\r
     {\r
-        typedef OSCAddressTokeniserTraits<OSCAddressType> Traits;\r
+        using Traits = OSCAddressTokeniserTraits<OSCAddressType>;\r
 \r
         //==============================================================================\r
         static bool isPrintableASCIIChar (juce_wchar c) noexcept\r
index c5c47192e5d8aeacbd7930d61235166a09d2c02f..4f466f3454bcff5ce85800e1c53facf7af0ae862 100644 (file)
@@ -58,9 +58,9 @@ OSCBundle::Element::Element (const Element& other)
         bundle = nullptr;\r
 \r
         if (other.isMessage())\r
-            message = new OSCMessage (other.getMessage());\r
+            message.reset (new OSCMessage (other.getMessage()));\r
         else\r
-            bundle = new OSCBundle (other.getBundle());\r
+            bundle.reset (new OSCBundle (other.getBundle()));\r
     }\r
 }\r
 \r
index dfb195f7d73fec8148b85310d4c8755740ec1289..5120757d1968e7386a0ba70199957c40a2da9bed 100644 (file)
@@ -98,8 +98,8 @@ public:
 \r
     private:\r
         //==============================================================================\r
-        ScopedPointer<OSCMessage> message;\r
-        ScopedPointer<OSCBundle> bundle;\r
+        std::unique_ptr<OSCMessage> message;\r
+        std::unique_ptr<OSCBundle> bundle;\r
     };\r
 \r
     //==============================================================================\r
index a007cbd150991f62e0630ac3f4223acfb95eb70c..c52ae4805d60ec0273c0987d6b058c41d97f9347 100644 (file)
@@ -101,9 +101,9 @@ namespace
             if (input.getNumBytesRemaining() < 4)\r
                 throw OSCFormatError ("OSC input stream exhausted while reading string");\r
 \r
-            const size_t posBegin = (size_t) getPosition();\r
-            String s (input.readString());\r
-            const size_t posEnd = (size_t) getPosition();\r
+            auto posBegin = (size_t) getPosition();\r
+            auto s = input.readString();\r
+            auto posEnd = (size_t) getPosition();\r
 \r
             if (static_cast<const char*> (getData()) [posEnd - 1] != '\0')\r
                 throw OSCFormatError ("OSC input stream exhausted before finding null terminator of string");\r
@@ -119,14 +119,14 @@ namespace
             if (input.getNumBytesRemaining() < 4)\r
                 throw OSCFormatError ("OSC input stream exhausted while reading blob");\r
 \r
-            const size_t blobDataSize = (size_t) input.readIntBigEndian();\r
+            auto blobDataSize = (size_t) input.readIntBigEndian();\r
 \r
             if ((size_t) input.getNumBytesRemaining() < (blobDataSize + 3) % 4)\r
                 throw OSCFormatError ("OSC input stream exhausted before reaching end of blob");\r
 \r
             MemoryBlock blob;\r
 \r
-            const size_t bytesRead = input.readIntoMemoryBlock (blob, (ssize_t) blobDataSize);\r
+            auto bytesRead = input.readIntoMemoryBlock (blob, (ssize_t) blobDataSize);\r
             readPaddingZeros (bytesRead);\r
 \r
             return blob;\r
@@ -203,8 +203,8 @@ namespace
         //==============================================================================\r
         OSCMessage readMessage()\r
         {\r
-            OSCAddressPattern ap = readAddressPattern();\r
-            OSCTypeList types = readTypeTagString();\r
+            auto ap = readAddressPattern();\r
+            auto types = readTypeTagString();\r
 \r
             OSCMessage msg (ap);\r
 \r
@@ -321,7 +321,7 @@ namespace
 struct OSCReceiver::Pimpl   : private Thread,\r
                               private MessageListener\r
 {\r
-    Pimpl()  : Thread ("JUCE OSC server")\r
+    Pimpl (const String& threadName)  : Thread (threadName)\r
     {\r
     }\r
 \r
@@ -387,8 +387,7 @@ struct OSCReceiver::Pimpl   : private Thread,
         addListenerWithAddress (listenerToAdd, addressToMatch, listenersWithAddress);\r
     }\r
 \r
-    void addListener (ListenerWithOSCAddress<RealtimeCallback>* listenerToAdd,\r
-                      OSCAddress addressToMatch)\r
+    void addListener (ListenerWithOSCAddress<RealtimeCallback>* listenerToAdd, OSCAddress addressToMatch)\r
     {\r
         addListenerWithAddress (listenerToAdd, addressToMatch, realtimeListenersWithAddress);\r
     }\r
@@ -429,7 +428,7 @@ struct OSCReceiver::Pimpl   : private Thread,
 \r
         try\r
         {\r
-            OSCBundle::Element content = inStream.readElementWithKnownSize (dataSize);\r
+            auto content = inStream.readElementWithKnownSize (dataSize);\r
 \r
             // realtime listeners should receive the OSC content first - and immediately\r
             // on this thread:\r
@@ -525,7 +524,7 @@ private:
     //==============================================================================\r
     void callListeners (const OSCBundle::Element& content)\r
     {\r
-        typedef OSCReceiver::Listener<OSCReceiver::MessageLoopCallback> Listener;\r
+        using Listener = OSCReceiver::Listener<OSCReceiver::MessageLoopCallback>;\r
 \r
         if (content.isMessage())\r
         {\r
@@ -541,7 +540,7 @@ private:
 \r
     void callRealtimeListeners (const OSCBundle::Element& content)\r
     {\r
-        typedef OSCReceiver::Listener<OSCReceiver::RealtimeCallback> Listener;\r
+        using Listener = OSCReceiver::Listener<OSCReceiver::RealtimeCallback>;\r
 \r
         if (content.isMessage())\r
         {\r
@@ -587,7 +586,11 @@ private:
 };\r
 \r
 //==============================================================================\r
-OSCReceiver::OSCReceiver()   : pimpl (new Pimpl())\r
+OSCReceiver::OSCReceiver (const String& threadName)   : pimpl (new Pimpl (threadName))\r
+{\r
+}\r
+\r
+OSCReceiver::OSCReceiver()  : OSCReceiver ("JUCE OSC server")\r
 {\r
 }\r
 \r
index 94b369b35500c0c0130e5c1d8e046da67a1f6887..4aa29ebb0c57e5be153d6f33f6e0f5a4b4d86831 100644 (file)
@@ -42,9 +42,12 @@ class JUCE_API  OSCReceiver
 {\r
 public:\r
     //==============================================================================\r
-    /** Constructs a new OSCReceiver. */\r
+    /** Creates an OSCReceiver. */\r
     OSCReceiver();\r
 \r
+    /** Creates an OSCReceiver with a specific name for its thread. */\r
+    OSCReceiver (const String& threadName);\r
+\r
     /** Destructor. */\r
     ~OSCReceiver();\r
 \r
@@ -200,7 +203,7 @@ public:
         The arguments passed are the pointer to and the data of the buffer that\r
         the OSCReceiver has failed to parse.\r
     */\r
-    typedef std::function<void (const char* data, int dataSize)> FormatErrorHandler;\r
+    using FormatErrorHandler = std::function<void (const char* data, int dataSize)>;\r
 \r
     /** Installs a custom error handler which is called in case the receiver\r
         encounters a stream it cannot parse as an OSC bundle or OSC message.\r
@@ -215,7 +218,7 @@ private:
     struct Pimpl;\r
     friend struct Pimpl;\r
     friend struct ContainerDeletePolicy<Pimpl>;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
     friend struct OSCReceiverCallbackMessage;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OSCReceiver)\r
index 1ba7eade370aaca32b82e57d7ab13f99de285df7..2024a5c35d5aa55ffdaf28a39dec6d3eb4094b8f 100644 (file)
@@ -143,7 +143,7 @@ private:
     struct Pimpl;\r
     friend struct Pimpl;\r
     friend struct ContainerDeletePolicy<Pimpl>;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OSCSender)\r
 };\r
index 5558ccba7abb65c9e29ef73dee10f2f3fb377410..74caf51da4cb191a96fcee533cee912d38e2626e 100644 (file)
@@ -278,7 +278,7 @@ private:
     struct Pimpl;\r
     friend struct Pimpl;\r
 \r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
    #endif\r
 };\r
 \r
index 25237e79354f202a62e80b0b9ae7e0bdef57ff82..0900654e5b627cc78c6ae4bf4556f1c22cb4fbbb 100644 (file)
@@ -35,7 +35,7 @@
 \r
   ID:               juce_product_unlocking\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE Online marketplace support\r
   description:      Classes for online product authentication\r
   website:          http://www.juce.com/juce\r
index bfbec1f76b248e75d29790dee5cd60bd998a5d10..4e02a1d09ca4ae5d9444cfbdac2153bacf67e858 100644 (file)
@@ -145,7 +145,7 @@ struct OnlineUnlockForm::OverlayComp  : public Component,
     OnlineUnlockStatus::UnlockResult result;\r
     String email, password;\r
 \r
-    ScopedPointer<TextButton> cancelButton;\r
+    std::unique_ptr<TextButton> cancelButton;\r
 \r
     JUCE_LEAK_DETECTOR (OnlineUnlockForm::OverlayComp)\r
 };\r
index c58ba5267cd6304176ea9ce6b59444fb517f0758..3550c3550c3893c512625fa380c9e783b3ff4107 100644 (file)
@@ -82,7 +82,7 @@ public:
 \r
 private:\r
     OnlineUnlockStatus& status;\r
-    ScopedPointer<BubbleMessageComponent> bubble;\r
+    std::unique_ptr<BubbleMessageComponent> bubble;\r
 \r
     bool showOverlayCancelButton;\r
 \r
index deef12c11e8d9299c65833f81cc98f2b8502fee1..964223fa47585a14a4493298794dc4c7104e35c3 100644 (file)
@@ -114,7 +114,7 @@ struct KeyFileUtils
         RSAKey key (rsaPublicKey);\r
         jassert (key.isValid());\r
 \r
-        ScopedPointer<XmlElement> xml;\r
+        std::unique_ptr<XmlElement> xml;\r
 \r
         if (! val.isZero())\r
         {\r
@@ -378,7 +378,7 @@ bool OnlineUnlockStatus::applyKeyFile (String keyFileContent)
 \r
 static bool canConnectToWebsite (const URL& url)\r
 {\r
-    ScopedPointer<InputStream> in (url.createInputStream (false, nullptr, nullptr, String(), 2000, nullptr));\r
+    std::unique_ptr<InputStream> in (url.createInputStream (false, nullptr, nullptr, String(), 2000, nullptr));\r
     return in != nullptr;\r
 }\r
 \r
@@ -454,7 +454,7 @@ OnlineUnlockStatus::UnlockResult OnlineUnlockStatus::attemptWebserverUnlock (con
 \r
     DBG ("Reply from server: " << reply);\r
 \r
-    ScopedPointer<XmlElement> xml (XmlDocument::parse (reply));\r
+    std::unique_ptr<XmlElement> xml (XmlDocument::parse (reply));\r
 \r
     if (xml != nullptr)\r
         return handleXmlReply (*xml);\r
index 114dc51203742c7ebfe26d31f489f7455c1422dd..14a7e682f63ef96c2691d45701d2fd500cd5dc78 100644 (file)
@@ -57,7 +57,7 @@ public:
 \r
 private:\r
     CriticalSection streamCreationLock;\r
-    ScopedPointer<WebInputStream> stream;\r
+    std::unique_ptr<WebInputStream> stream;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TracktionMarketplaceStatus)\r
 };\r
index 8fb17ef8a73b905249e0a89f7a28e06ba9bcd0b7..ef1595df8737f104ec29c600a297e1582ef9aa44 100644 (file)
@@ -89,7 +89,7 @@ struct InAppPurchases::Pimpl    : private AsyncUpdater,
                                             serviceConnection.get(), 1 /*BIND_AUTO_CREATE*/);\r
 \r
         if (threadPool == nullptr)\r
-            threadPool = new ThreadPool (1);\r
+            threadPool.reset (new ThreadPool (1));\r
     }\r
 \r
     ~Pimpl()\r
@@ -834,7 +834,7 @@ struct InAppPurchases::Pimpl    : private AsyncUpdater,
     //==============================================================================\r
     InAppPurchases& owner;\r
     GlobalRef inAppBillingService, serviceConnection;\r
-    ScopedPointer<ThreadPool> threadPool;\r
+    std::unique_ptr<ThreadPool> threadPool;\r
 \r
     CriticalSection getProductsInformationJobResultsLock,\r
                     getProductsBoughtJobResultsLock,\r
index 0ae7dc60c8a0c07259012ae2f437210e80e5f31a..c619832a94f1c25f9a51f36f4998ca05750ff373 100644 (file)
 namespace juce\r
 {\r
 \r
-template <> struct ContainerDeletePolicy<SKProductsRequest>                                                { static void destroy (NSObject* o) { [o release]; } };\r
-template <> struct ContainerDeletePolicy<SKReceiptRefreshRequest>                                          { static void destroy (NSObject* o) { [o release]; } };\r
-template <> struct ContainerDeletePolicy<NSObject<SKProductsRequestDelegate,SKPaymentTransactionObserver>> { static void destroy (NSObject* o) { [o release]; } };\r
-\r
-\r
-//==============================================================================\r
 struct SKDelegateAndPaymentObserver\r
 {\r
     SKDelegateAndPaymentObserver()  : delegate ([getClass().createInstance() init])\r
     {\r
-        Class::setThis (delegate, this);\r
+        Class::setThis (delegate.get(), this);\r
     }\r
 \r
     virtual ~SKDelegateAndPaymentObserver() {}\r
@@ -51,7 +45,7 @@ struct SKDelegateAndPaymentObserver
     virtual void updatedDownloads (SKPaymentQueue*, NSArray<SKDownload*>*) = 0;\r
 \r
 protected:\r
-    ScopedPointer<NSObject<SKProductsRequestDelegate, SKPaymentTransactionObserver>> delegate;\r
+    std::unique_ptr<NSObject<SKProductsRequestDelegate, SKPaymentTransactionObserver>, NSObjectDeleter> delegate;\r
 \r
 private:\r
     struct Class   : public ObjCClass<NSObject<SKProductsRequestDelegate, SKPaymentTransactionObserver>>\r
@@ -126,14 +120,14 @@ struct InAppPurchases::Pimpl   : public SKDelegateAndPaymentObserver
         };\r
 \r
         Type type;\r
-        ScopedPointer<SKProductsRequest> request;\r
+        std::unique_ptr<SKProductsRequest, NSObjectDeleter> request;\r
     };\r
 \r
     /** Represents a pending request started from [SKReceiptRefreshRequest start]. */\r
     struct PendingReceiptRefreshRequest\r
     {\r
         String subscriptionsSharedSecret;\r
-        ScopedPointer<SKReceiptRefreshRequest> request;\r
+        std::unique_ptr<SKReceiptRefreshRequest, NSObjectDeleter> request;\r
     };\r
 \r
     /** Represents a transaction with pending downloads. Only after all downloads\r
@@ -176,8 +170,8 @@ struct InAppPurchases::Pimpl   : public SKDelegateAndPaymentObserver
     };\r
 \r
     //==============================================================================\r
-    Pimpl (InAppPurchases& p) : owner (p)  { [[SKPaymentQueue defaultQueue] addTransactionObserver:    delegate]; }\r
-    ~Pimpl() noexcept                      { [[SKPaymentQueue defaultQueue] removeTransactionObserver: delegate]; }\r
+    Pimpl (InAppPurchases& p) : owner (p)  { [[SKPaymentQueue defaultQueue] addTransactionObserver:    delegate.get()]; }\r
+    ~Pimpl() noexcept                      { [[SKPaymentQueue defaultQueue] removeTransactionObserver: delegate.get()]; }\r
 \r
     //==============================================================================\r
     bool isInAppPurchasesSupported() const     { return true; }\r
@@ -186,9 +180,10 @@ struct InAppPurchases::Pimpl   : public SKDelegateAndPaymentObserver
     {\r
         auto* productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithArray: createNSArrayFromStringArray (productIdentifiers)]];\r
 \r
-        pendingProductInfoRequests.add (new PendingProductInfoRequest {PendingProductInfoRequest::Type::query, productsRequest});\r
+        pendingProductInfoRequests.add (new PendingProductInfoRequest { PendingProductInfoRequest::Type::query,\r
+                                                                        std::unique_ptr<SKProductsRequest, NSObjectDeleter> (productsRequest) });\r
 \r
-        productsRequest.delegate = delegate;\r
+        productsRequest.delegate = delegate.get();\r
         [productsRequest start];\r
     }\r
 \r
@@ -203,9 +198,10 @@ struct InAppPurchases::Pimpl   : public SKDelegateAndPaymentObserver
         auto* productIdentifiers = [NSArray arrayWithObject: juceStringToNS (productIdentifier)];\r
         auto* productsRequest    = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithArray:productIdentifiers]];\r
 \r
-        pendingProductInfoRequests.add (new PendingProductInfoRequest {PendingProductInfoRequest::Type::purchase, productsRequest});\r
+        pendingProductInfoRequests.add (new PendingProductInfoRequest { PendingProductInfoRequest::Type::purchase,\r
+                                                                        std::unique_ptr<SKProductsRequest, NSObjectDeleter> (productsRequest) });\r
 \r
-        productsRequest.delegate = delegate;\r
+        productsRequest.delegate = delegate.get();\r
         [productsRequest start];\r
     }\r
 \r
@@ -219,9 +215,9 @@ struct InAppPurchases::Pimpl   : public SKDelegateAndPaymentObserver
         {\r
             auto* receiptRequest = [[SKReceiptRefreshRequest alloc] init];\r
 \r
-            pendingReceiptRefreshRequests.add (new PendingReceiptRefreshRequest {subscriptionsSharedSecret,\r
-                                                                                 [receiptRequest retain]});\r
-            receiptRequest.delegate = delegate;\r
+            pendingReceiptRefreshRequests.add (new PendingReceiptRefreshRequest { subscriptionsSharedSecret,\r
+                                                                                  std::unique_ptr<SKReceiptRefreshRequest, NSObjectDeleter> ([receiptRequest retain]) });\r
+            receiptRequest.delegate = delegate.get();\r
             [receiptRequest start];\r
         }\r
     }\r
@@ -256,7 +252,7 @@ struct InAppPurchases::Pimpl   : public SKDelegateAndPaymentObserver
         {\r
             auto& pendingRequest = *pendingProductInfoRequests[i];\r
 \r
-            if (pendingRequest.request == request)\r
+            if (pendingRequest.request.get() == request)\r
             {\r
                 if      (pendingRequest.type == PendingProductInfoRequest::Type::query)    notifyProductsInfoReceived (response.products);\r
                 else if (pendingRequest.type == PendingProductInfoRequest::Type::purchase) startPurchase (response.products);\r
@@ -279,7 +275,7 @@ struct InAppPurchases::Pimpl   : public SKDelegateAndPaymentObserver
             {\r
                 auto& pendingRequest = *pendingReceiptRefreshRequests[i];\r
 \r
-                if (pendingRequest.request == receiptRefreshRequest)\r
+                if (pendingRequest.request.get() == receiptRefreshRequest)\r
                 {\r
                     processReceiptRefreshResponseWithSubscriptionsSharedSecret (pendingRequest.subscriptionsSharedSecret);\r
                     pendingReceiptRefreshRequests.remove (i);\r
@@ -297,7 +293,7 @@ struct InAppPurchases::Pimpl   : public SKDelegateAndPaymentObserver
             {\r
                 auto& pendingRequest = *pendingReceiptRefreshRequests[i];\r
 \r
-                if (pendingRequest.request == receiptRefreshRequest)\r
+                if (pendingRequest.request.get() == receiptRefreshRequest)\r
                 {\r
                     auto errorDetails = error != nil ? (", " + nsStringToJuce ([error localizedDescription])) : String();\r
                     owner.listeners.call ([&] (Listener& l) { l.purchasesListRestored ({}, false, NEEDS_TRANS ("Receipt fetch failed") + errorDetails); });\r
index facff97b9cd49bde2cc2641133c0f0b94d5c7ed2..636be58f25f19755904e08029d4b0a4f8d777c93 100644 (file)
 namespace juce\r
 {\r
 \r
-#if JUCE_MAC || JUCE_IOS\r
+#if JUCE_MAC\r
  #include "../native/juce_mac_CameraDevice.h"\r
 #elif JUCE_WINDOWS\r
  #include "../native/juce_win32_CameraDevice.h"\r
+#elif JUCE_IOS\r
+ #if JUCE_CLANG\r
+  #pragma clang diagnostic push\r
+  #pragma clang diagnostic ignored "-Wunguarded-availability-new"\r
+ #endif\r
+\r
+ #include "../native/juce_ios_CameraDevice.h"\r
+\r
+ #if JUCE_CLANG\r
+  #pragma clang diagnostic pop\r
+ #endif\r
 #elif JUCE_ANDROID\r
  #include "../native/juce_android_CameraDevice.h"\r
 #endif\r
 \r
+#if JUCE_ANDROID || JUCE_IOS\r
+//==============================================================================\r
+class CameraDevice::CameraFactory\r
+{\r
+public:\r
+    static CameraFactory& getInstance()\r
+    {\r
+        static CameraFactory factory;\r
+        return factory;\r
+    }\r
+\r
+    void openCamera (int index, OpenCameraResultCallback resultCallback,\r
+                     int minWidth, int minHeight, int maxWidth, int maxHeight, bool useHighQuality)\r
+    {\r
+        auto cameraId = getAvailableDevices()[index];\r
+\r
+        if (getCameraIndex (cameraId) != -1)\r
+        {\r
+            // You are trying to open the same camera twice.\r
+            jassertfalse;\r
+            return;\r
+        }\r
+\r
+        std::unique_ptr<CameraDevice> device (new CameraDevice (cameraId, index,\r
+                                                                minWidth, minHeight, maxWidth,\r
+                                                                maxHeight, useHighQuality));\r
+\r
+        camerasToOpen.add ({ nextRequestId++,\r
+                             std::unique_ptr<CameraDevice> (device.release()),\r
+                             resultCallback });\r
+\r
+        auto& pendingOpen = camerasToOpen.getReference (camerasToOpen.size() - 1);\r
+\r
+        pendingOpen.device->pimpl->open ([this](const String& deviceId, const String& error)\r
+                                         {\r
+                                             int index = getCameraIndex (deviceId);\r
+\r
+                                             if (index == -1)\r
+                                                 return;\r
+\r
+                                             auto& pendingOpen = camerasToOpen.getReference (index);\r
+\r
+                                             if (error.isEmpty())\r
+                                                 pendingOpen.resultCallback (pendingOpen.device.release(), error);\r
+                                             else\r
+                                                 pendingOpen.resultCallback (nullptr, error);\r
+\r
+                                             int id = pendingOpen.requestId;\r
+\r
+                                             MessageManager::callAsync ([this, id]() { removeRequestWithId (id); });\r
+                                         });\r
+    }\r
+\r
+private:\r
+    int getCameraIndex (const String& cameraId) const\r
+    {\r
+        for (int i = 0; i < camerasToOpen.size(); ++i)\r
+        {\r
+            auto& pendingOpen = camerasToOpen.getReference (i);\r
+\r
+            if (pendingOpen.device->pimpl->getCameraId() == cameraId)\r
+                return i;\r
+        }\r
+\r
+        return -1;\r
+    }\r
+\r
+    void removeRequestWithId (int id)\r
+    {\r
+        for (int i = camerasToOpen.size(); --i >= 0;)\r
+        {\r
+            if (camerasToOpen.getReference (i).requestId == id)\r
+            {\r
+                camerasToOpen.remove (i);\r
+                return;\r
+            }\r
+        }\r
+    }\r
+\r
+    struct PendingCameraOpen\r
+    {\r
+        int requestId;\r
+        std::unique_ptr<CameraDevice> device;\r
+        OpenCameraResultCallback resultCallback;\r
+    };\r
+\r
+    Array<PendingCameraOpen> camerasToOpen;\r
+    static int nextRequestId;\r
+};\r
+\r
+int CameraDevice::CameraFactory::nextRequestId = 0;\r
+\r
+#endif\r
+\r
 //==============================================================================\r
 CameraDevice::CameraDevice (const String& nm, int index, int minWidth, int minHeight, int maxWidth, int maxHeight, bool useHighQuality)\r
-   : name (nm), pimpl (new Pimpl (name, index, minWidth, minHeight, maxWidth, maxHeight, useHighQuality))\r
+   : name (nm), pimpl (new Pimpl (*this, name, index, minWidth, minHeight, maxWidth, maxHeight, useHighQuality))\r
 {\r
 }\r
 \r
 CameraDevice::~CameraDevice()\r
 {\r
+    jassert (juce::MessageManager::getInstance()->currentThreadHasLockedMessageManager());\r
+\r
     stopRecording();\r
     pimpl.reset();\r
 }\r
@@ -52,6 +159,11 @@ Component* CameraDevice::createViewerComponent()
     return new ViewerComponent (*this);\r
 }\r
 \r
+void CameraDevice::takeStillPicture (std::function<void (const Image&)> pictureTakenCallback)\r
+{\r
+    pimpl->takeStillPicture (pictureTakenCallback);\r
+}\r
+\r
 void CameraDevice::startRecordingToFile (const File& file, int quality)\r
 {\r
     stopRecording();\r
@@ -94,12 +206,44 @@ CameraDevice* CameraDevice::openDevice (int index,
                                         int maxWidth, int maxHeight,\r
                                         bool useHighQuality)\r
 {\r
-    if (ScopedPointer<CameraDevice> d = new CameraDevice (getAvailableDevices() [index], index,\r
-                                                          minWidth, minHeight, maxWidth, maxHeight, useHighQuality))\r
-        if (d->pimpl->openedOk())\r
-            return d.release();\r
+    jassert (juce::MessageManager::getInstance()->currentThreadHasLockedMessageManager());\r
+\r
+   #if ! JUCE_ANDROID && ! JUCE_IOS\r
+    std::unique_ptr<CameraDevice> d (new CameraDevice (getAvailableDevices() [index], index,\r
+                                                       minWidth, minHeight, maxWidth, maxHeight, useHighQuality));\r
+    if (d != nullptr && d->pimpl->openedOk())\r
+        return d.release();\r
+   #else\r
+    ignoreUnused (index, minWidth, minHeight);\r
+    ignoreUnused (maxWidth, maxHeight, useHighQuality);\r
+\r
+    // Use openDeviceAsync to open a camera device on iOS or Android.\r
+    jassertfalse;\r
+   #endif\r
 \r
     return nullptr;\r
 }\r
 \r
+void CameraDevice::openDeviceAsync (int index, OpenCameraResultCallback resultCallback,\r
+                                    int minWidth, int minHeight, int maxWidth, int maxHeight, bool useHighQuality)\r
+{\r
+    jassert (juce::MessageManager::getInstance()->currentThreadHasLockedMessageManager());\r
+\r
+    if (resultCallback == nullptr)\r
+    {\r
+        // A valid callback must be passed.\r
+        jassertfalse;\r
+        return;\r
+    }\r
+\r
+   #if JUCE_ANDROID || JUCE_IOS\r
+    CameraFactory::getInstance().openCamera (index, static_cast<OpenCameraResultCallback&&> (resultCallback),\r
+                                             minWidth, minHeight, maxWidth, maxHeight, useHighQuality);\r
+   #else\r
+    auto* device = openDevice (index, minWidth, minHeight, maxWidth, maxHeight, useHighQuality);\r
+\r
+    resultCallback (device, device != nullptr ? String() : "Could not open camera device");\r
+   #endif\r
+}\r
+\r
 } // namespace juce\r
index 57ac1a040062971e8125034977c621ad279188fb..b362d1c6343176d49de503e619d763426289b735 100644 (file)
@@ -35,9 +35,9 @@ namespace juce
     Controls any video capture devices that might be available.\r
 \r
     Use getAvailableDevices() to list the devices that are attached to the\r
-    system, then call openDevice to open one for use. Once you have a CameraDevice\r
-    object, you can get a viewer component from it, and use its methods to\r
-    stream to a file or capture still-frames.\r
+    system, then call openDevice() or openDeviceAsync() to open one for use.\r
+    Once you have a CameraDevice object, you can get a viewer component from it,\r
+    and use its methods to stream to a file or capture still-frames.\r
 \r
     @tags{Video}\r
 */\r
@@ -50,17 +50,18 @@ public:
     //==============================================================================\r
     /** Returns a list of the available cameras on this machine.\r
 \r
-        You can open one of these devices by calling openDevice().\r
+        You can open one of these devices by calling openDevice() or openDeviceAsync().\r
     */\r
     static StringArray getAvailableDevices();\r
 \r
-    /** Opens a camera device.\r
+    /** Synchronously opens a camera device. This function should not be used on iOS or\r
+        Android, use openDeviceAsync() instead.\r
 \r
         The index parameter indicates which of the items returned by getAvailableDevices()\r
         to open.\r
 \r
         The size constraints allow the method to choose between different resolutions if\r
-        the camera supports this. If the resolution cam't be specified (e.g. on the Mac)\r
+        the camera supports this. If the resolution can't be specified (e.g. on the Mac)\r
         then these will be ignored.\r
 \r
         On Mac, if highQuality is false, then the camera will be opened in preview mode\r
@@ -72,16 +73,62 @@ public:
                                      int maxWidth = 1024, int maxHeight = 768,\r
                                      bool highQuality = true);\r
 \r
+    using OpenCameraResultCallback = std::function<void (CameraDevice*, const String& /*error*/)>;\r
+\r
+    /** Asynchronously opens a camera device on iOS (iOS 7+) or Android (API 21+).\r
+        On other platforms, the function will simply call openDevice(). Upon completion,\r
+        resultCallback will be invoked with valid CameraDevice* and an empty error\r
+        String on success, or nullptr CameraDevice and a non-empty error String on failure.\r
+\r
+        This is the preferred method of opening a camera device, because it works on all\r
+        platforms, whereas synchronous openDevice() does not work on iOS & Android.\r
+\r
+        The index parameter indicates which of the items returned by getAvailableDevices()\r
+        to open.\r
+\r
+        The size constraints allow the method to choose between different resolutions if\r
+        the camera supports this. If the resolution can't be specified then these will be\r
+        ignored.\r
+\r
+        On iOS, if you want to switch a device, it is more efficient to open a new device\r
+        before closing the older one, because this way both devices can share the same\r
+        underlying camera session. Otherwise, the session needs to be close first, and this\r
+        is a lengthy process that can take several seconds.\r
+\r
+        The Android implementation currently supports a maximum recording resolution of\r
+        1080p. Choosing a larger size will result in larger pictures taken, but the video\r
+        will be capped at 1080p.\r
+    */\r
+    static void openDeviceAsync (int deviceIndex,\r
+                                 OpenCameraResultCallback resultCallback,\r
+                                 int minWidth = 128, int minHeight = 64,\r
+                                 int maxWidth = 1024, int maxHeight = 768,\r
+                                 bool highQuality = true);\r
+\r
     //==============================================================================\r
     /** Returns the name of this device */\r
     const String& getName() const noexcept          { return name; }\r
 \r
     /** Creates a component that can be used to display a preview of the\r
         video from this camera.\r
+\r
+        Note: while you can change the size of the preview component, the actual\r
+        preview display may be smaller than the size requested, because the correct\r
+        aspect ratio is maintained automatically.\r
     */\r
     Component* createViewerComponent();\r
 \r
     //==============================================================================\r
+    /** Triggers a still picture capture. Upon completion, pictureTakenCallback will\r
+        be invoked on a message thread.\r
+\r
+        On Android, before calling takeStillPicture(), you need to create a preview with\r
+        createViewerComponent() and you need to make it visible on screen.\r
+\r
+        Android does not support simultaneous video recording and still picture capture.\r
+     */\r
+    void takeStillPicture (std::function<void (const Image&)> pictureTakenCallback);\r
+\r
     /** Starts recording video to the specified file.\r
 \r
         You should use getFileExtension() to find out the correct extension to\r
@@ -95,6 +142,16 @@ public:
 \r
         The quality parameter can be 0, 1, or 2, to indicate low, medium, or high. It may\r
         or may not be used, depending on the driver.\r
+\r
+        On Android, before calling startRecordingToFile(), you need to create a preview with\r
+        createViewerComponent() and you need to make it visible on screen.\r
+\r
+        The Android camera also requires exclusive access to the audio device, so make sure\r
+        you close any open audio devices with AudioDeviceManager::closeAudioDevice() first.\r
+\r
+        Android does not support simultaneous video recording and still picture capture.\r
+\r
+        @see AudioDeviceManager::closeAudioDevice, AudioDeviceManager::restartLastAudioDevice\r
     */\r
     void startRecordingToFile (const File& file, int quality = 2);\r
 \r
@@ -113,9 +170,17 @@ public:
     */\r
     Time getTimeOfFirstRecordedFrame() const;\r
 \r
+    /** Set this callback to be notified whenever an error occurs. You may need to close\r
+        and reopen the device to be able to use it further. */\r
+    std::function<void (const String& /*error*/)> onErrorOccurred;\r
+\r
     //==============================================================================\r
     /**\r
-        Receives callbacks with images from a CameraDevice.\r
+        Receives callbacks with individual frames from a CameraDevice. It is mainly\r
+        useful for processing multiple frames that has to be done as quickly as\r
+        possible. The callbacks can be called from any thread.\r
+\r
+        If you just need to take one picture, you should use takeStillPicture() instead.\r
 \r
         @see CameraDevice::addListener\r
     */\r
@@ -130,6 +195,13 @@ public:
             This may be called by any thread, so be careful about thread-safety,\r
             and make sure that you process the data as quickly as possible to\r
             avoid glitching!\r
+\r
+            Simply add a listener to be continuously notified about new frames becoming\r
+            available and remove the listener when you no longer need new frames.\r
+\r
+            If you just need to take one picture, use takeStillPicture() instead.\r
+\r
+            @see CameraDevice::takeStillPicture\r
         */\r
         virtual void imageReceived (const Image& image) = 0;\r
     };\r
@@ -150,7 +222,7 @@ private:
     struct Pimpl;\r
     friend struct Pimpl;\r
     friend struct ContainerDeletePolicy<Pimpl>;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     struct ViewerComponent;\r
     friend struct ViewerComponent;\r
@@ -158,6 +230,32 @@ private:
     CameraDevice (const String& name, int index,\r
                   int minWidth, int minHeight, int maxWidth, int maxHeight, bool highQuality);\r
 \r
+   #if JUCE_ANDROID || JUCE_IOS\r
+    class CameraFactory;\r
+   #endif\r
+\r
+   #if JUCE_ANDROID\r
+    friend void juce_cameraDeviceStateClosed (int64);\r
+    friend void juce_cameraDeviceStateDisconnected (int64);\r
+    friend void juce_cameraDeviceStateError (int64, int);\r
+    friend void juce_cameraDeviceStateOpened (int64, void*);\r
+\r
+    friend void juce_cameraCaptureSessionActive (int64, void*);\r
+    friend void juce_cameraCaptureSessionClosed (int64, void*);\r
+    friend void juce_cameraCaptureSessionConfigureFailed (int64, void*);\r
+    friend void juce_cameraCaptureSessionConfigured (int64, void*);\r
+    friend void juce_cameraCaptureSessionReady (int64, void*);\r
+\r
+    friend void juce_cameraCaptureSessionCaptureCompleted (int64, bool, void*, void*, void*);\r
+    friend void juce_cameraCaptureSessionCaptureFailed (int64, bool, void*, void*, void*);\r
+    friend void juce_cameraCaptureSessionCaptureProgressed (int64, bool, void*, void*, void*);\r
+    friend void juce_cameraCaptureSessionCaptureSequenceAborted (int64, bool, void*, int);\r
+    friend void juce_cameraCaptureSessionCaptureSequenceCompleted (int64, bool, void*, int, int64);\r
+    friend void juce_cameraCaptureSessionCaptureStarted (int64, bool, void*, void*, int64, int64);\r
+\r
+    friend void juce_deviceOrientationChanged (int64, int);\r
+   #endif\r
+\r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CameraDevice)\r
 };\r
 \r
index 4333e43db431dbf4cb86aa0f74ca342b6523baf7..77ccb89838416b59712d16fd6eb91709a8c7e00c 100644 (file)
@@ -36,7 +36,7 @@
 \r
   ID:               juce_video\r
   vendor:           juce\r
-  version:          5.3.1\r
+  version:          5.3.2\r
   name:             JUCE video playback and capture classes\r
   description:      Classes for playing video and capturing camera input.\r
   website:          http://www.juce.com/juce\r
 \r
 //=============================================================================\r
 /** Config: JUCE_USE_CAMERA\r
-    Enables web-cam support using the CameraDevice class (Mac and Windows).\r
+    Enables camera support using the CameraDevice class (Mac, Windows, iOS, Android).\r
 */\r
 #ifndef JUCE_USE_CAMERA\r
  #define JUCE_USE_CAMERA 0\r
 #endif\r
 \r
-#if ! (JUCE_MAC || JUCE_WINDOWS)\r
+#ifndef JUCE_CAMERA_LOG_ENABLED\r
+ #define JUCE_CAMERA_LOG_ENABLED 0\r
+#endif\r
+\r
+#if JUCE_CAMERA_LOG_ENABLED\r
+ #define JUCE_CAMERA_LOG(x) DBG(x)\r
+#else\r
+ #define JUCE_CAMERA_LOG(x) {}\r
+#endif\r
+\r
+#if ! (JUCE_MAC || JUCE_WINDOWS || JUCE_IOS || JUCE_ANDROID)\r
  #undef JUCE_USE_CAMERA\r
 #endif\r
 \r
index 18e402ae762bd89a4d665fde70c2fff36c8b0680..ee424b03efff3bf4b6c46014d48ae3d4fa554b9e 100644 (file)
   ==============================================================================\r
 */\r
 \r
+#if __ANDROID_API__ >= 21\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ STATICMETHOD (valueOf, "valueOf", "(Ljava/lang/String;)Landroid/graphics/Bitmap$CompressFormat;")\r
+\r
+DECLARE_JNI_CLASS (AndroidBitmapCompressFormat, "android/graphics/Bitmap$CompressFormat");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (close,                "close",                "()V") \\r
+ METHOD (createCaptureRequest, "createCaptureRequest", "(I)Landroid/hardware/camera2/CaptureRequest$Builder;") \\r
+ METHOD (createCaptureSession, "createCaptureSession", "(Ljava/util/List;Landroid/hardware/camera2/CameraCaptureSession$StateCallback;Landroid/os/Handler;)V")\r
+\r
+DECLARE_JNI_CLASS (AndroidCameraDevice, "android/hardware/camera2/CameraDevice");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (close,     "close",     "()V") \\r
+ METHOD (getPlanes, "getPlanes", "()[Landroid/media/Image$Plane;")\r
+\r
+DECLARE_JNI_CLASS (AndroidImage, "android/media/Image");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (getBuffer, "getBuffer", "()Ljava/nio/ByteBuffer;")\r
+\r
+DECLARE_JNI_CLASS (AndroidImagePlane, "android/media/Image$Plane");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (acquireLatestImage,          "acquireLatestImage",          "()Landroid/media/Image;") \\r
+ METHOD (close,                       "close",                       "()V") \\r
+ METHOD (getSurface,                  "getSurface",                  "()Landroid/view/Surface;") \\r
+ METHOD (setOnImageAvailableListener, "setOnImageAvailableListener", "(Landroid/media/ImageReader$OnImageAvailableListener;Landroid/os/Handler;)V") \\r
+ STATICMETHOD (newInstance, "newInstance", "(IIII)Landroid/media/ImageReader;")\r
+\r
+DECLARE_JNI_CLASS (AndroidImageReader, "android/media/ImageReader");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor,             "<init>",                  "()V") \\r
+ METHOD (getSurface,              "getSurface",              "()Landroid/view/Surface;") \\r
+ METHOD (prepare,                 "prepare",                 "()V") \\r
+ METHOD (release,                 "release",                 "()V") \\r
+ METHOD (setAudioEncoder,         "setAudioEncoder",         "(I)V") \\r
+ METHOD (setAudioSource,          "setAudioSource",          "(I)V") \\r
+ METHOD (setOnErrorListener,      "setOnErrorListener",      "(Landroid/media/MediaRecorder$OnErrorListener;)V") \\r
+ METHOD (setOnInfoListener,       "setOnInfoListener",       "(Landroid/media/MediaRecorder$OnInfoListener;)V") \\r
+ METHOD (setOrientationHint,      "setOrientationHint",      "(I)V") \\r
+ METHOD (setOutputFile,           "setOutputFile",           "(Ljava/lang/String;)V") \\r
+ METHOD (setOutputFormat,         "setOutputFormat",         "(I)V") \\r
+ METHOD (setVideoEncoder,         "setVideoEncoder",         "(I)V") \\r
+ METHOD (setVideoEncodingBitRate, "setVideoEncodingBitRate", "(I)V") \\r
+ METHOD (setVideoFrameRate,       "setVideoFrameRate",       "(I)V") \\r
+ METHOD (setVideoSize,            "setVideoSize",            "(II)V") \\r
+ METHOD (setVideoSource,          "setVideoSource",          "(I)V") \\r
+ METHOD (start,                   "start",                   "()V") \\r
+ METHOD (stop,                    "stop",                    "()V")\r
+\r
+DECLARE_JNI_CLASS (AndroidMediaRecorder, "android/media/MediaRecorder");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor,               "<init>",                    "(Landroid/content/Context;)V") \\r
+ METHOD (getSurfaceTexture,         "getSurfaceTexture",         "()Landroid/graphics/SurfaceTexture;") \\r
+ METHOD (isAvailable,               "isAvailable",               "()Z") \\r
+ METHOD (setSurfaceTextureListener, "setSurfaceTextureListener", "(Landroid/view/TextureView$SurfaceTextureListener;)V") \\r
+ METHOD (setTransform,              "setTransform",              "(Landroid/graphics/Matrix;)V")\r
+\r
+DECLARE_JNI_CLASS (AndroidTextureView, "android/view/TextureView");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor, "<init>", "(Landroid/graphics/SurfaceTexture;)V")\r
+\r
+DECLARE_JNI_CLASS (AndroidSurface, "android/view/Surface");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (setDefaultBufferSize, "setDefaultBufferSize", "(II)V")\r
+\r
+DECLARE_JNI_CLASS (AndroidSurfaceTexture, "android/graphics/SurfaceTexture");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (getOutputSizesForClass,      "getOutputSizes",       "(Ljava/lang/Class;)[Landroid/util/Size;") \\r
+ METHOD (getOutputSizesForFormat,     "getOutputSizes",       "(I)[Landroid/util/Size;") \\r
+ METHOD (isOutputSupportedFor,        "isOutputSupportedFor", "(I)Z") \\r
+ METHOD (isOutputSupportedForSurface, "isOutputSupportedFor", "(Landroid/view/Surface;)Z")\r
+\r
+DECLARE_JNI_CLASS (AndroidStreamConfigurationMap, "android/hardware/camera2/params/StreamConfigurationMap");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor, "<init>",      "()V") \\r
+ METHOD (toByteArray, "toByteArray", "()[B") \\r
+ METHOD (size,        "size",        "()I")\r
+\r
+DECLARE_JNI_CLASS (ByteArrayOutputStream, "java/io/ByteArrayOutputStream");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (abortCaptures,       "abortCaptures",       "()V") \\r
+ METHOD (capture,             "capture",             "(Landroid/hardware/camera2/CaptureRequest;Landroid/hardware/camera2/CameraCaptureSession$CaptureCallback;Landroid/os/Handler;)I") \\r
+ METHOD (close,               "close",               "()V") \\r
+ METHOD (setRepeatingRequest, "setRepeatingRequest", "(Landroid/hardware/camera2/CaptureRequest;Landroid/hardware/camera2/CameraCaptureSession$CaptureCallback;Landroid/os/Handler;)I") \\r
+ METHOD (stopRepeating,       "stopRepeating",       "()V")\r
+\r
+DECLARE_JNI_CLASS (CameraCaptureSession, "android/hardware/camera2/CameraCaptureSession")\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor, "<init>", "(L" JUCE_ANDROID_ACTIVITY_CLASSPATH ";JZ)V")\r
+\r
+DECLARE_JNI_CLASS (CameraCaptureSessionCaptureCallback, JUCE_ANDROID_ACTIVITY_CLASSPATH "$CameraCaptureSessionCaptureCallback");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor, "<init>", "(L" JUCE_ANDROID_ACTIVITY_CLASSPATH ";J)V")\r
+\r
+DECLARE_JNI_CLASS (CameraCaptureSessionStateCallback, JUCE_ANDROID_ACTIVITY_CLASSPATH "$CameraCaptureSessionStateCallback");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (get,     "get",     "(Landroid/hardware/camera2/CameraCharacteristics$Key;)Ljava/lang/Object;") \\r
+ METHOD (getKeys, "getKeys", "()Ljava/util/List;") \\r
+ STATICFIELD (CONTROL_AF_AVAILABLE_MODES,      "CONTROL_AF_AVAILABLE_MODES",      "Landroid/hardware/camera2/CameraCharacteristics$Key;") \\r
+ STATICFIELD (LENS_FACING,                     "LENS_FACING",                     "Landroid/hardware/camera2/CameraCharacteristics$Key;") \\r
+ STATICFIELD (SCALER_STREAM_CONFIGURATION_MAP, "SCALER_STREAM_CONFIGURATION_MAP", "Landroid/hardware/camera2/CameraCharacteristics$Key;") \\r
+ STATICFIELD (SENSOR_ORIENTATION,              "SENSOR_ORIENTATION",              "Landroid/hardware/camera2/CameraCharacteristics$Key;")\r
+\r
+DECLARE_JNI_CLASS (CameraCharacteristics, "android/hardware/camera2/CameraCharacteristics");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (getName, "getName", "()Ljava/lang/String;")\r
+\r
+DECLARE_JNI_CLASS (CameraCharacteristicsKey, "android/hardware/camera2/CameraCharacteristics$Key");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor, "<init>", "(L" JUCE_ANDROID_ACTIVITY_CLASSPATH ";J)V")\r
+\r
+DECLARE_JNI_CLASS (CameraDeviceStateCallback, JUCE_ANDROID_ACTIVITY_CLASSPATH "$CameraDeviceStateCallback");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (getCameraCharacteristics, "getCameraCharacteristics", "(Ljava/lang/String;)Landroid/hardware/camera2/CameraCharacteristics;") \\r
+ METHOD (getCameraIdList,          "getCameraIdList",          "()[Ljava/lang/String;") \\r
+ METHOD (openCamera,               "openCamera",               "(Ljava/lang/String;Landroid/hardware/camera2/CameraDevice$StateCallback;Landroid/os/Handler;)V")\r
+\r
+DECLARE_JNI_CLASS (CameraManager, "android/hardware/camera2/CameraManager");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ STATICFIELD (CONTROL_AE_PRECAPTURE_TRIGGER, "CONTROL_AE_PRECAPTURE_TRIGGER", "Landroid/hardware/camera2/CaptureRequest$Key;") \\r
+ STATICFIELD (CONTROL_AF_MODE,               "CONTROL_AF_MODE",               "Landroid/hardware/camera2/CaptureRequest$Key;") \\r
+ STATICFIELD (CONTROL_AF_TRIGGER,            "CONTROL_AF_TRIGGER",            "Landroid/hardware/camera2/CaptureRequest$Key;") \\r
+ STATICFIELD (CONTROL_MODE,                  "CONTROL_MODE",                  "Landroid/hardware/camera2/CaptureRequest$Key;")\r
+\r
+DECLARE_JNI_CLASS (CaptureRequest, "android/hardware/camera2/CaptureRequest");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (addTarget, "addTarget", "(Landroid/view/Surface;)V") \\r
+ METHOD (build,     "build",     "()Landroid/hardware/camera2/CaptureRequest;") \\r
+ METHOD (set,       "set",       "(Landroid/hardware/camera2/CaptureRequest$Key;Ljava/lang/Object;)V")\r
+\r
+DECLARE_JNI_CLASS (CaptureRequestBuilder, "android/hardware/camera2/CaptureRequest$Builder");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (get, "get", "(Landroid/hardware/camera2/CaptureResult$Key;)Ljava/lang/Object;") \\r
+ STATICFIELD (CONTROL_AE_STATE, "CONTROL_AE_STATE", "Landroid/hardware/camera2/CaptureResult$Key;") \\r
+ STATICFIELD (CONTROL_AF_STATE, "CONTROL_AF_STATE", "Landroid/hardware/camera2/CaptureResult$Key;")\r
+\r
+DECLARE_JNI_CLASS (CaptureResult, "android/hardware/camera2/CaptureResult");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (canDetectOrientation, "canDetectOrientation", "()Z") \\r
+ METHOD (constructor,          "<init>",               "(L" JUCE_ANDROID_ACTIVITY_CLASSPATH ";JLandroid/content/Context;I)V") \\r
+ METHOD (disable,              "disable",              "()V") \\r
+ METHOD (enable,               "enable",               "()V")\r
+\r
+DECLARE_JNI_CLASS (OrientationEventListener, JUCE_ANDROID_ACTIVITY_CLASSPATH "$JuceOrientationEventListener");\r
+#undef JNI_CLASS_MEMBERS\r
+#endif\r
+\r
+//==============================================================================\r
+class AndroidRunnable  : public juce::AndroidInterfaceImplementer\r
+{\r
+public:\r
+    struct Owner\r
+    {\r
+        virtual ~Owner() {}\r
+\r
+        virtual void run() = 0;\r
+    };\r
+\r
+    AndroidRunnable (Owner& ownerToUse)\r
+        : owner (ownerToUse)\r
+    {}\r
+\r
+private:\r
+    Owner& owner;\r
+\r
+    jobject invoke (jobject proxy, jobject method, jobjectArray args) override\r
+    {\r
+        auto* env = getEnv();\r
+        auto methodName = juce::juceString ((jstring) env->CallObjectMethod (method, JavaMethod.getName));\r
+\r
+        if (methodName == "run")\r
+        {\r
+            owner.run();\r
+            return nullptr;\r
+        }\r
+\r
+        // invoke base class\r
+        return AndroidInterfaceImplementer::invoke (proxy, method, args);\r
+    }\r
+};\r
+\r
+//==============================================================================\r
+class TextureViewSurfaceTextureListener     : public AndroidInterfaceImplementer\r
+{\r
+public:\r
+    struct Owner\r
+    {\r
+        virtual ~Owner() {}\r
+\r
+        virtual void onSurfaceTextureAvailable (LocalRef<jobject>& surface, int width, int height) = 0;\r
+        virtual bool onSurfaceTextureDestroyed (LocalRef<jobject>& surface) = 0;\r
+        virtual void onSurfaceTextureSizeChanged (LocalRef<jobject>& surface, int width, int height) = 0;\r
+        virtual void onSurfaceTextureUpdated (LocalRef<jobject>& surface) = 0;\r
+    };\r
+\r
+    TextureViewSurfaceTextureListener (Owner& ownerToUse)\r
+        : owner (ownerToUse)\r
+    {}\r
+\r
+    jobject invoke (jobject proxy, jobject method, jobjectArray args) override\r
+    {\r
+        auto* env = getEnv();\r
+\r
+        auto methodName = juceString ((jstring) env->CallObjectMethod (method, JavaMethod.getName));\r
+\r
+        int numArgs = args != nullptr ? env->GetArrayLength (args) : 0;\r
+\r
+        if (methodName == "onSurfaceTextureAvailable" && numArgs == 3)\r
+        {\r
+            auto surface = LocalRef<jobject> (env->GetObjectArrayElement (args, 0));\r
+            auto width   = LocalRef<jobject> (env->GetObjectArrayElement (args, 1));\r
+            auto height  = LocalRef<jobject> (env->GetObjectArrayElement (args, 2));\r
+\r
+            auto widthInt  = env->CallIntMethod (width, JavaInteger.intValue);\r
+            auto heightInt = env->CallIntMethod (height, JavaInteger.intValue);\r
+\r
+            owner.onSurfaceTextureAvailable (surface, widthInt, heightInt);\r
+            return nullptr;\r
+        }\r
+        else if (methodName == "onSurfaceTextureDestroyed" && numArgs == 1)\r
+        {\r
+            auto surface = LocalRef<jobject> (env->GetObjectArrayElement (args, 0));\r
+            auto result = owner.onSurfaceTextureDestroyed (surface);\r
+\r
+            return env->CallStaticObjectMethod (JavaBoolean, JavaBoolean.valueOf, result);\r
+        }\r
+        else if (methodName == "onSurfaceTextureSizeChanged" && numArgs == 3)\r
+        {\r
+            auto surface = LocalRef<jobject> (env->GetObjectArrayElement (args, 0));\r
+            auto width   = LocalRef<jobject> (env->GetObjectArrayElement (args, 1));\r
+            auto height  = LocalRef<jobject> (env->GetObjectArrayElement (args, 2));\r
+\r
+            auto widthInt  = env->CallIntMethod (width, JavaInteger.intValue);\r
+            auto heightInt = env->CallIntMethod (height, JavaInteger.intValue);\r
+\r
+            owner.onSurfaceTextureSizeChanged (surface, widthInt, heightInt);\r
+            return nullptr;\r
+        }\r
+        else if (methodName == "onSurfaceTextureUpdated" && numArgs == 1)\r
+        {\r
+            auto surface = LocalRef<jobject> (env->GetObjectArrayElement (args, 0));\r
+\r
+            owner.onSurfaceTextureUpdated (surface);\r
+            return nullptr;\r
+        }\r
+\r
+        return AndroidInterfaceImplementer::invoke (proxy, method, args);\r
+    }\r
+\r
+private:\r
+    Owner& owner;\r
+};\r
+\r
+//==============================================================================\r
+class ImageReaderOnImageAvailableListener     : public AndroidInterfaceImplementer\r
+{\r
+public:\r
+    struct Owner\r
+    {\r
+        virtual ~Owner() {}\r
+\r
+        virtual void onImageAvailable (LocalRef<jobject>& imageReader) = 0;\r
+    };\r
+\r
+    ImageReaderOnImageAvailableListener (Owner& ownerToUse)\r
+        : owner (ownerToUse)\r
+    {}\r
+\r
+    jobject invoke (jobject proxy, jobject method, jobjectArray args) override\r
+    {\r
+        auto* env = getEnv();\r
+\r
+        auto methodName = juceString ((jstring) env->CallObjectMethod (method, JavaMethod.getName));\r
+\r
+        int numArgs = args != nullptr ? env->GetArrayLength (args) : 0;\r
+\r
+        if (methodName == "onImageAvailable" && numArgs == 1)\r
+        {\r
+            auto imageReader = LocalRef<jobject> (env->GetObjectArrayElement (args, 0));\r
+\r
+            owner.onImageAvailable (imageReader);\r
+            return nullptr;\r
+        }\r
+\r
+        return AndroidInterfaceImplementer::invoke (proxy, method, args);\r
+    }\r
+\r
+private:\r
+    Owner& owner;\r
+};\r
+\r
+//==============================================================================\r
+class MediaRecorderOnInfoListener     : public AndroidInterfaceImplementer\r
+{\r
+public:\r
+    struct Owner\r
+    {\r
+        virtual ~Owner() {}\r
+\r
+        virtual void onInfo (LocalRef<jobject>& mediaRecorder, int what, int extra) = 0;\r
+    };\r
+\r
+    MediaRecorderOnInfoListener (Owner& ownerToUse)\r
+        : owner (ownerToUse)\r
+    {}\r
+\r
+    jobject invoke (jobject proxy, jobject method, jobjectArray args) override\r
+    {\r
+        auto* env = getEnv();\r
+\r
+        auto methodName = juceString ((jstring) env->CallObjectMethod (method, JavaMethod.getName));\r
+\r
+        int numArgs = args != nullptr ? env->GetArrayLength (args) : 0;\r
+\r
+        if (methodName == "onInfo" && numArgs == 3)\r
+        {\r
+            auto mediaRecorder = LocalRef<jobject> (env->GetObjectArrayElement (args, 0));\r
+            auto what   = LocalRef<jobject> (env->GetObjectArrayElement (args, 1));\r
+            auto extra  = LocalRef<jobject> (env->GetObjectArrayElement (args, 2));\r
+\r
+            auto whatInt  = (int) env->CallIntMethod (what, JavaInteger.intValue);\r
+            auto extraInt = (int) env->CallIntMethod (extra, JavaInteger.intValue);\r
+\r
+            owner.onInfo (mediaRecorder, whatInt, extraInt);\r
+            return nullptr;\r
+        }\r
+\r
+        return AndroidInterfaceImplementer::invoke (proxy, method, args);\r
+    }\r
+\r
+private:\r
+    Owner& owner;\r
+};\r
+\r
+//==============================================================================\r
+class MediaRecorderOnErrorListener     : public AndroidInterfaceImplementer\r
+{\r
+public:\r
+    struct Owner\r
+    {\r
+        virtual ~Owner() {}\r
+\r
+        virtual void onError (LocalRef<jobject>& mediaRecorder, int what, int extra) = 0;\r
+    };\r
+\r
+    MediaRecorderOnErrorListener (Owner& ownerToUse)\r
+        : owner (ownerToUse)\r
+    {}\r
+\r
+    jobject invoke (jobject proxy, jobject method, jobjectArray args) override\r
+    {\r
+        auto* env = getEnv();\r
+\r
+        auto methodName = juceString ((jstring) env->CallObjectMethod (method, JavaMethod.getName));\r
+\r
+        int numArgs = args != nullptr ? env->GetArrayLength (args) : 0;\r
+\r
+        if (methodName == "onError" && numArgs == 3)\r
+        {\r
+            auto mediaRecorder = LocalRef<jobject> (env->GetObjectArrayElement (args, 0));\r
+            auto what   = LocalRef<jobject> (env->GetObjectArrayElement (args, 1));\r
+            auto extra  = LocalRef<jobject> (env->GetObjectArrayElement (args, 2));\r
+\r
+            auto whatInt  = (int) env->CallIntMethod (what, JavaInteger.intValue);\r
+            auto extraInt = (int) env->CallIntMethod (extra, JavaInteger.intValue);\r
+\r
+            owner.onError (mediaRecorder, whatInt, extraInt);\r
+            return nullptr;\r
+        }\r
+\r
+        return AndroidInterfaceImplementer::invoke (proxy, method, args);\r
+    }\r
+\r
+private:\r
+    Owner& owner;\r
+};\r
+\r
+//==============================================================================\r
+class AppPausedResumedListener     : public AndroidInterfaceImplementer\r
+{\r
+public:\r
+    struct Owner\r
+    {\r
+        virtual ~Owner() {}\r
+\r
+        virtual void appPaused() = 0;\r
+        virtual void appResumed() = 0;\r
+    };\r
+\r
+    AppPausedResumedListener (Owner& ownerToUse)\r
+        : owner (ownerToUse)\r
+    {}\r
+\r
+    jobject invoke (jobject proxy, jobject method, jobjectArray args) override\r
+    {\r
+        auto* env = getEnv();\r
+\r
+        auto methodName = juceString ((jstring) env->CallObjectMethod (method, JavaMethod.getName));\r
+\r
+        int numArgs = args != nullptr ? env->GetArrayLength (args) : 0;\r
+\r
+        if (methodName == "appPaused" && numArgs == 0)\r
+        {\r
+            owner.appPaused();\r
+            return nullptr;\r
+        }\r
+\r
+        if (methodName == "appResumed" && numArgs == 0)\r
+        {\r
+            owner.appResumed();\r
+            return nullptr;\r
+        }\r
+\r
+        return AndroidInterfaceImplementer::invoke (proxy, method, args);\r
+    }\r
+\r
+private:\r
+    Owner& owner;\r
+};\r
+\r
+//==============================================================================\r
 struct CameraDevice::Pimpl\r
+#if __ANDROID_API__ >= 21\r
+    : private AppPausedResumedListener::Owner\r
+#endif\r
 {\r
-    Pimpl (const String&, int /*index*/, int /*minWidth*/, int /*minHeight*/, int /*maxWidth*/, int /*maxHeight*/)\r
+    using InternalOpenCameraResultCallback = std::function<void (const String& /*cameraId*/, const String& /*error*/)>;\r
+\r
+    Pimpl (CameraDevice& ownerToUse, const String& cameraIdToUse, int /*index*/,\r
+           int minWidthToUse, int minHeightToUse, int maxWidthToUse, int maxHeightToUse,\r
+           bool /*useHighQuality*/)\r
+         #if __ANDROID_API__ >= 21\r
+        : owner (ownerToUse),\r
+          minWidth (minWidthToUse),\r
+          minHeight (minHeightToUse),\r
+          maxWidth (maxWidthToUse),\r
+          maxHeight (maxHeightToUse),\r
+          cameraId (cameraIdToUse),\r
+          appPausedResumedListener (*this),\r
+          appPausedResumedListenerNative (CreateJavaInterface (&appPausedResumedListener,\r
+                                                               JUCE_ANDROID_ACTIVITY_CLASSPATH "$AppPausedResumedListener").get()),\r
+\r
+          cameraManager (initialiseCameraManager()),\r
+          cameraCharacteristics (initialiseCameraCharacteristics (cameraManager, cameraId)),\r
+          streamConfigurationMap (cameraCharacteristics),\r
+          previewDisplay (streamConfigurationMap.getPreviewBufferSize()),\r
+          deviceOrientationChangeListener (previewDisplay)\r
+         #endif\r
     {\r
+       #if __ANDROID_API__ >= 21\r
+        startBackgroundThread();\r
+       #endif\r
     }\r
 \r
     ~Pimpl()\r
     {\r
+       #if __ANDROID_API__ >= 21\r
+        getEnv()->CallVoidMethod (android.activity, JuceAppActivity.removeAppPausedResumedListener,\r
+                                  appPausedResumedListenerNative.get(), reinterpret_cast<jlong>(this));\r
+       #endif\r
+    }\r
+\r
+   #if __ANDROID_API__ < 21\r
+    // Dummy implementations for unsupported API levels.\r
+    void open (InternalOpenCameraResultCallback) {}\r
+    void takeStillPicture (std::function<void (const Image&)>) {}\r
+    void startRecordingToFile (const File&, int) {}\r
+    void stopRecording() {}\r
+\r
+    void addListener (CameraDevice::Listener*) {}\r
+    void removeListener (CameraDevice::Listener*) {}\r
+\r
+    String getCameraId() const noexcept      { return {}; }\r
+    bool openedOk() const noexcept           { return false; }\r
+    Time getTimeOfFirstRecordedFrame() const { return {}; }\r
+    static StringArray getAvailableDevices()\r
+    {\r
+        // Camera on Android requires API 21 or above.\r
+        jassertfalse;\r
+        return {};\r
+    }\r
+   #else\r
+    JUCE_DECLARE_WEAK_REFERENCEABLE (Pimpl)\r
+\r
+    String getCameraId() const noexcept { return cameraId; }\r
+\r
+    void open (InternalOpenCameraResultCallback cameraOpenCallbackToUse)\r
+    {\r
+        cameraOpenCallback = static_cast<InternalOpenCameraResultCallback&&> (cameraOpenCallbackToUse);\r
+\r
+        // A valid camera open callback must be passed.\r
+        jassert (cameraOpenCallback != nullptr);\r
+\r
+        // The same camera can be opened only once!\r
+        jassert (scopedCameraDevice == nullptr);\r
+\r
+        if (cameraOpenCallback == nullptr || scopedCameraDevice != nullptr)\r
+            return;\r
+\r
+        WeakReference<Pimpl> safeThis (this);\r
+        RuntimePermissions::request (RuntimePermissions::camera, [safeThis] (bool granted) mutable\r
+                                     {\r
+                                         if (safeThis != nullptr)\r
+                                             safeThis->continueOpenRequest (granted);\r
+                                     });\r
+    }\r
+\r
+    void continueOpenRequest (bool granted)\r
+    {\r
+        if (granted)\r
+        {\r
+            getEnv()->CallVoidMethod (android.activity, JuceAppActivity.addAppPausedResumedListener,\r
+                                      appPausedResumedListenerNative.get(), reinterpret_cast<jlong> (this));\r
+            scopedCameraDevice.reset (new ScopedCameraDevice (*this, cameraId, cameraManager, handler, getAutoFocusModeToUse()));\r
+        }\r
+        else\r
+        {\r
+            invokeCameraOpenCallback ("Camera permission not granted");\r
+        }\r
+    }\r
+\r
+    bool openedOk() const noexcept { return scopedCameraDevice->openedOk(); }\r
+\r
+    void takeStillPicture (std::function<void (const Image&)> pictureTakenCallbackToUse)\r
+    {\r
+        if (pictureTakenCallbackToUse == nullptr)\r
+        {\r
+            jassertfalse;\r
+            return;\r
+        }\r
+\r
+        if (currentCaptureSessionMode->isVideoRecordSession())\r
+        {\r
+            // Taking still pictures while recording video is not supported on Android.\r
+            jassertfalse;\r
+            return;\r
+        }\r
+\r
+        pictureTakenCallback = static_cast<std::function<void (const Image&)>&&> (pictureTakenCallbackToUse);\r
+\r
+        triggerStillPictureCapture();\r
     }\r
 \r
-    void startRecordingToFile (const File&, int /*quality*/)\r
+    void startRecordingToFile (const File& file, int /*quality*/)\r
     {\r
+        if (! openedOk())\r
+        {\r
+            jassertfalse;\r
+            return;\r
+        }\r
+\r
+        if (! previewDisplay.isReady())\r
+        {\r
+            // Did you remember to create and show a preview display?\r
+            jassertfalse;\r
+            return;\r
+        }\r
+\r
+        file.deleteFile();\r
+        file.create();\r
+        jassert (file.existsAsFile());\r
+\r
+        // MediaRecorder can't handle videos larger than 1080p\r
+        auto videoSize = chooseBestSize (minWidth, minHeight, jmin (maxWidth, 1080), maxHeight,\r
+                                         streamConfigurationMap.getSupportedVideoRecordingOutputSizes());\r
+\r
+        mediaRecorder.reset (new MediaRecorder (file.getFullPathName(), videoSize.getWidth(), videoSize.getHeight(),\r
+                                                getCameraSensorOrientation(), getCameraLensFacing()));\r
+\r
+        firstRecordedFrameTimeMs = Time::getCurrentTime();\r
+\r
+        currentCaptureSessionMode.reset();\r
+        startVideoRecordingMode (*mediaRecorder);\r
     }\r
 \r
     void stopRecording()\r
     {\r
+        currentCaptureSessionMode.reset();\r
+        mediaRecorder.reset();\r
+\r
+        startPreviewMode (*imageReader);\r
     }\r
 \r
     Time getTimeOfFirstRecordedFrame() const\r
     {\r
-        return {};\r
+        return firstRecordedFrameTimeMs;\r
+    }\r
+\r
+    static StringArray getAvailableDevices()\r
+    {\r
+        StringArray results;\r
+\r
+        auto* env = getEnv();\r
+\r
+        auto cameraManagerToUse = initialiseCameraManager();\r
+        auto cameraIdArray = LocalRef<jobjectArray> ((jobjectArray) env->CallObjectMethod (cameraManagerToUse,\r
+                                                                                           CameraManager.getCameraIdList));\r
+\r
+        results = javaStringArrayToJuce (cameraIdArray);\r
+\r
+        for (auto& result : results)\r
+            printDebugCameraInfo (cameraManagerToUse, result);\r
+\r
+        return results;\r
     }\r
 \r
     void addListener (CameraDevice::Listener* listenerToAdd)\r
     {\r
         const ScopedLock sl (listenerLock);\r
-        listeners.addIfNotAlreadyThere (listenerToAdd);\r
+        listeners.add (listenerToAdd);\r
+\r
+        if (listeners.size() == 1)\r
+            triggerStillPictureCapture();\r
     }\r
 \r
     void removeListener (CameraDevice::Listener* listenerToRemove)\r
     {\r
         const ScopedLock sl (listenerLock);\r
-        listeners.removeFirstMatchingValue (listenerToRemove);\r
+        listeners.remove (listenerToRemove);\r
     }\r
 \r
-    static StringArray getAvailableDevices()\r
+private:\r
+    enum\r
     {\r
-        StringArray results;\r
+        ERROR_CAMERA_IN_USE = 1,\r
+        ERROR_MAX_CAMERAS_IN_USE = 2,\r
+        ERROR_CAMERA_DISABLED = 3,\r
+        ERROR_CAMERA_DEVICE = 4,\r
+        ERROR_CAMERA_SERVICE = 5\r
+    };\r
 \r
-        return results;\r
+    static String cameraErrorCodeToString (int errorCode)\r
+    {\r
+        switch (errorCode)\r
+        {\r
+            case ERROR_CAMERA_IN_USE:      return "Camera already in use.";\r
+            case ERROR_MAX_CAMERAS_IN_USE: return "Too many opened camera devices.";\r
+            case ERROR_CAMERA_DISABLED:    return "Camera disabled.";\r
+            case ERROR_CAMERA_DEVICE:      return "Fatal error.";\r
+            case ERROR_CAMERA_SERVICE:     return "Fatal error. Reboot required or persistent hardware problem.";\r
+            default:                       return "Unknown error.";\r
+        }\r
     }\r
 \r
-private:\r
-    JUCE_DECLARE_NON_COPYABLE (Pimpl)\r
-};\r
+    static LocalRef<jobject> initialiseCameraManager()\r
+    {\r
+        return LocalRef<jobject> (getEnv()->CallObjectMethod (android.activity, JuceAppActivity.getSystemService,\r
+                                                              javaString ("camera").get()));\r
+    }\r
 \r
-struct CameraDevice::ViewerComponent  : public Component\r
-{\r
-    ViewerComponent (CameraDevice&)\r
+    static LocalRef<jobject> initialiseCameraCharacteristics (const GlobalRef& cameraManager, const String& cameraId)\r
     {\r
+        return LocalRef<jobject> (getEnv()->CallObjectMethod (cameraManager,\r
+                                                              CameraManager.getCameraCharacteristics,\r
+                                                              javaString (cameraId).get()));\r
     }\r
 \r
-    JUCE_DECLARE_NON_COPYABLE (ViewerComponent)\r
-};\r
+    static void printDebugCameraInfo (const LocalRef<jobject>& cameraManagerToUse, const String& cameraId)\r
+    {\r
+        auto* env = getEnv();\r
 \r
-String CameraDevice::getFileExtension()\r
-{\r
-    return ".mov";\r
+        auto characteristics = LocalRef<jobject> (env->CallObjectMethod (cameraManagerToUse,\r
+                                                                         CameraManager.getCameraCharacteristics,\r
+                                                                         javaString (cameraId).get()));\r
+\r
+        auto keysList = LocalRef<jobject> (env->CallObjectMethod (characteristics, CameraCharacteristics.getKeys));\r
+\r
+        const int size = env->CallIntMethod (keysList, JavaList.size);\r
+\r
+        JUCE_CAMERA_LOG ("Camera id: " + cameraId + ", characteristics keys num: " + String (size));\r
+\r
+        for (int i = 0; i < size; ++i)\r
+        {\r
+            auto key = LocalRef<jobject> (env->CallObjectMethod (keysList, JavaList.get, i));\r
+            auto jKeyName = LocalRef<jstring> ((jstring) env->CallObjectMethod (key, CameraCharacteristicsKey.getName));\r
+            auto keyName = juceString (jKeyName);\r
+\r
+            auto keyValue = LocalRef<jobject> (env->CallObjectMethod (characteristics, CameraCharacteristics.get, key.get()));\r
+            auto jKeyValueString = LocalRef<jstring> ((jstring) env->CallObjectMethod (keyValue, JavaObject.toString));\r
+            auto keyValueString = juceString (jKeyValueString);\r
+\r
+            auto &kvs = keyValueString;\r
+\r
+            if (kvs.startsWith ("[I") || kvs.startsWith ("[F") || kvs.startsWith ("[Z") || kvs.startsWith ("[B"))\r
+            {\r
+                printPrimitiveArrayElements (keyValue, keyName, keyValueString);\r
+            }\r
+            else if (kvs.startsWith ("[Landroid.util.Range"))\r
+            {\r
+                printRangeArrayElements (keyValue, keyName);\r
+            }\r
+            else\r
+            {\r
+                int chunkSize = 256;\r
+\r
+                if (keyValueString.length() > chunkSize)\r
+                {\r
+                    JUCE_CAMERA_LOG ("Key: " + keyName);\r
+\r
+                    for (int i = 0, j = 1; i < keyValueString.length(); i += chunkSize, ++j)\r
+                        JUCE_CAMERA_LOG ("value part " + String (j) + ": " + keyValueString.substring (i, i + chunkSize));\r
+                }\r
+                else\r
+                {\r
+                    JUCE_CAMERA_LOG ("Key: " + keyName + ", value: " + keyValueString);\r
+                }\r
+            }\r
+\r
+            ignoreUnused (keyName);\r
+        }\r
+    }\r
+\r
+    static void printPrimitiveArrayElements (const LocalRef<jobject>& keyValue, const String& keyName,\r
+                                             const String& keyValueString)\r
+    {\r
+        ignoreUnused (keyName);\r
+\r
+        String result = "[";\r
+\r
+        auto* env = getEnv();\r
+\r
+        #define PRINT_ELEMENTS(elem_type, array_type, fun_name_middle)                                        \\r
+        {                                                                                                     \\r
+            elem_type* elements = env->Get##fun_name_middle##ArrayElements ((array_type) keyValue.get(), 0);  \\r
+            int size = env->GetArrayLength ((array_type) keyValue.get());                                     \\r
+                                                                                                              \\r
+            for (int i = 0; i < size - 1; ++i)                                                                \\r
+                result << String (elements[i]) << " ";                                                        \\r
+                                                                                                              \\r
+            if (size > 0)                                                                                     \\r
+                result << String (elements[size - 1]);                                                        \\r
+                                                                                                              \\r
+            env->Release##fun_name_middle##ArrayElements ((array_type) keyValue.get(), elements, 0);          \\r
+        }\r
+\r
+        if (keyValueString.startsWith ("[I"))\r
+            PRINT_ELEMENTS (jint, jintArray, Int)\r
+        else if (keyValueString.startsWith ("[F"))\r
+            PRINT_ELEMENTS (float, jfloatArray, Float)\r
+        else if (keyValueString.startsWith ("[Z"))\r
+            PRINT_ELEMENTS (jboolean, jbooleanArray, Boolean)\r
+        else if (keyValueString.startsWith ("[B"))\r
+            PRINT_ELEMENTS (jbyte, jbyteArray, Byte);\r
+\r
+        #undef PRINT_ELEMENTS\r
+\r
+        result << "]";\r
+        JUCE_CAMERA_LOG ("Key: " + keyName + ", value: " + result);\r
+    }\r
+\r
+    static void printRangeArrayElements (const LocalRef<jobject>& rangeArray, const String& keyName)\r
+    {\r
+        auto* env = getEnv();\r
+\r
+        jobjectArray ranges = static_cast<jobjectArray> (rangeArray.get());\r
+\r
+        int numRanges = env->GetArrayLength (ranges);\r
+\r
+        String result;\r
+\r
+        for (int i = 0; i < numRanges; ++i)\r
+        {\r
+            auto range = LocalRef<jobject> (env->GetObjectArrayElement (ranges, i));\r
+\r
+            auto jRangeString = LocalRef<jstring> ((jstring) env->CallObjectMethod (range, AndroidRange.toString));\r
+\r
+            result << juceString (jRangeString) << " ";\r
+        }\r
+\r
+        JUCE_CAMERA_LOG ("Key: " + keyName + ", value: " + result);\r
+    }\r
+\r
+    //==============================================================================\r
+    class StreamConfigurationMap\r
+    {\r
+    public:\r
+        StreamConfigurationMap (const GlobalRef& cameraCharacteristics)\r
+            : scalerStreamConfigurationMap (getStreamConfigurationMap (cameraCharacteristics)),\r
+              supportedPreviewOutputSizes (retrieveOutputSizes (scalerStreamConfigurationMap,\r
+                                                                getClassForName ("android.graphics.SurfaceTexture"),\r
+                                                                -1)),\r
+              supportedStillImageOutputSizes (retrieveOutputSizes (scalerStreamConfigurationMap,\r
+                                                                   LocalRef<jobject>(),\r
+                                                                   jpegImageFormat)),\r
+              supportedVideoRecordingOutputSizes (retrieveOutputSizes (scalerStreamConfigurationMap,\r
+                                                                       getClassForName ("android.media.MediaRecorder"),\r
+                                                                       -1)),\r
+              defaultPreviewSize (getSmallestSize (supportedPreviewOutputSizes)),\r
+              previewBufferSize (getLargestSize (supportedPreviewOutputSizes))\r
+        {\r
+            printSizesLog (supportedPreviewOutputSizes, "SurfaceTexture");\r
+            printSizesLog (supportedStillImageOutputSizes, "JPEG");\r
+            printSizesLog (supportedVideoRecordingOutputSizes, "MediaRecorder");\r
+        }\r
+\r
+        Array<Rectangle<int>> getSupportedPreviewOutputSizes()        const noexcept { return supportedPreviewOutputSizes; }\r
+        Array<Rectangle<int>> getSupportedStillImageOutputSizes()     const noexcept { return supportedStillImageOutputSizes; }\r
+        Array<Rectangle<int>> getSupportedVideoRecordingOutputSizes() const noexcept { return supportedVideoRecordingOutputSizes; }\r
+\r
+        Rectangle<int> getDefaultPreviewSize() const noexcept { return defaultPreviewSize; }\r
+        Rectangle<int> getPreviewBufferSize()  const noexcept { return previewBufferSize; }\r
+\r
+        bool isOutputSupportedForSurface (const LocalRef<jobject>& surface) const\r
+        {\r
+            return getEnv()->CallBooleanMethod (scalerStreamConfigurationMap, AndroidStreamConfigurationMap.isOutputSupportedForSurface, surface.get());\r
+        }\r
+\r
+        static constexpr int jpegImageFormat = 256;\r
+\r
+    private:\r
+        GlobalRef scalerStreamConfigurationMap;\r
+\r
+        Array<Rectangle<int>> supportedPreviewOutputSizes;\r
+        Array<Rectangle<int>> supportedStillImageOutputSizes;\r
+        Array<Rectangle<int>> supportedVideoRecordingOutputSizes;\r
+        Rectangle<int> defaultPreviewSize, previewBufferSize;\r
+\r
+        GlobalRef getStreamConfigurationMap (const GlobalRef& cameraCharacteristics)\r
+        {\r
+            auto* env = getEnv();\r
+\r
+            auto scalerStreamConfigurationMapKey = LocalRef<jobject> (env->GetStaticObjectField (CameraCharacteristics,\r
+                                                                                                 CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP));\r
+\r
+            return GlobalRef (LocalRef<jobject> (env->CallObjectMethod (cameraCharacteristics,\r
+                                                                        CameraCharacteristics.get,\r
+                                                                        scalerStreamConfigurationMapKey.get())));\r
+        }\r
+\r
+        static Array<Rectangle<int>> retrieveOutputSizes (GlobalRef& scalerStreamConfigurationMap,\r
+                                                          const LocalRef<jobject>& outputClass,\r
+                                                          int format)\r
+        {\r
+            Array<Rectangle<int>> result;\r
+\r
+            auto* env = getEnv();\r
+\r
+            auto outputSizes = outputClass.get() != nullptr\r
+                             ? LocalRef<jobjectArray> ((jobjectArray) env->CallObjectMethod (scalerStreamConfigurationMap,\r
+                                                                                             AndroidStreamConfigurationMap.getOutputSizesForClass,\r
+                                                                                             outputClass.get()))\r
+                             : LocalRef<jobjectArray> ((jobjectArray) env->CallObjectMethod (scalerStreamConfigurationMap,\r
+                                                                                             AndroidStreamConfigurationMap.getOutputSizesForFormat,\r
+                                                                                             (jint) format));\r
+\r
+            if (format != -1)\r
+            {\r
+                auto supported = (env->CallBooleanMethod (scalerStreamConfigurationMap, AndroidStreamConfigurationMap.isOutputSupportedFor, (jint) format) != 0);\r
+\r
+                if (! supported)\r
+                {\r
+                    // The output format is not supported by this device, still image capture will not work!\r
+                    jassertfalse;\r
+                    return {};\r
+                }\r
+            }\r
+\r
+            int numSizes = env->GetArrayLength (outputSizes);\r
+\r
+            jassert (numSizes > 0);\r
+\r
+            for (int i = 0; i < numSizes; ++i)\r
+            {\r
+                auto size = LocalRef<jobject> (env->GetObjectArrayElement (outputSizes, i));\r
+\r
+                auto width  = env->CallIntMethod (size, AndroidSize.getWidth);\r
+                auto height = env->CallIntMethod (size, AndroidSize.getHeight);\r
+\r
+                result.add (Rectangle<int> (0, 0, width, height));\r
+            }\r
+\r
+            return result;\r
+        }\r
+\r
+        static LocalRef<jobject> getClassForName (const String& name)\r
+        {\r
+            return LocalRef<jobject> (getEnv()->CallStaticObjectMethod (JavaClass, JavaClass.forName,\r
+                                                                        javaString (name).get()));\r
+        }\r
+\r
+        static void printSizesLog (const Array<Rectangle<int>>& sizes, const String& className)\r
+        {\r
+            ignoreUnused (sizes, className);\r
+\r
+            JUCE_CAMERA_LOG ("Sizes for class " + className);\r
+\r
+          #if JUCE_CAMERA_LOG_ENABLED\r
+            for (auto& s : sizes)\r
+                JUCE_CAMERA_LOG (s.toString() + "\n");\r
+          #endif\r
+        }\r
+\r
+        Rectangle<int> getSmallestSize (const Array<Rectangle<int>>& sizes) const\r
+        {\r
+            if (sizes.size() == 0)\r
+                return {};\r
+\r
+            auto smallestSize = sizes[0];\r
+\r
+            for (auto& size : sizes)\r
+            {\r
+                if (size.getWidth() < smallestSize.getWidth() && size.getHeight() < smallestSize.getHeight())\r
+                    smallestSize = size;\r
+            }\r
+\r
+            return smallestSize;\r
+        }\r
+\r
+        Rectangle<int> getLargestSize (const Array<Rectangle<int>>& sizes) const\r
+        {\r
+            if (sizes.size() == 0)\r
+                return {};\r
+\r
+            auto largestSize = sizes[0];\r
+\r
+            for (auto& size : sizes)\r
+            {\r
+                if (size.getWidth() > largestSize.getWidth() && size.getHeight() > largestSize.getHeight())\r
+                    largestSize = size;\r
+            }\r
+\r
+            return largestSize;\r
+        }\r
+    };\r
+\r
+    //==============================================================================\r
+    class PreviewDisplay    : private TextureViewSurfaceTextureListener::Owner\r
+    {\r
+    public:\r
+        struct Listener\r
+        {\r
+            virtual ~Listener() {}\r
+\r
+            virtual void previewDisplayReady() = 0;\r
+            virtual void previewDisplayAboutToBeDestroyed() = 0;\r
+        };\r
+\r
+        PreviewDisplay (Rectangle<int> bufferSize)\r
+            : textureViewSurfaceTextureListener (*this),\r
+              textureView (getEnv()->NewObject (AndroidTextureView, AndroidTextureView.constructor,\r
+                                                android.activity.get())),\r
+              bufferWidth (bufferSize.getWidth()),\r
+              bufferHeight (bufferSize.getHeight())\r
+        {\r
+            auto* env = getEnv();\r
+\r
+            if (! isReady())\r
+                env->CallVoidMethod (textureView, AndroidTextureView.setSurfaceTextureListener,\r
+                                     CreateJavaInterface (&textureViewSurfaceTextureListener,\r
+                                                          "android/view/TextureView$SurfaceTextureListener").get());\r
+        }\r
+\r
+        ~PreviewDisplay()\r
+        {\r
+            getEnv()->CallVoidMethod (textureView, AndroidTextureView.setSurfaceTextureListener, nullptr);\r
+        }\r
+\r
+        void addListener (Listener* l)\r
+        {\r
+            if (l == nullptr)\r
+            {\r
+                jassertfalse;\r
+                return;\r
+            }\r
+\r
+            listeners.add (l);\r
+\r
+            if (isReady())\r
+                l->previewDisplayReady();\r
+        }\r
+\r
+        void removeListener (Listener* l)\r
+        {\r
+            if (l == nullptr)\r
+            {\r
+                jassertfalse;\r
+                return;\r
+            }\r
+\r
+            listeners.remove (l);\r
+        }\r
+\r
+        bool isReady() const\r
+        {\r
+            return (getEnv()->CallBooleanMethod (textureView, AndroidTextureView.isAvailable) != 0)\r
+                    && width > 0 && height > 0;\r
+        }\r
+\r
+        LocalRef<jobject> createSurface()\r
+        {\r
+            // Surface may get destroyed while session is being configured, if\r
+            // the preview gets hidden in the meantime, so bailout.\r
+            if (! isReady())\r
+                return LocalRef<jobject> (nullptr);\r
+\r
+            auto* env = getEnv();\r
+\r
+            auto surfaceTexture = LocalRef<jobject> (env->CallObjectMethod (textureView,\r
+                                                                            AndroidTextureView.getSurfaceTexture));\r
+\r
+            // NB: too small buffer will result in pixelated preview. A buffer with wrong aspect ratio\r
+            //     can result in a cropped preview.\r
+            env->CallVoidMethod (surfaceTexture, AndroidSurfaceTexture.setDefaultBufferSize, (jint) bufferWidth, (jint) bufferHeight);\r
+\r
+            auto surface = LocalRef<jobject> (env->NewObject (AndroidSurface, AndroidSurface.constructor, surfaceTexture.get()));\r
+\r
+            return surface;\r
+        }\r
+\r
+        const GlobalRef& getNativeView() { return textureView; }\r
+\r
+        void updateSurfaceTransform()\r
+        {\r
+            auto* env = getEnv();\r
+\r
+            auto windowManager = LocalRef<jobject> (env->CallObjectMethod (android.activity, JuceAppActivity.getWindowManager));\r
+            auto display = LocalRef<jobject> (env->CallObjectMethod (windowManager, AndroidWindowManager.getDefaultDisplay));\r
+            auto rotation = env->CallIntMethod (display, AndroidDisplay.getRotation);\r
+\r
+            static constexpr int rotation90 = 1;\r
+            static constexpr int rotation270 = 3;\r
+\r
+            auto matrix = LocalRef<jobject> (env->NewObject (AndroidMatrix, AndroidMatrix.constructor));\r
+\r
+            if (rotation == rotation90 || rotation == rotation270)\r
+            {\r
+                env->CallBooleanMethod (matrix, AndroidMatrix.postScale, jfloat (height / (float) width), jfloat (width / (float) height), (jfloat) 0, (jfloat) 0);\r
+                env->CallBooleanMethod (matrix, AndroidMatrix.postRotate, (jfloat) 90 * (rotation - 2), (jfloat) 0, (jfloat) 0);\r
+                env->CallBooleanMethod (matrix, AndroidMatrix.postTranslate, (jfloat) (rotation == 3 ? width : 0), (jfloat) (rotation == 1 ? height : 0));\r
+            }\r
+\r
+            env->CallVoidMethod (textureView, AndroidTextureView.setTransform, matrix.get());\r
+        }\r
+\r
+    private:\r
+        ListenerList<Listener> listeners;\r
+\r
+        TextureViewSurfaceTextureListener textureViewSurfaceTextureListener;\r
+        GlobalRef textureView;\r
+        int width = -1, height = -1;\r
+        int bufferWidth, bufferHeight;\r
+\r
+        void onSurfaceTextureAvailable (LocalRef<jobject>& /*surface*/, int widthToUse, int heightToUse) override\r
+        {\r
+            JUCE_CAMERA_LOG ("onSurfaceTextureAvailable()");\r
+\r
+            width = widthToUse;\r
+            height = heightToUse;\r
+\r
+            updateSurfaceTransform();\r
+\r
+            listeners.call (&Listener::previewDisplayReady);\r
+        }\r
+\r
+        bool onSurfaceTextureDestroyed (LocalRef<jobject>& /*surface*/) override\r
+        {\r
+            JUCE_CAMERA_LOG ("onSurfaceTextureDestroyed()");\r
+\r
+            listeners.call (&Listener::previewDisplayAboutToBeDestroyed);\r
+\r
+            return true;\r
+        }\r
+\r
+        void onSurfaceTextureSizeChanged (LocalRef<jobject>& /*surface*/, int widthToUse, int heightToUse) override\r
+        {\r
+            JUCE_CAMERA_LOG ("onSurfaceTextureSizeChanged()");\r
+\r
+            width = widthToUse;\r
+            height = heightToUse;\r
+\r
+            updateSurfaceTransform();\r
+        }\r
+\r
+        void onSurfaceTextureUpdated (LocalRef<jobject>& /*surface*/) override\r
+        {\r
+            JUCE_CAMERA_LOG ("onSurfaceTextureUpdated()");\r
+        }\r
+\r
+        JUCE_DECLARE_NON_COPYABLE (PreviewDisplay)\r
+    };\r
+\r
+    //==============================================================================\r
+    class ImageReader   : private ImageReaderOnImageAvailableListener::Owner\r
+    {\r
+    public:\r
+        ImageReader (Pimpl& ownerToUse, GlobalRef& handlerToUse,\r
+                     int imageWidth, int imageHeight, int cameraSensorOrientationToUse)\r
+            : owner (ownerToUse),\r
+              cameraSensorOrientation (cameraSensorOrientationToUse),\r
+              imageReader (getEnv()->CallStaticObjectMethod (AndroidImageReader, AndroidImageReader.newInstance,\r
+                                                             imageWidth, imageHeight, StreamConfigurationMap::jpegImageFormat,\r
+                                                             numImagesToKeep)),\r
+              onImageAvailableListener (*this)\r
+        {\r
+            getEnv()->CallVoidMethod (imageReader, AndroidImageReader.setOnImageAvailableListener,\r
+                                      CreateJavaInterface (&onImageAvailableListener,\r
+                                                           "android/media/ImageReader$OnImageAvailableListener").get(),\r
+                                      handlerToUse.get());\r
+        }\r
+\r
+        ~ImageReader()\r
+        {\r
+            getEnv()->CallVoidMethod (imageReader, AndroidImageReader.close);\r
+        }\r
+\r
+        LocalRef<jobject> getSurface() const\r
+        {\r
+            return LocalRef<jobject> (getEnv()->CallObjectMethod (imageReader, AndroidImageReader.getSurface));\r
+        }\r
+\r
+        void resetNotificationFlag()\r
+        {\r
+            hasNotifiedListeners.set (0);\r
+        }\r
+\r
+    private:\r
+        Pimpl& owner;\r
+        int cameraSensorOrientation;\r
+\r
+        GlobalRef imageReader;\r
+        ImageReaderOnImageAvailableListener onImageAvailableListener;\r
+        static constexpr int numImagesToKeep = 2;\r
+        Atomic<int> hasNotifiedListeners { 0 };\r
+\r
+        JUCE_DECLARE_WEAK_REFERENCEABLE (ImageReader)\r
+\r
+        void onImageAvailable (LocalRef<jobject>& /*imageReader*/) override\r
+        {\r
+            JUCE_CAMERA_LOG ("onImageAvailable()");\r
+\r
+            auto* env = getEnv();\r
+\r
+            auto jImage = LocalRef<jobject> (env->CallObjectMethod (imageReader, AndroidImageReader.acquireLatestImage));\r
+\r
+            if (jImage.get() == nullptr)\r
+                return;\r
+\r
+            auto cameraLensFrontFacing = owner.getCameraLensFacing() == 0;\r
+\r
+            // NB: could use sensor orientation here to get real-world orientation, but then the resulting\r
+            //     image could not match the UI orientation.\r
+            auto image = androidImageToJuceWithFixedOrientation (jImage, owner.deviceOrientationChangeListener.getDeviceOrientation(),\r
+                                                                 Desktop::getInstance().getCurrentOrientation(),\r
+                                                                 cameraLensFrontFacing,\r
+                                                                 cameraSensorOrientation);\r
+\r
+            env->CallVoidMethod (jImage, AndroidImage.close);\r
+\r
+            WeakReference<ImageReader> safeThis (this);\r
+\r
+            owner.callListeners (image);\r
+\r
+            // Android may take multiple pictures before it handles a request to stop.\r
+            if (hasNotifiedListeners.compareAndSetBool (1, 0))\r
+                MessageManager::callAsync ([safeThis, image]() mutable { if (safeThis != nullptr) safeThis->owner.notifyPictureTaken (image); });\r
+        }\r
+\r
+        struct ImageBuffer\r
+        {\r
+            LocalRef<jbyteArray> byteArray;\r
+            int size;\r
+        };\r
+\r
+        static Image androidImageToJuceWithFixedOrientation (const LocalRef<jobject>& androidImage,\r
+                                                             Desktop::DisplayOrientation deviceOrientationFromAccelerometerSensor,\r
+                                                             Desktop::DisplayOrientation targetOrientation,\r
+                                                             bool cameraLensFrontFacing,\r
+                                                             int cameraSensorOrientation)\r
+        {\r
+            auto* env = getEnv();\r
+\r
+            auto planes = LocalRef<jobjectArray> ((jobjectArray) env->CallObjectMethod (androidImage, AndroidImage.getPlanes));\r
+            jassert (env->GetArrayLength (planes) > 0);\r
+\r
+            auto plane = LocalRef<jobject> (env->GetObjectArrayElement (planes, 0));\r
+            auto byteBuffer = LocalRef<jobject> (env->CallObjectMethod (plane, AndroidImagePlane.getBuffer));\r
+\r
+            ImageBuffer correctedBuffer = getImageBufferWithCorrectedOrientationFrom (byteBuffer, deviceOrientationFromAccelerometerSensor,\r
+                                                                                      targetOrientation, cameraLensFrontFacing, cameraSensorOrientation);\r
+\r
+            jbyte* rawBytes = env->GetByteArrayElements (correctedBuffer.byteArray, nullptr);\r
+\r
+            Image result = ImageFileFormat::loadFrom (rawBytes, (size_t) correctedBuffer.size);\r
+\r
+            env->ReleaseByteArrayElements (correctedBuffer.byteArray, rawBytes, 0);\r
+\r
+            return result;\r
+        }\r
+\r
+        static ImageBuffer getImageBufferWithCorrectedOrientationFrom (const LocalRef<jobject>& imagePlaneBuffer,\r
+                                                                       Desktop::DisplayOrientation deviceOrientationFromAccelerometerSensor,\r
+                                                                       Desktop::DisplayOrientation targetOrientation,\r
+                                                                       bool cameraLensFrontFacing,\r
+                                                                       int cameraSensorOrientation)\r
+        {\r
+            auto* env = getEnv();\r
+\r
+            auto bufferSize = env->CallIntMethod (imagePlaneBuffer, JavaByteBuffer.remaining);\r
+            auto byteArray = LocalRef<jbyteArray> (env->NewByteArray (bufferSize));\r
+            env->CallObjectMethod (imagePlaneBuffer, JavaByteBuffer.get, byteArray.get());\r
+\r
+            auto orientationsEnabled = Desktop::getInstance().getOrientationsEnabled() & ~Desktop::upsideDown;\r
+\r
+            auto rotationAngle = getRotationAngle (deviceOrientationFromAccelerometerSensor, targetOrientation,\r
+                                                  cameraLensFrontFacing, cameraSensorOrientation);\r
+\r
+            if (rotationAngle == 0)\r
+            {\r
+                // Nothing to do, just get the bytes\r
+                return { byteArray, bufferSize };\r
+            }\r
+\r
+            auto origBitmap = LocalRef<jobject> (env->CallStaticObjectMethod (AndroidBitmapFactory,\r
+                                                                              AndroidBitmapFactory.decodeByteArray,\r
+                                                                              byteArray.get(), (jint) 0, (jint) bufferSize));\r
+\r
+            auto correctedBitmap = getBitmapWithCorrectOrientationFrom (origBitmap, rotationAngle);\r
+\r
+            auto byteArrayOutputStream = LocalRef<jobject> (env->NewObject (ByteArrayOutputStream,\r
+                                                                            ByteArrayOutputStream.constructor));\r
+\r
+            auto jCompressFormatString = javaString ("JPEG");\r
+            auto compressFormat = LocalRef<jobject> (env->CallStaticObjectMethod (AndroidBitmapCompressFormat,\r
+                                                                                  AndroidBitmapCompressFormat.valueOf,\r
+                                                                                  jCompressFormatString.get()));\r
+\r
+            if (env->CallBooleanMethod (correctedBitmap, AndroidBitmap.compress, compressFormat.get(),\r
+                                        (jint) 100, byteArrayOutputStream.get()) != 0)\r
+            {\r
+                auto correctedByteArray = LocalRef<jbyteArray> ((jbyteArray) env->CallObjectMethod (byteArrayOutputStream,\r
+                                                                                                    ByteArrayOutputStream.toByteArray));\r
+\r
+                int correctedByteArraySize = env->CallIntMethod (byteArrayOutputStream, ByteArrayOutputStream.size);\r
+\r
+                return { correctedByteArray, correctedByteArraySize };\r
+            }\r
+\r
+            jassertfalse;\r
+            // fallback, return original bitmap\r
+            return { byteArray, bufferSize };\r
+        }\r
+\r
+        static int getRotationAngle (Desktop::DisplayOrientation deviceOrientationFromAccelerometerSensor,\r
+                                     Desktop::DisplayOrientation targetOrientation,\r
+                                     bool cameraLensFrontFacing,\r
+                                     int cameraSensorOrientation)\r
+        {\r
+            auto orientationsEnabled = Desktop::getInstance().getOrientationsEnabled() & ~Desktop::upsideDown;\r
+\r
+            auto isSensorOrientationHorizontal = deviceOrientationFromAccelerometerSensor == Desktop::rotatedAntiClockwise\r
+                                              || deviceOrientationFromAccelerometerSensor == Desktop::rotatedClockwise;\r
+\r
+            if (cameraLensFrontFacing && isSensorOrientationHorizontal)\r
+            {\r
+                // flip angles for front camera\r
+                return getRotationAngle (deviceOrientationFromAccelerometerSensor, targetOrientation, false, (cameraSensorOrientation + 180) % 360);\r
+            }\r
+\r
+            switch (targetOrientation)\r
+            {\r
+                case Desktop::rotatedAntiClockwise:\r
+                    return cameraSensorOrientation == 90 ? 0 : 180;\r
+                case Desktop::rotatedClockwise:\r
+                    return cameraSensorOrientation == 90 ? 180 : 0;\r
+                case Desktop::upright:\r
+                case Desktop::upsideDown:\r
+                    if ((targetOrientation == Desktop::upright && ! cameraLensFrontFacing)\r
+                        || (targetOrientation == Desktop::upsideDown && cameraLensFrontFacing))\r
+                    {\r
+                        return cameraSensorOrientation;\r
+                    }\r
+                    else\r
+                    {\r
+                        if (deviceOrientationFromAccelerometerSensor == Desktop::upright || deviceOrientationFromAccelerometerSensor == Desktop::upsideDown)\r
+                            return cameraSensorOrientation;\r
+                        else\r
+                            return (cameraSensorOrientation + 180) % 360;\r
+                    }\r
+                    break;\r
+                default:\r
+                    return 0;\r
+            }\r
+        }\r
+\r
+        static LocalRef<jobject> getBitmapWithCorrectOrientationFrom (LocalRef<jobject>& origBitmap, int rotationAngle)\r
+        {\r
+            auto* env = getEnv();\r
+\r
+            auto origBitmapWidth  = env->CallIntMethod (origBitmap, AndroidBitmap.getWidth);\r
+            auto origBitmapHeight = env->CallIntMethod (origBitmap, AndroidBitmap.getHeight);\r
+\r
+            auto orientationsEnabled = Desktop::getInstance().getOrientationsEnabled() & ~Desktop::upsideDown;\r
+\r
+            auto matrix = LocalRef<jobject> (env->NewObject (AndroidMatrix, AndroidMatrix.constructor));\r
+            env->CallBooleanMethod (matrix, AndroidMatrix.postRotate, (jfloat) rotationAngle, (jfloat) 0, (jfloat) 0);\r
+\r
+            auto rotatedBitmap = LocalRef<jobject> (env->CallStaticObjectMethod (AndroidBitmap, AndroidBitmap.createBitmapFrom,\r
+                                                                                 origBitmap.get(), (jint) 0, (jint) 0,\r
+                                                                                 (jint) origBitmapWidth, (jint) origBitmapHeight,\r
+                                                                                 matrix.get(), true));\r
+\r
+            env->CallVoidMethod (origBitmap, AndroidBitmap.recycle);\r
+\r
+            return rotatedBitmap;\r
+        }\r
+    };\r
+\r
+    //==============================================================================\r
+    class MediaRecorder : private MediaRecorderOnInfoListener::Owner,\r
+                          private MediaRecorderOnErrorListener::Owner\r
+    {\r
+    public:\r
+        MediaRecorder (const String& outputFilePath, int videoWidth, int videoHeight,\r
+                       int sensorOrientation, int cameraLensFacing)\r
+            : onInfoListener (*this),\r
+              onErrorListener (*this),\r
+              mediaRecorder (LocalRef<jobject> (getEnv()->NewObject (AndroidMediaRecorder,\r
+                                                                     AndroidMediaRecorder.constructor)))\r
+        {\r
+            auto* env = getEnv();\r
+\r
+            env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setOnInfoListener,\r
+                                 CreateJavaInterface (&onInfoListener,\r
+                                                      "android/media/MediaRecorder$OnInfoListener").get());\r
+\r
+            env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setOnErrorListener,\r
+                                 CreateJavaInterface (&onErrorListener,\r
+                                                      "android/media/MediaRecorder$OnErrorListener").get());\r
+\r
+            // NB: the order of function calls here is enforced, and exceptions will be thrown if\r
+            //     the order is changed.\r
+            static constexpr int audioSourceMic = 1;\r
+            env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setAudioSource, (jint) audioSourceMic);\r
+\r
+            static constexpr int videoSourceSurface = 2;\r
+            env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setVideoSource, (jint) videoSourceSurface);\r
+\r
+            static constexpr int outputFormatMPEG4 = 2;\r
+            env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setOutputFormat, (jint) outputFormatMPEG4);\r
+\r
+            static constexpr int audioEncoderAAC = 3;\r
+            env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setAudioEncoder, (jint) audioEncoderAAC);\r
+\r
+            static constexpr int videoEncoderH264 = 2;\r
+            env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setVideoEncoder, (jint) videoEncoderH264);\r
+\r
+            env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setVideoEncodingBitRate, (jint) 10000000);\r
+            env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setVideoFrameRate, (jint) 30);\r
+\r
+            auto frontFacing = cameraLensFacing == 0;\r
+\r
+            auto useInverseDegrees = frontFacing && sensorOrientation == 90;\r
+\r
+            int orientationHint = getOrientationHint (useInverseDegrees, sensorOrientation);\r
+            env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setOrientationHint, (jint) orientationHint);\r
+\r
+            getEnv()->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setVideoSize, (jint) videoWidth, (jint) videoHeight);\r
+            getEnv()->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setOutputFile, javaString (outputFilePath).get());\r
+            getEnv()->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.prepare);\r
+        }\r
+\r
+        ~MediaRecorder()\r
+        {\r
+            getEnv()->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.release);\r
+        }\r
+\r
+        LocalRef<jobject> getSurface()\r
+        {\r
+            return LocalRef<jobject> (getEnv()->CallObjectMethod (mediaRecorder, AndroidMediaRecorder.getSurface));\r
+        }\r
+\r
+        void start()\r
+        {\r
+            lockScreenOrientation();\r
+\r
+            getEnv()->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.start);\r
+\r
+            hasStartedRecording = true;\r
+        }\r
+\r
+        void stop()\r
+        {\r
+            // A request to stop can be sent before recording has had a chance to start, so\r
+            // ignore the request rather than calling AndroidMediaRecorder.stop because\r
+            // otherwise MediaRecorder will throw an exception and...\r
+            if (! hasStartedRecording)\r
+                return;\r
+\r
+            hasStartedRecording = false;\r
+\r
+            auto* env = getEnv();\r
+            env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.stop);\r
+\r
+            // ... ignore RuntimeException that can be thrown if stop() was called after recording\r
+            // has started but before any frame was written to a file. This is not an error.\r
+            auto exception = LocalRef<jobject> (env->ExceptionOccurred());\r
+\r
+            if (exception != 0)\r
+                env->ExceptionClear();\r
+\r
+            unlockScreenOrientation();\r
+        }\r
+\r
+    private:\r
+        MediaRecorderOnInfoListener onInfoListener;\r
+        MediaRecorderOnErrorListener onErrorListener;\r
+        GlobalRef mediaRecorder;\r
+        bool hasStartedRecording = false;\r
+        int orientationsEnabled = -1;\r
+\r
+        void lockScreenOrientation()\r
+        {\r
+            orientationsEnabled = Desktop::getInstance().getOrientationsEnabled();\r
+\r
+            auto o = Desktop::getInstance().getCurrentOrientation();\r
+            Desktop::getInstance().setOrientationsEnabled (o);\r
+        }\r
+\r
+        static jint juceOrientationToNativeOrientation (int orientations) noexcept\r
+        {\r
+            enum\r
+            {\r
+                SCREEN_ORIENTATION_LANDSCAPE          = 0,\r
+                SCREEN_ORIENTATION_PORTRAIT           = 1,\r
+                SCREEN_ORIENTATION_USER               = 2,\r
+                SCREEN_ORIENTATION_REVERSE_LANDSCAPE  = 8,\r
+                SCREEN_ORIENTATION_REVERSE_PORTRAIT   = 9,\r
+                SCREEN_ORIENTATION_USER_LANDSCAPE     = 11,\r
+                SCREEN_ORIENTATION_USER_PORTRAIT      = 12,\r
+            };\r
+\r
+            switch (orientations)\r
+            {\r
+                case Desktop::upright:                                          return (jint) SCREEN_ORIENTATION_PORTRAIT;\r
+                case Desktop::upsideDown:                                       return (jint) SCREEN_ORIENTATION_REVERSE_PORTRAIT;\r
+                case Desktop::upright + Desktop::upsideDown:                    return (jint) SCREEN_ORIENTATION_USER_PORTRAIT;\r
+                case Desktop::rotatedAntiClockwise:                             return (jint) SCREEN_ORIENTATION_LANDSCAPE;\r
+                case Desktop::rotatedClockwise:                                 return (jint) SCREEN_ORIENTATION_REVERSE_LANDSCAPE;\r
+                case Desktop::rotatedClockwise + Desktop::rotatedAntiClockwise: return (jint) SCREEN_ORIENTATION_USER_LANDSCAPE;\r
+                default:                                                        return (jint) SCREEN_ORIENTATION_USER;\r
+            }\r
+        }\r
+\r
+        void unlockScreenOrientation()\r
+        {\r
+            Desktop::getInstance().setOrientationsEnabled (orientationsEnabled);\r
+        }\r
+\r
+        void onInfo (LocalRef<jobject>& recorder, int what, int extra) override\r
+        {\r
+            ignoreUnused (recorder, what, extra);\r
+\r
+            JUCE_CAMERA_LOG ("MediaRecorder::OnInfo: " + getInfoStringFromCode (what)\r
+                                     + ", extra code = " + String (extra));\r
+        }\r
+\r
+        void onError (LocalRef<jobject>& recorder, int what, int extra) override\r
+        {\r
+            ignoreUnused (recorder, what, extra);\r
+\r
+            JUCE_CAMERA_LOG ("MediaRecorder::onError: " + getErrorStringFromCode (what)\r
+                                     + ", extra code = " + String (extra));\r
+        }\r
+\r
+        static String getInfoStringFromCode (int what)\r
+        {\r
+            enum\r
+            {\r
+                MEDIA_RECORDER_INFO_UNKNOWN = 1,\r
+                MEDIA_RECORDER_INFO_MAX_DURATION_REACHED = 800,\r
+                MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED = 801,\r
+                MEDIA_RECORDER_INFO_MAX_FILESIZE_APPROACHING = 802,\r
+                MEDIA_RECORDER_INFO_NEXT_OUTPUT_FILE_STARTED = 803\r
+            };\r
+\r
+            switch (what)\r
+            {\r
+                case MEDIA_RECORDER_INFO_UNKNOWN:                  return { "Unknown info" };\r
+                case MEDIA_RECORDER_INFO_MAX_DURATION_REACHED:     return { "Max duration reached" };\r
+                case MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED:     return { "Max filesize reached" };\r
+                case MEDIA_RECORDER_INFO_MAX_FILESIZE_APPROACHING: return { "Max filesize approaching" };\r
+                case MEDIA_RECORDER_INFO_NEXT_OUTPUT_FILE_STARTED: return { "Next output file started" };\r
+                default: return String (what);\r
+            };\r
+        }\r
+\r
+        static String getErrorStringFromCode (int what)\r
+        {\r
+            enum\r
+            {\r
+                MEDIA_RECORDER_ERROR_UNKNOWN = 1,\r
+                MEDIA_ERROR_SERVER_DIED = 100\r
+            };\r
+\r
+            switch (what)\r
+            {\r
+                case MEDIA_RECORDER_ERROR_UNKNOWN:   return { "Unknown error" };\r
+                case MEDIA_ERROR_SERVER_DIED:        return { "Server died" };\r
+                default: return String (what);\r
+            };\r
+        }\r
+\r
+        static int getOrientationHint (bool useInverseDegrees, int cameraSensorOrientation)\r
+        {\r
+            auto* env = getEnv();\r
+\r
+            auto windowManager = LocalRef<jobject> (env->CallObjectMethod (android.activity, JuceAppActivity.getWindowManager));\r
+            auto display = LocalRef<jobject> (env->CallObjectMethod (windowManager, AndroidWindowManager.getDefaultDisplay));\r
+            auto rotation = env->CallIntMethod (display, AndroidDisplay.getRotation);\r
+\r
+            enum\r
+            {\r
+                ROTATION_0 = 0,\r
+                ROTATION_90,\r
+                ROTATION_180,\r
+                ROTATION_270\r
+            };\r
+\r
+            int hint = 0;\r
+\r
+            switch (rotation)\r
+            {\r
+                case ROTATION_0:   hint = cameraSensorOrientation;       break;\r
+                case ROTATION_90:  hint = useInverseDegrees ? 180 : 0;   break;\r
+                case ROTATION_180: hint = cameraSensorOrientation + 180; break;\r
+                case ROTATION_270: hint = useInverseDegrees ? 0 : 180;   break;\r
+                default: jassertfalse;\r
+            }\r
+\r
+            return (hint + 360) % 360;\r
+        }\r
+    };\r
+\r
+    //==============================================================================\r
+    class ScopedCameraDevice\r
+    {\r
+    public:\r
+        //==============================================================================\r
+        class CaptureSession\r
+        {\r
+        public:\r
+            struct ConfiguredCallback\r
+            {\r
+                virtual ~ConfiguredCallback() {}\r
+\r
+                virtual void captureSessionConfigured (CaptureSession*) = 0;\r
+            };\r
+\r
+            ~CaptureSession()\r
+            {\r
+                bool calledClose = false;\r
+\r
+                auto* env = getEnv();\r
+\r
+                {\r
+                    const ScopedLock lock (captureSessionLock);\r
+\r
+                    if (captureSession.get() != nullptr)\r
+                    {\r
+                        calledClose = true;\r
+\r
+                        env->CallVoidMethod (captureSession, CameraCaptureSession.close);\r
+                    }\r
+                }\r
+\r
+                auto exception = LocalRef<jobject> (env->ExceptionOccurred());\r
+\r
+                // When exception occurs, CameraCaptureSession.close will never finish, so\r
+                // we should not wait for it. For fatal error an exception does occur, but\r
+                // it is catched internally in Java...\r
+                if (exception != 0 || scopedCameraDevice.fatalErrorOccurred.get())\r
+                {\r
+                    JUCE_CAMERA_LOG ("Exception or fatal error occurred while closing Capture Session, closing by force");\r
+\r
+                    env->ExceptionClear();\r
+                }\r
+                else if (calledClose)\r
+                {\r
+                    pendingClose.set (1);\r
+                    closedEvent.wait (-1);\r
+                }\r
+            }\r
+\r
+            bool openedOk() const noexcept { return captureSession != nullptr; }\r
+\r
+            const GlobalRef& getNativeSession() const { return captureSession; }\r
+\r
+            bool start (const LocalRef<jobject>& targetSurfacesList, GlobalRef& handlerToUse)\r
+            {\r
+                if (! openedOk())\r
+                {\r
+                    jassertfalse;\r
+                    return false;\r
+                }\r
+\r
+                auto* env = getEnv();\r
+\r
+                auto numSurfaces = env->CallIntMethod (targetSurfacesList, JavaArrayList.size);\r
+\r
+                for (int i = 0; i < numSurfaces; ++i)\r
+                {\r
+                    auto surface = LocalRef<jobject> (env->CallObjectMethod (targetSurfacesList, JavaArrayList.get, (jint) i));\r
+                    env->CallVoidMethod (captureRequestBuilder, CaptureRequestBuilder.addTarget, surface.get());\r
+                }\r
+\r
+                previewCaptureRequest = GlobalRef (env->CallObjectMethod (captureRequestBuilder, CaptureRequestBuilder.build));\r
+\r
+                env->CallIntMethod (captureSession, CameraCaptureSession.setRepeatingRequest,\r
+                                    previewCaptureRequest.get(), nullptr, handlerToUse.get());\r
+\r
+                return true;\r
+            }\r
+\r
+            void takeStillPicture (jobject targetSurface)\r
+            {\r
+                if (stillPictureTaker == nullptr)\r
+                {\r
+                    // Can only take picture once session was successfully configured!\r
+                    jassertfalse;\r
+                    return;\r
+                }\r
+\r
+                auto* env = getEnv();\r
+\r
+                static constexpr int templateStillCapture = 2;\r
+                auto builder = LocalRef<jobject> (env->CallObjectMethod (scopedCameraDevice.cameraDevice,\r
+                                                                         AndroidCameraDevice.createCaptureRequest,\r
+                                                                         (jint) templateStillCapture));\r
+\r
+                env->CallVoidMethod (builder, CaptureRequestBuilder.addTarget, targetSurface);\r
+\r
+                setCaptureRequestBuilderIntegerKey (builder.get(), CaptureRequest.CONTROL_AF_MODE, autoFocusMode);\r
+\r
+                auto stillPictureCaptureRequest = LocalRef<jobject> (env->CallObjectMethod (builder, CaptureRequestBuilder.build));\r
+\r
+                stillPictureTaker->takePicture (stillPictureCaptureRequest.get());\r
+            }\r
+\r
+        private:\r
+            //==============================================================================\r
+            class StillPictureTaker   : private AndroidRunnable::Owner\r
+            {\r
+            public:\r
+                StillPictureTaker (GlobalRef& captureSessionToUse, GlobalRef& captureRequestBuilderToUse,\r
+                                   GlobalRef& previewCaptureRequestToUse, GlobalRef& handlerToUse,\r
+                                   int autoFocusModeToUse)\r
+                    : captureSession (captureSessionToUse),\r
+                      captureRequestBuilder (captureRequestBuilderToUse),\r
+                      previewCaptureRequest (previewCaptureRequestToUse),\r
+                      handler (handlerToUse),\r
+                      runnable (*this),\r
+                      captureSessionPreviewCaptureCallback (LocalRef<jobject> (getEnv()->NewObject (CameraCaptureSessionCaptureCallback,\r
+                                                                                                    CameraCaptureSessionCaptureCallback.constructor,\r
+                                                                                                    android.activity.get(),\r
+                                                                                                    reinterpret_cast<jlong> (this),\r
+                                                                                                    true))),\r
+                      captureSessionStillPictureCaptureCallback (LocalRef<jobject> (getEnv()->NewObject (CameraCaptureSessionCaptureCallback,\r
+                                                                                                         CameraCaptureSessionCaptureCallback.constructor,\r
+                                                                                                         android.activity.get(),\r
+                                                                                                         reinterpret_cast<jlong> (this),\r
+                                                                                                         false))),\r
+                      autoFocusMode (autoFocusModeToUse)\r
+                {\r
+                }\r
+\r
+                void takePicture (jobject stillPictureCaptureRequestToUse)\r
+                {\r
+                    JUCE_CAMERA_LOG ("Taking picture...");\r
+\r
+                    stillPictureCaptureRequest = GlobalRef (stillPictureCaptureRequestToUse);\r
+\r
+                    lockFocus();\r
+                }\r
+\r
+            private:\r
+                GlobalRef& captureSession;\r
+                GlobalRef& captureRequestBuilder;\r
+                GlobalRef& previewCaptureRequest;\r
+                GlobalRef& handler;\r
+\r
+                AndroidRunnable runnable;\r
+                GlobalRef delayedCaptureRunnable;\r
+\r
+                GlobalRef captureSessionPreviewCaptureCallback;\r
+\r
+                GlobalRef stillPictureCaptureRequest;\r
+                GlobalRef captureSessionStillPictureCaptureCallback;\r
+\r
+                int autoFocusMode;\r
+\r
+                enum class State\r
+                {\r
+                    idle = 0,\r
+                    pendingFocusLock,\r
+                    pendingExposurePrecapture,\r
+                    pendingExposurePostPrecapture,\r
+                    pictureTaken\r
+                };\r
+\r
+                State currentState = State::idle;\r
+\r
+                void lockFocus()\r
+                {\r
+                    if (Pimpl::checkHasExceptionOccurred())\r
+                        return;\r
+\r
+                    JUCE_CAMERA_LOG ("Performing auto-focus if possible...");\r
+\r
+                    currentState = State::pendingFocusLock;\r
+\r
+                    auto* env = getEnv();\r
+\r
+                    // NB: auto-focus may be unavailable on a device, in which case it may have already\r
+                    // automatically adjusted the exposure. We check for that in updateState().\r
+                    static constexpr int controlAfTriggerStart = 1;\r
+                    CaptureSession::setCaptureRequestBuilderIntegerKey (captureRequestBuilder.get(),\r
+                                                                        CaptureRequest.CONTROL_AF_TRIGGER,\r
+                                                                        controlAfTriggerStart);\r
+\r
+                    auto previewRequest = LocalRef<jobject> (env->CallObjectMethod (captureRequestBuilder,\r
+                                                                                    CaptureRequestBuilder.build));\r
+\r
+                    env->CallIntMethod (captureSession, CameraCaptureSession.capture, previewRequest.get(),\r
+                                        captureSessionPreviewCaptureCallback.get(), handler.get());\r
+                }\r
+\r
+                void updateState (jobject captureResult)\r
+                {\r
+                    // IllegalStateException can be thrown when accessing CaptureSession,\r
+                    // claiming that capture session was already closed but we may not\r
+                    // get relevant callback yet, so check for this and bailout when needed.\r
+                    if (Pimpl::checkHasExceptionOccurred())\r
+                        return;\r
+\r
+                    auto* env = getEnv();\r
+\r
+                    switch (currentState)\r
+                    {\r
+                        case State::pendingFocusLock:\r
+                        {\r
+                            JUCE_CAMERA_LOG ("Still picture capture, updateState(), State::pendingFocusLock...");\r
+\r
+                            auto controlAfStateValue = getCaptureResultIntegerKeyValue (CaptureResult.CONTROL_AF_STATE, captureResult);\r
+\r
+                            if (controlAfStateValue.get() == nullptr)\r
+                            {\r
+                                captureStillPictureDelayed();\r
+                                return;\r
+                            }\r
+\r
+                            auto autoToFocusNotAvailable = autoFocusMode == 0;\r
+\r
+                            if (autoToFocusNotAvailable || autoFocusHasFinished (controlAfStateValue))\r
+                            {\r
+                                auto controlAeStateIntValue = getControlAEState (captureResult);\r
+                                static constexpr int controlAeStateConverged = 2;\r
+\r
+                                if (controlAeStateIntValue == -1 || controlAeStateIntValue == controlAeStateConverged)\r
+                                {\r
+                                    currentState = State::pictureTaken;\r
+                                    captureStillPictureDelayed();\r
+                                }\r
+                                else\r
+                                {\r
+                                    runPrecaptureSequence();\r
+                                }\r
+                            }\r
+\r
+                            break;\r
+                        }\r
+\r
+                        case State::pendingExposurePrecapture:\r
+                        {\r
+                            JUCE_CAMERA_LOG ("Still picture capture, updateState(), State::pendingExposurePrecapture...");\r
+\r
+                            auto controlAeStateIntValue = getControlAEState (captureResult);\r
+                            static constexpr int controlAeStateFlashRequired = 4;\r
+                            static constexpr int controlAeStatePrecapture = 5;\r
+\r
+                            if (controlAeStateIntValue == -1 || controlAeStateIntValue == controlAeStateFlashRequired\r
+                                                             || controlAeStateIntValue == controlAeStatePrecapture)\r
+                            {\r
+                                currentState = State::pendingExposurePostPrecapture;\r
+                            }\r
+\r
+                            break;\r
+                        }\r
+\r
+                        case State::pendingExposurePostPrecapture:\r
+                        {\r
+                            JUCE_CAMERA_LOG ("Still picture capture, updateState(), State::pendingExposurePostPrecapture...");\r
+\r
+                            auto controlAeStateIntValue = getControlAEState (captureResult);\r
+                            static constexpr int controlAeStatePrecapture = 5;\r
+\r
+                            if (controlAeStateIntValue == -1 || controlAeStateIntValue != controlAeStatePrecapture)\r
+                            {\r
+                                currentState = State::pictureTaken;\r
+                                captureStillPictureDelayed();\r
+                            }\r
+\r
+                            break;\r
+                        }\r
+                        case State::idle:\r
+                        case State::pictureTaken:\r
+                            { /* do nothing */ break; }\r
+                    };\r
+                }\r
+\r
+                static int getControlAEState (jobject captureResult)\r
+                {\r
+                    auto controlAeStateValue = getCaptureResultIntegerKeyValue (CaptureResult.CONTROL_AE_STATE, captureResult);\r
+\r
+                    return controlAeStateValue.get() != nullptr\r
+                                    ? getEnv()->CallIntMethod (controlAeStateValue, JavaInteger.intValue) : -1;\r
+                }\r
+\r
+                static bool autoFocusHasFinished (const LocalRef<jobject>& controlAfStateValue)\r
+                {\r
+                    static constexpr int controlAfStateFocusedLocked = 4;\r
+                    static constexpr int controlAfStateNotFocusedLocked = 5;\r
+\r
+                    auto controlAfStateIntValue = getEnv()->CallIntMethod (controlAfStateValue, JavaInteger.intValue);\r
+\r
+                    return controlAfStateIntValue == controlAfStateFocusedLocked || controlAfStateIntValue == controlAfStateNotFocusedLocked;\r
+                }\r
+\r
+                static LocalRef<jobject> getCaptureResultIntegerKeyValue (jfieldID key, jobject captureResult)\r
+                {\r
+                    auto* env = getEnv();\r
+\r
+                    auto jKey = LocalRef<jobject> (env->GetStaticObjectField (CaptureResult, key));\r
+                    return LocalRef<jobject> (env->CallObjectMethod (captureResult, CaptureResult.get, jKey.get()));\r
+                }\r
+\r
+                void captureStillPictureDelayed()\r
+                {\r
+                    if (Pimpl::checkHasExceptionOccurred())\r
+                        return;\r
+\r
+                    JUCE_CAMERA_LOG ("Still picture capture, device ready, capturing now...");\r
+\r
+                    auto* env = getEnv();\r
+\r
+                    env->CallVoidMethod (captureSession, CameraCaptureSession.stopRepeating);\r
+\r
+                    if (Pimpl::checkHasExceptionOccurred())\r
+                        return;\r
+\r
+                    env->CallVoidMethod (captureSession, CameraCaptureSession.abortCaptures);\r
+\r
+                    if (Pimpl::checkHasExceptionOccurred())\r
+                        return;\r
+\r
+                    // Delay still picture capture for devices that can't handle it right after\r
+                    // stopRepeating/abortCaptures calls.\r
+                    if (delayedCaptureRunnable.get() == nullptr)\r
+                        delayedCaptureRunnable = GlobalRef (CreateJavaInterface (&runnable, "java/lang/Runnable").get());\r
+\r
+                    env->CallBooleanMethod (handler, AndroidHandler.postDelayed, delayedCaptureRunnable.get(), (jlong) 200);\r
+                }\r
+\r
+                void runPrecaptureSequence()\r
+                {\r
+                    if (Pimpl::checkHasExceptionOccurred())\r
+                        return;\r
+\r
+                    auto* env = getEnv();\r
+\r
+                    static constexpr int controlAePrecaptureTriggerStart = 1;\r
+                    CaptureSession::setCaptureRequestBuilderIntegerKey (captureRequestBuilder.get(),\r
+                                                                        CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER,\r
+                                                                        controlAePrecaptureTriggerStart);\r
+\r
+                    currentState = State::pendingExposurePrecapture;\r
+\r
+                    auto previewRequest = LocalRef<jobject> (env->CallObjectMethod (captureRequestBuilder,\r
+                                                                                    CaptureRequestBuilder.build));\r
+\r
+                    env->CallIntMethod (captureSession, CameraCaptureSession.capture, previewRequest.get(),\r
+                                        captureSessionPreviewCaptureCallback.get(), handler.get());\r
+                }\r
+\r
+                void unlockFocus()\r
+                {\r
+                    if (Pimpl::checkHasExceptionOccurred())\r
+                        return;\r
+\r
+                    JUCE_CAMERA_LOG ("Unlocking focus...");\r
+\r
+                    currentState = State::idle;\r
+\r
+                    auto* env = getEnv();\r
+\r
+                    static constexpr int controlAfTriggerCancel = 2;\r
+                    CaptureSession::setCaptureRequestBuilderIntegerKey (captureRequestBuilder.get(),\r
+                                                                        CaptureRequest.CONTROL_AF_TRIGGER,\r
+                                                                        controlAfTriggerCancel);\r
+\r
+                    auto resetAutoFocusRequest = LocalRef<jobject> (env->CallObjectMethod (captureRequestBuilder,\r
+                                                                                           CaptureRequestBuilder.build));\r
+\r
+                    env->CallIntMethod (captureSession, CameraCaptureSession.capture, resetAutoFocusRequest.get(),\r
+                                        nullptr, handler.get());\r
+\r
+                    if (Pimpl::checkHasExceptionOccurred())\r
+                        return;\r
+\r
+                    // NB: for preview, using preview capture request again\r
+                    env->CallIntMethod (captureSession, CameraCaptureSession.setRepeatingRequest, previewCaptureRequest.get(),\r
+                                        nullptr, handler.get());\r
+                }\r
+                //==============================================================================\r
+                void run() override\r
+                {\r
+                    captureStillPicture();\r
+                }\r
+\r
+                void captureStillPicture()\r
+                {\r
+                    getEnv()->CallIntMethod (captureSession, CameraCaptureSession.capture,\r
+                                             stillPictureCaptureRequest.get(), captureSessionStillPictureCaptureCallback.get(),\r
+                                             nullptr);\r
+                }\r
+\r
+                //==============================================================================\r
+                void cameraCaptureSessionCaptureCompleted (bool isPreview, jobject session, jobject request, jobject result)\r
+                {\r
+                    JUCE_CAMERA_LOG ("cameraCaptureSessionCaptureCompleted()");\r
+\r
+                    ignoreUnused (session, request);\r
+\r
+                    if (isPreview)\r
+                        updateState (result);\r
+                    else if (currentState != State::idle)\r
+                        unlockFocus();\r
+                }\r
+\r
+                void cameraCaptureSessionCaptureFailed (bool isPreview, jobject session, jobject request, jobject failure)\r
+                {\r
+                    JUCE_CAMERA_LOG ("cameraCaptureSessionCaptureFailed()");\r
+\r
+                    ignoreUnused (isPreview, session, request, failure);\r
+                }\r
+\r
+                void cameraCaptureSessionCaptureProgressed (bool isPreview, jobject session, jobject request, jobject partialResult)\r
+                {\r
+                    JUCE_CAMERA_LOG ("cameraCaptureSessionCaptureProgressed()");\r
+\r
+                    ignoreUnused (session, request);\r
+\r
+                    if (isPreview)\r
+                        updateState (partialResult);\r
+                }\r
+\r
+                void cameraCaptureSessionCaptureSequenceAborted (bool isPreview, jobject session, int sequenceId)\r
+                {\r
+                    JUCE_CAMERA_LOG ("cameraCaptureSessionCaptureSequenceAborted()");\r
+\r
+                    ignoreUnused (isPreview, isPreview, session, sequenceId);\r
+                }\r
+\r
+                void cameraCaptureSessionCaptureSequenceCompleted (bool isPreview, jobject session, int sequenceId, int64 frameNumber)\r
+                {\r
+                    JUCE_CAMERA_LOG ("cameraCaptureSessionCaptureSequenceCompleted()");\r
+\r
+                    ignoreUnused (isPreview, session, sequenceId, frameNumber);\r
+                }\r
+\r
+                void cameraCaptureSessionCaptureStarted (bool isPreview, jobject session, jobject request, int64 timestamp, int64 frameNumber)\r
+                {\r
+                    JUCE_CAMERA_LOG ("cameraCaptureSessionCaptureStarted()");\r
+\r
+                    ignoreUnused (isPreview, session, request, timestamp, frameNumber);\r
+                }\r
+\r
+                friend void juce_cameraCaptureSessionCaptureCompleted (int64, bool, void*, void*, void*);\r
+                friend void juce_cameraCaptureSessionCaptureFailed (int64, bool, void*, void*, void*);\r
+                friend void juce_cameraCaptureSessionCaptureProgressed (int64, bool, void*, void*, void*);\r
+                friend void juce_cameraCaptureSessionCaptureSequenceAborted (int64, bool, void*, int);\r
+                friend void juce_cameraCaptureSessionCaptureSequenceCompleted (int64, bool, void*, int, int64);\r
+                friend void juce_cameraCaptureSessionCaptureStarted (int64, bool, void*, void*, int64, int64);\r
+            };\r
+\r
+            //==============================================================================\r
+            ScopedCameraDevice& scopedCameraDevice;\r
+            ConfiguredCallback& configuredCallback;\r
+            GlobalRef& handler;\r
+\r
+            GlobalRef captureRequestBuilder;\r
+            GlobalRef previewCaptureRequest;\r
+\r
+            GlobalRef captureSessionStateCallback;\r
+            int autoFocusMode;\r
+\r
+            GlobalRef captureSession;\r
+            CriticalSection captureSessionLock;\r
+\r
+            Atomic<int> pendingClose { 0 };\r
+\r
+            std::unique_ptr<StillPictureTaker> stillPictureTaker;\r
+\r
+            WaitableEvent closedEvent;\r
+\r
+            JUCE_DECLARE_WEAK_REFERENCEABLE (CaptureSession)\r
+\r
+            //==============================================================================\r
+            CaptureSession (ScopedCameraDevice& scopedCameraDeviceToUse, ConfiguredCallback& configuredCallbackToUse,\r
+                            const LocalRef<jobject>& surfacesList, GlobalRef& handlerToUse,\r
+                            int captureSessionTemplate, int autoFocusModeToUse)\r
+                : scopedCameraDevice (scopedCameraDeviceToUse),\r
+                  configuredCallback (configuredCallbackToUse),\r
+                  handler (handlerToUse),\r
+                  captureRequestBuilder (LocalRef<jobject> (getEnv()->CallObjectMethod (scopedCameraDevice.cameraDevice,\r
+                                                                                        AndroidCameraDevice.createCaptureRequest,\r
+                                                                                        (jint) captureSessionTemplate))),\r
+                  captureSessionStateCallback (LocalRef<jobject> (getEnv()->NewObject (CameraCaptureSessionStateCallback,\r
+                                                                                       CameraCaptureSessionStateCallback.constructor,\r
+                                                                                       android.activity.get(),\r
+                                                                                       reinterpret_cast<jlong> (this)))),\r
+                  autoFocusMode (autoFocusModeToUse)\r
+            {\r
+                auto* env = getEnv();\r
+\r
+                env->CallVoidMethod (scopedCameraDevice.cameraDevice, AndroidCameraDevice.createCaptureSession,\r
+                                     surfacesList.get(), captureSessionStateCallback.get(), handler.get());\r
+\r
+                static constexpr int controlModeAuto = 1;\r
+                setCaptureRequestBuilderIntegerKey (captureRequestBuilder.get(), CaptureRequest.CONTROL_MODE, controlModeAuto);\r
+\r
+                setCaptureRequestBuilderIntegerKey (captureRequestBuilder.get(), CaptureRequest.CONTROL_AF_MODE, autoFocusMode);\r
+            }\r
+\r
+            static void setCaptureRequestBuilderIntegerKey (jobject captureRequestBuilder, jfieldID key, int value)\r
+            {\r
+                auto* env = getEnv();\r
+\r
+                auto jKey = LocalRef<jobject> (env->GetStaticObjectField (CaptureRequest, key));\r
+                auto jValue = LocalRef<jobject> (env->CallStaticObjectMethod (JavaInteger, JavaInteger.valueOf, (jint) value));\r
+\r
+                env->CallVoidMethod (captureRequestBuilder, CaptureRequestBuilder.set, jKey.get(), jValue.get());\r
+            }\r
+\r
+            void cameraCaptureSessionActive (jobject session)\r
+            {\r
+                JUCE_CAMERA_LOG ("cameraCaptureSessionActive()");\r
+                ignoreUnused (session);\r
+            }\r
+\r
+            void cameraCaptureSessionClosed (jobject session)\r
+            {\r
+                JUCE_CAMERA_LOG ("cameraCaptureSessionClosed()");\r
+                ignoreUnused (session);\r
+\r
+                closedEvent.signal();\r
+            }\r
+\r
+            void cameraCaptureSessionConfigureFailed (jobject session)\r
+            {\r
+                JUCE_CAMERA_LOG ("cameraCaptureSessionConfigureFailed()");\r
+                ignoreUnused (session);\r
+\r
+                WeakReference<CaptureSession> weakRef (this);\r
+\r
+                MessageManager::callAsync ([this, weakRef]()\r
+                {\r
+                    if (weakRef == nullptr)\r
+                        return;\r
+\r
+                    configuredCallback.captureSessionConfigured (nullptr);\r
+                });\r
+            }\r
+\r
+            void cameraCaptureSessionConfigured (jobject session)\r
+            {\r
+                JUCE_CAMERA_LOG ("cameraCaptureSessionConfigured()");\r
+\r
+                if (pendingClose.get() == 1)\r
+                {\r
+                    // Already closing, bailout.\r
+                    closedEvent.signal();\r
+\r
+                    GlobalRef s (session);\r
+\r
+                    MessageManager::callAsync ([s]()\r
+                        {\r
+                            getEnv()->CallVoidMethod (s, CameraCaptureSession.close);\r
+                        });\r
+\r
+                    return;\r
+                }\r
+\r
+                {\r
+                    const ScopedLock lock (captureSessionLock);\r
+                    captureSession = GlobalRef (session);\r
+                }\r
+\r
+                WeakReference<CaptureSession> weakRef (this);\r
+\r
+                MessageManager::callAsync ([this, weakRef]()\r
+                {\r
+                    if (weakRef == nullptr)\r
+                        return;\r
+\r
+                    stillPictureTaker.reset (new StillPictureTaker (captureSession, captureRequestBuilder,\r
+                                                                    previewCaptureRequest, handler, autoFocusMode));\r
+\r
+                    configuredCallback.captureSessionConfigured (this);\r
+                });\r
+            }\r
+\r
+            void cameraCaptureSessionReady (jobject session)\r
+            {\r
+                JUCE_CAMERA_LOG ("cameraCaptureSessionReady()");\r
+                ignoreUnused (session);\r
+            }\r
+\r
+            friend class ScopedCameraDevice;\r
+\r
+            friend void juce_cameraCaptureSessionActive (int64, void*);\r
+            friend void juce_cameraCaptureSessionClosed (int64, void*);\r
+            friend void juce_cameraCaptureSessionConfigureFailed (int64, void*);\r
+            friend void juce_cameraCaptureSessionConfigured (int64, void*);\r
+            friend void juce_cameraCaptureSessionReady (int64, void*);\r
+\r
+            friend void juce_cameraCaptureSessionCaptureCompleted (int64, bool, void*, void*, void*);\r
+            friend void juce_cameraCaptureSessionCaptureFailed (int64, bool, void*, void*, void*);\r
+            friend void juce_cameraCaptureSessionCaptureProgressed (int64, bool, void*, void*, void*);\r
+            friend void juce_cameraCaptureSessionCaptureSequenceAborted (int64, bool, void*, int);\r
+            friend void juce_cameraCaptureSessionCaptureSequenceCompleted (int64, bool, void*, int, int64);\r
+            friend void juce_cameraCaptureSessionCaptureStarted (int64, bool, void*, void*, int64, int64);\r
+\r
+            JUCE_DECLARE_NON_COPYABLE (CaptureSession)\r
+        };\r
+\r
+        //==============================================================================\r
+        ScopedCameraDevice (Pimpl& ownerToUse, const String& cameraIdToUse, GlobalRef& cameraManagerToUse,\r
+                            GlobalRef& handlerToUse, int autoFocusModeToUse)\r
+            : owner (ownerToUse),\r
+              cameraId (cameraIdToUse),\r
+              cameraManager (cameraManagerToUse),\r
+              handler (handlerToUse),\r
+              cameraStateCallback (LocalRef<jobject> (getEnv()->NewObject (CameraDeviceStateCallback,\r
+                                                                           CameraDeviceStateCallback.constructor,\r
+                                                                           android.activity.get(),\r
+                                                                           reinterpret_cast<jlong> (this)))),\r
+              autoFocusMode (autoFocusModeToUse)\r
+        {\r
+            open();\r
+        }\r
+\r
+        ~ScopedCameraDevice()\r
+        {\r
+            close();\r
+        }\r
+\r
+        void open()\r
+        {\r
+            pendingOpen.set (1);\r
+\r
+            auto* env = getEnv();\r
+\r
+            env->CallVoidMethod (cameraManager, CameraManager.openCamera,\r
+                                 javaString (cameraId).get(),\r
+                                 cameraStateCallback.get(), handler.get());\r
+\r
+            // If something went wrong we will be pinged in cameraDeviceStateError()\r
+            // callback, silence the redundant exception.\r
+            auto exception = LocalRef<jobject> (env->ExceptionOccurred());\r
+\r
+            if (exception != 0)\r
+                env->ExceptionClear();\r
+        }\r
+\r
+        void close()\r
+        {\r
+            if (pendingClose.compareAndSetBool (1, 0))\r
+            {\r
+                auto* env = getEnv();\r
+\r
+                if (cameraDevice.get() != nullptr)\r
+                {\r
+                    env->CallVoidMethod (cameraDevice, AndroidCameraDevice.close);\r
+                    closedEvent.wait (-1);\r
+                }\r
+\r
+                pendingClose.set (0);\r
+                pendingOpen .set (0);\r
+                cameraDevice.clear();\r
+            }\r
+        }\r
+\r
+        bool openedOk() const { return cameraDevice != nullptr; }\r
+\r
+        bool hasErrorOccurred() const { return fatalErrorOccurred.get(); }\r
+\r
+        CaptureSession* createCaptureSession (CaptureSession::ConfiguredCallback& cc,\r
+                                              const LocalRef<jobject>& surfacesList,\r
+                                              GlobalRef& handlerToUse,\r
+                                              int captureSessionTemplate)\r
+        {\r
+            if (! openedOk())\r
+            {\r
+                jassertfalse;\r
+                return nullptr;\r
+            }\r
+\r
+            return new CaptureSession (*this, cc, surfacesList, handlerToUse, captureSessionTemplate, autoFocusMode);\r
+        }\r
+\r
+    private:\r
+        Pimpl& owner;\r
+        const String cameraId;\r
+        GlobalRef& cameraManager;\r
+        GlobalRef& handler;\r
+\r
+        GlobalRef cameraStateCallback;\r
+        int autoFocusMode;\r
+\r
+        GlobalRef cameraDevice;\r
+        Atomic<int> pendingOpen { 0 };\r
+        Atomic<int> pendingClose { 0 };\r
+        Atomic<int> fatalErrorOccurred { 0 };\r
+        String openError;\r
+\r
+        WaitableEvent closedEvent;\r
+\r
+        void cameraDeviceStateClosed()\r
+        {\r
+            JUCE_CAMERA_LOG ("cameraDeviceStateClosed()");\r
+\r
+            closedEvent.signal();\r
+        }\r
+\r
+        void cameraDeviceStateDisconnected()\r
+        {\r
+            JUCE_CAMERA_LOG ("cameraDeviceStateDisconnected()");\r
+\r
+            if (pendingOpen.compareAndSetBool (0, 1))\r
+            {\r
+                openError = "Device disconnected";\r
+\r
+                notifyOpenResult();\r
+            }\r
+\r
+            MessageManager::callAsync ([this]() { close(); });\r
+        }\r
+\r
+        void cameraDeviceStateError (int errorCode)\r
+        {\r
+            String error = cameraErrorCodeToString (errorCode);\r
+\r
+            JUCE_CAMERA_LOG ("cameraDeviceStateError(), error: " + error);\r
+\r
+            if (pendingOpen.compareAndSetBool (0, 1))\r
+            {\r
+                openError = error;\r
+\r
+                notifyOpenResult();\r
+            }\r
+\r
+            fatalErrorOccurred.set (1);\r
+\r
+            MessageManager::callAsync ([this, error]()\r
+                                       {\r
+                                           owner.cameraDeviceError (error);\r
+                                           close();\r
+                                       });\r
+        }\r
+\r
+        void cameraDeviceStateOpened (jobject cameraDeviceToUse)\r
+        {\r
+            JUCE_CAMERA_LOG ("cameraDeviceStateOpened()");\r
+\r
+            pendingOpen.set (0);\r
+\r
+            cameraDevice = GlobalRef (cameraDeviceToUse);\r
+\r
+            notifyOpenResult();\r
+        }\r
+\r
+        void notifyOpenResult()\r
+        {\r
+            MessageManager::callAsync ([this]() { owner.cameraOpenFinished (openError); });\r
+        }\r
+\r
+        friend void juce_cameraDeviceStateClosed (int64);\r
+        friend void juce_cameraDeviceStateDisconnected (int64);\r
+        friend void juce_cameraDeviceStateError (int64, int);\r
+        friend void juce_cameraDeviceStateOpened (int64, void*);\r
+\r
+        friend void juce_cameraCaptureSessionActive (int64, void*);\r
+        friend void juce_cameraCaptureSessionClosed (int64, void*);\r
+        friend void juce_cameraCaptureSessionConfigureFailed (int64, void*);\r
+        friend void juce_cameraCaptureSessionConfigured (int64, void*);\r
+        friend void juce_cameraCaptureSessionReady (int64, void*);\r
+\r
+        friend void juce_cameraCaptureSessionCaptureCompleted (int64, bool, void*, void*, void*);\r
+        friend void juce_cameraCaptureSessionCaptureFailed (int64, bool, void*, void*, void*);\r
+        friend void juce_cameraCaptureSessionCaptureProgressed (int64, bool, void*, void*, void*);\r
+        friend void juce_cameraCaptureSessionCaptureSequenceAborted (int64, bool, void*, int);\r
+        friend void juce_cameraCaptureSessionCaptureSequenceCompleted (int64, bool, void*, int, int64);\r
+        friend void juce_cameraCaptureSessionCaptureStarted (int64, bool, void*, void*, int64, int64);\r
+    };\r
+\r
+    //==============================================================================\r
+    struct CaptureSessionModeBase\r
+    {\r
+        virtual ~CaptureSessionModeBase() { }\r
+\r
+        virtual bool isVideoRecordSession() const = 0;\r
+\r
+        virtual void triggerStillPictureCapture() = 0;\r
+    };\r
+\r
+    //==============================================================================\r
+    template <typename Mode>\r
+    struct CaptureSessionMode   : public CaptureSessionModeBase,\r
+                                  private PreviewDisplay::Listener,\r
+                                  private ScopedCameraDevice::CaptureSession::ConfiguredCallback\r
+    {\r
+        ~CaptureSessionMode()\r
+        {\r
+            captureSession.reset();\r
+\r
+            previewDisplay.removeListener (this);\r
+        }\r
+\r
+        bool isVideoRecordSession() const override\r
+        {\r
+            return Mode::isVideoRecord();\r
+        }\r
+\r
+        void triggerStillPictureCapture() override\r
+        {\r
+            if (captureSession == nullptr)\r
+            {\r
+                // The capture session must be ready before taking a still picture.\r
+                // Did you remember to create and show a preview display?\r
+                jassertfalse;\r
+                return;\r
+            }\r
+\r
+            crtp().takeStillPicture();\r
+        }\r
+\r
+    protected:\r
+        CaptureSessionMode (Pimpl& ownerToUse, ScopedCameraDevice& cameraDeviceToUse,\r
+                            GlobalRef& handlerToUse, PreviewDisplay& pd, int cameraSensorOrientationToUse,\r
+                            int cameraLensFacingToUse, StreamConfigurationMap& streamConfigurationMapToUse)\r
+            : owner (ownerToUse),\r
+              scopedCameraDevice (cameraDeviceToUse),\r
+              handler (handlerToUse),\r
+              previewDisplay (pd),\r
+              cameraSensorOrientation (cameraSensorOrientationToUse),\r
+              cameraLensFacing (cameraLensFacingToUse),\r
+              streamConfigurationMap (streamConfigurationMapToUse)\r
+        {\r
+            WeakReference<CaptureSessionMode<Mode>> weakRef (this);\r
+\r
+            if (weakRef == nullptr)\r
+                return;\r
+\r
+            // async so that the object is fully constructed before the callback gets invoked\r
+            MessageManager::callAsync ([this, weakRef]()\r
+            {\r
+                if (weakRef == nullptr)\r
+                    return;\r
+\r
+                previewDisplay.addListener (this);\r
+            });\r
+        }\r
+\r
+        Mode& crtp() { return static_cast<Mode&> (*this); }\r
+\r
+        void previewDisplayReady() override\r
+        {\r
+            jassert (previewDisplay.isReady());\r
+\r
+            JUCE_CAMERA_LOG ("previewDisplayReady()");\r
+\r
+            // close previous capture session first\r
+            captureSession.reset();\r
+\r
+            if (scopedCameraDevice.hasErrorOccurred())\r
+            {\r
+                JUCE_CAMERA_LOG ("Device error detected, not recreating a new camera session. The device needs to be reopened.");\r
+                return;\r
+            }\r
+\r
+            captureSession.reset (scopedCameraDevice.createCaptureSession (*this, crtp().getCaptureSessionSurfaces(),\r
+                                                                           handler, Mode::getTemplate()));\r
+        }\r
+\r
+        void previewDisplayAboutToBeDestroyed() override\r
+        {\r
+            JUCE_CAMERA_LOG ("previewDisplayAboutToBeDestroyed()");\r
+\r
+            stopPreview();\r
+        }\r
+\r
+        void captureSessionConfigured (ScopedCameraDevice::CaptureSession* session) override\r
+        {\r
+            if (session == nullptr)\r
+            {\r
+                owner.cameraDeviceError ("Failed to configure camera session.");\r
+                return;\r
+            }\r
+\r
+            jassert (session == captureSession.get());\r
+\r
+            startSession();\r
+        }\r
+\r
+        void startSession()\r
+        {\r
+            if (! captureSession->start (crtp().getTargetSurfaces(), handler))\r
+            {\r
+                jassertfalse;\r
+                JUCE_CAMERA_LOG ("Could not start capture session");\r
+            }\r
+\r
+            crtp().sessionStarted();\r
+        }\r
+\r
+        void stopPreview()\r
+        {\r
+            if (captureSession != nullptr)\r
+            {\r
+                auto session = captureSession->getNativeSession();\r
+\r
+                auto* env = getEnv();\r
+\r
+                env->CallVoidMethod (session, CameraCaptureSession.stopRepeating);\r
+\r
+                if (Pimpl::checkHasExceptionOccurred())\r
+                    return;\r
+\r
+                env->CallVoidMethod (session, CameraCaptureSession.abortCaptures);\r
+\r
+                Pimpl::checkHasExceptionOccurred();\r
+            }\r
+        }\r
+\r
+        Pimpl& owner;\r
+        ScopedCameraDevice& scopedCameraDevice;\r
+        GlobalRef& handler;\r
+        PreviewDisplay& previewDisplay;\r
+        int cameraSensorOrientation;\r
+        int cameraLensFacing;\r
+        StreamConfigurationMap& streamConfigurationMap;\r
+\r
+        std::unique_ptr<ScopedCameraDevice::CaptureSession> captureSession;\r
+\r
+        JUCE_DECLARE_WEAK_REFERENCEABLE (CaptureSessionMode<Mode>)\r
+    };\r
+\r
+    //==============================================================================\r
+    struct CaptureSessionPreviewMode : public CaptureSessionMode<CaptureSessionPreviewMode>\r
+    {\r
+        CaptureSessionPreviewMode (Pimpl& ownerToUse, ScopedCameraDevice& cameraDeviceToUse, GlobalRef& handlerToUse,\r
+                                   PreviewDisplay& pd, ImageReader& ir, int cameraSensorOrientation,\r
+                                   int cameraLensFacingToUse, StreamConfigurationMap& streamConfigurationMapToUse)\r
+            : CaptureSessionMode<CaptureSessionPreviewMode> (ownerToUse, cameraDeviceToUse, handlerToUse, pd,\r
+                                                             cameraSensorOrientation, cameraLensFacingToUse, streamConfigurationMapToUse),\r
+              imageReader (ir)\r
+        {\r
+        }\r
+\r
+        // Surfaces passed to newly created capture session.\r
+        LocalRef<jobject> getCaptureSessionSurfaces() const\r
+        {\r
+            auto* env = getEnv();\r
+\r
+            auto previewSurface = LocalRef<jobject> (previewDisplay.createSurface());\r
+            auto imageSurface = LocalRef<jobject> (imageReader.getSurface());\r
+\r
+            auto arrayList = LocalRef<jobject> (env->NewObject (JavaArrayList, JavaArrayList.constructor, 2));\r
+            env->CallBooleanMethod (arrayList, JavaArrayList.add, previewSurface.get());\r
+            env->CallBooleanMethod (arrayList, JavaArrayList.add, imageSurface.get());\r
+\r
+            auto supported = streamConfigurationMap.isOutputSupportedForSurface (imageSurface);\r
+\r
+            // Output surface is not supported by this device, still image capture will not work!\r
+            jassert (supported);\r
+\r
+            return arrayList;\r
+        }\r
+\r
+        // Surfaces set as target during capture.\r
+        LocalRef<jobject> getTargetSurfaces() const\r
+        {\r
+            auto* env = getEnv();\r
+\r
+            auto previewSurface = LocalRef<jobject> (previewDisplay.createSurface());\r
+\r
+            auto arrayList = LocalRef<jobject> (env->NewObject (JavaArrayList, JavaArrayList.constructor, 1));\r
+            env->CallBooleanMethod (arrayList, JavaArrayList.add, previewSurface.get());\r
+\r
+            return arrayList;\r
+        }\r
+\r
+        static int getTemplate()\r
+        {\r
+            static constexpr int templatePreview = 1;\r
+            return templatePreview;\r
+        }\r
+\r
+        static bool isVideoRecord() { return false; }\r
+\r
+        void sessionStarted() {}\r
+\r
+        void takeStillPicture()\r
+        {\r
+            imageReader.resetNotificationFlag();\r
+            captureSession->takeStillPicture (imageReader.getSurface());\r
+        }\r
+\r
+    private:\r
+        ImageReader& imageReader;\r
+    };\r
+\r
+    //==============================================================================\r
+    struct CaptureSessionVideoRecordingMode : public CaptureSessionMode<CaptureSessionVideoRecordingMode>\r
+    {\r
+        CaptureSessionVideoRecordingMode (Pimpl& ownerToUse, ScopedCameraDevice& cameraDeviceToUse, GlobalRef& handlerToUse,\r
+                                          PreviewDisplay& pd, MediaRecorder& mr, int cameraSensorOrientation,\r
+                                          int cameraLensFacingToUse, StreamConfigurationMap& streamConfigurationMapToUse)\r
+            : CaptureSessionMode<CaptureSessionVideoRecordingMode> (ownerToUse, cameraDeviceToUse, handlerToUse, pd,\r
+                                                                    cameraSensorOrientation, cameraLensFacingToUse, streamConfigurationMapToUse),\r
+              mediaRecorder (mr)\r
+        {\r
+        }\r
+\r
+        ~CaptureSessionVideoRecordingMode()\r
+        {\r
+            // We need to explicitly stop the preview before stopping the media recorder,\r
+            // because legacy devices can't handle recording stop before stopping the preview.\r
+            stopPreview();\r
+\r
+            mediaRecorder.stop();\r
+        }\r
+\r
+        // Surfaces passed to newly created capture session.\r
+        LocalRef<jobject> getCaptureSessionSurfaces() const\r
+        {\r
+            auto* env = getEnv();\r
+\r
+            auto previewSurface = LocalRef<jobject> (previewDisplay.createSurface());\r
+            auto mediaRecorderSurface = LocalRef<jobject> (mediaRecorder.getSurface());\r
+\r
+            auto arrayList = LocalRef<jobject> (env->NewObject (JavaArrayList, JavaArrayList.constructor, 2));\r
+            env->CallBooleanMethod (arrayList, JavaArrayList.add, previewSurface.get());\r
+            env->CallBooleanMethod (arrayList, JavaArrayList.add, mediaRecorderSurface.get());\r
+\r
+            return arrayList;\r
+        }\r
+\r
+        // Surfaces set as target during capture.\r
+        LocalRef<jobject> getTargetSurfaces() const\r
+        {\r
+            // Same surfaces used.\r
+            return getCaptureSessionSurfaces();\r
+        }\r
+\r
+        static int getTemplate()\r
+        {\r
+            static constexpr int templateRecord = 3;\r
+            return templateRecord;\r
+        }\r
+\r
+        static bool isVideoRecord() { return true; }\r
+\r
+        void sessionStarted()\r
+        {\r
+            MessageManager::callAsync ([this]() { mediaRecorder.start(); });\r
+        }\r
+\r
+        void takeStillPicture()\r
+        {\r
+            // Taking still pictures while recording video is not supported on Android.\r
+            jassertfalse;\r
+        }\r
+\r
+    private:\r
+        MediaRecorder& mediaRecorder;\r
+    };\r
+\r
+    //==============================================================================\r
+    class DeviceOrientationChangeListener   : private Timer\r
+    {\r
+    public:\r
+        DeviceOrientationChangeListener (PreviewDisplay& pd)\r
+            : previewDisplay (pd),\r
+              orientationEventListener (getEnv()->NewObject (OrientationEventListener,\r
+                                                             OrientationEventListener.constructor,\r
+                                                             android.activity.get(),\r
+                                                             reinterpret_cast<jlong> (this),\r
+                                                             android.activity.get(),\r
+                                                             sensorDelayUI)),\r
+              canDetectChange (getEnv()->CallBooleanMethod (orientationEventListener,\r
+                                                            OrientationEventListener.canDetectOrientation) != 0),\r
+              deviceOrientation (Desktop::getInstance().getCurrentOrientation()),\r
+              lastKnownScreenOrientation (deviceOrientation)\r
+        {\r
+            setEnabled (true);\r
+        }\r
+\r
+        ~DeviceOrientationChangeListener()\r
+        {\r
+            setEnabled (false);\r
+        }\r
+\r
+        void setEnabled (bool shouldBeEnabled)\r
+        {\r
+            if (shouldBeEnabled && ! canDetectChange)\r
+            {\r
+                // This device does not support orientation listening, photos may have wrong orientation!\r
+                jassertfalse;\r
+                return;\r
+            }\r
+\r
+            if (shouldBeEnabled)\r
+                getEnv()->CallVoidMethod (orientationEventListener, OrientationEventListener.enable);\r
+            else\r
+                getEnv()->CallVoidMethod (orientationEventListener, OrientationEventListener.disable);\r
+        }\r
+\r
+        bool isSupported() const noexcept { return canDetectChange; }\r
+\r
+        Desktop::DisplayOrientation getDeviceOrientation() const noexcept\r
+        {\r
+            return deviceOrientation;\r
+        }\r
+\r
+    private:\r
+        PreviewDisplay& previewDisplay;\r
+\r
+        GlobalRef orientationEventListener;\r
+        static constexpr jint sensorDelayUI = 2;\r
+\r
+        bool canDetectChange;\r
+        Desktop::DisplayOrientation deviceOrientation;\r
+\r
+        Desktop::DisplayOrientation lastKnownScreenOrientation;\r
+        int numChecksForOrientationChange = 10;\r
+\r
+        void orientationChanged (int orientation)\r
+        {\r
+            jassert (orientation < 360);\r
+\r
+            // -1 == unknown\r
+            if (orientation < 0)\r
+                return;\r
+\r
+            auto oldOrientation = deviceOrientation;\r
+\r
+            // NB: this assumes natural position to be portrait always, but some devices may be landscape...\r
+            if (orientation > (360 - 45) || orientation < 45)\r
+                deviceOrientation = Desktop::upright;\r
+            else if (orientation < 135)\r
+                deviceOrientation = Desktop::rotatedClockwise;\r
+            else if (orientation < 225)\r
+                deviceOrientation = Desktop::upsideDown;\r
+            else\r
+                deviceOrientation = Desktop::rotatedAntiClockwise;\r
+\r
+            if (oldOrientation != deviceOrientation)\r
+            {\r
+                lastKnownScreenOrientation = Desktop::getInstance().getCurrentOrientation();\r
+\r
+                // Need to update preview transform, but screen orientation will change slightly\r
+                // later than sensor orientation.\r
+                startTimer (500);\r
+            }\r
+        }\r
+\r
+        void timerCallback() override\r
+        {\r
+            auto currentOrientation = Desktop::getInstance().getCurrentOrientation();\r
+\r
+            if (lastKnownScreenOrientation != currentOrientation)\r
+            {\r
+                lastKnownScreenOrientation = currentOrientation;\r
+\r
+                stopTimer();\r
+                numChecksForOrientationChange = 10;\r
+                previewDisplay.updateSurfaceTransform();\r
+\r
+                return;\r
+            }\r
+\r
+            if (--numChecksForOrientationChange == 0)\r
+            {\r
+                stopTimer();\r
+                numChecksForOrientationChange = 10;\r
+            }\r
+        }\r
+\r
+        friend void juce_deviceOrientationChanged (int64, int);\r
+    };\r
+\r
+    //==============================================================================\r
+    CameraDevice& owner;\r
+    int minWidth, minHeight, maxWidth, maxHeight;\r
+\r
+    String cameraId;\r
+    InternalOpenCameraResultCallback cameraOpenCallback;\r
+\r
+   #if __ANDROID_API__ >= 21\r
+    AppPausedResumedListener appPausedResumedListener;\r
+    GlobalRef appPausedResumedListenerNative;\r
+\r
+    GlobalRef cameraManager;\r
+    GlobalRef cameraCharacteristics;\r
+    GlobalRef handlerThread;\r
+    GlobalRef handler;\r
+\r
+    StreamConfigurationMap streamConfigurationMap;\r
+    PreviewDisplay previewDisplay;\r
+    DeviceOrientationChangeListener deviceOrientationChangeListener;\r
+    std::unique_ptr<ImageReader> imageReader;\r
+    std::unique_ptr<MediaRecorder> mediaRecorder;\r
+\r
+    std::unique_ptr<CaptureSessionModeBase> currentCaptureSessionMode;\r
+\r
+    std::unique_ptr<ScopedCameraDevice> scopedCameraDevice;\r
+\r
+    CriticalSection listenerLock;\r
+    ListenerList<Listener> listeners;\r
+\r
+    std::function<void (const Image&)> pictureTakenCallback;\r
+\r
+    Time firstRecordedFrameTimeMs;\r
+    bool notifiedOfCameraOpening = false;\r
+   #endif\r
+\r
+    bool appWasPaused = false;\r
+\r
+    //==============================================================================\r
+    int getCameraSensorOrientation() const\r
+    {\r
+        return getCameraCharacteristicsIntegerKeyValue (CameraCharacteristics.SENSOR_ORIENTATION);\r
+    }\r
+\r
+    int getAutoFocusModeToUse() const\r
+    {\r
+        auto supportedModes = getSupportedAutoFocusModes();\r
+\r
+        enum\r
+        {\r
+            CONTROL_AF_MODE_OFF = 0,\r
+            CONTROL_AF_MODE_AUTO = 1,\r
+            CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4\r
+        };\r
+\r
+        if (supportedModes.contains (CONTROL_AF_MODE_CONTINUOUS_PICTURE))\r
+            return CONTROL_AF_MODE_CONTINUOUS_PICTURE;\r
+\r
+        if (supportedModes.contains (CONTROL_AF_MODE_AUTO))\r
+            return CONTROL_AF_MODE_AUTO;\r
+\r
+        return CONTROL_AF_MODE_OFF;\r
+    }\r
+\r
+    Array<int> getSupportedAutoFocusModes() const\r
+    {\r
+        auto* env = getEnv();\r
+\r
+        auto jKey = LocalRef<jobject> (env->GetStaticObjectField (CameraCharacteristics, CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES));\r
+\r
+        auto supportedModes = LocalRef<jintArray> ((jintArray) env->CallObjectMethod (cameraCharacteristics,\r
+                                                                                      CameraCharacteristics.get,\r
+                                                                                      jKey.get()));\r
+\r
+        return jintArrayToJuceArray (supportedModes);\r
+    }\r
+\r
+    static Array<int> jintArrayToJuceArray (const LocalRef<jintArray>& jArray)\r
+    {\r
+        auto* env = getEnv();\r
+\r
+        auto* jArrayElems = env->GetIntArrayElements (jArray, 0);\r
+        auto numElems = env->GetArrayLength (jArray);\r
+\r
+        Array<int> juceArray;\r
+\r
+        for (int s = 0; s < numElems; ++s)\r
+            juceArray.add (jArrayElems[s]);\r
+\r
+        env->ReleaseIntArrayElements (jArray, jArrayElems, 0);\r
+        return juceArray;\r
+    }\r
+\r
+    int getCameraCharacteristicsIntegerKeyValue (jfieldID key) const\r
+    {\r
+        auto* env = getEnv();\r
+\r
+        auto jKey = LocalRef<jobject> (env->GetStaticObjectField (CameraCharacteristics, key));\r
+\r
+        auto jValue = LocalRef<jobject> (env->CallObjectMethod (cameraCharacteristics,\r
+                                                                CameraCharacteristics.get,\r
+                                                                jKey.get()));\r
+\r
+        return env->CallIntMethod (jValue, JavaInteger.intValue);\r
+    }\r
+\r
+    int getCameraLensFacing() const\r
+    {\r
+        return getCameraCharacteristicsIntegerKeyValue (CameraCharacteristics.LENS_FACING);\r
+    }\r
+\r
+    //==============================================================================\r
+    void cameraOpenFinished (const String& error)\r
+    {\r
+        JUCE_CAMERA_LOG ("cameraOpenFinished(), error = " + error);\r
+\r
+        if (error.isEmpty())\r
+        {\r
+            setupStillImageSize();\r
+            startPreviewMode (*imageReader);\r
+        }\r
+\r
+        // Do not notify about camera being reopened on app resume.\r
+        if (! notifiedOfCameraOpening)\r
+        {\r
+            notifiedOfCameraOpening = true;\r
+\r
+            invokeCameraOpenCallback (error);\r
+        }\r
+    }\r
+\r
+    void cameraDeviceError (const String& error)\r
+    {\r
+        if (owner.onErrorOccurred != nullptr)\r
+            owner.onErrorOccurred (error);\r
+    }\r
+\r
+    void invokeCameraOpenCallback (const String& error)\r
+    {\r
+        JUCE_CAMERA_LOG ("invokeCameraOpenCallback(), error = " + error);\r
+\r
+        if (cameraOpenCallback != nullptr)\r
+            cameraOpenCallback (cameraId, error);\r
+    }\r
+\r
+    //==============================================================================\r
+    void callListeners (const Image& image)\r
+    {\r
+        const ScopedLock sl (listenerLock);\r
+        listeners.call ([=] (Listener& l) { l.imageReceived (image); });\r
+    }\r
+\r
+    void notifyPictureTaken (const Image& image)\r
+    {\r
+        JUCE_CAMERA_LOG ("notifyPictureTaken()");\r
+\r
+        if (pictureTakenCallback != nullptr)\r
+            pictureTakenCallback (image);\r
+    }\r
+\r
+    void triggerStillPictureCapture()\r
+    {\r
+        currentCaptureSessionMode->triggerStillPictureCapture();\r
+    }\r
+\r
+    //==============================================================================\r
+    void setupStillImageSize()\r
+    {\r
+        imageReader.reset();\r
+\r
+        auto imageSize = chooseBestSize (minWidth, minHeight, maxWidth, maxHeight,\r
+                                         streamConfigurationMap.getSupportedStillImageOutputSizes());\r
+\r
+        imageReader.reset (new ImageReader (*this, handler, imageSize.getWidth(), imageSize.getHeight(),\r
+                                            getCameraSensorOrientation()));\r
+    }\r
+\r
+    static Rectangle<int> chooseBestSize (int minWidth, int minHeight, int maxWidth, int maxHeight,\r
+                                          Array<Rectangle<int>> supportedSizes)\r
+    {\r
+        Rectangle<int> result;\r
+\r
+        for (auto& size : supportedSizes)\r
+        {\r
+            auto width  = size.getWidth();\r
+            auto height = size.getHeight();\r
+\r
+            if (width < minWidth || width > maxWidth || height < minHeight || height > maxHeight)\r
+                continue;\r
+\r
+            if (size.contains (result))\r
+                result = size;\r
+        }\r
+\r
+        // None of the supported sizes matches required width & height limitations, picking\r
+        // the first one available...\r
+        jassert (! result.isEmpty());\r
+\r
+        if (result.isEmpty())\r
+            result = supportedSizes[0];\r
+\r
+        return result;\r
+    }\r
+\r
+    //==============================================================================\r
+    void startPreviewMode (ImageReader& ir)\r
+    {\r
+        if (currentCaptureSessionMode != nullptr && ! currentCaptureSessionMode->isVideoRecordSession())\r
+            return;\r
+\r
+        // previous mode has to be stopped first\r
+        jassert (currentCaptureSessionMode.get() == nullptr);\r
+\r
+        if (scopedCameraDevice == nullptr || ! scopedCameraDevice->openedOk())\r
+            return;\r
+\r
+        currentCaptureSessionMode.reset (new CaptureSessionPreviewMode (*this, *scopedCameraDevice, handler,\r
+                                                                        previewDisplay, ir,\r
+                                                                        getCameraSensorOrientation(),\r
+                                                                        getCameraLensFacing(),\r
+                                                                        streamConfigurationMap));\r
+    }\r
+\r
+    void startVideoRecordingMode (MediaRecorder& mr)\r
+    {\r
+        if (currentCaptureSessionMode != nullptr && currentCaptureSessionMode->isVideoRecordSession())\r
+            return;\r
+\r
+        // previous mode has to be stopped first\r
+        jassert (currentCaptureSessionMode.get() == nullptr);\r
+\r
+        jassert (scopedCameraDevice != nullptr && scopedCameraDevice->openedOk());\r
+\r
+        if (scopedCameraDevice == nullptr || ! scopedCameraDevice->openedOk())\r
+            return;\r
+\r
+        currentCaptureSessionMode.reset (new CaptureSessionVideoRecordingMode (*this, *scopedCameraDevice, handler,\r
+                                                                               previewDisplay, mr,\r
+                                                                               getCameraSensorOrientation(),\r
+                                                                               getCameraLensFacing(),\r
+                                                                               streamConfigurationMap));\r
+    }\r
+\r
+    //==============================================================================\r
+    void appPaused() override\r
+    {\r
+        JUCE_CAMERA_LOG ("appPaused, closing camera...");\r
+\r
+        appWasPaused = true;\r
+\r
+        deviceOrientationChangeListener.setEnabled (false);\r
+\r
+        // We need to restart the whole session mode when the app gets resumed.\r
+        currentCaptureSessionMode.reset();\r
+\r
+        if (scopedCameraDevice != nullptr)\r
+            scopedCameraDevice->close();\r
+\r
+        stopBackgroundThread();\r
+    }\r
+\r
+    void appResumed() override\r
+    {\r
+        // Only care about resumed event when paused event was called first.\r
+        if (! appWasPaused)\r
+            return;\r
+\r
+        JUCE_CAMERA_LOG ("appResumed, opening camera...");\r
+\r
+        deviceOrientationChangeListener.setEnabled (true);\r
+\r
+        startBackgroundThread();\r
+\r
+        if (scopedCameraDevice != nullptr)\r
+            scopedCameraDevice->open();\r
+    }\r
+\r
+    void startBackgroundThread()\r
+    {\r
+        auto* env = getEnv();\r
+\r
+        handlerThread = GlobalRef (LocalRef<jobject> (env->NewObject (AndroidHandlerThread,\r
+                                                                      AndroidHandlerThread.constructor,\r
+                                                                      javaString ("JuceCameraDeviceBackgroundThread").get())));\r
+        // handler thread has to be started before its looper can be fetched\r
+        env->CallVoidMethod (handlerThread, AndroidHandlerThread.start);\r
+        handler = GlobalRef (LocalRef<jobject> (env->NewObject (AndroidHandler,\r
+                                                                AndroidHandler.constructorWithLooper,\r
+                                                                env->CallObjectMethod (handlerThread, AndroidHandlerThread.getLooper))));\r
+    }\r
+\r
+    void stopBackgroundThread()\r
+    {\r
+        auto* env = getEnv();\r
+\r
+        env->CallBooleanMethod (handlerThread, AndroidHandlerThread.quitSafely);\r
+        env->CallVoidMethod (handlerThread, AndroidHandlerThread.join);\r
+\r
+        auto exception = LocalRef<jobject> (env->ExceptionOccurred());\r
+\r
+        if (exception != 0)\r
+            env->ExceptionClear();\r
+\r
+        handlerThread.clear();\r
+        handler.clear();\r
+    }\r
+\r
+    static bool checkHasExceptionOccurred()\r
+    {\r
+        auto* env = getEnv();\r
+\r
+        auto exception = LocalRef<jobject> (env->ExceptionOccurred());\r
+\r
+        if (exception != 0)\r
+        {\r
+            env->ExceptionClear();\r
+            return true;\r
+        }\r
+\r
+        return false;\r
+    }\r
+#endif\r
+\r
+    friend struct CameraDevice::ViewerComponent;\r
+\r
+    friend void juce_cameraDeviceStateClosed (int64);\r
+    friend void juce_cameraDeviceStateDisconnected (int64);\r
+    friend void juce_cameraDeviceStateError (int64, int);\r
+    friend void juce_cameraDeviceStateOpened (int64, void*);\r
+\r
+    friend void juce_cameraCaptureSessionActive (int64, void*);\r
+    friend void juce_cameraCaptureSessionClosed (int64, void*);\r
+    friend void juce_cameraCaptureSessionConfigureFailed (int64, void*);\r
+    friend void juce_cameraCaptureSessionConfigured (int64, void*);\r
+    friend void juce_cameraCaptureSessionReady (int64, void*);\r
+\r
+    friend void juce_cameraCaptureSessionCaptureCompleted (int64, bool, void*, void*, void*);\r
+    friend void juce_cameraCaptureSessionCaptureFailed (int64, bool, void*, void*, void*);\r
+    friend void juce_cameraCaptureSessionCaptureProgressed (int64, bool, void*, void*, void*);\r
+    friend void juce_cameraCaptureSessionCaptureSequenceAborted (int64, bool, void*, int);\r
+    friend void juce_cameraCaptureSessionCaptureSequenceCompleted (int64, bool, void*, int, int64);\r
+    friend void juce_cameraCaptureSessionCaptureStarted (int64, bool, void*, void*, int64, int64);\r
+\r
+    friend void juce_deviceOrientationChanged (int64, int);\r
+\r
+    JUCE_DECLARE_NON_COPYABLE (Pimpl)\r
+};\r
+\r
+//==============================================================================\r
+struct CameraDevice::ViewerComponent  : public Component,\r
+                                        private ComponentMovementWatcher\r
+{\r
+    ViewerComponent (CameraDevice& device) : ComponentMovementWatcher (this)\r
+    {\r
+       #if __ANDROID_API__ >= 21\r
+        auto previewSize = device.pimpl->streamConfigurationMap.getDefaultPreviewSize();\r
+\r
+        targetAspectRatio = previewSize.getWidth() / (float) previewSize.getHeight();\r
+\r
+        if (isOrientationLandscape())\r
+            setBounds (previewSize);\r
+        else\r
+            setBounds (0, 0, previewSize.getHeight(), previewSize.getWidth());\r
+\r
+        addAndMakeVisible (viewerComponent);\r
+        viewerComponent.setView (device.pimpl->previewDisplay.getNativeView());\r
+       #else\r
+        ignoreUnused (device);\r
+       #endif\r
+    }\r
+\r
+private:\r
+    AndroidViewComponent viewerComponent;\r
+\r
+    float targetAspectRatio = 1.0f;\r
+\r
+    void componentMovedOrResized (bool, bool) override\r
+    {\r
+        auto b = getLocalBounds();\r
+\r
+        auto targetWidth  = b.getWidth();\r
+        auto targetHeight = b.getHeight();\r
+\r
+        if (isOrientationLandscape())\r
+        {\r
+            auto currentAspectRatio = b.getWidth() / (float) b.getHeight();\r
+\r
+            if (currentAspectRatio > targetAspectRatio)\r
+                targetWidth = static_cast<int> (targetWidth * targetAspectRatio / currentAspectRatio);\r
+            else\r
+                targetHeight = static_cast<int> (targetHeight * currentAspectRatio / targetAspectRatio);\r
+        }\r
+        else\r
+        {\r
+            auto currentAspectRatio = b.getHeight() / (float) b.getWidth();\r
+\r
+            if (currentAspectRatio > targetAspectRatio)\r
+                targetHeight = static_cast<int> (targetHeight * targetAspectRatio / currentAspectRatio);\r
+            else\r
+                targetWidth = static_cast<int> (targetWidth * currentAspectRatio / targetAspectRatio);\r
+        }\r
+\r
+        viewerComponent.setBounds (Rectangle<int> (0, 0, targetWidth, targetHeight).withCentre (b.getCentre()));\r
+    }\r
+\r
+    bool isOrientationLandscape() const\r
+    {\r
+        auto o = Desktop::getInstance().getCurrentOrientation();\r
+        return o == Desktop::rotatedClockwise || o == Desktop::rotatedAntiClockwise;\r
+    }\r
+\r
+    void componentPeerChanged() override {}\r
+    void componentVisibilityChanged() override {}\r
+\r
+    JUCE_DECLARE_NON_COPYABLE (ViewerComponent)\r
+};\r
+\r
+String CameraDevice::getFileExtension()\r
+{\r
+    return ".mp4";\r
+}\r
+\r
+#if __ANDROID_API__ >= 21\r
+//==============================================================================\r
+void juce_cameraDeviceStateClosed (int64 host)\r
+{\r
+    reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice*> (host)->cameraDeviceStateClosed();\r
+}\r
+\r
+void juce_cameraDeviceStateDisconnected (int64 host)\r
+{\r
+    reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice*> (host)->cameraDeviceStateDisconnected();\r
+}\r
+\r
+void juce_cameraDeviceStateError (int64 host, int error)\r
+{\r
+    reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice*> (host)->cameraDeviceStateError (error);\r
+}\r
+\r
+void juce_cameraDeviceStateOpened (int64 host, void* camera)\r
+{\r
+    reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice*> (host)->cameraDeviceStateOpened ((jobject) camera);\r
+}\r
+\r
+//==============================================================================\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraDeviceStateCallback), cameraDeviceStateClosed, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject /*camera*/))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_cameraDeviceStateClosed (host);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraDeviceStateCallback), cameraDeviceStateDisconnected, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject /*camera*/))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_cameraDeviceStateDisconnected (host);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraDeviceStateCallback), cameraDeviceStateError, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject /*camera*/, int error))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_cameraDeviceStateError (host, error);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraDeviceStateCallback), cameraDeviceStateOpened, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject camera))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_cameraDeviceStateOpened (host, camera);\r
+}\r
+\r
+//==============================================================================\r
+void juce_cameraCaptureSessionActive (int64 host, void* session)\r
+{\r
+    auto* juceCaptureSession = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession*> (host);\r
+    juceCaptureSession->cameraCaptureSessionActive ((jobject) session);\r
+}\r
+\r
+void juce_cameraCaptureSessionClosed (int64 host, void* session)\r
+{\r
+    auto* juceCaptureSession = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession*> (host);\r
+    juceCaptureSession->cameraCaptureSessionClosed ((jobject) session);\r
+}\r
+\r
+void juce_cameraCaptureSessionConfigureFailed (int64 host, void* session)\r
+{\r
+    auto* juceCaptureSession = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession*> (host);\r
+    juceCaptureSession->cameraCaptureSessionConfigureFailed ((jobject) session);\r
+}\r
+\r
+void juce_cameraCaptureSessionConfigured (int64 host, void* session)\r
+{\r
+    auto* juceCaptureSession = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession*> (host);\r
+    juceCaptureSession->cameraCaptureSessionConfigured ((jobject) session);\r
+}\r
+\r
+void juce_cameraCaptureSessionReady (int64 host, void* session)\r
+{\r
+    auto* juceCaptureSession = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession*> (host);\r
+    juceCaptureSession->cameraCaptureSessionReady ((jobject) session);\r
+}\r
+\r
+//==============================================================================\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionStateCallback), cameraCaptureSessionActive, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject session))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_cameraCaptureSessionActive (host, session);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionStateCallback), cameraCaptureSessionClosed, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject session))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_cameraCaptureSessionClosed (host, session);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionStateCallback), cameraCaptureSessionConfigureFailed, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject session))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_cameraCaptureSessionConfigureFailed (host, session);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionStateCallback), cameraCaptureSessionConfigured, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject session))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_cameraCaptureSessionConfigured (host, session);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionStateCallback), cameraCaptureSessionReady, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject session))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_cameraCaptureSessionReady (host, session);\r
+}\r
+\r
+\r
+//==============================================================================\r
+void juce_cameraCaptureSessionCaptureCompleted (int64 host, bool isPreview, void* session, void* request, void* result)\r
+{\r
+    auto* stillPictureTaker = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker*> (host);\r
+    stillPictureTaker->cameraCaptureSessionCaptureCompleted (isPreview, (jobject) session, (jobject) request, (jobject) result);\r
+}\r
+\r
+void juce_cameraCaptureSessionCaptureFailed (int64 host, bool isPreview, void* session, void* request, void* failure)\r
+{\r
+    auto* stillPictureTaker = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker*> (host);\r
+    stillPictureTaker->cameraCaptureSessionCaptureFailed (isPreview, (jobject) session, (jobject) request, (jobject) failure);\r
+}\r
+\r
+void juce_cameraCaptureSessionCaptureProgressed (int64 host, bool isPreview, void* session, void* request, void* partialResult)\r
+{\r
+    auto* stillPictureTaker = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker*> (host);\r
+    stillPictureTaker->cameraCaptureSessionCaptureProgressed (isPreview, (jobject) session, (jobject) request, (jobject) partialResult);\r
+}\r
+\r
+void juce_cameraCaptureSessionCaptureSequenceAborted (int64 host, bool isPreview, void* session, int sequenceId)\r
+{\r
+    auto* stillPictureTaker = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker*> (host);\r
+    stillPictureTaker->cameraCaptureSessionCaptureSequenceAborted (isPreview, (jobject) session, sequenceId);\r
+}\r
+\r
+void juce_cameraCaptureSessionCaptureSequenceCompleted (int64 host, bool isPreview, void* session, int sequenceId, int64 frameNumber)\r
+{\r
+    auto* stillPictureTaker = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker*> (host);\r
+    stillPictureTaker->cameraCaptureSessionCaptureSequenceCompleted (isPreview, (jobject) session, sequenceId, frameNumber);\r
+}\r
+\r
+void juce_cameraCaptureSessionCaptureStarted (int64 host, bool isPreview, void* session, void* request, int64 timestamp, int64 frameNumber)\r
+{\r
+    auto* stillPictureTaker = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker*> (host);\r
+    stillPictureTaker->cameraCaptureSessionCaptureStarted (isPreview, (jobject) session, (jobject) request, timestamp, frameNumber);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionCaptureCallback), cameraCaptureSessionCaptureCompleted, \\r
+                   void, (JNIEnv* env, jobject /*activity*/, jlong host, bool isPreview, jobject session, jobject request, jobject result))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_cameraCaptureSessionCaptureCompleted (host, isPreview, session, request, result);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionCaptureCallback), cameraCaptureSessionCaptureFailed, \\r
+                   void, (JNIEnv* env, jobject /*activity*/, jlong host, bool isPreview, jobject session, jobject request, jobject failure))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_cameraCaptureSessionCaptureFailed (host, isPreview, session, request, failure);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionCaptureCallback), cameraCaptureSessionCaptureProgressed, \\r
+                   void, (JNIEnv* env, jobject /*activity*/, jlong host, bool isPreview, jobject session, jobject request, jobject partialResult))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_cameraCaptureSessionCaptureProgressed (host, isPreview, session, request, partialResult);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionCaptureCallback), cameraCaptureSessionCaptureSequenceAborted, \\r
+                   void, (JNIEnv* env, jobject /*activity*/, jlong host, bool isPreview, jobject session, jint sequenceId))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_cameraCaptureSessionCaptureSequenceAborted (host, isPreview, session, (int) sequenceId);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionCaptureCallback), cameraCaptureSessionCaptureSequenceCompleted, \\r
+                   void, (JNIEnv* env, jobject /*activity*/, jlong host, bool isPreview, jobject session, jint sequenceId, jlong frameNumber))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_cameraCaptureSessionCaptureSequenceCompleted (host, isPreview, session, (int) sequenceId, frameNumber);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionCaptureCallback), cameraCaptureSessionCaptureStarted, \\r
+                   void, (JNIEnv* env, jobject /*activity*/, jlong host, bool isPreview, jobject session, jobject request, int64 timestamp, int64 frameNumber))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_cameraCaptureSessionCaptureStarted (host, isPreview, session, request, timestamp, frameNumber);\r
+}\r
+\r
+//==============================================================================\r
+void juce_deviceOrientationChanged (int64 host, int orientation)\r
+{\r
+    auto* listener = reinterpret_cast<CameraDevice::Pimpl::DeviceOrientationChangeListener*> (host);\r
+    listener->orientationChanged (orientation);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024JuceOrientationEventListener), deviceOrientationChanged, \\r
+                   void, (JNIEnv* env, jobject /*activity*/, jlong host, jint orientation))\r
+{\r
+    setEnv (env);\r
+\r
+    juce_deviceOrientationChanged (host, (int) orientation);\r
 }\r
+#endif\r
diff --git a/modules/juce_video/native/juce_ios_CameraDevice.h b/modules/juce_video/native/juce_ios_CameraDevice.h
new file mode 100644 (file)
index 0000000..8724b19
--- /dev/null
@@ -0,0 +1,1331 @@
+/*\r
+  ==============================================================================\r
+\r
+   This file is part of the JUCE library.\r
+   Copyright (c) 2017 - ROLI Ltd.\r
+\r
+   JUCE is an open source library subject to commercial or open-source\r
+   licensing.\r
+\r
+   By using JUCE, you agree to the terms of both the JUCE 5 End-User License\r
+   Agreement and JUCE 5 Privacy Policy (both updated and effective as of the\r
+   27th April 2017).\r
+\r
+   End User License Agreement: www.juce.com/juce-5-licence\r
+   Privacy Policy: www.juce.com/juce-5-privacy-policy\r
+\r
+   Or: You may also use this code under the terms of the GPL v3 (see\r
+   www.gnu.org/licenses).\r
+\r
+   JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r
+   EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r
+   DISCLAIMED.\r
+\r
+  ==============================================================================\r
+*/\r
+\r
+struct CameraDevice::Pimpl\r
+{\r
+    using InternalOpenCameraResultCallback = std::function<void (const String& /*cameraId*/, const String& /*error*/)>;\r
+\r
+    Pimpl (CameraDevice& ownerToUse, const String& cameraIdToUse, int /*index*/,\r
+           int /*minWidth*/, int /*minHeight*/, int /*maxWidth*/, int /*maxHeight*/,\r
+           bool useHighQuality)\r
+        : owner (ownerToUse),\r
+          cameraId (cameraIdToUse),\r
+          captureSession (*this, useHighQuality)\r
+    {\r
+    }\r
+\r
+    String getCameraId() const noexcept { return cameraId; }\r
+\r
+    void open (InternalOpenCameraResultCallback cameraOpenCallbackToUse)\r
+    {\r
+        cameraOpenCallback = static_cast<InternalOpenCameraResultCallback&&> (cameraOpenCallbackToUse);\r
+\r
+        if (cameraOpenCallback == nullptr)\r
+        {\r
+            // A valid camera open callback must be passed.\r
+            jassertfalse;\r
+            return;\r
+        }\r
+\r
+        [AVCaptureDevice requestAccessForMediaType: AVMediaTypeVideo\r
+                                 completionHandler: ^(BOOL granted)\r
+         {\r
+             // Access to video is required for camera to work,\r
+             // black images will be produced otherwise!\r
+             jassert (granted);\r
+\r
+             ignoreUnused (granted);\r
+         }];\r
+\r
+        [AVCaptureDevice requestAccessForMediaType: AVMediaTypeAudio\r
+                                 completionHandler: ^(BOOL granted)\r
+         {\r
+             // Access to audio is required for camera to work,\r
+             // silence will be produced otherwise!\r
+             jassert (granted);\r
+\r
+             ignoreUnused (granted);\r
+         }];\r
+\r
+        captureSession.startSessionForDeviceWithId (cameraId);\r
+    }\r
+\r
+    bool openedOk() const noexcept { return captureSession.openedOk(); }\r
+\r
+    void takeStillPicture (std::function<void (const Image&)> pictureTakenCallbackToUse)\r
+    {\r
+        if (pictureTakenCallbackToUse == nullptr)\r
+        {\r
+            jassertfalse;\r
+            return;\r
+        }\r
+\r
+        pictureTakenCallback = static_cast<std::function<void (const Image&)>&&> (pictureTakenCallbackToUse);\r
+\r
+        triggerStillPictureCapture();\r
+    }\r
+\r
+    void startRecordingToFile (const File& file, int /*quality*/)\r
+    {\r
+        file.deleteFile();\r
+\r
+        captureSession.startRecording (file);\r
+    }\r
+\r
+    void stopRecording()\r
+    {\r
+        captureSession.stopRecording();\r
+    }\r
+\r
+    Time getTimeOfFirstRecordedFrame() const\r
+    {\r
+        return captureSession.getTimeOfFirstRecordedFrame();\r
+    }\r
+\r
+    static StringArray getAvailableDevices()\r
+    {\r
+        StringArray results;\r
+\r
+        JUCE_CAMERA_LOG ("Available camera devices: ");\r
+\r
+        for (AVCaptureDevice* device in getDevices())\r
+        {\r
+            JUCE_CAMERA_LOG ("Device start----------------------------------");\r
+            printDebugCameraInfo (device);\r
+            JUCE_CAMERA_LOG ("Device end----------------------------------");\r
+\r
+            results.add (nsStringToJuce (device.uniqueID));\r
+        }\r
+\r
+        return results;\r
+    }\r
+\r
+    void addListener (CameraDevice::Listener* listenerToAdd)\r
+    {\r
+        const ScopedLock sl (listenerLock);\r
+        listeners.add (listenerToAdd);\r
+\r
+        if (listeners.size() == 1)\r
+            triggerStillPictureCapture();\r
+    }\r
+\r
+    void removeListener (CameraDevice::Listener* listenerToRemove)\r
+    {\r
+        const ScopedLock sl (listenerLock);\r
+        listeners.remove (listenerToRemove);\r
+    }\r
+\r
+private:\r
+    static NSArray<AVCaptureDevice*>* getDevices()\r
+    {\r
+       #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+        if (iosVersion.major >= 10)\r
+        {\r
+            std::unique_ptr<NSMutableArray<AVCaptureDeviceType>, NSObjectDeleter> deviceTypes ([[NSMutableArray alloc] initWithCapacity: 2]);\r
+\r
+            [deviceTypes.get() addObject: AVCaptureDeviceTypeBuiltInWideAngleCamera];\r
+            [deviceTypes.get() addObject: AVCaptureDeviceTypeBuiltInTelephotoCamera];\r
+\r
+            if ((iosVersion.major == 10 && iosVersion.minor >= 2) || iosVersion.major >= 11)\r
+                [deviceTypes.get() addObject: AVCaptureDeviceTypeBuiltInDualCamera];\r
+\r
+            if ((iosVersion.major == 11 && iosVersion.minor >= 1) || iosVersion.major >= 12)\r
+                [deviceTypes.get() addObject: AVCaptureDeviceTypeBuiltInTrueDepthCamera];\r
+\r
+            auto discoverySession = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes: deviceTypes.get()\r
+                                                                                           mediaType: AVMediaTypeVideo\r
+                                                                                            position: AVCaptureDevicePositionUnspecified];\r
+\r
+            return [discoverySession devices];\r
+        }\r
+       #endif\r
+\r
+        return [AVCaptureDevice devicesWithMediaType: AVMediaTypeVideo];\r
+    }\r
+\r
+    //==============================================================================\r
+    static void printDebugCameraInfo (AVCaptureDevice* device)\r
+    {\r
+        auto position = device.position;\r
+\r
+        String positionString = position == AVCaptureDevicePositionBack\r
+                              ? "Back"\r
+                              : position == AVCaptureDevicePositionFront\r
+                                         ? "Front"\r
+                                         : "Unspecified";\r
+\r
+        JUCE_CAMERA_LOG ("Position: " + positionString);\r
+        JUCE_CAMERA_LOG ("Model ID: " + nsStringToJuce (device.modelID));\r
+        JUCE_CAMERA_LOG ("Localized name: " + nsStringToJuce (device.localizedName));\r
+        JUCE_CAMERA_LOG ("Unique ID: " + nsStringToJuce (device.uniqueID));\r
+        JUCE_CAMERA_LOG ("Lens aperture: " + String (device.lensAperture));\r
+\r
+        JUCE_CAMERA_LOG ("Has flash: " + String ((int)device.hasFlash));\r
+        JUCE_CAMERA_LOG ("Supports flash always on: " + String ((int)[device isFlashModeSupported: AVCaptureFlashModeOn]));\r
+        JUCE_CAMERA_LOG ("Supports auto flash: " + String ((int)[device isFlashModeSupported: AVCaptureFlashModeAuto]));\r
+\r
+        JUCE_CAMERA_LOG ("Has torch: " + String ((int)device.hasTorch));\r
+        JUCE_CAMERA_LOG ("Supports torch always on: " + String ((int)[device isTorchModeSupported: AVCaptureTorchModeOn]));\r
+        JUCE_CAMERA_LOG ("Supports auto torch: " + String ((int)[device isTorchModeSupported: AVCaptureTorchModeAuto]));\r
+\r
+        JUCE_CAMERA_LOG ("Low light boost supported: " + String ((int)device.lowLightBoostEnabled));\r
+\r
+        JUCE_CAMERA_LOG ("Supports auto white balance: " + String ((int)[device isWhiteBalanceModeSupported: AVCaptureWhiteBalanceModeAutoWhiteBalance]));\r
+        JUCE_CAMERA_LOG ("Supports continuous auto white balance: " + String ((int)[device isWhiteBalanceModeSupported: AVCaptureWhiteBalanceModeContinuousAutoWhiteBalance]));\r
+\r
+        JUCE_CAMERA_LOG ("Supports auto focus: " + String ((int)[device isFocusModeSupported: AVCaptureFocusModeAutoFocus]));\r
+        JUCE_CAMERA_LOG ("Supports continuous auto focus: " + String ((int)[device isFocusModeSupported: AVCaptureFocusModeContinuousAutoFocus]));\r
+        JUCE_CAMERA_LOG ("Supports point of interest focus: " + String ((int)device.focusPointOfInterestSupported));\r
+        JUCE_CAMERA_LOG ("Smooth auto focus supported: " + String ((int)device.smoothAutoFocusSupported));\r
+        JUCE_CAMERA_LOG ("Auto focus range restriction supported: " + String ((int)device.autoFocusRangeRestrictionSupported));\r
+\r
+        JUCE_CAMERA_LOG ("Supports auto exposure: " + String ((int)[device isExposureModeSupported: AVCaptureExposureModeAutoExpose]));\r
+        JUCE_CAMERA_LOG ("Supports continuous auto exposure: " + String ((int)[device isExposureModeSupported: AVCaptureExposureModeContinuousAutoExposure]));\r
+        JUCE_CAMERA_LOG ("Supports custom exposure: " + String ((int)[device isExposureModeSupported: AVCaptureExposureModeCustom]));\r
+        JUCE_CAMERA_LOG ("Supports point of interest exposure: " + String ((int)device.exposurePointOfInterestSupported));\r
+\r
+       #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+        if (iosVersion.major >= 10)\r
+        {\r
+            JUCE_CAMERA_LOG ("Device type: " + nsStringToJuce (device.deviceType));\r
+            JUCE_CAMERA_LOG ("Locking focus with custom lens position supported: " + String ((int)device.lockingFocusWithCustomLensPositionSupported));\r
+        }\r
+       #endif\r
+\r
+       #if defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0\r
+        if (iosVersion.major >= 11)\r
+        {\r
+            JUCE_CAMERA_LOG ("Min available video zoom factor: " + String (device.minAvailableVideoZoomFactor));\r
+            JUCE_CAMERA_LOG ("Max available video zoom factor: " + String (device.maxAvailableVideoZoomFactor));\r
+            JUCE_CAMERA_LOG ("Dual camera switch over video zoom factor: " + String (device.dualCameraSwitchOverVideoZoomFactor));\r
+        }\r
+       #endif\r
+\r
+        JUCE_CAMERA_LOG ("Capture formats start-------------------");\r
+        for (AVCaptureDeviceFormat* format in device.formats)\r
+        {\r
+            JUCE_CAMERA_LOG ("Capture format start------");\r
+            printDebugCameraFormatInfo (format);\r
+            JUCE_CAMERA_LOG ("Capture format end------");\r
+        }\r
+        JUCE_CAMERA_LOG ("Capture formats end-------------------");\r
+    }\r
+\r
+    static void printDebugCameraFormatInfo (AVCaptureDeviceFormat* format)\r
+    {\r
+        JUCE_CAMERA_LOG ("Media type: " + nsStringToJuce (format.mediaType));\r
+\r
+        String colourSpaces;\r
+\r
+        for (NSNumber* number in format.supportedColorSpaces)\r
+        {\r
+            switch ([number intValue])\r
+            {\r
+                case AVCaptureColorSpace_sRGB:   colourSpaces << "sRGB ";  break;\r
+                case AVCaptureColorSpace_P3_D65: colourSpaces << "P3_D65 "; break;\r
+                default: break;\r
+            }\r
+        }\r
+\r
+        JUCE_CAMERA_LOG ("Supported colour spaces: " + colourSpaces);\r
+\r
+        JUCE_CAMERA_LOG ("Video field of view: " + String (format.videoFieldOfView));\r
+        JUCE_CAMERA_LOG ("Video max zoom factor: " + String (format.videoMaxZoomFactor));\r
+        JUCE_CAMERA_LOG ("Video zoom factor upscale threshold: " + String (format.videoZoomFactorUpscaleThreshold));\r
+\r
+        String videoFrameRateRangesString = "Video supported frame rate ranges: ";\r
+\r
+        for (AVFrameRateRange* range in format.videoSupportedFrameRateRanges)\r
+            videoFrameRateRangesString << frameRateRangeToString (range);\r
+        JUCE_CAMERA_LOG (videoFrameRateRangesString);\r
+\r
+        JUCE_CAMERA_LOG ("Video binned: " + String (int(format.videoBinned)));\r
+\r
+       #if defined (__IPHONE_8_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_8_0\r
+        if (iosVersion.major >= 8)\r
+        {\r
+            JUCE_CAMERA_LOG ("Video HDR supported: " + String (int (format.videoHDRSupported)));\r
+            JUCE_CAMERA_LOG ("High resolution still image dimensions: " + getHighResStillImgDimensionsString (format.highResolutionStillImageDimensions));\r
+            JUCE_CAMERA_LOG ("Min ISO: " + String (format.minISO));\r
+            JUCE_CAMERA_LOG ("Max ISO: " + String (format.maxISO));\r
+            JUCE_CAMERA_LOG ("Min exposure duration: " + cmTimeToString (format.minExposureDuration));\r
+\r
+            String autoFocusSystemString;\r
+            switch (format.autoFocusSystem)\r
+            {\r
+                case AVCaptureAutoFocusSystemPhaseDetection:    autoFocusSystemString = "PhaseDetection";    break;\r
+                case AVCaptureAutoFocusSystemContrastDetection: autoFocusSystemString = "ContrastDetection"; break;\r
+                default: autoFocusSystemString = "None";\r
+            }\r
+            JUCE_CAMERA_LOG ("Auto focus system: " + autoFocusSystemString);\r
+\r
+            JUCE_CAMERA_LOG ("Standard (iOS 5.0) video stabilization supported: " + String ((int) [format isVideoStabilizationModeSupported: AVCaptureVideoStabilizationModeStandard]));\r
+            JUCE_CAMERA_LOG ("Cinematic video stabilization supported: " + String ((int) [format isVideoStabilizationModeSupported: AVCaptureVideoStabilizationModeCinematic]));\r
+            JUCE_CAMERA_LOG ("Auto video stabilization supported: " + String ((int) [format isVideoStabilizationModeSupported: AVCaptureVideoStabilizationModeAuto]));\r
+        }\r
+       #endif\r
+\r
+       #if defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0\r
+        if (iosVersion.major >= 11)\r
+        {\r
+            JUCE_CAMERA_LOG ("Min zoom factor for depth data delivery: " + String (format.videoMinZoomFactorForDepthDataDelivery));\r
+            JUCE_CAMERA_LOG ("Max zoom factor for depth data delivery: " + String (format.videoMaxZoomFactorForDepthDataDelivery));\r
+        }\r
+       #endif\r
+    }\r
+\r
+    static String getHighResStillImgDimensionsString (CMVideoDimensions d)\r
+    {\r
+        return "[" + String (d.width) + " " + String (d.height) + "]";\r
+    }\r
+\r
+    static String cmTimeToString (CMTime time)\r
+    {\r
+        CFStringRef timeDesc = CMTimeCopyDescription (NULL, time);\r
+        String result = String::fromCFString (timeDesc);\r
+\r
+        CFRelease (timeDesc);\r
+        return result;\r
+    }\r
+\r
+    static String frameRateRangeToString (AVFrameRateRange* range)\r
+    {\r
+        String result;\r
+        result << "[minFrameDuration: " + cmTimeToString (range.minFrameDuration);\r
+        result << " maxFrameDuration: " + cmTimeToString (range.maxFrameDuration);\r
+        result << " minFrameRate: " + String (range.minFrameRate);\r
+        result << " maxFrameRate: " + String (range.maxFrameRate) << "] ";\r
+\r
+        return result;\r
+    }\r
+\r
+    //==============================================================================\r
+    class CaptureSession\r
+    {\r
+    public:\r
+        CaptureSession (Pimpl& ownerToUse, bool useHighQuality)\r
+            : owner (ownerToUse),\r
+              captureSessionQueue (dispatch_queue_create ("JuceCameraDeviceBackgroundDispatchQueue", DISPATCH_QUEUE_SERIAL)),\r
+              captureSession ([[AVCaptureSession alloc] init]),\r
+              delegate (nullptr),\r
+              stillPictureTaker (*this),\r
+              videoRecorder (*this)\r
+        {\r
+            static SessionDelegateClass cls;\r
+            delegate.reset ([cls.createInstance() init]);\r
+            SessionDelegateClass::setOwner (delegate.get(), this);\r
+\r
+          #pragma clang diagnostic push\r
+          #pragma clang diagnostic ignored "-Wundeclared-selector"\r
+            [[NSNotificationCenter defaultCenter] addObserver: delegate.get()\r
+                                                     selector: @selector (sessionDidStartRunning:)\r
+                                                         name: AVCaptureSessionDidStartRunningNotification\r
+                                                       object: captureSession.get()];\r
+\r
+            [[NSNotificationCenter defaultCenter] addObserver: delegate.get()\r
+                                                     selector: @selector (sessionDidStopRunning:)\r
+                                                         name: AVCaptureSessionDidStopRunningNotification\r
+                                                       object: captureSession.get()];\r
+\r
+            [[NSNotificationCenter defaultCenter] addObserver: delegate.get()\r
+                                                     selector: @selector (sessionRuntimeError:)\r
+                                                         name: AVCaptureSessionRuntimeErrorNotification\r
+                                                       object: captureSession.get()];\r
+\r
+            [[NSNotificationCenter defaultCenter] addObserver: delegate.get()\r
+                                                     selector: @selector (sessionWasInterrupted:)\r
+                                                         name: AVCaptureSessionWasInterruptedNotification\r
+                                                       object: captureSession.get()];\r
+\r
+            [[NSNotificationCenter defaultCenter] addObserver: delegate.get()\r
+                                                     selector: @selector (sessionInterruptionEnded:)\r
+                                                         name: AVCaptureSessionInterruptionEndedNotification\r
+                                                       object: captureSession.get()];\r
+           #pragma clang diagnostic pop\r
+\r
+            dispatch_async (captureSessionQueue,^\r
+                            {\r
+                                [captureSession.get() setSessionPreset: useHighQuality ? AVCaptureSessionPresetHigh\r
+                                                                                       : AVCaptureSessionPresetMedium];\r
+                            });\r
+\r
+            ++numCaptureSessions;\r
+        }\r
+\r
+        ~CaptureSession()\r
+        {\r
+            [[NSNotificationCenter defaultCenter] removeObserver: delegate.get()];\r
+\r
+            stopRecording();\r
+\r
+            if (--numCaptureSessions == 0)\r
+            {\r
+                dispatch_async (captureSessionQueue, ^\r
+                                {\r
+                                    if (captureSession.get().running)\r
+                                        [captureSession.get() stopRunning];\r
+\r
+                                    sessionClosedEvent.signal();\r
+                                });\r
+\r
+                sessionClosedEvent.wait (-1);\r
+            }\r
+        }\r
+\r
+        bool openedOk() const noexcept { return sessionStarted; }\r
+\r
+        void startSessionForDeviceWithId (const String& cameraIdToUse)\r
+        {\r
+            dispatch_async (captureSessionQueue,^\r
+                            {\r
+                                cameraDevice = [AVCaptureDevice deviceWithUniqueID: juceStringToNS (cameraIdToUse)];\r
+                                auto* audioDevice = [AVCaptureDevice defaultDeviceWithMediaType: AVMediaTypeAudio];\r
+\r
+                                [captureSession.get() beginConfiguration];\r
+\r
+                                // This will add just video...\r
+                                auto error = addInputToDevice (cameraDevice);\r
+\r
+                                if (error.isNotEmpty())\r
+                                {\r
+                                    WeakReference<CaptureSession> weakRef (this);\r
+\r
+                                    MessageManager::callAsync ([weakRef, error]() mutable\r
+                                    {\r
+                                        if (weakRef != nullptr)\r
+                                            weakRef->owner.cameraOpenCallback ({}, error);\r
+                                    });\r
+\r
+                                    return;\r
+                                }\r
+\r
+                                // ... so add audio explicitly here\r
+                                error = addInputToDevice (audioDevice);\r
+\r
+                                if (error.isNotEmpty())\r
+                                {\r
+                                    WeakReference<CaptureSession> weakRef (this);\r
+\r
+                                    MessageManager::callAsync ([weakRef, error]() mutable\r
+                                    {\r
+                                        if (weakRef != nullptr)\r
+                                            weakRef->owner.cameraOpenCallback ({}, error);\r
+                                    });\r
+\r
+                                    return;\r
+                                }\r
+\r
+                                [captureSession.get() commitConfiguration];\r
+\r
+                                if (! captureSession.get().running)\r
+                                    [captureSession.get() startRunning];\r
+                            });\r
+        }\r
+\r
+        AVCaptureVideoPreviewLayer* createPreviewLayer()\r
+        {\r
+            if (! openedOk())\r
+            {\r
+                // A session must be started first!\r
+                jassertfalse;\r
+                return nullptr;\r
+            }\r
+\r
+            previewLayer = [AVCaptureVideoPreviewLayer layerWithSession: captureSession.get()];\r
+            return previewLayer;\r
+        }\r
+\r
+        void takeStillPicture()\r
+        {\r
+            if (! openedOk())\r
+            {\r
+                // A session must be started first!\r
+                jassert (openedOk());\r
+                return;\r
+            }\r
+\r
+            stillPictureTaker.takePicture (previewLayer.connection.videoOrientation);\r
+        }\r
+\r
+        void startRecording (const File& file)\r
+        {\r
+            if (! openedOk())\r
+            {\r
+                // A session must be started first!\r
+                jassertfalse;\r
+                return;\r
+            }\r
+\r
+            if (file.existsAsFile())\r
+            {\r
+                // File overwriting is not supported by iOS video recorder, the target\r
+                // file must not exist.\r
+                jassertfalse;\r
+                return;\r
+            }\r
+\r
+            videoRecorder.startRecording (file, previewLayer.connection.videoOrientation);\r
+        }\r
+\r
+        void stopRecording()\r
+        {\r
+            videoRecorder.stopRecording();\r
+        }\r
+\r
+        Time getTimeOfFirstRecordedFrame() const\r
+        {\r
+            return videoRecorder.getTimeOfFirstRecordedFrame();\r
+        }\r
+\r
+        JUCE_DECLARE_WEAK_REFERENCEABLE (CaptureSession)\r
+\r
+    private:\r
+        String addInputToDevice (AVCaptureDevice* device)\r
+        {\r
+            NSError* error = nil;\r
+\r
+            auto* input = [AVCaptureDeviceInput deviceInputWithDevice: device\r
+                                                                error: &error];\r
+\r
+            if (error != nil)\r
+                return nsStringToJuce (error.localizedDescription);\r
+\r
+            if (! [captureSession.get() canAddInput: input])\r
+                return "Could not add input to camera session.";\r
+\r
+            [captureSession.get() addInput: input];\r
+            return {};\r
+        }\r
+\r
+        //==============================================================================\r
+        struct SessionDelegateClass    : public ObjCClass<NSObject>\r
+        {\r
+            SessionDelegateClass()  : ObjCClass<NSObject> ("SessionDelegateClass_")\r
+            {\r
+               #pragma clang diagnostic push\r
+               #pragma clang diagnostic ignored "-Wundeclared-selector"\r
+                addMethod (@selector (sessionDidStartRunning:),   started,           "v@:@");\r
+                addMethod (@selector (sessionDidStopRunning:),    stopped,           "v@:@");\r
+                addMethod (@selector (sessionRuntimeError:),      runtimeError,      "v@:@");\r
+                addMethod (@selector (sessionWasInterrupted:),    interrupted,       "v@:@");\r
+                addMethod (@selector (sessionInterruptionEnded:), interruptionEnded, "v@:@");\r
+               #pragma clang diagnostic pop\r
+\r
+                addIvar<CaptureSession*> ("owner");\r
+\r
+                registerClass();\r
+            }\r
+\r
+            //==============================================================================\r
+            static CaptureSession& getOwner (id self)         { return *getIvar<CaptureSession*> (self, "owner"); }\r
+            static void setOwner (id self, CaptureSession* s) { object_setInstanceVariable (self, "owner", s); }\r
+\r
+        private:\r
+            //==============================================================================\r
+            static void started (id self, SEL, NSNotification* notification)\r
+            {\r
+                JUCE_CAMERA_LOG (nsStringToJuce ([notification description]));\r
+\r
+                ignoreUnused (notification);\r
+\r
+                dispatch_async (dispatch_get_main_queue(),\r
+                                ^{\r
+                                    getOwner (self).cameraSessionStarted();\r
+                                });\r
+            }\r
+\r
+            static void stopped (id, SEL, NSNotification* notification)\r
+            {\r
+                JUCE_CAMERA_LOG (nsStringToJuce ([notification description]));\r
+\r
+                ignoreUnused (notification);\r
+            }\r
+\r
+            static void runtimeError (id self, SEL, NSNotification* notification)\r
+            {\r
+                JUCE_CAMERA_LOG (nsStringToJuce ([notification description]));\r
+\r
+                dispatch_async (dispatch_get_main_queue(),\r
+                                ^{\r
+                                    NSError* error = notification.userInfo[AVCaptureSessionErrorKey];\r
+                                    auto errorString = error != nil ? nsStringToJuce (error.localizedDescription) : String();\r
+                                    getOwner (self).cameraSessionRuntimeError (errorString);\r
+                                });\r
+            }\r
+\r
+            static void interrupted (id, SEL, NSNotification* notification)\r
+            {\r
+                JUCE_CAMERA_LOG (nsStringToJuce ([notification description]));\r
+\r
+                ignoreUnused (notification);\r
+            }\r
+\r
+            static void interruptionEnded (id, SEL, NSNotification* notification)\r
+            {\r
+                JUCE_CAMERA_LOG (nsStringToJuce ([notification description]));\r
+\r
+                ignoreUnused (notification);\r
+            }\r
+        };\r
+\r
+        //==============================================================================\r
+        class StillPictureTaker\r
+        {\r
+        public:\r
+            StillPictureTaker (CaptureSession& cs)\r
+                : captureSession (cs),\r
+                  captureOutput (createCaptureOutput()),\r
+                  photoOutputDelegate (nullptr)\r
+            {\r
+                if (Pimpl::getIOSVersion().major >= 10)\r
+                {\r
+                    static PhotoOutputDelegateClass cls;\r
+                    photoOutputDelegate.reset ([cls.createInstance() init]);\r
+                    PhotoOutputDelegateClass::setOwner (photoOutputDelegate.get(), this);\r
+                }\r
+\r
+                captureSession.addOutputIfPossible (captureOutput);\r
+            }\r
+\r
+            void takePicture (AVCaptureVideoOrientation orientationToUse)\r
+            {\r
+                if (takingPicture)\r
+                {\r
+                    // Picture taking already in progress!\r
+                    jassertfalse;\r
+                    return;\r
+                }\r
+\r
+                takingPicture = true;\r
+\r
+                printImageOutputDebugInfo (captureOutput);\r
+\r
+                if (auto* connection = findVideoConnection (captureOutput))\r
+                {\r
+                   #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+                    if (Pimpl::getIOSVersion().major >= 10 && [captureOutput isKindOfClass: [AVCapturePhotoOutput class]])\r
+                    {\r
+                        auto* photoOutput = (AVCapturePhotoOutput*) captureOutput;\r
+                        auto* outputConnection = [photoOutput connectionWithMediaType: AVMediaTypeVideo];\r
+                        outputConnection.videoOrientation = orientationToUse;\r
+\r
+                        [photoOutput capturePhotoWithSettings: [AVCapturePhotoSettings photoSettings]\r
+                                                     delegate: id<AVCapturePhotoCaptureDelegate> (photoOutputDelegate.get())];\r
+\r
+                        return;\r
+                    }\r
+                   #endif\r
+\r
+                    auto* stillImageOutput = (AVCaptureStillImageOutput*) captureOutput;\r
+                    auto* outputConnection = [stillImageOutput connectionWithMediaType: AVMediaTypeVideo];\r
+                    outputConnection.videoOrientation = orientationToUse;\r
+\r
+                    [stillImageOutput captureStillImageAsynchronouslyFromConnection: connection completionHandler:\r
+                         ^(CMSampleBufferRef imageSampleBuffer, NSError* error)\r
+                         {\r
+                             if (error != nil)\r
+                             {\r
+                                 JUCE_CAMERA_LOG ("Still picture capture failed, error: " + nsStringToJuce (error.localizedDescription));\r
+                                 jassertfalse;\r
+                                 return;\r
+                             }\r
+\r
+                             NSData* imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation: imageSampleBuffer];\r
+\r
+                             auto image = ImageFileFormat::loadFrom (imageData.bytes, (size_t) imageData.length);\r
+\r
+                             callListeners (image);\r
+\r
+                             MessageManager::callAsync ([this, image]() { notifyPictureTaken (image); });\r
+                         }];\r
+                }\r
+                else\r
+                {\r
+                    // Could not find a connection of video type\r
+                    jassertfalse;\r
+                }\r
+            }\r
+\r
+        private:\r
+            static AVCaptureOutput* createCaptureOutput()\r
+            {\r
+               #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+                if (Pimpl::getIOSVersion().major >= 10)\r
+                    return [AVCapturePhotoOutput new];\r
+               #endif\r
+\r
+                return [AVCaptureStillImageOutput new];\r
+            }\r
+\r
+            static void printImageOutputDebugInfo (AVCaptureOutput* captureOutput)\r
+            {\r
+               #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+                if (Pimpl::getIOSVersion().major >= 10 && [captureOutput isKindOfClass: [AVCapturePhotoOutput class]])\r
+                {\r
+                    auto* photoOutput = (AVCapturePhotoOutput*) captureOutput;\r
+\r
+                    String typesString;\r
+\r
+                    for (AVVideoCodecType type in photoOutput.availablePhotoCodecTypes)\r
+                        typesString << nsStringToJuce (type) << " ";\r
+\r
+                    JUCE_CAMERA_LOG ("Available image codec types: " + typesString);\r
+\r
+                    JUCE_CAMERA_LOG ("Still image stabilization supported: " + String ((int) photoOutput.stillImageStabilizationSupported));\r
+                    JUCE_CAMERA_LOG ("Dual camera fusion supported: " + String ((int) photoOutput.dualCameraFusionSupported));\r
+                    JUCE_CAMERA_LOG ("Supports flash: "      + String ((int) [photoOutput.supportedFlashModes containsObject: @(AVCaptureFlashModeOn)]));\r
+                    JUCE_CAMERA_LOG ("Supports auto flash: " + String ((int) [photoOutput.supportedFlashModes containsObject: @(AVCaptureFlashModeAuto)]));\r
+                    JUCE_CAMERA_LOG ("Max bracketed photo count: " + String (photoOutput.maxBracketedCapturePhotoCount));\r
+                    JUCE_CAMERA_LOG ("Lens stabilization during bracketed capture supported: " + String ((int) photoOutput.lensStabilizationDuringBracketedCaptureSupported));\r
+                    JUCE_CAMERA_LOG ("Live photo capture supported: " + String ((int) photoOutput.livePhotoCaptureSupported));\r
+\r
+\r
+                   #if defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0\r
+                    if (Pimpl::getIOSVersion().major >= 11)\r
+                    {\r
+                        typesString.clear();\r
+\r
+                        for (AVFileType type in photoOutput.availablePhotoFileTypes)\r
+                            typesString << nsStringToJuce (type) << " ";\r
+\r
+                        JUCE_CAMERA_LOG ("Available photo file types: " + typesString);\r
+\r
+                        typesString.clear();\r
+\r
+                        for (AVFileType type in photoOutput.availableRawPhotoFileTypes)\r
+                            typesString << nsStringToJuce (type) << " ";\r
+\r
+                        JUCE_CAMERA_LOG ("Available RAW photo file types: " + typesString);\r
+\r
+                        typesString.clear();\r
+\r
+                        for (AVFileType type in photoOutput.availableLivePhotoVideoCodecTypes)\r
+                            typesString << nsStringToJuce (type) << " ";\r
+\r
+                        JUCE_CAMERA_LOG ("Available live photo video codec types: " + typesString);\r
+\r
+                        JUCE_CAMERA_LOG ("Dual camera dual photo delivery supported: " + String ((int) photoOutput.dualCameraDualPhotoDeliverySupported));\r
+                        JUCE_CAMERA_LOG ("Camera calibration data delivery supported: " + String ((int) photoOutput.cameraCalibrationDataDeliverySupported));\r
+                        JUCE_CAMERA_LOG ("Depth data delivery supported: " + String ((int) photoOutput.depthDataDeliverySupported));\r
+                    }\r
+                   #endif\r
+\r
+                    return;\r
+                }\r
+               #endif\r
+\r
+                auto* stillImageOutput = (AVCaptureStillImageOutput*) captureOutput;\r
+\r
+                String typesString;\r
+\r
+                for (AVVideoCodecType type in stillImageOutput.availableImageDataCodecTypes)\r
+                    typesString << nsStringToJuce (type) << " ";\r
+\r
+                JUCE_CAMERA_LOG ("Available image codec types: " + typesString);\r
+                JUCE_CAMERA_LOG ("Still image stabilization supported: " + String ((int) stillImageOutput.stillImageStabilizationSupported));\r
+                JUCE_CAMERA_LOG ("Automatically enableds still image stabilization when available: " + String ((int) stillImageOutput.automaticallyEnablesStillImageStabilizationWhenAvailable));\r
+\r
+                JUCE_CAMERA_LOG ("Output settings for image output: " + nsStringToJuce ([stillImageOutput.outputSettings description]));\r
+            }\r
+\r
+            //==============================================================================\r
+            static AVCaptureConnection* findVideoConnection (AVCaptureOutput* output)\r
+            {\r
+                for (AVCaptureConnection* connection in output.connections)\r
+                    for (AVCaptureInputPort* port in connection.inputPorts)\r
+                        if ([port.mediaType isEqual: AVMediaTypeVideo])\r
+                            return connection;\r
+\r
+                return nullptr;\r
+            }\r
+\r
+            //==============================================================================\r
+            class PhotoOutputDelegateClass : public ObjCClass<NSObject>\r
+            {\r
+            public:\r
+                PhotoOutputDelegateClass() : ObjCClass<NSObject> ("PhotoOutputDelegateClass_")\r
+                {\r
+                    addMethod (@selector (captureOutput:willBeginCaptureForResolvedSettings:),       willBeginCaptureForSettings, "v@:@@");\r
+                    addMethod (@selector (captureOutput:willCapturePhotoForResolvedSettings:),       willCaptureForSettings,      "v@:@@");\r
+                    addMethod (@selector (captureOutput:didCapturePhotoForResolvedSettings:),        didCaptureForSettings,       "v@:@@");\r
+                    addMethod (@selector (captureOutput:didFinishCaptureForResolvedSettings:error:), didFinishCaptureForSettings, "v@:@@@");\r
+\r
+                    if (Pimpl::getIOSVersion().major >= 11)\r
+                        addMethod (@selector (captureOutput:didFinishProcessingPhoto:error:), didFinishProcessingPhoto, "v@:@@@");\r
+                    else\r
+                        addMethod (@selector (captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:), didFinishProcessingPhotoSampleBuffer, "v@:@@@@@@");\r
+\r
+                    addIvar<StillPictureTaker*> ("owner");\r
+\r
+                    registerClass();\r
+                }\r
+\r
+                //==============================================================================\r
+                static StillPictureTaker& getOwner (id self) { return *getIvar<StillPictureTaker*> (self, "owner"); }\r
+                static void setOwner (id self, StillPictureTaker* t) { object_setInstanceVariable (self, "owner", t); }\r
+\r
+            private:\r
+                static void willBeginCaptureForSettings (id, SEL, AVCapturePhotoOutput*, AVCaptureResolvedPhotoSettings*)\r
+                {\r
+                    JUCE_CAMERA_LOG ("willBeginCaptureForSettings()");\r
+                }\r
+\r
+                static void willCaptureForSettings (id, SEL, AVCapturePhotoOutput*, AVCaptureResolvedPhotoSettings*)\r
+                {\r
+                    JUCE_CAMERA_LOG ("willCaptureForSettings()");\r
+                }\r
+\r
+                static void didCaptureForSettings (id, SEL, AVCapturePhotoOutput*, AVCaptureResolvedPhotoSettings*)\r
+                {\r
+                    JUCE_CAMERA_LOG ("didCaptureForSettings()");\r
+                }\r
+\r
+                static void didFinishCaptureForSettings (id, SEL, AVCapturePhotoOutput*, AVCaptureResolvedPhotoSettings*, NSError* error)\r
+                {\r
+                    String errorString = error != nil ? nsStringToJuce (error.localizedDescription) : String();\r
+                    ignoreUnused (errorString);\r
+\r
+                    JUCE_CAMERA_LOG ("didFinishCaptureForSettings(), error = " + errorString);\r
+                }\r
+\r
+                static void didFinishProcessingPhoto (id self, SEL, AVCapturePhotoOutput*, AVCapturePhoto* capturePhoto, NSError* error)\r
+                {\r
+                    String errorString = error != nil ? nsStringToJuce (error.localizedDescription) : String();\r
+                    ignoreUnused (errorString);\r
+\r
+                    JUCE_CAMERA_LOG ("didFinishProcessingPhoto(), error = " + errorString);\r
+\r
+                    if (error != nil)\r
+                    {\r
+                        JUCE_CAMERA_LOG ("Still picture capture failed, error: " + nsStringToJuce (error.localizedDescription));\r
+                        jassertfalse;\r
+                        return;\r
+                    }\r
+\r
+                    auto* imageOrientation = (NSNumber *) capturePhoto.metadata[(NSString*) kCGImagePropertyOrientation];\r
+\r
+                    auto* uiImage = getImageWithCorrectOrientation ((CGImagePropertyOrientation) imageOrientation.unsignedIntValue,\r
+                                                                    [capturePhoto CGImageRepresentation]);\r
+\r
+                    auto* imageData = UIImageJPEGRepresentation (uiImage, 0.f);\r
+\r
+                    auto image = ImageFileFormat::loadFrom (imageData.bytes, (size_t) imageData.length);\r
+\r
+                    getOwner (self).callListeners (image);\r
+\r
+                    MessageManager::callAsync ([self, image]() { getOwner (self).notifyPictureTaken (image); });\r
+                }\r
+\r
+                static UIImage* getImageWithCorrectOrientation (CGImagePropertyOrientation imageOrientation,\r
+                                                                CGImageRef imageData)\r
+                {\r
+                    auto origWidth  = CGImageGetWidth (imageData);\r
+                    auto origHeight = CGImageGetHeight (imageData);\r
+\r
+                    auto targetSize = getTargetImageDimensionFor (imageOrientation, imageData);\r
+\r
+                    UIGraphicsBeginImageContext (targetSize);\r
+                    CGContextRef context = UIGraphicsGetCurrentContext();\r
+\r
+                    switch (imageOrientation)\r
+                    {\r
+                        case kCGImagePropertyOrientationUp:\r
+                            CGContextScaleCTM (context, 1.0, -1.0);\r
+                            CGContextTranslateCTM (context, 0.0, -targetSize.height);\r
+                            break;\r
+                        case kCGImagePropertyOrientationRight:\r
+                            CGContextRotateCTM (context, 90 * MathConstants<CGFloat>::pi / 180);\r
+                            CGContextScaleCTM (context, targetSize.height / origHeight, -targetSize.width / origWidth);\r
+                            break;\r
+                        case kCGImagePropertyOrientationDown:\r
+                            CGContextTranslateCTM (context, targetSize.width, 0.0);\r
+                            CGContextScaleCTM (context, -1.0, 1.0);\r
+                            break;\r
+                        case kCGImagePropertyOrientationLeft:\r
+                            CGContextRotateCTM (context, -90 * MathConstants<CGFloat>::pi / 180);\r
+                            CGContextScaleCTM (context, targetSize.height / origHeight, -targetSize.width / origWidth);\r
+                            CGContextTranslateCTM (context, -targetSize.width, -targetSize.height);\r
+                            break;\r
+                        default:\r
+                            // Not implemented.\r
+                            jassertfalse;\r
+                            break;\r
+                    }\r
+\r
+                    CGContextDrawImage (context, CGRectMake (0, 0, targetSize.width, targetSize.height), imageData);\r
+\r
+                    UIImage* correctedImage = UIGraphicsGetImageFromCurrentImageContext();\r
+                    UIGraphicsEndImageContext();\r
+\r
+                    return correctedImage;\r
+                }\r
+\r
+                static CGSize getTargetImageDimensionFor (CGImagePropertyOrientation imageOrientation,\r
+                                                          CGImageRef imageData)\r
+                {\r
+                    auto width = CGImageGetWidth (imageData);\r
+                    auto height = CGImageGetHeight (imageData);\r
+\r
+                    switch (imageOrientation)\r
+                    {\r
+                        case kCGImagePropertyOrientationUp:\r
+                        case kCGImagePropertyOrientationUpMirrored:\r
+                        case kCGImagePropertyOrientationDown:\r
+                        case kCGImagePropertyOrientationDownMirrored:\r
+                            return CGSizeMake ((CGFloat) width, (CGFloat) height);\r
+                        case kCGImagePropertyOrientationRight:\r
+                        case kCGImagePropertyOrientationRightMirrored:\r
+                        case kCGImagePropertyOrientationLeft:\r
+                        case kCGImagePropertyOrientationLeftMirrored:\r
+                            return CGSizeMake ((CGFloat) height, (CGFloat) width);\r
+                    }\r
+\r
+                    jassertfalse;\r
+                    return CGSizeMake ((CGFloat) width, (CGFloat) height);\r
+                }\r
+\r
+                static void didFinishProcessingPhotoSampleBuffer (id self, SEL, AVCapturePhotoOutput*,\r
+                                                                  CMSampleBufferRef imageBuffer, CMSampleBufferRef imagePreviewBuffer,\r
+                                                                  AVCaptureResolvedPhotoSettings*, AVCaptureBracketedStillImageSettings*,\r
+                                                                  NSError* error)\r
+                {\r
+                    String errorString = error != nil ? nsStringToJuce (error.localizedDescription) : String();\r
+                    ignoreUnused (errorString);\r
+\r
+                    JUCE_CAMERA_LOG ("didFinishProcessingPhotoSampleBuffer(), error = " + errorString);\r
+\r
+                    if (error != nil)\r
+                    {\r
+                        JUCE_CAMERA_LOG ("Still picture capture failed, error: " + nsStringToJuce (error.localizedDescription));\r
+                        jassertfalse;\r
+                        return;\r
+                    }\r
+\r
+                    NSData* origImageData = [AVCapturePhotoOutput JPEGPhotoDataRepresentationForJPEGSampleBuffer: imageBuffer previewPhotoSampleBuffer: imagePreviewBuffer];\r
+                    auto* origImage = [UIImage imageWithData: origImageData];\r
+                    auto imageOrientation = uiImageOrientationToCGImageOrientation (origImage.imageOrientation);\r
+\r
+                    auto* uiImage = getImageWithCorrectOrientation (imageOrientation, origImage.CGImage);\r
+\r
+                    auto* imageData = UIImageJPEGRepresentation (uiImage, 0.f);\r
+\r
+                    auto image = ImageFileFormat::loadFrom (imageData.bytes, (size_t) imageData.length);\r
+\r
+                    getOwner (self).callListeners (image);\r
+\r
+                    MessageManager::callAsync ([self, image]() { getOwner (self).notifyPictureTaken (image); });\r
+                }\r
+\r
+                static CGImagePropertyOrientation uiImageOrientationToCGImageOrientation (UIImageOrientation orientation)\r
+                {\r
+                    switch (orientation)\r
+                    {\r
+                        case UIImageOrientationUp:            return kCGImagePropertyOrientationUp;\r
+                        case UIImageOrientationDown:          return kCGImagePropertyOrientationDown;\r
+                        case UIImageOrientationLeft:          return kCGImagePropertyOrientationLeft;\r
+                        case UIImageOrientationRight:         return kCGImagePropertyOrientationRight;\r
+                        case UIImageOrientationUpMirrored:    return kCGImagePropertyOrientationUpMirrored;\r
+                        case UIImageOrientationDownMirrored:  return kCGImagePropertyOrientationDownMirrored;\r
+                        case UIImageOrientationLeftMirrored:  return kCGImagePropertyOrientationLeftMirrored;\r
+                        case UIImageOrientationRightMirrored: return kCGImagePropertyOrientationRightMirrored;\r
+                    }\r
+                }\r
+            };\r
+\r
+            //==============================================================================\r
+            void callListeners (const Image& image)\r
+            {\r
+                captureSession.callListeners (image);\r
+            }\r
+\r
+            void notifyPictureTaken (const Image& image)\r
+            {\r
+                takingPicture = false;\r
+\r
+                captureSession.notifyPictureTaken (image);\r
+            }\r
+\r
+            CaptureSession& captureSession;\r
+            AVCaptureOutput* captureOutput;\r
+\r
+            std::unique_ptr<NSObject, NSObjectDeleter> photoOutputDelegate;\r
+\r
+            bool takingPicture = false;\r
+        };\r
+\r
+        //==============================================================================\r
+        // NB: FileOutputRecordingDelegateClass callbacks can be called from any thread (incl.\r
+        // the message thread), so waiting for an event when stopping recording is not an\r
+        // option and VideoRecorder must be alive at all times in order to get stopped\r
+        // recording callback.\r
+        class VideoRecorder\r
+        {\r
+        public:\r
+            VideoRecorder (CaptureSession& captureSession)\r
+                : movieFileOutput ([AVCaptureMovieFileOutput new]),\r
+                  delegate (nullptr)\r
+            {\r
+                static FileOutputRecordingDelegateClass cls;\r
+                delegate.reset ([cls.createInstance() init]);\r
+                FileOutputRecordingDelegateClass::setOwner (delegate.get(), this);\r
+\r
+                captureSession.addOutputIfPossible (movieFileOutput);\r
+            }\r
+\r
+            ~VideoRecorder()\r
+            {\r
+                stopRecording();\r
+\r
+                // Shutting down a device while recording will stop the recording\r
+                // abruptly and the recording will be lost.\r
+                jassert (! recordingInProgress);\r
+            }\r
+\r
+            void startRecording (const File& file, AVCaptureVideoOrientation orientationToUse)\r
+            {\r
+                if (Pimpl::getIOSVersion().major >= 10)\r
+                    printVideoOutputDebugInfo (movieFileOutput);\r
+\r
+                auto* url = [NSURL fileURLWithPath: juceStringToNS (file.getFullPathName())\r
+                                       isDirectory: NO];\r
+\r
+                auto* outputConnection = [movieFileOutput connectionWithMediaType: AVMediaTypeVideo];\r
+                outputConnection.videoOrientation = orientationToUse;\r
+\r
+                [movieFileOutput startRecordingToOutputFileURL: url recordingDelegate: delegate.get()];\r
+            }\r
+\r
+            void stopRecording()\r
+            {\r
+                [movieFileOutput stopRecording];\r
+            }\r
+\r
+            Time getTimeOfFirstRecordedFrame() const\r
+            {\r
+                return Time (firstRecordedFrameTimeMs.get());\r
+            }\r
+\r
+        private:\r
+            static void printVideoOutputDebugInfo (AVCaptureMovieFileOutput* output)\r
+            {\r
+                ignoreUnused (output);\r
+\r
+                JUCE_CAMERA_LOG ("Available video codec types:");\r
+\r
+               #if JUCE_CAMERA_LOG_ENABLED\r
+                for (AVVideoCodecType type in output.availableVideoCodecTypes)\r
+                    JUCE_CAMERA_LOG (nsStringToJuce (type));\r
+               #endif\r
+\r
+                JUCE_CAMERA_LOG ("Output settings per video connection:");\r
+\r
+               #if JUCE_CAMERA_LOG_ENABLED\r
+                for (AVCaptureConnection* connection in output.connections)\r
+                    JUCE_CAMERA_LOG (nsStringToJuce ([[output outputSettingsForConnection: connection] description]));\r
+               #endif\r
+            }\r
+\r
+            //==============================================================================\r
+            struct FileOutputRecordingDelegateClass    : public ObjCClass<NSObject<AVCaptureFileOutputRecordingDelegate>>\r
+            {\r
+                FileOutputRecordingDelegateClass()  : ObjCClass<NSObject<AVCaptureFileOutputRecordingDelegate>> ("FileOutputRecordingDelegateClass_")\r
+                {\r
+                    addMethod (@selector (captureOutput:didStartRecordingToOutputFileAtURL:fromConnections:),        started, "v@:@@@");\r
+                    addMethod (@selector (captureOutput:didFinishRecordingToOutputFileAtURL:fromConnections:error:), stopped, "v@:@@@@");\r
+\r
+                    addIvar<VideoRecorder*> ("owner");\r
+\r
+                    registerClass();\r
+                }\r
+\r
+                //==============================================================================\r
+                static VideoRecorder& getOwner (id self)         { return *getIvar<VideoRecorder*> (self, "owner"); }\r
+                static void setOwner (id self, VideoRecorder* r) { object_setInstanceVariable (self, "owner", r); }\r
+\r
+            private:\r
+                static void started (id self, SEL, AVCaptureFileOutput*, NSURL*, NSArray<AVCaptureConnection*>*)\r
+                {\r
+                    JUCE_CAMERA_LOG ("Started recording");\r
+\r
+                    getOwner (self).firstRecordedFrameTimeMs.set (Time::getCurrentTime().toMilliseconds());\r
+                    getOwner (self).recordingInProgress = true;\r
+                }\r
+\r
+                static void stopped (id self, SEL, AVCaptureFileOutput*, NSURL*, NSArray<AVCaptureConnection*>*, NSError* error)\r
+                {\r
+                    String errorString;\r
+                    bool recordingPlayable = true;\r
+\r
+                    // There might have been an error in the recording, yet there may be a playable file...\r
+                    if ([error code] != noErr)\r
+                    {\r
+                        id value = [[error userInfo] objectForKey: AVErrorRecordingSuccessfullyFinishedKey];\r
+\r
+                        if (value != nil && ! [value boolValue])\r
+                            recordingPlayable = false;\r
+\r
+                        errorString = nsStringToJuce (error.localizedDescription) + ", playable: " + String ((int) recordingPlayable);\r
+                    }\r
+\r
+                    JUCE_CAMERA_LOG ("Stopped recording, error = " + errorString);\r
+\r
+                    getOwner (self).recordingInProgress = false;\r
+                }\r
+            };\r
+\r
+            AVCaptureMovieFileOutput* movieFileOutput;\r
+            std::unique_ptr<NSObject<AVCaptureFileOutputRecordingDelegate>, NSObjectDeleter> delegate;\r
+            bool recordingInProgress = false;\r
+            Atomic<int64> firstRecordedFrameTimeMs { 0 };\r
+        };\r
+\r
+        //==============================================================================\r
+        void addOutputIfPossible (AVCaptureOutput* output)\r
+        {\r
+            dispatch_async (captureSessionQueue,^\r
+                            {\r
+                                if ([captureSession.get() canAddOutput: output])\r
+                                {\r
+                                    [captureSession.get() beginConfiguration];\r
+                                    [captureSession.get() addOutput: output];\r
+                                    [captureSession.get() commitConfiguration];\r
+\r
+                                    return;\r
+                                }\r
+\r
+                                // Can't add output to camera session!\r
+                                jassertfalse;\r
+                            });\r
+        }\r
+\r
+        //==============================================================================\r
+        void cameraSessionStarted()\r
+        {\r
+            sessionStarted = true;\r
+\r
+            owner.cameraSessionStarted();\r
+        }\r
+\r
+        void cameraSessionRuntimeError (const String& error)\r
+        {\r
+            owner.cameraSessionRuntimeError (error);\r
+        }\r
+\r
+        void callListeners (const Image& image)\r
+        {\r
+            owner.callListeners (image);\r
+        }\r
+\r
+        void notifyPictureTaken (const Image& image)\r
+        {\r
+            owner.notifyPictureTaken (image);\r
+        }\r
+\r
+        Pimpl& owner;\r
+\r
+        dispatch_queue_t captureSessionQueue;\r
+        std::unique_ptr<AVCaptureSession, NSObjectDeleter> captureSession;\r
+        std::unique_ptr<NSObject, NSObjectDeleter> delegate;\r
+\r
+        StillPictureTaker stillPictureTaker;\r
+        VideoRecorder videoRecorder;\r
+\r
+        AVCaptureDevice* cameraDevice = nil;\r
+        AVCaptureVideoPreviewLayer* previewLayer = nil;\r
+\r
+        bool sessionStarted = false;\r
+\r
+        WaitableEvent sessionClosedEvent;\r
+\r
+        static int numCaptureSessions;\r
+    };\r
+\r
+    //==============================================================================\r
+    void cameraSessionStarted()\r
+    {\r
+        JUCE_CAMERA_LOG ("cameraSessionStarted()");\r
+\r
+        cameraOpenCallback (cameraId, {});\r
+    }\r
+\r
+    void cameraSessionRuntimeError (const String& error)\r
+    {\r
+        JUCE_CAMERA_LOG ("cameraSessionRuntimeError(), error = " + error);\r
+\r
+        if (! notifiedOfCameraOpening)\r
+        {\r
+            cameraOpenCallback ({}, error);\r
+        }\r
+        else\r
+        {\r
+            if (owner.onErrorOccurred != nullptr)\r
+                owner.onErrorOccurred (error);\r
+        }\r
+    }\r
+\r
+    void callListeners (const Image& image)\r
+    {\r
+        const ScopedLock sl (listenerLock);\r
+        listeners.call ([=] (Listener& l) { l.imageReceived (image); });\r
+    }\r
+\r
+    void notifyPictureTaken (const Image& image)\r
+    {\r
+        JUCE_CAMERA_LOG ("notifyPictureTaken()");\r
+\r
+        if (pictureTakenCallback != nullptr)\r
+            pictureTakenCallback (image);\r
+    }\r
+\r
+    //==============================================================================\r
+    void triggerStillPictureCapture()\r
+    {\r
+        captureSession.takeStillPicture();\r
+    }\r
+\r
+    //==============================================================================\r
+    CameraDevice& owner;\r
+    String cameraId;\r
+    InternalOpenCameraResultCallback cameraOpenCallback;\r
+\r
+    CriticalSection listenerLock;\r
+    ListenerList<Listener> listeners;\r
+\r
+    std::function<void (const Image&)> pictureTakenCallback;\r
+\r
+    CaptureSession captureSession;\r
+\r
+    bool notifiedOfCameraOpening = false;\r
+\r
+    //==============================================================================\r
+    struct IOSVersion\r
+    {\r
+        int major;\r
+        int minor;\r
+    };\r
+\r
+    static IOSVersion getIOSVersion()\r
+    {\r
+        auto processInfo = [NSProcessInfo processInfo];\r
+\r
+        if (! [processInfo respondsToSelector: @selector (operatingSystemVersion)])\r
+            return {7, 0};   // Below 8.0 in fact, but only care that it's below 8\r
+\r
+        return { (int)[processInfo operatingSystemVersion].majorVersion,\r
+                 (int)[processInfo operatingSystemVersion].minorVersion };\r
+    }\r
+\r
+    static IOSVersion iosVersion;\r
+\r
+    friend struct CameraDevice::ViewerComponent;\r
+\r
+    JUCE_DECLARE_NON_COPYABLE (Pimpl)\r
+};\r
+\r
+CameraDevice::Pimpl::IOSVersion CameraDevice::Pimpl::iosVersion = CameraDevice::Pimpl::getIOSVersion();\r
+int CameraDevice::Pimpl::CaptureSession::numCaptureSessions = 0;\r
+\r
+//==============================================================================\r
+struct CameraDevice::ViewerComponent  : public UIViewComponent\r
+{\r
+    //==============================================================================\r
+    struct JuceCameraDeviceViewerClass    : public ObjCClass<UIView>\r
+    {\r
+        JuceCameraDeviceViewerClass()  : ObjCClass<UIView> ("JuceCameraDeviceViewerClass_")\r
+        {\r
+            addMethod (@selector (layoutSubviews), layoutSubviews, "v@:");\r
+\r
+            registerClass();\r
+        }\r
+\r
+    private:\r
+        static void layoutSubviews (id self, SEL)\r
+        {\r
+            sendSuperclassMessage (self, @selector (layoutSubviews));\r
+\r
+            UIView* asUIView = (UIView*) self;\r
+\r
+            updateOrientation (self);\r
+\r
+            if (auto* previewLayer = getPreviewLayer (self))\r
+                previewLayer.frame = asUIView.bounds;\r
+        }\r
+\r
+        static AVCaptureVideoPreviewLayer* getPreviewLayer (id self)\r
+        {\r
+            UIView* asUIView = (UIView*) self;\r
+\r
+            if (asUIView.layer.sublayers != nil && [asUIView.layer.sublayers count] > 0)\r
+                if ([asUIView.layer.sublayers[0] isKindOfClass: [AVCaptureVideoPreviewLayer class]])\r
+                     return (AVCaptureVideoPreviewLayer*) asUIView.layer.sublayers[0];\r
+\r
+            return nil;\r
+        }\r
+\r
+        static void updateOrientation (id self)\r
+        {\r
+            if (auto* previewLayer = getPreviewLayer (self))\r
+            {\r
+                UIDeviceOrientation o = [UIDevice currentDevice].orientation;\r
+\r
+                if (UIDeviceOrientationIsPortrait (o) || UIDeviceOrientationIsLandscape (o))\r
+                {\r
+                    if (previewLayer.connection != nil)\r
+                        previewLayer.connection.videoOrientation = (AVCaptureVideoOrientation) o;\r
+                }\r
+            }\r
+        }\r
+    };\r
+\r
+    ViewerComponent (CameraDevice& device)\r
+    {\r
+        static JuceCameraDeviceViewerClass cls;\r
+\r
+        // Initial size that can be overriden later.\r
+        setSize (640, 480);\r
+\r
+        auto* view = [cls.createInstance() init];\r
+        setView (view);\r
+\r
+        auto* previewLayer = device.pimpl->captureSession.createPreviewLayer();\r
+        previewLayer.frame = view.bounds;\r
+\r
+        UIInterfaceOrientation statusBarOrientation = [UIApplication sharedApplication].statusBarOrientation;\r
+        AVCaptureVideoOrientation videoOrientation = statusBarOrientation != UIInterfaceOrientationUnknown\r
+                                                   ? (AVCaptureVideoOrientation) statusBarOrientation\r
+                                                   : AVCaptureVideoOrientationPortrait;\r
+\r
+        previewLayer.connection.videoOrientation = videoOrientation;\r
+\r
+        [view.layer addSublayer: previewLayer];\r
+    }\r
+};\r
+\r
+//==============================================================================\r
+String CameraDevice::getFileExtension()\r
+{\r
+    return ".mov";\r
+}\r
index fbd812c49714fbd3b3e2da8e4ebb8934e1b5fa18..e60b59b095f1c9b497ff746b9abf2ffa8c20f8e7 100644 (file)
@@ -26,8 +26,9 @@
 \r
 struct CameraDevice::Pimpl\r
 {\r
-    Pimpl (const String&, int /*index*/, int /*minWidth*/, int /*minHeight*/,\r
+    Pimpl (CameraDevice& ownerToUse, const String&, int /*index*/, int /*minWidth*/, int /*minHeight*/,\r
            int /*maxWidth*/, int /*maxHeight*/, bool useHighQuality)\r
+        : owner (ownerToUse)\r
     {\r
         JUCE_AUTORELEASEPOOL\r
         {\r
@@ -42,11 +43,20 @@ struct CameraDevice::Pimpl
             static DelegateClass cls;\r
             callbackDelegate = (id<AVCaptureFileOutputRecordingDelegate>) [cls.createInstance() init];\r
             DelegateClass::setOwner (callbackDelegate, this);\r
+\r
+            SEL runtimeErrorSel = NSSelectorFromString (nsStringLiteral ("captureSessionRuntimeError:"));\r
+\r
+            [[NSNotificationCenter defaultCenter] addObserver: callbackDelegate\r
+                                                     selector: runtimeErrorSel\r
+                                                         name: AVCaptureSessionRuntimeErrorNotification\r
+                                                       object: session];\r
         }\r
     }\r
 \r
     ~Pimpl()\r
     {\r
+        [[NSNotificationCenter defaultCenter] removeObserver: callbackDelegate];\r
+\r
         [session stopRunning];\r
         removeImageCapture();\r
         removeMovieCapture();\r
@@ -113,6 +123,19 @@ struct CameraDevice::Pimpl
             refreshConnections();\r
     }\r
 \r
+    void takeStillPicture (std::function<void (const Image&)> pictureTakenCallbackToUse)\r
+    {\r
+        if (pictureTakenCallbackToUse == nullptr)\r
+        {\r
+            jassertfalse;\r
+            return;\r
+        }\r
+\r
+        pictureTakenCallback = static_cast<std::function<void (const Image&)>&&> (pictureTakenCallbackToUse);\r
+\r
+        triggerImageCapture();\r
+    }\r
+\r
     void startRecordingToFile (const File& file, int /*quality*/)\r
     {\r
         stopRecording();\r
@@ -150,21 +173,10 @@ struct CameraDevice::Pimpl
         return nil;\r
     }\r
 \r
-    void handleImageCapture (const void* data, size_t size)\r
+    void handleImageCapture (const Image& image)\r
     {\r
-        auto image = ImageFileFormat::loadFrom (data, size);\r
-\r
         const ScopedLock sl (listenerLock);\r
-\r
-        if (! listeners.isEmpty())\r
-        {\r
-            for (int i = listeners.size(); --i >= 0;)\r
-                if (auto* l = listeners[i])\r
-                    l->imageReceived (image);\r
-\r
-            if (! listeners.isEmpty())\r
-                triggerImageCapture();\r
-        }\r
+        listeners.call ([=] (Listener& l) { l.imageReceived (image); });\r
     }\r
 \r
     void triggerImageCapture()\r
@@ -174,14 +186,27 @@ struct CameraDevice::Pimpl
         if (auto* videoConnection = getVideoConnection())\r
         {\r
             [imageOutput captureStillImageAsynchronouslyFromConnection: videoConnection\r
-                                                     completionHandler: ^(CMSampleBufferRef sampleBuffer, NSError*)\r
+                                                     completionHandler: ^(CMSampleBufferRef sampleBuffer, NSError* error)\r
             {\r
-                auto buffer = CMSampleBufferGetDataBuffer (sampleBuffer);\r
-                size_t size = CMBlockBufferGetDataLength (buffer);\r
-                jassert (CMBlockBufferIsRangeContiguous (buffer, 0, size)); // TODO: need to add code to handle this if it happens\r
-                char* data = nullptr;\r
-                CMBlockBufferGetDataPointer (buffer, 0, &size, nullptr, &data);\r
-                handleImageCapture (data, size);\r
+                if (error != nil)\r
+                {\r
+                    JUCE_CAMERA_LOG ("Still picture capture failed, error: " + nsStringToJuce (error.localizedDescription));\r
+                    jassertfalse;\r
+                    return;\r
+                }\r
+\r
+                NSData* imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation: sampleBuffer];\r
+\r
+                auto image = ImageFileFormat::loadFrom (imageData.bytes, (size_t) imageData.length);\r
+\r
+                handleImageCapture (image);\r
+\r
+                WeakReference<Pimpl> weakRef (this);\r
+                MessageManager::callAsync ([weakRef, image]() mutable\r
+                {\r
+                    if (weakRef != nullptr && weakRef->pictureTakenCallback != nullptr)\r
+                        weakRef->pictureTakenCallback (image);\r
+                });\r
             }];\r
         }\r
     }\r
@@ -189,7 +214,7 @@ struct CameraDevice::Pimpl
     void addListener (CameraDevice::Listener* listenerToAdd)\r
     {\r
         const ScopedLock sl (listenerLock);\r
-        listeners.addIfNotAlreadyThere (listenerToAdd);\r
+        listeners.add (listenerToAdd);\r
 \r
         if (listeners.size() == 1)\r
             triggerImageCapture();\r
@@ -198,7 +223,7 @@ struct CameraDevice::Pimpl
     void removeListener (CameraDevice::Listener* listenerToRemove)\r
     {\r
         const ScopedLock sl (listenerLock);\r
-        listeners.removeFirstMatchingValue (listenerToRemove);\r
+        listeners.remove (listenerToRemove);\r
     }\r
 \r
     static StringArray getAvailableDevices()\r
@@ -208,6 +233,15 @@ struct CameraDevice::Pimpl
         return results;\r
     }\r
 \r
+    void cameraSessionRuntimeError (const String& error)\r
+    {\r
+        JUCE_CAMERA_LOG ("cameraSessionRuntimeError(), error = " + error);\r
+\r
+        if (owner.onErrorOccurred != nullptr)\r
+            owner.onErrorOccurred (error);\r
+    }\r
+\r
+    CameraDevice& owner;\r
     AVCaptureView* captureView = nil;\r
     AVCaptureSession* session = nil;\r
     AVCaptureMovieFileOutput* fileOutput = nil;\r
@@ -218,8 +252,12 @@ struct CameraDevice::Pimpl
     Time firstPresentationTime;\r
     bool isRecording = false;\r
 \r
-    Array<CameraDevice::Listener*> listeners;\r
     CriticalSection listenerLock;\r
+    ListenerList<Listener> listeners;\r
+\r
+    std::function<void (const Image&)> pictureTakenCallback;\r
+\r
+    JUCE_DECLARE_WEAK_REFERENCEABLE (Pimpl)\r
 \r
 private:\r
     //==============================================================================\r
@@ -235,17 +273,29 @@ private:
             addMethod (@selector (captureOutput:didResumeRecordingToOutputFileAtURL: fromConnections:),       didResumeRecordingToOutputFileAtURL,  "v@:@@@");\r
             addMethod (@selector (captureOutput:willFinishRecordingToOutputFileAtURL:fromConnections:error:), willFinishRecordingToOutputFileAtURL, "v@:@@@@");\r
 \r
+            SEL runtimeErrorSel = NSSelectorFromString (nsStringLiteral ("captureSessionRuntimeError:"));\r
+            addMethod (runtimeErrorSel, sessionRuntimeError, "v@:@");\r
+\r
             registerClass();\r
         }\r
 \r
         static void setOwner (id self, Pimpl* owner)   { object_setInstanceVariable (self, "owner", owner); }\r
-        static Pimpl* getOwner (id self)               { return getIvar<Pimpl*> (self, "owner"); }\r
+        static Pimpl& getOwner (id self)               { return *getIvar<Pimpl*> (self, "owner"); }\r
 \r
     private:\r
         static void didStartRecordingToOutputFileAtURL (id, SEL, AVCaptureFileOutput*, NSURL*, NSArray*) {}\r
         static void didPauseRecordingToOutputFileAtURL (id, SEL, AVCaptureFileOutput*, NSURL*, NSArray*) {}\r
         static void didResumeRecordingToOutputFileAtURL (id, SEL, AVCaptureFileOutput*, NSURL*, NSArray*) {}\r
         static void willFinishRecordingToOutputFileAtURL (id, SEL, AVCaptureFileOutput*, NSURL*, NSArray*, NSError*) {}\r
+\r
+        static void sessionRuntimeError (id self, SEL, NSNotification* notification)\r
+        {\r
+            JUCE_CAMERA_LOG (nsStringToJuce ([notification description]));\r
+\r
+            NSError* error = notification.userInfo[AVCaptureSessionErrorKey];\r
+            auto errorString = error != nil ? nsStringToJuce (error.localizedDescription) : String();\r
+            getOwner (self).cameraSessionRuntimeError (errorString);\r
+        }\r
     };\r
 \r
     JUCE_DECLARE_NON_COPYABLE (Pimpl)\r
index f49fe82c783dd99a255c3bc7788cdb13178252e3..dc631b48216aa4c3e4d426dc86b9b2e373e065d2 100644 (file)
@@ -49,10 +49,11 @@ static const CLSID CLSID_NullRenderer  = { 0xC1F400A4, 0x3F08, 0x11d3, { 0x9F, 0
 \r
 struct CameraDevice::Pimpl  : public ChangeBroadcaster\r
 {\r
-    Pimpl (const String&, int index,\r
-           int minWidth, int minHeight,\r
-           int maxWidth, int maxHeight, bool /*highQuality*/)\r
-       : isRecording (false),\r
+    Pimpl (CameraDevice& ownerToUse, const String&, int index,\r
+           int minWidth, int minHeight, int maxWidth, int maxHeight,\r
+           bool /*highQuality*/)\r
+       : owner (ownerToUse),\r
+         isRecording (false),\r
          openedSuccessfully (false),\r
          imageNeedsFlipping (false),\r
          width (0), height (0),\r
@@ -191,6 +192,22 @@ struct CameraDevice::Pimpl  : public ChangeBroadcaster
 \r
     bool openedOk() const noexcept       { return openedSuccessfully; }\r
 \r
+    void takeStillPicture (std::function<void (const Image&)> pictureTakenCallbackToUse)\r
+    {\r
+        {\r
+            const ScopedLock sl (pictureTakenCallbackLock);\r
+\r
+            jassert (pictureTakenCallbackToUse != nullptr);\r
+\r
+            if (pictureTakenCallbackToUse == nullptr)\r
+                return;\r
+\r
+            pictureTakenCallback = static_cast<std::function<void (const Image&)>&&> (pictureTakenCallbackToUse);\r
+        }\r
+\r
+        addUser();\r
+    }\r
+\r
     void startRecordingToFile (const File& file, int quality)\r
     {\r
         addUser();\r
@@ -219,13 +236,13 @@ struct CameraDevice::Pimpl  : public ChangeBroadcaster
         if (listeners.size() == 0)\r
             addUser();\r
 \r
-        listeners.addIfNotAlreadyThere (listenerToAdd);\r
+        listeners.add (listenerToAdd);\r
     }\r
 \r
     void removeListener (CameraDevice::Listener* listenerToRemove)\r
     {\r
         const ScopedLock sl (listenerLock);\r
-        listeners.removeAllInstancesOf (listenerToRemove);\r
+        listeners.remove (listenerToRemove);\r
 \r
         if (listeners.size() == 0)\r
             removeUser();\r
@@ -234,10 +251,29 @@ struct CameraDevice::Pimpl  : public ChangeBroadcaster
     void callListeners (const Image& image)\r
     {\r
         const ScopedLock sl (listenerLock);\r
+        listeners.call ([=] (Listener& l) { l.imageReceived (image); });\r
+    }\r
 \r
-        for (int i = listeners.size(); --i >= 0;)\r
-            if (CameraDevice::Listener* const l = listeners[i])\r
-                l->imageReceived (image);\r
+    void notifyPictureTakenIfNeeded (const Image& image)\r
+    {\r
+        {\r
+            const ScopedLock sl (pictureTakenCallbackLock);\r
+\r
+            if (pictureTakenCallback == nullptr)\r
+                return;\r
+        }\r
+\r
+        WeakReference<Pimpl> weakRef (this);\r
+        MessageManager::callAsync ([weakRef, image]() mutable\r
+                                   {\r
+                                       if (weakRef == nullptr)\r
+                                           return;\r
+\r
+                                       if (weakRef->pictureTakenCallback != nullptr)\r
+                                           weakRef->pictureTakenCallback (image);\r
+\r
+                                       weakRef->pictureTakenCallback = nullptr;\r
+                                   });\r
     }\r
 \r
     void addUser()\r
@@ -297,6 +333,8 @@ struct CameraDevice::Pimpl  : public ChangeBroadcaster
         if (listeners.size() > 0)\r
             callListeners (loadingImage);\r
 \r
+        notifyPictureTakenIfNeeded (loadingImage);\r
+\r
         sendChangeMessage();\r
     }\r
 \r
@@ -520,9 +558,15 @@ struct CameraDevice::Pimpl  : public ChangeBroadcaster
         JUCE_DECLARE_NON_COPYABLE (GrabberCallback)\r
     };\r
 \r
+    CameraDevice& owner;\r
+\r
     ComSmartPtr<GrabberCallback> callback;\r
-    Array<CameraDevice::Listener*> listeners;\r
+\r
     CriticalSection listenerLock;\r
+    ListenerList<Listener> listeners;\r
+\r
+    CriticalSection pictureTakenCallbackLock;\r
+    std::function<void (const Image&)> pictureTakenCallback;\r
 \r
     bool isRecording, openedSuccessfully;\r
     int width, height;\r
@@ -547,6 +591,8 @@ struct CameraDevice::Pimpl  : public ChangeBroadcaster
     bool recordNextFrameTime;\r
     int previewMaxFPS;\r
 \r
+    JUCE_DECLARE_WEAK_REFERENCEABLE (Pimpl)\r
+\r
 private:\r
     void getVideoSizes (IAMStreamConfig* const streamConfig)\r
     {\r
@@ -725,7 +771,7 @@ struct CameraDevice::ViewerComponent  : public Component,
                                         public ChangeListener\r
 {\r
     ViewerComponent (CameraDevice& d)\r
-       : owner (d.pimpl), maxFPS (15), lastRepaintTime (0)\r
+       : owner (d.pimpl.get()), maxFPS (15), lastRepaintTime (0)\r
     {\r
         setOpaque (true);\r
         owner->addChangeListener (this);\r
index 7432710cf1a28184aa6d381fdcbceabfe604bcfc..dd25a2ea5fbaa9fa159a859ba028019ab3091788 100644 (file)
@@ -163,8 +163,8 @@ struct VideoComponent::Pimpl  : public Component
     Pimpl()  : videoLoaded (false)\r
     {\r
         setOpaque (true);\r
-        context = new DirectShowContext (*this);\r
-        componentWatcher = new ComponentWatcher (*this);\r
+        context.reset (new DirectShowContext (*this));\r
+        componentWatcher.reset (new ComponentWatcher (*this));\r
     }\r
 \r
     ~Pimpl()\r
@@ -343,7 +343,7 @@ private:
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComponentWatcher)\r
     };\r
 \r
-    ScopedPointer<ComponentWatcher> componentWatcher;\r
+    std::unique_ptr<ComponentWatcher> componentWatcher;\r
 \r
     //======================================================================\r
     struct DirectShowContext    : public AsyncUpdater\r
@@ -462,7 +462,7 @@ private:
             {\r
                 if (SystemStats::getOperatingSystemType() >= SystemStats::WinVista)\r
                 {\r
-                    videoRenderer = new VideoRenderers::EVR();\r
+                    videoRenderer.reset (new VideoRenderers::EVR());\r
                     hr = videoRenderer->create (graphBuilder, baseFilter, hwnd);\r
 \r
                     if (FAILED (hr))\r
@@ -471,7 +471,7 @@ private:
 \r
                 if (videoRenderer == nullptr)\r
                 {\r
-                    videoRenderer = new VideoRenderers::VMR7();\r
+                    videoRenderer.reset (new VideoRenderers::VMR7());\r
                     hr = videoRenderer->create (graphBuilder, baseFilter, hwnd);\r
                 }\r
             }\r
@@ -689,7 +689,7 @@ private:
         ComSmartPtr<IBasicAudio> basicAudio;\r
         ComSmartPtr<IBaseFilter> baseFilter;\r
 \r
-        ScopedPointer<VideoRenderers::Base> videoRenderer;\r
+        std::unique_ptr<VideoRenderers::Base> videoRenderer;\r
 \r
         bool hasVideo = false, needToUpdateViewport = true, needToRecreateNativeWindow = false;\r
 \r
@@ -700,7 +700,7 @@ private:
 \r
             if (auto* topLevelPeer = component.getTopLevelComponent()->getPeer())\r
             {\r
-                nativeWindow = new NativeWindow ((HWND) topLevelPeer->getNativeHandle(), this);\r
+                nativeWindow.reset (new NativeWindow ((HWND) topLevelPeer->getNativeHandle(), this));\r
 \r
                 hwnd = nativeWindow->hwnd;\r
 \r
@@ -879,12 +879,12 @@ private:
             JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NativeWindow)\r
         };\r
 \r
-        ScopedPointer<NativeWindow> nativeWindow;\r
+        std::unique_ptr<NativeWindow> nativeWindow;\r
 \r
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DirectShowContext)\r
     };\r
 \r
-    ScopedPointer<DirectShowContext> context;\r
+    std::unique_ptr<DirectShowContext> context;\r
 \r
     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl)\r
 };\r
index 0f4403c87c94ea9b49484e2d787ef77a8261b0f0..b960cdfbac5dfadc4755868b5576b19cfa7d74d9 100644 (file)
@@ -54,12 +54,12 @@ public:
 \r
     //==============================================================================\r
     /** Tries to load a video from a local file.\r
-        @returns am error if the file failed to be loaded correctly\r
+        @returns an error if the file failed to be loaded correctly\r
     */\r
     Result load (const File& file);\r
 \r
     /** Tries to load a video from a URL.\r
-        @returns am error if the file failed to be loaded correctly\r
+        @returns an error if the file failed to be loaded correctly\r
     */\r
     Result load (const URL& url);\r
 \r
@@ -75,7 +75,7 @@ public:
     File getCurrentVideoFile() const;\r
 \r
     /** Returns the last URL that was loaded.\r
-        If nothing is open, or if it was a file rather than a URL, this will return File().\r
+        If nothing is open, or if it was a file rather than a URL, this will return URL().\r
     */\r
     URL getCurrentVideoURL() const;\r
 \r
@@ -124,7 +124,7 @@ private:
     struct Pimpl;\r
     friend struct Pimpl;\r
     friend struct ContainerDeletePolicy<Pimpl>;\r
-    ScopedPointer<Pimpl> pimpl;\r
+    std::unique_ptr<Pimpl> pimpl;\r
 \r
     void resized() override;\r
     void timerCallback() override;\r