From 998d67a66bfaa87a0a5ba1025cf45de6b1f37f2e Mon Sep 17 00:00:00 2001 From: =?utf8?q?IOhannes=20m=20zm=C3=B6lnig=20=28Debian/GNU=29?= Date: Mon, 14 May 2018 09:42:14 +0200 Subject: [PATCH] New upstream version 5.3.2~repack --- BREAKING-CHANGES.txt | 87 +- ChangeList.txt | 19 +- examples/Assets/DSPDemos_Common.h | 14 +- examples/Assets/DemoUtilities.h | 11 +- examples/Assets/WavefrontObjParser.h | 2 +- examples/Audio/AudioLatencyDemo.h | 4 +- examples/Audio/AudioPlaybackDemo.h | 10 +- examples/Audio/AudioRecordingDemo.h | 16 +- examples/Audio/AudioSettingsDemo.h | 2 +- examples/Audio/AudioSynthesiserDemo.h | 2 +- examples/Audio/MidiDemo.h | 10 +- examples/BLOCKS/BlocksDrawingDemo.h | 2 +- examples/BLOCKS/BlocksMonitorDemo.h | 2 +- examples/BLOCKS/BlocksSynthDemo.h | 2 +- examples/DSP/ConvolutionDemo.h | 2 +- examples/DSP/SIMDRegisterDemo.h | 2 +- .../Builds/Android/app/CMakeLists.txt | 8 +- .../Builds/Android/app/build.gradle | 2 +- .../Android/app/src/main/AndroidManifest.xml | 9 +- .../app/src/main/assets/DSPDemos_Common.h | 14 +- .../app/src/main/assets/DemoUtilities.h | 11 +- .../app/src/main/assets/WavefrontObjParser.h | 2 +- .../java/com/juce/demorunner/DemoRunner.java | 2992 +++++++++++++ .../demorunner/SharingContentProvider.java | 138 + .../com/roli/juce/demorunner/DemoRunner.java | 228 +- .../DemoRunner/Builds/LinuxMakefile/Makefile | 4 +- .../DemoRunner.xcodeproj/project.pbxproj | 570 +-- .../DemoRunner/Builds/MacOSX/Info-App.plist | 6 +- .../Builds/VisualStudio2013/DemoRunner.sln | 10 +- .../VisualStudio2013/DemoRunner_App.vcxproj | 11 +- .../DemoRunner_App.vcxproj.filters | 9 + .../Builds/VisualStudio2013/resources.rc | 6 +- .../Builds/VisualStudio2015/DemoRunner.sln | 10 +- .../VisualStudio2015/DemoRunner_App.vcxproj | 11 +- .../DemoRunner_App.vcxproj.filters | 9 + .../Builds/VisualStudio2015/resources.rc | 6 +- .../Builds/VisualStudio2017/DemoRunner.sln | 10 +- .../VisualStudio2017/DemoRunner_App.vcxproj | 11 +- .../DemoRunner_App.vcxproj.filters | 9 + .../Builds/VisualStudio2017/resources.rc | 6 +- .../iOS/DemoRunner.xcodeproj/project.pbxproj | 584 +-- examples/DemoRunner/Builds/iOS/Info-App.plist | 9 +- examples/DemoRunner/DemoRunner.jucer | 24 +- .../DemoRunner/JuceLibraryCode/AppConfig.h | 6 +- .../DemoRunner/JuceLibraryCode/JuceHeader.h | 4 +- .../DemoRunner/Source/Demos/DemoPIPs1.cpp | 10 +- .../DemoRunner/Source/Demos/DemoPIPs2.cpp | 14 +- .../DemoRunner/Source/Demos/JUCEDemos.cpp | 11 +- examples/DemoRunner/Source/Demos/JUCEDemos.h | 3 +- examples/DemoRunner/Source/Main.cpp | 11 +- .../Source/UI/DemoContentComponent.cpp | 10 +- .../Source/UI/DemoContentComponent.h | 4 +- .../DemoRunner/Source/UI/MainComponent.cpp | 6 +- examples/DemoRunner/Source/UI/MainComponent.h | 2 +- .../DemoRunner/Source/UI/SettingsContent.h | 7 +- examples/GUI/CameraDemo.h | 252 +- examples/GUI/CodeEditorDemo.h | 2 +- examples/GUI/ComponentTransformsDemo.h | 4 +- examples/GUI/DialogsDemo.h | 10 +- examples/GUI/FontsDemo.h | 2 +- examples/GUI/GraphicsDemo.h | 4 +- examples/GUI/MDIDemo.h | 12 +- examples/GUI/MenusDemo.h | 2 +- examples/GUI/OpenGLAppDemo.h | 14 +- examples/GUI/OpenGLDemo.h | 18 +- examples/GUI/OpenGLDemo2D.h | 2 +- examples/GUI/WebBrowserDemo.h | 2 +- examples/GUI/WidgetsDemo.h | 92 +- examples/Plugins/AUv3SynthPluginDemo.h | 6 +- examples/Plugins/AudioPluginDemo.h | 4 +- examples/Plugins/DSPModulePluginDemo.h | 7 +- .../Plugins/InterAppAudioEffectPluginDemo.h | 4 +- examples/Plugins/MultiOutSynthPluginDemo.h | 2 +- examples/Plugins/SamplerPluginDemo.h | 5 +- examples/Utilities/AnalyticsCollectionDemo.h | 8 +- examples/Utilities/Box2DDemo.h | 4 +- examples/Utilities/ChildProcessDemo.h | 11 +- examples/Utilities/InAppPurchasesDemo.h | 9 +- examples/Utilities/JavaScriptDemo.h | 2 +- examples/Utilities/NetworkingDemo.h | 2 +- examples/Utilities/UnitTestsDemo.h | 2 +- examples/Utilities/ValueTreesDemo.h | 4 +- examples/Utilities/XMLandJSONDemo.h | 6 +- .../AudioPerformanceTest.jucer | 27 +- .../Builds/Android/app/CMakeLists.txt | 2 + .../AudioPerformanceTest.java | 224 +- .../project.pbxproj | 4 +- .../VisualStudio2017/AudioPerformanceTest.sln | 20 + .../AudioPerformanceTest_App.vcxproj | 2348 ++++++++++ .../AudioPerformanceTest_App.vcxproj.filters | 3848 +++++++++++++++++ .../Builds/VisualStudio2017/resources.rc | 31 + .../project.pbxproj | 4 +- .../JuceLibraryCode/AppConfig.h | 4 + extras/AudioPerformanceTest/Source/Main.cpp | 4 +- extras/AudioPluginHost/AudioPluginHost.jucer | 6 +- .../Builds/Android/app/CMakeLists.txt | 4 + .../roli/juce/pluginhost/AudioPluginHost.java | 224 +- .../AudioPluginHost.xcodeproj/project.pbxproj | 4 +- .../AudioPluginHost_App.vcxproj | 4 + .../AudioPluginHost_App.vcxproj.filters | 6 + .../AudioPluginHost_App.vcxproj | 4 + .../AudioPluginHost_App.vcxproj.filters | 6 + .../AudioPluginHost_App.vcxproj | 4 + .../AudioPluginHost_App.vcxproj.filters | 6 + .../AudioPluginHost.xcodeproj/project.pbxproj | 4 +- .../JuceLibraryCode/AppConfig.h | 4 + .../JuceLibraryCode/BinaryData.cpp | 4 +- .../JuceLibraryCode/BinaryData.h | 4 +- .../Source/Filters/FilterGraph.cpp | 4 +- .../Source/Filters/FilterIOConfiguration.cpp | 10 +- .../Source/Filters/FilterIOConfiguration.h | 4 +- extras/AudioPluginHost/Source/HostStartup.cpp | 10 +- .../Source/UI/GraphEditorPanel.cpp | 44 +- .../Source/UI/GraphEditorPanel.h | 16 +- .../Source/UI/MainHostWindow.cpp | 24 +- .../Source/UI/MainHostWindow.h | 4 +- extras/BinaryBuilder/BinaryBuilder.jucer | 3 + .../BinaryBuilder.xcodeproj/project.pbxproj | 4 +- .../BinaryBuilder_ConsoleApp.vcxproj | 3 + .../BinaryBuilder_ConsoleApp.vcxproj.filters | 3 + extras/BinaryBuilder/Source/Main.cpp | 6 +- .../Builds/Android/app/CMakeLists.txt | 2 + .../JUCENetworkGraphicsDemo.java | 55 +- .../project.pbxproj | 4 +- .../NetworkGraphicsDemo_App.vcxproj | 3 + .../NetworkGraphicsDemo_App.vcxproj.filters | 3 + .../NetworkGraphicsDemo_App.vcxproj | 3 + .../NetworkGraphicsDemo_App.vcxproj.filters | 3 + .../project.pbxproj | 4 +- .../JuceLibraryCode/AppConfig.h | 4 + .../JuceLibraryCode/BinaryData.cpp | 4 +- .../JuceLibraryCode/BinaryData.h | 4 +- .../NetworkGraphicsDemo.jucer | 3 + extras/NetworkGraphicsDemo/Source/Demos.h | 24 +- .../Source/MasterComponent.h | 6 +- extras/Projucer/Builds/LinuxMakefile/Makefile | 4 +- extras/Projucer/Builds/MacOSX/Info-App.plist | 4 +- .../MacOSX/Projucer.xcodeproj/project.pbxproj | 10 +- .../VisualStudio2013/Projucer_App.vcxproj | 7 +- .../Projucer_App.vcxproj.filters | 3 + .../Builds/VisualStudio2013/resources.rc | 6 +- .../VisualStudio2015/Projucer_App.vcxproj | 7 +- .../Projucer_App.vcxproj.filters | 3 + .../Builds/VisualStudio2015/resources.rc | 6 +- .../VisualStudio2017/Projucer_App.vcxproj | 7 +- .../Projucer_App.vcxproj.filters | 3 + .../Builds/VisualStudio2017/resources.rc | 6 +- .../Projucer/JuceLibraryCode/BinaryData.cpp | 21 +- extras/Projucer/JuceLibraryCode/BinaryData.h | 10 +- extras/Projucer/JuceLibraryCode/JuceHeader.h | 4 +- extras/Projucer/Projucer.jucer | 2 +- .../Windows/jucer_AboutWindowComponent.h | 8 +- ...ucer_ApplicationUsageDataWindowComponent.h | 5 +- .../jucer_EditorColourSchemeWindowComponent.h | 2 +- .../Windows/jucer_FloatingToolWindow.h | 4 +- .../Windows/jucer_PIPCreatorWindowComponent.h | 5 +- .../jucer_SVGPathDataWindowComponent.h | 8 +- .../Source/Application/jucer_Application.cpp | 188 +- .../Source/Application/jucer_Application.h | 22 +- .../Source/Application/jucer_AutoUpdater.cpp | 69 +- .../Source/Application/jucer_CommandLine.cpp | 14 +- .../Source/Application/jucer_MainWindow.cpp | 8 +- .../Source/Application/jucer_MainWindow.h | 2 +- .../jucer_MainTemplate_SimpleWindow.cpp | 4 +- .../Templates/jucer_MainTemplate_Window.cpp | 4 +- .../BinaryData/Templates/jucer_PIPMain.cpp | 3 +- .../CodeEditor/jucer_ItemPreviewComponent.h | 6 +- .../CodeEditor/jucer_LiveBuildCodeEditor.h | 4 +- .../CodeEditor/jucer_SourceCodeEditor.h | 8 +- .../Components/jucer_ButtonHandler.h | 4 +- .../Components/jucer_ComboBoxHandler.h | 4 +- .../Components/jucer_ComponentTypeHandler.cpp | 11 +- .../Components/jucer_SliderHandler.h | 4 +- .../Components/jucer_TabbedComponentHandler.h | 12 +- .../Components/jucer_ViewportHandler.h | 2 +- .../Documents/jucer_ButtonDocument.cpp | 2 +- .../Documents/jucer_ButtonDocument.h | 2 +- .../Documents/jucer_ComponentDocument.cpp | 2 +- .../Documents/jucer_ComponentDocument.h | 4 +- .../PaintElements/jucer_ColouredElement.cpp | 2 +- .../PaintElements/jucer_PaintElement.cpp | 5 +- .../PaintElements/jucer_PaintElement.h | 2 +- .../PaintElements/jucer_PaintElementGroup.cpp | 6 +- .../PaintElements/jucer_PaintElementImage.cpp | 9 +- .../PaintElements/jucer_PaintElementPath.cpp | 4 +- .../jucer_ColourPropertyComponent.h | 4 +- .../Properties/jucer_PositionPropertyBase.h | 5 +- .../UI/jucer_ComponentLayoutEditor.cpp | 6 +- .../UI/jucer_ComponentOverlayComponent.cpp | 5 +- .../UI/jucer_ComponentOverlayComponent.h | 2 +- .../UI/jucer_EditingPanelBase.cpp | 4 +- .../UI/jucer_JucerCommandIDs.h | 4 + .../UI/jucer_JucerDocumentEditor.cpp | 17 +- .../UI/jucer_JucerDocumentEditor.h | 2 +- .../UI/jucer_PaintRoutineEditor.cpp | 2 +- .../UI/jucer_PaintRoutinePanel.cpp | 2 +- .../UI/jucer_ResourceEditorPanel.cpp | 3 +- .../UI/jucer_ResourceEditorPanel.h | 2 +- .../UI/jucer_TestComponent.cpp | 2 +- .../ComponentEditor/UI/jucer_TestComponent.h | 2 +- .../ComponentEditor/jucer_BinaryResources.h | 2 +- .../ComponentEditor/jucer_ComponentLayout.cpp | 37 +- .../ComponentEditor/jucer_JucerDocument.cpp | 36 +- .../ComponentEditor/jucer_JucerDocument.h | 4 +- .../ComponentEditor/jucer_ObjectTypes.cpp | 18 +- .../ComponentEditor/jucer_PaintRoutine.cpp | 16 +- .../Licenses/jucer_LicenseController.cpp | 10 +- .../Source/Licenses/jucer_LicenseController.h | 2 +- .../Source/Licenses/jucer_LicenseThread.h | 21 +- .../Source/Licenses/jucer_LicenseWebview.h | 7 +- .../jucer_CompileEngineClient.cpp | 14 +- .../jucer_CompileEngineClient.h | 4 +- .../jucer_CompileEngineServer.cpp | 6 +- .../jucer_CompileEngineSettings.h | 6 +- .../LiveBuildEngine/jucer_DiagnosticMessage.h | 2 +- .../jucer_DownloadCompileEngineThread.cpp | 6 +- .../UI/Sidebar/jucer_ExporterTreeItems.h | 2 +- .../Project/UI/Sidebar/jucer_FileTreeItems.h | 2 +- .../Project/UI/Sidebar/jucer_LiveBuildTab.h | 19 +- .../UI/Sidebar/jucer_ProjectTreeItemBase.h | 2 +- .../Project/UI/Sidebar/jucer_TabComponents.h | 17 +- .../UI/jucer_FileGroupInformationComponent.h | 2 +- .../Project/UI/jucer_HeaderComponent.cpp | 15 +- .../Source/Project/UI/jucer_HeaderComponent.h | 4 +- .../UI/jucer_ProjectContentComponent.cpp | 32 +- .../UI/jucer_ProjectContentComponent.h | 6 +- .../Projucer/Source/Project/jucer_Module.cpp | 2 +- .../Projucer/Source/Project/jucer_Project.cpp | 39 +- .../Projucer/Source/Project/jucer_Project.h | 10 +- .../jucer_ProjectExport_Android.h | 157 +- .../ProjectSaving/jucer_ProjectExport_CLion.h | 7 +- .../ProjectSaving/jucer_ProjectExport_MSVC.h | 66 +- .../ProjectSaving/jucer_ProjectExport_Xcode.h | 108 +- .../ProjectSaving/jucer_ProjectExporter.cpp | 24 +- .../ProjectSaving/jucer_ProjectExporter.h | 4 +- .../ProjectSaving/jucer_ProjectSaver.cpp | 3 - .../Source/ProjectSaving/jucer_ProjectSaver.h | 19 +- .../ProjectSaving/jucer_ResourceFile.cpp | 8 +- .../Settings/jucer_AppearanceSettings.cpp | 7 +- .../Source/Settings/jucer_StoredSettings.cpp | 10 +- .../Source/Settings/jucer_StoredSettings.h | 4 +- .../Utility/Helpers/jucer_FileHelpers.cpp | 2 +- .../Utility/Helpers/jucer_MiscUtilities.cpp | 4 + .../Source/Utility/Helpers/jucer_PresetIDs.h | 4 +- .../Utility/PIPs/jucer_PIPGenerator.cpp | 60 +- .../Source/Utility/PIPs/jucer_PIPGenerator.h | 3 + .../Source/Utility/UI/jucer_Icons.cpp | 2 +- .../Utility/UI/jucer_JucerTreeViewBase.cpp | 8 +- .../Utility/UI/jucer_JucerTreeViewBase.h | 4 +- .../Utility/UI/jucer_ProjucerLookAndFeel.cpp | 3 +- .../UI/jucer_SlidingPanelComponent.cpp | 3 +- .../Utility/UI/jucer_SlidingPanelComponent.h | 2 +- .../Utility/UI/jucer_UserSettingsPopup.h | 18 +- .../Source/Wizards/jucer_NewProjectWizard.h | 2 +- .../Wizards/jucer_NewProjectWizardClasses.cpp | 20 +- .../Wizards/jucer_NewProjectWizardComponent.h | 17 +- .../Wizards/jucer_ProjectWizard_AudioPlugin.h | 1 - .../jucer_TemplateThumbnailsComponent.h | 10 +- .../UnitTestRunner.xcodeproj/project.pbxproj | 4 +- .../UnitTestRunner_ConsoleApp.vcxproj | 5 + .../UnitTestRunner_ConsoleApp.vcxproj.filters | 9 + .../JuceLibraryCode/AppConfig.h | 4 + .../WindowsDLL_StaticLibrary.vcxproj | 4 + .../WindowsDLL_StaticLibrary.vcxproj.filters | 6 + extras/WindowsDLL/JuceLibraryCode/AppConfig.h | 4 + extras/WindowsDLL/WindowsDLL.jucer | 3 + .../juce_ThreadedAnalyticsDestination.cpp | 24 +- modules/juce_analytics/juce_analytics.h | 2 +- .../buffers/juce_AudioDataConverters.cpp | 4 +- .../buffers/juce_AudioDataConverters.h | 4 +- .../buffers/juce_AudioSampleBuffer.h | 6 +- .../buffers/juce_FloatVectorOperations.cpp | 36 +- modules/juce_audio_basics/juce_audio_basics.h | 2 +- .../mpe/juce_MPEInstrument.cpp | 5 +- .../mpe/juce_MPESynthesiserBase.h | 4 +- modules/juce_audio_basics/mpe/juce_MPEUtils.h | 2 +- .../sources/juce_BufferingAudioSource.cpp | 67 +- .../sources/juce_BufferingAudioSource.h | 6 +- .../sources/juce_MixerAudioSource.cpp | 2 +- .../sources/juce_ReverbAudioSource.h | 2 +- .../synthesisers/juce_Synthesiser.h | 2 +- .../audio_io/juce_AudioDeviceManager.cpp | 6 +- .../audio_io/juce_AudioDeviceManager.h | 15 +- .../juce_audio_devices/juce_audio_devices.h | 2 +- .../midi_io/juce_MidiOutput.cpp | 28 +- .../midi_io/juce_MidiOutput.h | 2 +- .../native/juce_android_Audio.cpp | 6 +- .../native/juce_android_Midi.cpp | 24 +- .../native/juce_android_Oboe.cpp | 16 +- .../native/juce_android_OpenSL.cpp | 60 +- .../native/juce_ios_Audio.cpp | 40 +- .../native/juce_ios_Audio.h | 2 +- .../native/juce_linux_ALSA.cpp | 144 +- .../native/juce_linux_Midi.cpp | 135 +- .../native/juce_mac_CoreAudio.cpp | 8 +- .../native/juce_mac_CoreMidi.cpp | 95 +- .../native/juce_win32_ASIO.cpp | 283 +- .../native/juce_win32_DirectSound.cpp | 8 +- .../native/juce_win32_Midi.cpp | 858 ++-- .../native/juce_win32_WASAPI.cpp | 220 +- .../sources/juce_AudioTransportSource.cpp | 4 +- .../sources/juce_AudioTransportSource.h | 6 +- .../codecs/juce_AiffAudioFormat.cpp | 2 +- .../codecs/juce_CoreAudioFormat.cpp | 2 +- .../codecs/juce_FlacAudioFormat.cpp | 4 +- .../codecs/juce_LAMEEncoderAudioFormat.cpp | 6 +- .../codecs/juce_MP3AudioFormat.cpp | 2 +- .../codecs/juce_OggVorbisAudioFormat.cpp | 10 +- .../codecs/juce_WavAudioFormat.cpp | 32 +- .../codecs/juce_WindowsMediaAudioFormat.cpp | 2 +- .../format/juce_AudioFormatManager.cpp | 2 +- .../format/juce_AudioFormatReader.h | 4 +- .../format/juce_AudioFormatReaderSource.h | 4 +- .../format/juce_AudioFormatWriter.cpp | 22 +- .../format/juce_AudioFormatWriter.h | 6 +- .../format/juce_BufferingAudioFormatReader.h | 2 +- .../juce_MemoryMappedAudioFormatReader.h | 4 +- .../juce_audio_formats/juce_audio_formats.h | 2 +- .../juce_audio_formats/sampler/juce_Sampler.h | 2 +- .../AAX/juce_AAX_Wrapper.cpp | 41 +- .../Standalone/juce_StandaloneFilterApp.cpp | 6 +- .../Standalone/juce_StandaloneFilterWindow.h | 42 +- .../VST/juce_VSTCallbackHandler.h | 12 + .../VST/juce_VST_Wrapper.cpp | 9 +- .../VST3/juce_VST3_Wrapper.cpp | 58 +- .../juce_audio_plugin_client.h | 4 +- .../utility/juce_FakeMouseMoveGenerator.h | 47 +- .../format/juce_AudioPluginFormat.cpp | 6 +- .../format/juce_AudioPluginFormatManager.cpp | 2 +- .../juce_AudioUnitPluginFormat.mm | 21 +- .../format_types/juce_LADSPAPluginFormat.cpp | 461 +- .../juce_LegacyAudioParameter.cpp | 37 +- .../format_types/juce_VST3Common.h | 4 +- .../format_types/juce_VST3PluginFormat.cpp | 88 +- .../format_types/juce_VSTPluginFormat.cpp | 54 +- .../juce_audio_processors.cpp | 4 +- .../juce_audio_processors.h | 23 +- .../processors/juce_AudioPluginInstance.cpp | 11 +- .../processors/juce_AudioProcessor.cpp | 11 +- .../processors/juce_AudioProcessor.h | 12 - .../processors/juce_AudioProcessorEditor.h | 4 +- .../processors/juce_AudioProcessorGraph.cpp | 24 +- .../processors/juce_AudioProcessorGraph.h | 10 +- .../processors/juce_AudioProcessorParameter.h | 1 + .../juce_GenericAudioProcessorEditor.cpp | 63 +- .../juce_GenericAudioProcessorEditor.h | 2 +- .../scanning/juce_KnownPluginList.cpp | 4 +- .../scanning/juce_KnownPluginList.h | 2 +- .../scanning/juce_PluginListComponent.cpp | 4 +- .../scanning/juce_PluginListComponent.h | 4 +- .../juce_AudioProcessorValueTreeState.cpp | 48 +- .../juce_AudioProcessorValueTreeState.h | 6 +- .../audio_cd/juce_AudioCDBurner.h | 2 +- .../audio_cd/juce_AudioCDReader.h | 2 +- .../gui/juce_AudioDeviceSelectorComponent.cpp | 16 +- .../gui/juce_AudioDeviceSelectorComponent.h | 14 +- .../gui/juce_AudioThumbnail.cpp | 4 +- .../gui/juce_AudioThumbnail.h | 4 +- .../gui/juce_MidiKeyboardComponent.cpp | 17 +- .../gui/juce_MidiKeyboardComponent.h | 9 +- modules/juce_audio_utils/juce_audio_utils.h | 2 +- ...oid_BluetoothMidiDevicePairingDialogue.cpp | 4 +- ..._ios_BluetoothMidiDevicePairingDialogue.mm | 6 +- ...nux_BluetoothMidiDevicePairingDialogue.cpp | 2 +- .../native/juce_mac_AudioCDBurner.mm | 8 +- .../native/juce_mac_AudioCDReader.mm | 4 +- ..._mac_BluetoothMidiDevicePairingDialogue.mm | 2 +- .../native/juce_win32_AudioCDBurner.cpp | 6 +- .../native/juce_win32_AudioCDReader.cpp | 6 +- ...win_BluetoothMidiDevicePairingDialogue.cpp | 2 +- .../players/juce_SoundPlayer.cpp | 2 +- .../blocks/juce_BlockConfigManager.h | 2 +- .../juce_blocks_basics/juce_blocks_basics.cpp | 4 +- .../juce_blocks_basics/juce_blocks_basics.h | 6 +- .../topology/juce_PhysicalTopologySource.cpp | 5 +- .../topology/juce_PhysicalTopologySource.h | 2 +- .../topology/juce_RuleBasedTopologySource.cpp | 2 +- .../topology/juce_RuleBasedTopologySource.h | 2 +- .../box2d/Collision/Shapes/b2ChainShape.cpp | 3 +- .../box2d/Collision/Shapes/b2CircleShape.cpp | 2 +- .../box2d/Collision/Shapes/b2EdgeShape.cpp | 2 +- .../box2d/Collision/Shapes/b2PolygonShape.cpp | 1 - .../box2d/Collision/b2BroadPhase.cpp | 2 +- .../juce_box2d/box2d/Collision/b2Collision.h | 1 - .../box2d/Common/b2BlockAllocator.cpp | 5 +- modules/juce_box2d/box2d/Common/b2Math.h | 5 - .../juce_box2d/box2d/Common/b2Settings.cpp | 3 - modules/juce_box2d/box2d/Common/b2Settings.h | 5 +- modules/juce_box2d/box2d/Common/b2Timer.cpp | 70 +- modules/juce_box2d/box2d/Common/b2Timer.h | 9 +- modules/juce_box2d/box2d/Dynamics/b2Body.h | 1 - modules/juce_box2d/juce_box2d.cpp | 13 +- modules/juce_box2d/juce_box2d.h | 5 +- modules/juce_core/containers/juce_Array.h | 8 +- .../juce_core/containers/juce_DynamicObject.h | 2 +- .../containers/juce_ElementComparator.h | 2 +- modules/juce_core/containers/juce_HashMap.h | 14 +- .../juce_core/containers/juce_ListenerList.h | 20 +- .../juce_core/containers/juce_OwnedArray.h | 16 +- .../containers/juce_ReferenceCountedArray.h | 4 +- modules/juce_core/containers/juce_SortedSet.h | 2 +- .../juce_core/containers/juce_SparseSet.cpp | 204 + modules/juce_core/containers/juce_SparseSet.h | 28 +- modules/juce_core/containers/juce_Variant.cpp | 4 +- modules/juce_core/containers/juce_Variant.h | 18 +- .../juce_core/files/juce_DirectoryIterator.h | 4 +- modules/juce_core/files/juce_File.cpp | 21 +- modules/juce_core/files/juce_File.h | 30 +- modules/juce_core/files/juce_TemporaryFile.h | 2 +- .../juce_core/javascript/juce_Javascript.cpp | 49 +- modules/juce_core/juce_core.cpp | 1 + modules/juce_core/juce_core.h | 4 +- modules/juce_core/maths/juce_Expression.cpp | 8 +- modules/juce_core/maths/juce_MathsFunctions.h | 76 +- .../juce_core/maths/juce_NormalisableRange.h | 5 +- modules/juce_core/memory/juce_Atomic.h | 507 +-- .../memory/juce_LeakedObjectDetector.h | 4 +- modules/juce_core/memory/juce_Memory.h | 2 +- .../memory/juce_ReferenceCountedObject.h | 38 +- modules/juce_core/memory/juce_ScopedPointer.h | 18 +- .../memory/juce_SharedResourcePointer.h | 6 +- modules/juce_core/memory/juce_WeakReference.h | 2 +- .../juce_core/misc/juce_RuntimePermissions.h | 5 +- .../juce_core/misc/juce_StdFunctionCompat.cpp | 14 +- modules/juce_core/misc/juce_Uuid.cpp | 20 + modules/juce_core/misc/juce_Uuid.h | 3 + .../juce_core/native/java/AndroidCamera.java | 169 + .../native/java/JuceAppActivity.java | 57 +- .../native/juce_android_JNIHelpers.h | 188 +- modules/juce_core/native/juce_mac_Network.mm | 4 +- .../juce_core/native/juce_osx_ObjCHelpers.h | 9 + .../juce_core/native/juce_posix_NamedPipe.cpp | 42 +- .../juce_core/native/juce_posix_SharedCode.h | 130 +- .../juce_core/native/juce_win32_Threads.cpp | 2 +- modules/juce_core/network/juce_NamedPipe.h | 2 +- modules/juce_core/network/juce_Socket.cpp | 64 +- modules/juce_core/network/juce_Socket.h | 16 +- modules/juce_core/network/juce_URL.cpp | 47 +- modules/juce_core/network/juce_URL.h | 2 +- .../juce_core/streams/juce_OutputStream.cpp | 94 +- modules/juce_core/streams/juce_OutputStream.h | 7 +- .../juce_core/system/juce_CompilerSupport.h | 40 +- modules/juce_core/system/juce_PlatformDefs.h | 22 + .../juce_core/system/juce_StandardHeader.h | 13 +- .../juce_core/text/juce_CharPointer_ASCII.h | 2 +- .../juce_core/text/juce_CharPointer_UTF16.h | 4 +- .../juce_core/text/juce_CharPointer_UTF32.h | 2 +- .../juce_core/text/juce_CharPointer_UTF8.h | 6 +- .../juce_core/text/juce_CharacterFunctions.h | 20 +- .../juce_core/text/juce_LocalisedStrings.cpp | 4 +- .../juce_core/text/juce_LocalisedStrings.h | 2 +- modules/juce_core/text/juce_String.cpp | 97 +- modules/juce_core/text/juce_String.h | 12 +- modules/juce_core/text/juce_StringArray.cpp | 2 - modules/juce_core/text/juce_StringArray.h | 3 +- modules/juce_core/text/juce_StringRef.h | 7 + modules/juce_core/threads/juce_ChildProcess.h | 2 +- .../threads/juce_HighResolutionTimer.h | 2 +- .../juce_core/threads/juce_InterProcessLock.h | 2 +- modules/juce_core/threads/juce_Thread.cpp | 2 +- modules/juce_core/threads/juce_Thread.h | 2 +- modules/juce_core/threads/juce_ThreadPool.cpp | 7 +- modules/juce_core/threads/juce_ThreadPool.h | 7 +- modules/juce_core/xml/juce_XmlDocument.cpp | 6 +- modules/juce_core/xml/juce_XmlDocument.h | 6 +- .../zip/juce_GZIPCompressorOutputStream.h | 2 +- .../zip/juce_GZIPDecompressorInputStream.h | 2 +- modules/juce_core/zip/juce_ZipFile.cpp | 10 +- modules/juce_core/zip/juce_ZipFile.h | 4 +- modules/juce_cryptography/juce_cryptography.h | 2 +- .../juce_ApplicationProperties.h | 2 +- .../app_properties/juce_PropertiesFile.cpp | 2 +- .../app_properties/juce_PropertiesFile.h | 2 +- .../juce_data_structures.h | 2 +- .../undomanager/juce_UndoManager.cpp | 2 +- .../values/juce_ValueTree.cpp | 15 +- .../values/juce_ValueTree.h | 8 +- modules/juce_dsp/containers/juce_AudioBlock.h | 43 + .../juce_dsp/containers/juce_SIMDRegister.h | 157 +- .../containers/juce_SIMDRegister_Impl.h | 178 + .../containers/juce_SIMDRegister_test.cpp | 267 +- .../juce_dsp/frequency/juce_Convolution.cpp | 7 +- modules/juce_dsp/frequency/juce_Convolution.h | 2 +- modules/juce_dsp/frequency/juce_FFT.cpp | 6 +- modules/juce_dsp/frequency/juce_FFT.h | 2 +- modules/juce_dsp/juce_dsp.cpp | 4 +- modules/juce_dsp/juce_dsp.h | 6 +- .../juce_dsp/native/juce_avx_SIMDNativeOps.h | 451 +- .../native/juce_fallback_SIMDNativeOps.h | 164 +- .../juce_dsp/native/juce_neon_SIMDNativeOps.h | 469 +- .../juce_dsp/native/juce_sse_SIMDNativeOps.h | 432 +- modules/juce_dsp/processors/juce_Oscillator.h | 4 +- modules/juce_dsp/processors/juce_WaveShaper.h | 7 + .../interprocess/juce_ConnectedChildProcess.h | 6 +- .../juce_InterprocessConnection.cpp | 47 +- .../juce_InterprocessConnection.h | 9 +- .../juce_InterprocessConnectionServer.cpp | 2 +- .../juce_InterprocessConnectionServer.h | 2 +- modules/juce_events/juce_events.h | 2 +- .../messages/juce_ApplicationBase.cpp | 4 +- .../messages/juce_ApplicationBase.h | 8 +- modules/juce_events/messages/juce_Message.h | 2 +- .../messages/juce_MessageManager.cpp | 4 +- .../messages/juce_MessageManager.h | 4 +- .../juce_MountedVolumeListChangeDetector.h | 2 +- .../native/juce_android_Messaging.cpp | 12 +- .../native/juce_ios_MessageManager.mm | 4 +- .../native/juce_linux_Messaging.cpp | 6 +- .../native/juce_win32_Messaging.cpp | 4 +- .../juce_graphics/colour/juce_FillType.cpp | 4 +- modules/juce_graphics/colour/juce_FillType.h | 2 +- .../contexts/juce_GraphicsContext.h | 2 +- .../juce_graphics/fonts/juce_TextLayout.cpp | 4 +- modules/juce_graphics/fonts/juce_Typeface.h | 4 +- .../geometry/juce_AffineTransform.cpp | 4 +- .../geometry/juce_AffineTransform.h | 8 +- .../image_formats/juce_GIFLoader.cpp | 2 +- modules/juce_graphics/images/juce_Image.cpp | 14 +- modules/juce_graphics/images/juce_Image.h | 10 +- modules/juce_graphics/juce_graphics.h | 2 +- .../native/juce_RenderingHelpers.h | 26 +- .../native/juce_android_Fonts.cpp | 18 +- .../native/juce_freetype_Fonts.cpp | 4 +- .../juce_graphics/native/juce_linux_Fonts.cpp | 4 +- .../native/juce_mac_CoreGraphicsContext.h | 2 +- .../juce_graphics/native/juce_mac_Fonts.mm | 59 +- .../juce_win32_Direct2DGraphicsContext.h | 2 +- .../juce_graphics/native/juce_win32_Fonts.cpp | 12 +- .../application/juce_Application.h | 6 +- .../juce_gui_basics/buttons/juce_Button.cpp | 55 +- modules/juce_gui_basics/buttons/juce_Button.h | 5 +- .../buttons/juce_DrawableButton.h | 2 +- .../buttons/juce_ToolbarButton.h | 2 +- .../commands/juce_ApplicationCommandManager.h | 2 +- .../commands/juce_KeyPressMappingSet.cpp | 2 +- .../components/juce_Component.cpp | 49 +- .../components/juce_Component.h | 18 +- .../components/juce_Desktop.cpp | 2 +- .../juce_gui_basics/components/juce_Desktop.h | 6 +- .../components/juce_ModalComponentManager.cpp | 4 +- .../drawables/juce_Drawable.cpp | 4 +- .../juce_gui_basics/drawables/juce_Drawable.h | 2 +- .../drawables/juce_SVGParser.cpp | 8 +- .../filebrowser/juce_ContentSharer.cpp | 10 +- .../filebrowser/juce_ContentSharer.h | 6 +- .../juce_DirectoryContentsList.cpp | 2 +- .../filebrowser/juce_DirectoryContentsList.h | 2 +- .../filebrowser/juce_FileBrowserComponent.h | 6 +- .../filebrowser/juce_FileChooser.h | 2 +- .../filebrowser/juce_FilenameComponent.h | 2 +- .../juce_ImagePreviewComponent.cpp | 2 +- modules/juce_gui_basics/juce_gui_basics.cpp | 15 +- modules/juce_gui_basics/juce_gui_basics.h | 17 +- .../keyboard/juce_KeyPress.cpp | 2 +- .../keyboard/juce_ModifierKeys.cpp | 18 +- .../keyboard/juce_ModifierKeys.h | 31 +- .../layout/juce_ComponentAnimator.cpp | 2 +- .../layout/juce_ComponentBuilder.h | 2 +- .../layout/juce_ConcertinaPanel.h | 2 +- modules/juce_gui_basics/layout/juce_Grid.cpp | 4 + .../layout/juce_MultiDocumentPanel.cpp | 6 +- .../layout/juce_MultiDocumentPanel.h | 2 +- .../juce_gui_basics/layout/juce_ScrollBar.h | 2 +- .../layout/juce_TabbedButtonBar.h | 8 +- .../layout/juce_TabbedComponent.h | 2 +- .../juce_gui_basics/layout/juce_Viewport.cpp | 43 +- .../juce_gui_basics/layout/juce_Viewport.h | 4 +- .../lookandfeel/juce_LookAndFeel_V2.cpp | 2 +- .../lookandfeel/juce_LookAndFeel_V2.h | 2 +- .../juce_gui_basics/menus/juce_PopupMenu.cpp | 14 +- .../juce_gui_basics/menus/juce_PopupMenu.h | 4 +- .../misc/juce_JUCESplashScreen.cpp | 10 +- .../misc/juce_JUCESplashScreen.h | 4 +- .../mouse/juce_DragAndDropContainer.cpp | 2 +- .../mouse/juce_MouseInputSource.cpp | 6 +- .../native/juce_android_ContentSharer.cpp | 44 +- .../native/juce_android_Windowing.cpp | 49 +- .../native/juce_ios_ContentSharer.cpp | 16 +- .../native/juce_ios_FileChooser.mm | 26 +- .../native/juce_ios_UIViewComponentPeer.mm | 21 +- .../native/juce_ios_Windowing.mm | 12 +- .../native/juce_linux_X11_Windowing.cpp | 134 +- .../native/juce_mac_FileChooser.mm | 6 +- .../native/juce_mac_MainMenu.mm | 6 +- .../native/juce_mac_NSViewComponentPeer.mm | 51 +- .../native/juce_mac_Windowing.mm | 10 +- .../native/juce_win32_FileChooser.cpp | 8 +- .../native/juce_win32_Windowing.cpp | 120 +- .../juce_MultiChoicePropertyComponent.cpp | 4 +- .../properties/juce_TextPropertyComponent.h | 2 +- .../juce_gui_basics/widgets/juce_ComboBox.cpp | 2 +- .../juce_gui_basics/widgets/juce_ComboBox.h | 2 +- .../juce_gui_basics/widgets/juce_Label.cpp | 2 +- modules/juce_gui_basics/widgets/juce_Label.h | 2 +- .../juce_gui_basics/widgets/juce_ListBox.cpp | 2 +- .../juce_gui_basics/widgets/juce_ListBox.h | 6 +- .../juce_gui_basics/widgets/juce_Slider.cpp | 13 +- modules/juce_gui_basics/widgets/juce_Slider.h | 2 +- .../widgets/juce_TableHeaderComponent.cpp | 2 +- .../widgets/juce_TableHeaderComponent.h | 2 +- .../widgets/juce_TextEditor.cpp | 2 +- .../juce_gui_basics/widgets/juce_TextEditor.h | 4 +- .../juce_gui_basics/widgets/juce_Toolbar.h | 2 +- .../widgets/juce_ToolbarItemComponent.h | 2 +- .../juce_gui_basics/widgets/juce_TreeView.cpp | 2 +- .../juce_gui_basics/widgets/juce_TreeView.h | 8 +- .../windows/juce_AlertWindow.cpp | 6 +- .../windows/juce_CallOutBox.cpp | 2 +- .../windows/juce_ComponentPeer.cpp | 33 +- .../windows/juce_ComponentPeer.h | 14 + .../windows/juce_DocumentWindow.h | 6 +- .../windows/juce_ResizableWindow.h | 4 +- .../windows/juce_ThreadWithProgressWindow.h | 2 +- .../windows/juce_TooltipWindow.cpp | 2 +- .../windows/juce_TopLevelWindow.cpp | 1 - .../windows/juce_TopLevelWindow.h | 2 +- .../code_editor/juce_CodeEditorComponent.h | 6 +- .../embedding/juce_ActiveXControlComponent.h | 2 +- .../embedding/juce_AndroidViewComponent.h | 12 +- .../embedding/juce_UIViewComponent.h | 2 +- .../embedding/juce_XEmbedComponent.h | 2 +- modules/juce_gui_extra/juce_gui_extra.h | 2 +- .../juce_gui_extra/misc/juce_ColourSelector.h | 6 +- .../misc/juce_KeyMappingEditorComponent.cpp | 2 +- .../misc/juce_KeyMappingEditorComponent.h | 2 +- .../misc/juce_LiveConstantEditor.h | 2 +- .../misc/juce_PreferencesPanel.h | 2 +- .../misc/juce_PushNotifications.h | 10 +- .../misc/juce_SystemTrayIconComponent.h | 2 +- .../misc/juce_WebBrowserComponent.h | 2 +- .../native/juce_AndroidViewComponent.cpp | 40 +- .../native/juce_android_PushNotifications.cpp | 21 +- .../juce_android_WebBrowserComponent.cpp | 14 +- .../native/juce_ios_PushNotifications.cpp | 64 +- .../juce_linux_X11_WebBrowserComponent.cpp | 11 +- .../native/juce_linux_XEmbedComponent.cpp | 2 +- .../native/juce_mac_NSViewComponent.mm | 23 +- .../native/juce_mac_PushNotifications.cpp | 10 +- .../native/juce_mac_SystemTrayIcon.cpp | 2 +- .../native/juce_win32_ActiveXComponent.cpp | 6 +- .../native/juce_win32_SystemTrayIcon.cpp | 4 +- .../native/juce_win32_WebBrowserComponent.cpp | 2 +- .../geometry/juce_Draggable3DOrientation.h | 34 +- modules/juce_opengl/juce_opengl.h | 2 +- .../juce_opengl/native/juce_OpenGL_win32.h | 8 +- .../juce_opengl/opengl/juce_OpenGLContext.cpp | 6 +- .../juce_opengl/opengl/juce_OpenGLContext.h | 4 +- .../opengl/juce_OpenGLFrameBuffer.cpp | 2 +- .../opengl/juce_OpenGLFrameBuffer.h | 4 +- .../opengl/juce_OpenGLGraphicsContext.cpp | 98 +- .../opengl/juce_OpenGLGraphicsContext.h | 18 +- .../juce_opengl/opengl/juce_OpenGLImage.cpp | 2 +- modules/juce_osc/juce_osc.cpp | 8 - modules/juce_osc/juce_osc.h | 10 +- modules/juce_osc/osc/juce_OSCAddress.cpp | 4 +- modules/juce_osc/osc/juce_OSCBundle.cpp | 4 +- modules/juce_osc/osc/juce_OSCBundle.h | 4 +- modules/juce_osc/osc/juce_OSCReceiver.cpp | 31 +- modules/juce_osc/osc/juce_OSCReceiver.h | 9 +- modules/juce_osc/osc/juce_OSCSender.h | 2 +- .../in_app_purchases/juce_InAppPurchases.h | 2 +- .../juce_product_unlocking.h | 2 +- .../marketplace/juce_OnlineUnlockForm.cpp | 2 +- .../marketplace/juce_OnlineUnlockForm.h | 2 +- .../marketplace/juce_OnlineUnlockStatus.cpp | 6 +- .../juce_TracktionMarketplaceStatus.h | 2 +- .../native/juce_android_InAppPurchases.cpp | 4 +- .../native/juce_ios_InAppPurchases.cpp | 40 +- .../juce_video/capture/juce_CameraDevice.cpp | 156 +- .../juce_video/capture/juce_CameraDevice.h | 114 +- modules/juce_video/juce_video.h | 16 +- .../native/juce_android_CameraDevice.h | 3362 +++++++++++++- .../juce_video/native/juce_ios_CameraDevice.h | 1331 ++++++ .../juce_video/native/juce_mac_CameraDevice.h | 100 +- .../native/juce_win32_CameraDevice.h | 68 +- modules/juce_video/native/juce_win32_Video.h | 18 +- .../juce_video/playback/juce_VideoComponent.h | 8 +- 677 files changed, 22692 insertions(+), 6606 deletions(-) create mode 100644 examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/DemoRunner.java create mode 100644 examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/SharingContentProvider.java create mode 100644 extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest.sln create mode 100644 extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj create mode 100644 extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj.filters create mode 100644 extras/AudioPerformanceTest/Builds/VisualStudio2017/resources.rc create mode 100644 modules/juce_core/containers/juce_SparseSet.cpp create mode 100644 modules/juce_core/native/java/AndroidCamera.java create mode 100644 modules/juce_dsp/containers/juce_SIMDRegister_Impl.h create mode 100644 modules/juce_video/native/juce_ios_CameraDevice.h diff --git a/BREAKING-CHANGES.txt b/BREAKING-CHANGES.txt index c9c90571..937d8499 100644 --- a/BREAKING-CHANGES.txt +++ b/BREAKING-CHANGES.txt @@ -4,39 +4,86 @@ JUCE breaking changes Develop ======= + +Version 5.3.2 +============= + +Change +------ +The behaviour of an UndoManager used by an AudioProcessorValueTreeState has +been improved. + +Possible Issues +--------------- +If your plug-in contains an UndoManager used by an AudioProcessorValueTreeState +and relies upon the old behaviour of the UndoManager then it is possible that +the new behaviour is no longer appropriate for your use case. + +Workaround +---------- +Use an external UndoManager to reproduce the old behaviour manually. + +Rationale +--------- +This change fixes a few bugs in the behaviour of an UndoManager used by an +AudioProcessorValueTreeState. + + +Change +------ +JUCE no longer supports OS X deployment targets earlier than 10.7. + +Possible Issues +--------------- +If you were previously targeting OS X 10.5 or 10.6 you will no longer be able +to build JUCE-based products compatible with those platforms. + +Workaround +---------- +None. With the appropriate JUCE licence you may be able to backport new JUCE +features, but there will be no official support for this. + +Rationale +--------- +Increasing the minimum supported OS X version allows the JUCE codebase to make +use of the more modern C++ features found in the 10.7 standard library, which +in turn will increase thread and memory safety. + + Version 5.3.0 ============= Change ------ -The JUCE examples have been cleaned up, modernised and converted into -PIPs (Projucer Instant Projects). The JUCE Demo has been removed and replaced by the -DemoRunner application and larger projects such as the Audio Plugin Host and the -Network Graphics Demo have been moved into the extras directory. +The JUCE examples have been cleaned up, modernised and converted into PIPs +(Projucer Instant Projects). The JUCE Demo has been removed and replaced by the +DemoRunner application and larger projects such as the Audio Plugin Host and +the Network Graphics Demo have been moved into the extras directory. Possible Issues --------------- -1. Due to the large number of changes that have occured in the JUCE Git repository, -pulling this version may result in a messy folder structure with empty directories -that have been removed. +1. Due to the large number of changes that have occured in the JUCE Git + repository, pulling this version may result in a messy folder structure with + empty directories that have been removed. 2. The JUCE Demo project is no longer in the JUCE repository. -3. The Audio Plugin Host project has moved from the examples directory to the extras -directory. +3. The Audio Plugin Host project has moved from the examples directory to the + extras directory. Workaround ---------- -1. Run a Git clean command (git clean -xdf) in your JUCE directory to remove all untracked -files, directories and build products. -2. The new DemoRunner application, located in extras/DemoRunner, can be used to preview -all the JUCE examples and see the code side-by-side. -3. Change any file paths that depended on the plugin host project being located in the examples -directory to use the extras directory instead. +1. Run a Git clean command (git clean -xdf) in your JUCE directory to remove + all untracked files, directories and build products. +2. The new DemoRunner application, located in extras/DemoRunner, can be used to + preview all the JUCE examples and see the code side-by-side. +3. Change any file paths that depended on the plugin host project being located + in the examples directory to use the extras directory instead. Rationale --------- -The JUCE examples had inconsistent naming, coding styles and the projects and build products -took up a large amount of space in the repository. Replacing them with PIPs reduces the file size -and allows us to categorise the examples better, as well as cleaning up the code. +The JUCE examples had inconsistent naming, coding styles and the projects and +build products took up a large amount of space in the repository. Replacing +them with PIPs reduces the file size and allows us to categorise the examples +better, as well as cleaning up the code. Change @@ -74,8 +121,8 @@ InAppPurchases object yourself. Possible Issues --------------- -Any code using InAppPurchases needs to be updated to retrieve a singleton pointer -to InAppPurchases. +Any code using InAppPurchases needs to be updated to retrieve a singleton +pointer to InAppPurchases. Workaround ---------- diff --git a/ChangeList.txt b/ChangeList.txt index 38978ff2..54ae34b6 100644 --- a/ChangeList.txt +++ b/ChangeList.txt @@ -3,7 +3,22 @@ This file just lists the more notable headline features. For more detailed info about minor changes and bugfixes, please see the git log! - + +Version 5.3.2 + - Removed the OSX 10.5 and 10.6 deployment target options from the Projucer and enabled more C++11 features across all platforms + - Replaced all usage of ScopedPointer with std::unique_ptr + - Added camera support for iOS and Android + - Fixed some issues using an UndoManager with an AudioProcessorValueTreeState + - Added MIDI input to IAA plug-ins + - Made multiple calls to MidiInput::openDevice share the same underlying win32 MIDI handle + - Added a config flag to juce_audio_processors for enabling LADSPA plugin hosting and enabled it in the AudioPluginHost + - Added a "plug-in can do" callback to the VSTCallbackHandler interface + - Fixed various undefined behavior in SIMDRegister + - Added the methods AudioBlock::copyTo/AudioBlock::copyFrom which facilitate copying to/from an AudioBuffer + - Added a lambda callback to OpenGLGraphicsContextCustomShader to allow custom set-up when the shader is activated + - Fixed a bug causing an unintentional menu item highlight disco party when using a popup menu in a plug-in's UI + - Marked as deprecated: String::empty, var::null, File::nonexistent, ValueTree::invalid and other problematic statically-initialised null values + Version 5.3.1 - Add Android and iOS support to AudioPluginHost - Added support for Bela in the form of an AudioIODeviceType @@ -21,7 +36,7 @@ Version 5.3.1 - Added options for setting plugin categories and characteristics with MultiChoicePropertyComponent in the Projucer - Fixed a Projucer bug where the OSX base SDK version was not being set - Added a command-line option to use LF as linefeeds rather than CRLF in the Projucer cleanup tools - - Multiple documentation updates + - Multiple documentation updates Version 5.3.0 - Added support for Android OBOE (developer preview) diff --git a/examples/Assets/DSPDemos_Common.h b/examples/Assets/DSPDemos_Common.h index 3ec6f72a..dc9dfcb5 100644 --- a/examples/Assets/DSPDemos_Common.h +++ b/examples/Assets/DSPDemos_Common.h @@ -602,7 +602,7 @@ private: return; } - fileChooser = new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif"); + fileChooser.reset (new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif")); fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles, [safeThis] (const FileChooser& fc) mutable @@ -639,7 +639,7 @@ private: ToggleButton loopButton { "Loop File" }; AudioFileReaderComponent& audioFileReader; - ScopedPointer fileChooser; + std::unique_ptr fileChooser; }; //============================================================================== @@ -671,10 +671,10 @@ private: uint32 currentBlockSize = 512; uint32 currentNumChannels = 2; - ScopedPointer reader; - ScopedPointer readerSource; - ScopedPointer transportSource; - ScopedPointer> currentDemo; + std::unique_ptr reader; + std::unique_ptr readerSource; + std::unique_ptr transportSource; + std::unique_ptr> currentDemo; AudioSourcePlayer audioSourcePlayer; @@ -682,5 +682,5 @@ private: AudioBuffer fileReadBuffer; - ScopedPointer parametersComponent; + std::unique_ptr parametersComponent; }; diff --git a/examples/Assets/DemoUtilities.h b/examples/Assets/DemoUtilities.h index 92108d84..c6438e27 100644 --- a/examples/Assets/DemoUtilities.h +++ b/examples/Assets/DemoUtilities.h @@ -54,6 +54,7 @@ inline File getExamplesDirectory() noexcept MemoryOutputStream mo; auto success = Base64::convertFromBase64 (mo, JUCE_STRINGIFY (PIP_JUCE_EXAMPLES_DIRECTORY)); + ignoreUnused (success); jassert (success); return mo.toString(); @@ -82,6 +83,12 @@ inline InputStream* createAssetInputStream (const char* resourcePath) #if JUCE_IOS auto assetsDir = File::getSpecialLocation (File::currentExecutableFile) .getParentDirectory().getChildFile ("Assets"); + #elif JUCE_MAC + auto assetsDir = File::getSpecialLocation (File::currentExecutableFile) + .getParentDirectory().getParentDirectory().getChildFile ("Resources").getChildFile ("Assets"); + + if (! assetsDir.exists()) + assetsDir = getExamplesDirectory().getChildFile ("Assets"); #else auto assetsDir = getExamplesDirectory().getChildFile ("Assets"); #endif @@ -100,7 +107,7 @@ inline Image getImageFromAssets (const char* assetName) if (img.isNull()) { - ScopedPointer juceIconStream (createAssetInputStream (assetName)); + std::unique_ptr juceIconStream (createAssetInputStream (assetName)); if (juceIconStream == nullptr) return {}; @@ -115,7 +122,7 @@ inline Image getImageFromAssets (const char* assetName) inline String loadEntireAssetIntoString (const char* assetName) { - ScopedPointer input (createAssetInputStream (assetName)); + std::unique_ptr input (createAssetInputStream (assetName)); if (input == nullptr) return {}; diff --git a/examples/Assets/WavefrontObjParser.h b/examples/Assets/WavefrontObjParser.h index f2a05265..696214ce 100644 --- a/examples/Assets/WavefrontObjParser.h +++ b/examples/Assets/WavefrontObjParser.h @@ -250,7 +250,7 @@ private: if (faceGroup.size() == 0) return nullptr; - ScopedPointer shape (new Shape()); + std::unique_ptr shape (new Shape()); shape->name = name; shape->material = material; diff --git a/examples/Audio/AudioLatencyDemo.h b/examples/Audio/AudioLatencyDemo.h index 7920d453..45733d37 100644 --- a/examples/Audio/AudioLatencyDemo.h +++ b/examples/Audio/AudioLatencyDemo.h @@ -391,8 +391,8 @@ private: AudioDeviceManager& audioDeviceManager { getSharedAudioDeviceManager (1, 2) }; #endif - ScopedPointer latencyTester; - ScopedPointer liveAudioScroller; + std::unique_ptr latencyTester; + std::unique_ptr liveAudioScroller; TextButton startTestButton { "Test Latency" }; TextEditor resultsBox; diff --git a/examples/Audio/AudioPlaybackDemo.h b/examples/Audio/AudioPlaybackDemo.h index b0f942f9..e4da079e 100644 --- a/examples/Audio/AudioPlaybackDemo.h +++ b/examples/Audio/AudioPlaybackDemo.h @@ -400,7 +400,7 @@ private: TimeSliceThread thread { "audio file preview" }; #if (JUCE_ANDROID || JUCE_IOS) - ScopedPointer fileChooser; + std::unique_ptr fileChooser; TextButton chooseFileButton {"Choose Audio File...", "Choose an audio file for playback"}; #else DirectoryContentsList directoryList {nullptr, thread}; @@ -410,9 +410,9 @@ private: URL currentAudioFile; AudioSourcePlayer audioSourcePlayer; AudioTransportSource transportSource; - ScopedPointer currentAudioFileSource; + std::unique_ptr currentAudioFileSource; - ScopedPointer thumbnail; + std::unique_ptr thumbnail; Label zoomLabel { {}, "zoom:" }, explanation { {}, "Select an audio file in the treeview above, and this page will display its waveform, and let you play it.." }; Slider zoomSlider { Slider::LinearHorizontal, Slider::NoTextBox }; @@ -487,7 +487,7 @@ private: #if (JUCE_ANDROID || JUCE_IOS) void buttonClicked (Button* btn) override { - if (btn == &chooseFileButton && fileChooser == nullptr) + if (btn == &chooseFileButton && fileChooser.get() == nullptr) { SafePointer safeThis (this); @@ -504,7 +504,7 @@ private: if (FileChooser::isPlatformDialogAvailable()) { - fileChooser = new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif"); + fileChooser.reset (new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif")); fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles, [safeThis] (const FileChooser& fc) mutable diff --git a/examples/Audio/AudioRecordingDemo.h b/examples/Audio/AudioRecordingDemo.h index 93283256..8266a0d1 100644 --- a/examples/Audio/AudioRecordingDemo.h +++ b/examples/Audio/AudioRecordingDemo.h @@ -76,7 +76,7 @@ public: { // Create an OutputStream to write to our destination file... file.deleteFile(); - ScopedPointer fileStream (file.createOutputStream()); + std::unique_ptr fileStream (file.createOutputStream()); if (fileStream.get() != nullptr) { @@ -120,7 +120,7 @@ public: bool isRecording() const { - return activeWriter != nullptr; + return activeWriter.load() != nullptr; } //============================================================================== @@ -140,9 +140,9 @@ public: { const ScopedLock sl (writerLock); - if (activeWriter != nullptr && numInputChannels >= thumbnail.getNumChannels()) + if (activeWriter.load() != nullptr && numInputChannels >= thumbnail.getNumChannels()) { - activeWriter->write (inputChannelData, numSamples); + activeWriter.load()->write (inputChannelData, numSamples); // Create an AudioBuffer to wrap our incoming data, note that this does no allocations or copies, it simply references our input data AudioBuffer buffer (const_cast (inputChannelData), thumbnail.getNumChannels(), numSamples); @@ -158,13 +158,13 @@ public: private: AudioThumbnail& thumbnail; - TimeSliceThread backgroundThread { "Audio Recorder Thread" }; // the thread that will write our audio data to disk - ScopedPointer threadedWriter; // the FIFO used to buffer the incoming data - double sampleRate = 0.0; + TimeSliceThread backgroundThread { "Audio Recorder Thread" }; // the thread that will write our audio data to disk + std::unique_ptr threadedWriter; // the FIFO used to buffer the incoming data + double sampleRate = 0.0; int64 nextSampleNum = 0; CriticalSection writerLock; - AudioFormatWriter::ThreadedWriter* volatile activeWriter = nullptr; + std::atomic activeWriter { nullptr }; }; //============================================================================== diff --git a/examples/Audio/AudioSettingsDemo.h b/examples/Audio/AudioSettingsDemo.h index 08ff2b9d..d93377bc 100644 --- a/examples/Audio/AudioSettingsDemo.h +++ b/examples/Audio/AudioSettingsDemo.h @@ -143,7 +143,7 @@ private: AudioDeviceManager& audioDeviceManager { getSharedAudioDeviceManager() }; #endif - ScopedPointer audioSetupComp; + std::unique_ptr audioSetupComp; TextEditor diagnosticsBox; void changeListenerCallback (ChangeBroadcaster*) override diff --git a/examples/Audio/AudioSynthesiserDemo.h b/examples/Audio/AudioSynthesiserDemo.h index cfed6dfe..5e1e7cad 100644 --- a/examples/Audio/AudioSynthesiserDemo.h +++ b/examples/Audio/AudioSynthesiserDemo.h @@ -178,7 +178,7 @@ struct SynthAudioSource : public AudioSource { WavAudioFormat wavFormat; - ScopedPointer audioReader (wavFormat.createReaderFor (createAssetInputStream ("cello.wav"), true)); + std::unique_ptr audioReader (wavFormat.createReaderFor (createAssetInputStream ("cello.wav"), true)); BigInteger allNotes; allNotes.setRange (0, 128, true); diff --git a/examples/Audio/MidiDemo.h b/examples/Audio/MidiDemo.h index 6b6e33f2..4f576711 100644 --- a/examples/Audio/MidiDemo.h +++ b/examples/Audio/MidiDemo.h @@ -53,10 +53,10 @@ struct MidiDeviceListEntry : ReferenceCountedObject MidiDeviceListEntry (const String& deviceName) : name (deviceName) {} String name; - ScopedPointer inDevice; - ScopedPointer outDevice; + std::unique_ptr inDevice; + std::unique_ptr outDevice; - typedef ReferenceCountedObjectPtr Ptr; + using Ptr = ReferenceCountedObjectPtr; }; //============================================================================== @@ -476,8 +476,8 @@ private: TextEditor midiMonitor { "MIDI Monitor" }; TextButton pairButton { "MIDI Bluetooth devices..." }; - ScopedPointer midiInputSelector; - ScopedPointer midiOutputSelector; + std::unique_ptr midiInputSelector; + std::unique_ptr midiOutputSelector; ReferenceCountedArray midiInputs; ReferenceCountedArray midiOutputs; diff --git a/examples/BLOCKS/BlocksDrawingDemo.h b/examples/BLOCKS/BlocksDrawingDemo.h index a2b24178..5ea9708c 100644 --- a/examples/BLOCKS/BlocksDrawingDemo.h +++ b/examples/BLOCKS/BlocksDrawingDemo.h @@ -305,7 +305,7 @@ public: #if JUCE_IOS connectButton.setButtonText ("Connect"); - connectButton.onClick = [this] { BluetoothMidiDevicePairingDialogue::open(); }; + connectButton.onClick = [] { BluetoothMidiDevicePairingDialogue::open(); }; connectButton.setAlwaysOnTop (true); addAndMakeVisible (connectButton); #endif diff --git a/examples/BLOCKS/BlocksMonitorDemo.h b/examples/BLOCKS/BlocksMonitorDemo.h index 9c064ffa..7c32040b 100644 --- a/examples/BLOCKS/BlocksMonitorDemo.h +++ b/examples/BLOCKS/BlocksMonitorDemo.h @@ -597,7 +597,7 @@ public: #if JUCE_IOS connectButton.setButtonText ("Connect"); - connectButton.onClick = [this] { BluetoothMidiDevicePairingDialogue::open(); }; + connectButton.onClick = [] { BluetoothMidiDevicePairingDialogue::open(); }; connectButton.setAlwaysOnTop (true); addAndMakeVisible (connectButton); #endif diff --git a/examples/BLOCKS/BlocksSynthDemo.h b/examples/BLOCKS/BlocksSynthDemo.h index b2ab1e1c..3476b759 100644 --- a/examples/BLOCKS/BlocksSynthDemo.h +++ b/examples/BLOCKS/BlocksSynthDemo.h @@ -596,7 +596,7 @@ public: #if JUCE_IOS connectButton.setButtonText ("Connect"); - connectButton.onClick = [this] { BluetoothMidiDevicePairingDialogue::open(); }; + connectButton.onClick = [] { BluetoothMidiDevicePairingDialogue::open(); }; addAndMakeVisible (connectButton); #endif diff --git a/examples/DSP/ConvolutionDemo.h b/examples/DSP/ConvolutionDemo.h index 1391f452..d9db0aef 100644 --- a/examples/DSP/ConvolutionDemo.h +++ b/examples/DSP/ConvolutionDemo.h @@ -88,7 +88,7 @@ struct ConvolutionDemoDSP auto selectedType = cabinetTypeParameter->getCurrentSelectedID(); auto assetName = (selectedType == 2 ? "guitar_amp.wav" : "cassette_recorder.wav"); - ScopedPointer assetInputStream (createAssetInputStream (assetName)); + std::unique_ptr assetInputStream (createAssetInputStream (assetName)); if (assetInputStream != nullptr) { currentCabinetData.reset(); diff --git a/examples/DSP/SIMDRegisterDemo.h b/examples/DSP/SIMDRegisterDemo.h index d17ba27e..da338865 100644 --- a/examples/DSP/SIMDRegisterDemo.h +++ b/examples/DSP/SIMDRegisterDemo.h @@ -124,7 +124,7 @@ struct SIMDRegisterDemoDSP //============================================================================== IIR::Coefficients::Ptr iirCoefficients; - ScopedPointer>> iir; + std::unique_ptr>> iir; AudioBlock> interleaved; AudioBlock zero; diff --git a/examples/DemoRunner/Builds/Android/app/CMakeLists.txt b/examples/DemoRunner/Builds/Android/app/CMakeLists.txt index e9de472a..e6ad817f 100644 --- a/examples/DemoRunner/Builds/Android/app/CMakeLists.txt +++ b/examples/DemoRunner/Builds/Android/app/CMakeLists.txt @@ -8,7 +8,7 @@ SET(BINARY_NAME "juce_jni") add_library("cpufeatures" STATIC "${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c") set_source_files_properties("${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c" PROPERTIES COMPILE_FLAGS "-Wno-sign-conversion -Wno-gnu-statement-expression") -add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=23" "-DJUCE_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") +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") include_directories( AFTER "../../../JuceLibraryCode" @@ -546,6 +546,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h" "../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" "../../../../../modules/juce_core/containers/juce_SortedSet.h" + "../../../../../modules/juce_core/containers/juce_SparseSet.cpp" "../../../../../modules/juce_core/containers/juce_SparseSet.h" "../../../../../modules/juce_core/containers/juce_Variant.cpp" "../../../../../modules/juce_core/containers/juce_Variant.h" @@ -796,6 +797,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_data_structures/juce_data_structures.h" "../../../../../modules/juce_dsp/containers/juce_AudioBlock.h" "../../../../../modules/juce_dsp/containers/juce_SIMDRegister.h" + "../../../../../modules/juce_dsp/containers/juce_SIMDRegister_Impl.h" "../../../../../modules/juce_dsp/containers/juce_SIMDRegister_test.cpp" "../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.cpp" "../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.h" @@ -1465,6 +1467,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_video/capture/juce_CameraDevice.cpp" "../../../../../modules/juce_video/capture/juce_CameraDevice.h" "../../../../../modules/juce_video/native/juce_android_CameraDevice.h" + "../../../../../modules/juce_video/native/juce_ios_CameraDevice.h" "../../../../../modules/juce_video/native/juce_mac_CameraDevice.h" "../../../../../modules/juce_video/native/juce_mac_Video.h" "../../../../../modules/juce_video/native/juce_win32_CameraDevice.h" @@ -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) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_SortedSet.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -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) set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_AudioBlock.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_SIMDRegister.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_SIMDRegister_Impl.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_SIMDRegister_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -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) set_source_files_properties("../../../../../modules/juce_video/capture/juce_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_video/native/juce_android_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_video/native/juce_ios_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_video/native/juce_mac_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_video/native/juce_mac_Video.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_video/native/juce_win32_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/examples/DemoRunner/Builds/Android/app/build.gradle b/examples/DemoRunner/Builds/Android/app/build.gradle index 1bbe7b6c..b2250b3f 100644 --- a/examples/DemoRunner/Builds/Android/app/build.gradle +++ b/examples/DemoRunner/Builds/Android/app/build.gradle @@ -19,7 +19,7 @@ android { } defaultConfig { - applicationId "com.roli.juce.demorunner" + applicationId "com.juce.demorunner" minSdkVersion 23 targetSdkVersion 23 externalNativeBuild { diff --git a/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml b/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml index b1d2d7db..6d7c487a 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml +++ b/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ - + @@ -9,18 +9,19 @@ + + android:screenOrientation="unspecified" android:launchMode="singleTask" android:hardwareAccelerated="true"> - diff --git a/examples/DemoRunner/Builds/Android/app/src/main/assets/DSPDemos_Common.h b/examples/DemoRunner/Builds/Android/app/src/main/assets/DSPDemos_Common.h index 3ec6f72a..dc9dfcb5 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/assets/DSPDemos_Common.h +++ b/examples/DemoRunner/Builds/Android/app/src/main/assets/DSPDemos_Common.h @@ -602,7 +602,7 @@ private: return; } - fileChooser = new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif"); + fileChooser.reset (new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif")); fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles, [safeThis] (const FileChooser& fc) mutable @@ -639,7 +639,7 @@ private: ToggleButton loopButton { "Loop File" }; AudioFileReaderComponent& audioFileReader; - ScopedPointer fileChooser; + std::unique_ptr fileChooser; }; //============================================================================== @@ -671,10 +671,10 @@ private: uint32 currentBlockSize = 512; uint32 currentNumChannels = 2; - ScopedPointer reader; - ScopedPointer readerSource; - ScopedPointer transportSource; - ScopedPointer> currentDemo; + std::unique_ptr reader; + std::unique_ptr readerSource; + std::unique_ptr transportSource; + std::unique_ptr> currentDemo; AudioSourcePlayer audioSourcePlayer; @@ -682,5 +682,5 @@ private: AudioBuffer fileReadBuffer; - ScopedPointer parametersComponent; + std::unique_ptr parametersComponent; }; diff --git a/examples/DemoRunner/Builds/Android/app/src/main/assets/DemoUtilities.h b/examples/DemoRunner/Builds/Android/app/src/main/assets/DemoUtilities.h index 92108d84..c6438e27 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/assets/DemoUtilities.h +++ b/examples/DemoRunner/Builds/Android/app/src/main/assets/DemoUtilities.h @@ -54,6 +54,7 @@ inline File getExamplesDirectory() noexcept MemoryOutputStream mo; auto success = Base64::convertFromBase64 (mo, JUCE_STRINGIFY (PIP_JUCE_EXAMPLES_DIRECTORY)); + ignoreUnused (success); jassert (success); return mo.toString(); @@ -82,6 +83,12 @@ inline InputStream* createAssetInputStream (const char* resourcePath) #if JUCE_IOS auto assetsDir = File::getSpecialLocation (File::currentExecutableFile) .getParentDirectory().getChildFile ("Assets"); + #elif JUCE_MAC + auto assetsDir = File::getSpecialLocation (File::currentExecutableFile) + .getParentDirectory().getParentDirectory().getChildFile ("Resources").getChildFile ("Assets"); + + if (! assetsDir.exists()) + assetsDir = getExamplesDirectory().getChildFile ("Assets"); #else auto assetsDir = getExamplesDirectory().getChildFile ("Assets"); #endif @@ -100,7 +107,7 @@ inline Image getImageFromAssets (const char* assetName) if (img.isNull()) { - ScopedPointer juceIconStream (createAssetInputStream (assetName)); + std::unique_ptr juceIconStream (createAssetInputStream (assetName)); if (juceIconStream == nullptr) return {}; @@ -115,7 +122,7 @@ inline Image getImageFromAssets (const char* assetName) inline String loadEntireAssetIntoString (const char* assetName) { - ScopedPointer input (createAssetInputStream (assetName)); + std::unique_ptr input (createAssetInputStream (assetName)); if (input == nullptr) return {}; diff --git a/examples/DemoRunner/Builds/Android/app/src/main/assets/WavefrontObjParser.h b/examples/DemoRunner/Builds/Android/app/src/main/assets/WavefrontObjParser.h index f2a05265..696214ce 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/assets/WavefrontObjParser.h +++ b/examples/DemoRunner/Builds/Android/app/src/main/assets/WavefrontObjParser.h @@ -250,7 +250,7 @@ private: if (faceGroup.size() == 0) return nullptr; - ScopedPointer shape (new Shape()); + std::unique_ptr shape (new Shape()); shape->name = name; shape->material = material; 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 index 00000000..6320a603 --- /dev/null +++ b/examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/DemoRunner.java @@ -0,0 +1,2992 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + The code included in this file is provided under the terms of the ISC license + http://www.isc.org/downloads/software-support-policy/isc-license. Permission + To use, copy, modify, and/or distribute this software for any purpose with or + without fee is hereby granted provided that the above copyright notice and + this permission notice appear in all copies. + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +package com.juce.demorunner; + +import android.app.Activity; +import android.app.AlertDialog; +import android.content.DialogInterface; +import android.content.Context; +import android.content.Intent; +import android.content.res.Configuration; +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.hardware.camera2.*; +import android.net.http.SslError; +import android.net.Uri; +import android.os.Bundle; +import android.os.Looper; +import android.os.Handler; +import android.os.Message; +import android.os.ParcelUuid; +import android.os.Environment; +import android.view.*; +import android.view.inputmethod.BaseInputConnection; +import android.view.inputmethod.EditorInfo; +import android.view.inputmethod.InputConnection; +import android.view.inputmethod.InputMethodManager; +import android.graphics.*; +import android.text.ClipboardManager; +import android.text.InputType; +import android.util.DisplayMetrics; +import android.util.Log; +import android.util.Pair; +import android.webkit.SslErrorHandler; +import android.webkit.WebChromeClient; +import android.webkit.WebResourceError; +import android.webkit.WebResourceRequest; +import android.webkit.WebResourceResponse; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import java.lang.Runnable; +import java.lang.ref.WeakReference; +import java.lang.reflect.*; +import java.util.*; +import java.io.*; +import java.net.URL; +import java.net.HttpURLConnection; +import android.media.AudioManager; +import android.Manifest; +import java.util.concurrent.CancellationException; +import java.util.concurrent.Future; +import java.util.concurrent.Executors; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.Callable; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.locks.ReentrantLock; +import java.util.concurrent.atomic.*; + +import android.media.midi.*; +import android.bluetooth.*; +import android.bluetooth.le.*; + + +//============================================================================== +public class DemoRunner extends Activity +{ + //============================================================================== + static + { + System.loadLibrary ("juce_jni"); + } + + //============================================================================== + public boolean isPermissionDeclaredInManifest (int permissionID) + { + String permissionToCheck = getAndroidPermissionName(permissionID); + + try + { + PackageInfo info = getPackageManager().getPackageInfo(getApplicationContext().getPackageName(), PackageManager.GET_PERMISSIONS); + + if (info.requestedPermissions != null) + for (String permission : info.requestedPermissions) + if (permission.equals (permissionToCheck)) + return true; + } + catch (PackageManager.NameNotFoundException e) + { + Log.d ("JUCE", "isPermissionDeclaredInManifest: PackageManager.NameNotFoundException = " + e.toString()); + } + + Log.d ("JUCE", "isPermissionDeclaredInManifest: could not find requested permission " + permissionToCheck); + return false; + } + + //============================================================================== + // these have to match the values of enum PermissionID in C++ class RuntimePermissions: + private static final int JUCE_PERMISSIONS_RECORD_AUDIO = 1; + private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2; + private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3; + private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4; + private static final int JUCE_PERMISSIONS_CAMERA = 5; + + private static String getAndroidPermissionName (int permissionID) + { + switch (permissionID) + { + case JUCE_PERMISSIONS_RECORD_AUDIO: return Manifest.permission.RECORD_AUDIO; + case JUCE_PERMISSIONS_BLUETOOTH_MIDI: return Manifest.permission.ACCESS_COARSE_LOCATION; + // use string value as this is not defined in SDKs < 16 + case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE"; + case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE; + case JUCE_PERMISSIONS_CAMERA: return Manifest.permission.CAMERA; + } + + // unknown permission ID! + assert false; + return new String(); + } + + public boolean isPermissionGranted (int permissionID) + { + return getApplicationContext().checkCallingOrSelfPermission (getAndroidPermissionName (permissionID)) == PackageManager.PERMISSION_GRANTED; + } + + private Map permissionCallbackPtrMap; + + public void requestRuntimePermission (int permissionID, long ptrToCallback) + { + String permissionName = getAndroidPermissionName (permissionID); + + if (getApplicationContext().checkCallingOrSelfPermission (permissionName) != PackageManager.PERMISSION_GRANTED) + { + // remember callbackPtr, request permissions, and let onRequestPermissionResult call callback asynchronously + permissionCallbackPtrMap.put (permissionID, ptrToCallback); + requestPermissionsCompat (new String[]{permissionName}, permissionID); + } + else + { + // permissions were already granted before, we can call callback directly + androidRuntimePermissionsCallback (true, ptrToCallback); + } + } + + private native void androidRuntimePermissionsCallback (boolean permissionWasGranted, long ptrToCallback); + + @Override + public void onRequestPermissionsResult (int permissionID, String permissions[], int[] grantResults) + { + boolean permissionsGranted = (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED); + + if (! permissionsGranted) + Log.d ("JUCE", "onRequestPermissionsResult: runtime permission was DENIED: " + getAndroidPermissionName (permissionID)); + + Long ptrToCallback = permissionCallbackPtrMap.get (permissionID); + permissionCallbackPtrMap.remove (permissionID); + androidRuntimePermissionsCallback (permissionsGranted, ptrToCallback); + } + + //============================================================================== + public interface JuceMidiPort + { + boolean isInputPort(); + + // start, stop does nothing on an output port + void start(); + void stop(); + + void close(); + + // send will do nothing on an input port + void sendMidi (byte[] msg, int offset, int count); + } + + //============================================================================== + //============================================================================== + public class BluetoothManager extends ScanCallback + { + BluetoothManager() + { + } + + public String[] getMidiBluetoothAddresses() + { + return bluetoothMidiDevices.toArray (new String[bluetoothMidiDevices.size()]); + } + + public String getHumanReadableStringForBluetoothAddress (String address) + { + BluetoothDevice btDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice (address); + return btDevice.getName(); + } + + public int getBluetoothDeviceStatus (String address) + { + return getAndroidMidiDeviceManager().getBluetoothDeviceStatus (address); + } + + public void startStopScan (boolean shouldStart) + { + BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); + + if (bluetoothAdapter == null) + { + Log.d ("JUCE", "BluetoothManager error: could not get default Bluetooth adapter"); + return; + } + + BluetoothLeScanner bluetoothLeScanner = bluetoothAdapter.getBluetoothLeScanner(); + + if (bluetoothLeScanner == null) + { + Log.d ("JUCE", "BluetoothManager error: could not get Bluetooth LE scanner"); + return; + } + + if (shouldStart) + { + ScanFilter.Builder scanFilterBuilder = new ScanFilter.Builder(); + scanFilterBuilder.setServiceUuid (ParcelUuid.fromString (bluetoothLEMidiServiceUUID)); + + ScanSettings.Builder scanSettingsBuilder = new ScanSettings.Builder(); + scanSettingsBuilder.setCallbackType (ScanSettings.CALLBACK_TYPE_ALL_MATCHES) + .setScanMode (ScanSettings.SCAN_MODE_LOW_POWER) + .setScanMode (ScanSettings.MATCH_MODE_STICKY); + + bluetoothLeScanner.startScan (Arrays.asList (scanFilterBuilder.build()), + scanSettingsBuilder.build(), + this); + } + else + { + bluetoothLeScanner.stopScan (this); + } + } + + public boolean pairBluetoothMidiDevice(String address) + { + BluetoothDevice btDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice (address); + + if (btDevice == null) + { + Log.d ("JUCE", "failed to create buletooth device from address"); + return false; + } + + return getAndroidMidiDeviceManager().pairBluetoothDevice (btDevice); + } + + public void unpairBluetoothMidiDevice (String address) + { + getAndroidMidiDeviceManager().unpairBluetoothDevice (address); + } + + public void onScanFailed (int errorCode) + { + } + + public void onScanResult (int callbackType, ScanResult result) + { + if (callbackType == ScanSettings.CALLBACK_TYPE_ALL_MATCHES + || callbackType == ScanSettings.CALLBACK_TYPE_FIRST_MATCH) + { + BluetoothDevice device = result.getDevice(); + + if (device != null) + bluetoothMidiDevices.add (device.getAddress()); + } + + if (callbackType == ScanSettings.CALLBACK_TYPE_MATCH_LOST) + { + Log.d ("JUCE", "ScanSettings.CALLBACK_TYPE_MATCH_LOST"); + BluetoothDevice device = result.getDevice(); + + if (device != null) + { + bluetoothMidiDevices.remove (device.getAddress()); + unpairBluetoothMidiDevice (device.getAddress()); + } + } + } + + public void onBatchScanResults (List results) + { + for (ScanResult result : results) + onScanResult (ScanSettings.CALLBACK_TYPE_ALL_MATCHES, result); + } + + private BluetoothLeScanner scanner; + private static final String bluetoothLEMidiServiceUUID = "03B80E5A-EDE8-4B33-A751-6CE34EC4C700"; + + private HashSet bluetoothMidiDevices = new HashSet(); + } + + public static class JuceMidiInputPort extends MidiReceiver implements JuceMidiPort + { + private native void handleReceive (long host, byte[] msg, int offset, int count, long timestamp); + + public JuceMidiInputPort (MidiDeviceManager mm, MidiOutputPort actualPort, MidiPortPath portPathToUse, long hostToUse) + { + owner = mm; + androidPort = actualPort; + portPath = portPathToUse; + juceHost = hostToUse; + isConnected = false; + } + + @Override + protected void finalize() throws Throwable + { + close(); + super.finalize(); + } + + @Override + public boolean isInputPort() + { + return true; + } + + @Override + public void start() + { + if (owner != null && androidPort != null && ! isConnected) { + androidPort.connect(this); + isConnected = true; + } + } + + @Override + public void stop() + { + if (owner != null && androidPort != null && isConnected) { + androidPort.disconnect(this); + isConnected = false; + } + } + + @Override + public void close() + { + if (androidPort != null) { + try { + androidPort.close(); + } catch (IOException exception) { + Log.d("JUCE", "IO Exception while closing port"); + } + } + + if (owner != null) + owner.removePort (portPath); + + owner = null; + androidPort = null; + } + + @Override + public void onSend (byte[] msg, int offset, int count, long timestamp) + { + if (count > 0) + handleReceive (juceHost, msg, offset, count, timestamp); + } + + @Override + public void onFlush() + {} + + @Override + public void sendMidi (byte[] msg, int offset, int count) + { + } + + MidiDeviceManager owner; + MidiOutputPort androidPort; + MidiPortPath portPath; + long juceHost; + boolean isConnected; + } + + public static class JuceMidiOutputPort implements JuceMidiPort + { + public JuceMidiOutputPort (MidiDeviceManager mm, MidiInputPort actualPort, MidiPortPath portPathToUse) + { + owner = mm; + androidPort = actualPort; + portPath = portPathToUse; + } + + @Override + protected void finalize() throws Throwable + { + close(); + super.finalize(); + } + + @Override + public boolean isInputPort() + { + return false; + } + + @Override + public void start() + { + } + + @Override + public void stop() + { + } + + @Override + public void sendMidi (byte[] msg, int offset, int count) + { + if (androidPort != null) + { + try { + androidPort.send(msg, offset, count); + } catch (IOException exception) + { + Log.d ("JUCE", "send midi had IO exception"); + } + } + } + + @Override + public void close() + { + if (androidPort != null) { + try { + androidPort.close(); + } catch (IOException exception) { + Log.d("JUCE", "IO Exception while closing port"); + } + } + + if (owner != null) + owner.removePort (portPath); + + owner = null; + androidPort = null; + } + + MidiDeviceManager owner; + MidiInputPort androidPort; + MidiPortPath portPath; + } + + private static class MidiPortPath extends Object + { + public MidiPortPath (int deviceIdToUse, boolean direction, int androidIndex) + { + deviceId = deviceIdToUse; + isInput = direction; + portIndex = androidIndex; + + } + + public int deviceId; + public int portIndex; + public boolean isInput; + + @Override + public int hashCode() + { + Integer i = new Integer ((deviceId * 128) + (portIndex < 128 ? portIndex : 127)); + return i.hashCode() * (isInput ? -1 : 1); + } + + @Override + public boolean equals (Object obj) + { + if (obj == null) + return false; + + if (getClass() != obj.getClass()) + return false; + + MidiPortPath other = (MidiPortPath) obj; + return (portIndex == other.portIndex && isInput == other.isInput && deviceId == other.deviceId); + } + } + + //============================================================================== + public class MidiDeviceManager extends MidiManager.DeviceCallback implements MidiManager.OnDeviceOpenedListener + { + //============================================================================== + private class DummyBluetoothGattCallback extends BluetoothGattCallback + { + public DummyBluetoothGattCallback (MidiDeviceManager mm) + { + super(); + owner = mm; + } + + public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) + { + if (newState == BluetoothProfile.STATE_CONNECTED) + { + gatt.requestConnectionPriority(BluetoothGatt.CONNECTION_PRIORITY_HIGH); + owner.pairBluetoothDeviceStepTwo (gatt.getDevice()); + } + } + public void onServicesDiscovered(BluetoothGatt gatt, int status) {} + public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {} + public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {} + public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {} + public void onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {} + public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {} + public void onReliableWriteCompleted(BluetoothGatt gatt, int status) {} + public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) {} + public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) {} + + private MidiDeviceManager owner; + } + + //============================================================================== + private class MidiDeviceOpenTask extends java.util.TimerTask + { + public MidiDeviceOpenTask (MidiDeviceManager deviceManager, MidiDevice device, BluetoothGatt gattToUse) + { + owner = deviceManager; + midiDevice = device; + btGatt = gattToUse; + } + + @Override + public boolean cancel() + { + synchronized (MidiDeviceOpenTask.class) + { + owner = null; + boolean retval = super.cancel(); + + if (btGatt != null) + { + btGatt.disconnect(); + btGatt.close(); + + btGatt = null; + } + + if (midiDevice != null) + { + try + { + midiDevice.close(); + } + catch (IOException e) + {} + + midiDevice = null; + } + + return retval; + } + } + + public String getBluetoothAddress() + { + synchronized (MidiDeviceOpenTask.class) + { + if (midiDevice != null) + { + MidiDeviceInfo info = midiDevice.getInfo(); + if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH) + { + BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); + if (btDevice != null) + return btDevice.getAddress(); + } + } + } + + return ""; + } + + public BluetoothGatt getGatt() { return btGatt; } + + public int getID() + { + return midiDevice.getInfo().getId(); + } + + @Override + public void run() + { + synchronized (MidiDeviceOpenTask.class) + { + if (owner != null && midiDevice != null) + owner.onDeviceOpenedDelayed (midiDevice); + } + } + + private MidiDeviceManager owner; + private MidiDevice midiDevice; + private BluetoothGatt btGatt; + } + + //============================================================================== + public MidiDeviceManager() + { + manager = (MidiManager) getSystemService (MIDI_SERVICE); + + if (manager == null) + { + Log.d ("JUCE", "MidiDeviceManager error: could not get MidiManager system service"); + return; + } + + openPorts = new HashMap> (); + midiDevices = new ArrayList>(); + openTasks = new HashMap(); + btDevicesPairing = new HashMap(); + + MidiDeviceInfo[] foundDevices = manager.getDevices(); + for (MidiDeviceInfo info : foundDevices) + onDeviceAdded (info); + + manager.registerDeviceCallback (this, null); + } + + protected void finalize() throws Throwable + { + manager.unregisterDeviceCallback (this); + + synchronized (MidiDeviceManager.class) + { + btDevicesPairing.clear(); + + for (Integer deviceID : openTasks.keySet()) + openTasks.get (deviceID).cancel(); + + openTasks = null; + } + + for (MidiPortPath key : openPorts.keySet()) + openPorts.get (key).get().close(); + + openPorts = null; + + for (Pair device : midiDevices) + { + if (device.second != null) + { + device.second.disconnect(); + device.second.close(); + } + + device.first.close(); + } + + midiDevices.clear(); + + super.finalize(); + } + + public String[] getJuceAndroidMidiInputDevices() + { + return getJuceAndroidMidiDevices (MidiDeviceInfo.PortInfo.TYPE_OUTPUT); + } + + public String[] getJuceAndroidMidiOutputDevices() + { + return getJuceAndroidMidiDevices (MidiDeviceInfo.PortInfo.TYPE_INPUT); + } + + private String[] getJuceAndroidMidiDevices (int portType) + { + // only update the list when JUCE asks for a new list + synchronized (MidiDeviceManager.class) + { + deviceInfos = getDeviceInfos(); + } + + ArrayList portNames = new ArrayList(); + + int index = 0; + for (MidiPortPath portInfo = getPortPathForJuceIndex (portType, index); portInfo != null; portInfo = getPortPathForJuceIndex (portType, ++index)) + portNames.add (getPortName (portInfo)); + + String[] names = new String[portNames.size()]; + return portNames.toArray (names); + } + + private JuceMidiPort openMidiPortWithJuceIndex (int index, long host, boolean isInput) + { + synchronized (MidiDeviceManager.class) + { + int portTypeToFind = (isInput ? MidiDeviceInfo.PortInfo.TYPE_OUTPUT : MidiDeviceInfo.PortInfo.TYPE_INPUT); + MidiPortPath portInfo = getPortPathForJuceIndex (portTypeToFind, index); + + if (portInfo != null) + { + // ports must be opened exclusively! + if (openPorts.containsKey (portInfo)) + return null; + + Pair devicePair = getMidiDevicePairForId (portInfo.deviceId); + + if (devicePair != null) + { + MidiDevice device = devicePair.first; + if (device != null) + { + JuceMidiPort juceMidiPort = null; + + if (isInput) + { + MidiOutputPort outputPort = device.openOutputPort(portInfo.portIndex); + + if (outputPort != null) + juceMidiPort = new JuceMidiInputPort(this, outputPort, portInfo, host); + } + else + { + MidiInputPort inputPort = device.openInputPort(portInfo.portIndex); + + if (inputPort != null) + juceMidiPort = new JuceMidiOutputPort(this, inputPort, portInfo); + } + + if (juceMidiPort != null) + { + openPorts.put(portInfo, new WeakReference(juceMidiPort)); + + return juceMidiPort; + } + } + } + } + } + + return null; + } + + public JuceMidiPort openMidiInputPortWithJuceIndex (int index, long host) + { + return openMidiPortWithJuceIndex (index, host, true); + } + + public JuceMidiPort openMidiOutputPortWithJuceIndex (int index) + { + return openMidiPortWithJuceIndex (index, 0, false); + } + + /* 0: unpaired, 1: paired, 2: pairing */ + public int getBluetoothDeviceStatus (String address) + { + synchronized (MidiDeviceManager.class) + { + if (! address.isEmpty()) + { + if (findMidiDeviceForBluetoothAddress (address) != null) + return 1; + + if (btDevicesPairing.containsKey (address)) + return 2; + + if (findOpenTaskForBluetoothAddress (address) != null) + return 2; + } + } + + return 0; + } + + public boolean pairBluetoothDevice (BluetoothDevice btDevice) + { + String btAddress = btDevice.getAddress(); + if (btAddress.isEmpty()) + return false; + + synchronized (MidiDeviceManager.class) + { + if (getBluetoothDeviceStatus (btAddress) != 0) + return false; + + + btDevicesPairing.put (btDevice.getAddress(), null); + BluetoothGatt gatt = btDevice.connectGatt (getApplicationContext(), true, new DummyBluetoothGattCallback (this)); + + if (gatt != null) + { + btDevicesPairing.put (btDevice.getAddress(), gatt); + } + else + { + pairBluetoothDeviceStepTwo (btDevice); + } + } + + return true; + } + + public void pairBluetoothDeviceStepTwo (BluetoothDevice btDevice) + { + manager.openBluetoothDevice(btDevice, this, null); + } + + public void unpairBluetoothDevice (String address) + { + if (address.isEmpty()) + return; + + synchronized (MidiDeviceManager.class) + { + if (btDevicesPairing.containsKey (address)) + { + BluetoothGatt gatt = btDevicesPairing.get (address); + if (gatt != null) + { + gatt.disconnect(); + gatt.close(); + } + + btDevicesPairing.remove (address); + } + + MidiDeviceOpenTask openTask = findOpenTaskForBluetoothAddress (address); + if (openTask != null) + { + int deviceID = openTask.getID(); + openTask.cancel(); + openTasks.remove (deviceID); + } + + Pair midiDevicePair = findMidiDeviceForBluetoothAddress (address); + if (midiDevicePair != null) + { + MidiDevice midiDevice = midiDevicePair.first; + onDeviceRemoved (midiDevice.getInfo()); + + try { + midiDevice.close(); + } + catch (IOException exception) + { + Log.d ("JUCE", "IOException while closing midi device"); + } + } + } + } + + private Pair findMidiDeviceForBluetoothAddress (String address) + { + for (Pair midiDevice : midiDevices) + { + MidiDeviceInfo info = midiDevice.first.getInfo(); + if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH) + { + BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); + if (btDevice != null && btDevice.getAddress().equals (address)) + return midiDevice; + } + } + + return null; + } + + private MidiDeviceOpenTask findOpenTaskForBluetoothAddress (String address) + { + for (Integer deviceID : openTasks.keySet()) + { + MidiDeviceOpenTask openTask = openTasks.get (deviceID); + if (openTask.getBluetoothAddress().equals (address)) + return openTask; + } + + return null; + } + + public void removePort (MidiPortPath path) + { + openPorts.remove (path); + } + + public String getInputPortNameForJuceIndex (int index) + { + MidiPortPath portInfo = getPortPathForJuceIndex (MidiDeviceInfo.PortInfo.TYPE_OUTPUT, index); + if (portInfo != null) + return getPortName (portInfo); + + return ""; + } + + public String getOutputPortNameForJuceIndex (int index) + { + MidiPortPath portInfo = getPortPathForJuceIndex (MidiDeviceInfo.PortInfo.TYPE_INPUT, index); + if (portInfo != null) + return getPortName (portInfo); + + return ""; + } + + public void onDeviceAdded (MidiDeviceInfo info) + { + // only add standard midi devices + if (info.getType() == info.TYPE_BLUETOOTH) + return; + + manager.openDevice (info, this, null); + } + + public void onDeviceRemoved (MidiDeviceInfo info) + { + synchronized (MidiDeviceManager.class) + { + Pair devicePair = getMidiDevicePairForId (info.getId()); + + if (devicePair != null) + { + MidiDevice midiDevice = devicePair.first; + BluetoothGatt gatt = devicePair.second; + + // close all ports that use this device + boolean removedPort = true; + + while (removedPort == true) + { + removedPort = false; + for (MidiPortPath key : openPorts.keySet()) + { + if (key.deviceId == info.getId()) + { + openPorts.get(key).get().close(); + removedPort = true; + break; + } + } + } + + if (gatt != null) + { + gatt.disconnect(); + gatt.close(); + } + + midiDevices.remove (devicePair); + } + } + } + + public void onDeviceStatusChanged (MidiDeviceStatus status) + { + } + + @Override + public void onDeviceOpened (MidiDevice theDevice) + { + synchronized (MidiDeviceManager.class) + { + MidiDeviceInfo info = theDevice.getInfo(); + int deviceID = info.getId(); + BluetoothGatt gatt = null; + boolean isBluetooth = false; + + if (! openTasks.containsKey (deviceID)) + { + if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH) + { + isBluetooth = true; + BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); + if (btDevice != null) + { + String btAddress = btDevice.getAddress(); + if (btDevicesPairing.containsKey (btAddress)) + { + gatt = btDevicesPairing.get (btAddress); + btDevicesPairing.remove (btAddress); + } + else + { + // unpair was called in the mean time + try + { + Pair midiDevicePair = findMidiDeviceForBluetoothAddress (btDevice.getAddress()); + if (midiDevicePair != null) + { + gatt = midiDevicePair.second; + + if (gatt != null) + { + gatt.disconnect(); + gatt.close(); + } + } + + theDevice.close(); + } + catch (IOException e) + {} + + return; + } + } + } + + MidiDeviceOpenTask openTask = new MidiDeviceOpenTask (this, theDevice, gatt); + openTasks.put (deviceID, openTask); + + new java.util.Timer().schedule (openTask, (isBluetooth ? 2000 : 100)); + } + } + } + + public void onDeviceOpenedDelayed (MidiDevice theDevice) + { + synchronized (MidiDeviceManager.class) + { + int deviceID = theDevice.getInfo().getId(); + + if (openTasks.containsKey (deviceID)) + { + if (! midiDevices.contains(theDevice)) + { + BluetoothGatt gatt = openTasks.get (deviceID).getGatt(); + openTasks.remove (deviceID); + midiDevices.add (new Pair (theDevice, gatt)); + } + } + else + { + // unpair was called in the mean time + MidiDeviceInfo info = theDevice.getInfo(); + BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE); + if (btDevice != null) + { + String btAddress = btDevice.getAddress(); + Pair midiDevicePair = findMidiDeviceForBluetoothAddress (btDevice.getAddress()); + if (midiDevicePair != null) + { + BluetoothGatt gatt = midiDevicePair.second; + + if (gatt != null) + { + gatt.disconnect(); + gatt.close(); + } + } + } + + try + { + theDevice.close(); + } + catch (IOException e) + {} + } + } + } + + public String getPortName(MidiPortPath path) + { + int portTypeToFind = (path.isInput ? MidiDeviceInfo.PortInfo.TYPE_INPUT : MidiDeviceInfo.PortInfo.TYPE_OUTPUT); + + synchronized (MidiDeviceManager.class) + { + for (MidiDeviceInfo info : deviceInfos) + { + int localIndex = 0; + if (info.getId() == path.deviceId) + { + for (MidiDeviceInfo.PortInfo portInfo : info.getPorts()) + { + int portType = portInfo.getType(); + if (portType == portTypeToFind) + { + int portIndex = portInfo.getPortNumber(); + if (portIndex == path.portIndex) + { + String portName = portInfo.getName(); + if (portName.isEmpty()) + portName = (String) info.getProperties().get(info.PROPERTY_NAME); + + return portName; + } + } + } + } + } + } + + return ""; + } + + public MidiPortPath getPortPathForJuceIndex (int portType, int juceIndex) + { + int portIdx = 0; + for (MidiDeviceInfo info : deviceInfos) + { + for (MidiDeviceInfo.PortInfo portInfo : info.getPorts()) + { + if (portInfo.getType() == portType) + { + if (portIdx == juceIndex) + return new MidiPortPath (info.getId(), + (portType == MidiDeviceInfo.PortInfo.TYPE_INPUT), + portInfo.getPortNumber()); + + portIdx++; + } + } + } + + return null; + } + + private MidiDeviceInfo[] getDeviceInfos() + { + synchronized (MidiDeviceManager.class) + { + MidiDeviceInfo[] infos = new MidiDeviceInfo[midiDevices.size()]; + + int idx = 0; + for (Pair midiDevice : midiDevices) + infos[idx++] = midiDevice.first.getInfo(); + + return infos; + } + } + + private Pair getMidiDevicePairForId (int deviceId) + { + synchronized (MidiDeviceManager.class) + { + for (Pair midiDevice : midiDevices) + if (midiDevice.first.getInfo().getId() == deviceId) + return midiDevice; + } + + return null; + } + + private MidiManager manager; + private HashMap btDevicesPairing; + private HashMap openTasks; + private ArrayList> midiDevices; + private MidiDeviceInfo[] deviceInfos; + private HashMap> openPorts; + } + + public MidiDeviceManager getAndroidMidiDeviceManager() + { + if (getSystemService (MIDI_SERVICE) == null) + return null; + + synchronized (DemoRunner.class) + { + if (midiDeviceManager == null) + midiDeviceManager = new MidiDeviceManager(); + } + + return midiDeviceManager; + } + + public BluetoothManager getAndroidBluetoothManager() + { + BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); + + if (adapter == null) + return null; + + if (adapter.getBluetoothLeScanner() == null) + return null; + + synchronized (DemoRunner.class) + { + if (bluetoothManager == null) + bluetoothManager = new BluetoothManager(); + } + + return bluetoothManager; + } + + //============================================================================== + @Override + public void onCreate (Bundle savedInstanceState) + { + super.onCreate (savedInstanceState); + + isScreenSaverEnabled = true; + hideActionBar(); + viewHolder = new ViewHolder (this); + setContentView (viewHolder); + + setVolumeControlStream (AudioManager.STREAM_MUSIC); + + permissionCallbackPtrMap = new HashMap(); + appPausedResumedListeners = new HashMap(); + } + + @Override + protected void onDestroy() + { + quitApp(); + super.onDestroy(); + + clearDataCache(); + } + + @Override + protected void onPause() + { + suspendApp(); + + Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); + + for (Long k : keys) + appPausedResumedListeners.get (k).appPaused(); + + try + { + Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down + // openGL glitches when pausing/resuming apps.. + } catch (InterruptedException e) {} + + super.onPause(); + } + + @Override + protected void onResume() + { + super.onResume(); + resumeApp(); + + Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); + + for (Long k : keys) + appPausedResumedListeners.get (k).appResumed(); + } + + @Override + public void onConfigurationChanged (Configuration cfg) + { + super.onConfigurationChanged (cfg); + setContentView (viewHolder); + } + + private void callAppLauncher() + { + launchApp (getApplicationInfo().publicSourceDir, + getApplicationInfo().dataDir); + } + + // Need to override this as the default implementation always finishes the activity. + @Override + public void onBackPressed() + { + ComponentPeerView focusedView = getViewWithFocusOrDefaultView(); + + if (focusedView == null) + return; + + focusedView.backButtonPressed(); + } + + private ComponentPeerView getViewWithFocusOrDefaultView() + { + for (int i = 0; i < viewHolder.getChildCount(); ++i) + { + if (viewHolder.getChildAt (i).hasFocus()) + return (ComponentPeerView) viewHolder.getChildAt (i); + } + + if (viewHolder.getChildCount() > 0) + return (ComponentPeerView) viewHolder.getChildAt (0); + + return null; + } + + //============================================================================== + private void hideActionBar() + { + // get "getActionBar" method + java.lang.reflect.Method getActionBarMethod = null; + try + { + getActionBarMethod = this.getClass().getMethod ("getActionBar"); + } + catch (SecurityException e) { return; } + catch (NoSuchMethodException e) { return; } + if (getActionBarMethod == null) return; + + // invoke "getActionBar" method + Object actionBar = null; + try + { + actionBar = getActionBarMethod.invoke (this); + } + catch (java.lang.IllegalArgumentException e) { return; } + catch (java.lang.IllegalAccessException e) { return; } + catch (java.lang.reflect.InvocationTargetException e) { return; } + if (actionBar == null) return; + + // get "hide" method + java.lang.reflect.Method actionBarHideMethod = null; + try + { + actionBarHideMethod = actionBar.getClass().getMethod ("hide"); + } + catch (SecurityException e) { return; } + catch (NoSuchMethodException e) { return; } + if (actionBarHideMethod == null) return; + + // invoke "hide" method + try + { + actionBarHideMethod.invoke (actionBar); + } + catch (java.lang.IllegalArgumentException e) {} + catch (java.lang.IllegalAccessException e) {} + catch (java.lang.reflect.InvocationTargetException e) {} + } + + void requestPermissionsCompat (String[] permissions, int requestCode) + { + Method requestPermissionsMethod = null; + try + { + requestPermissionsMethod = this.getClass().getMethod ("requestPermissions", + String[].class, int.class); + } + catch (SecurityException e) { return; } + catch (NoSuchMethodException e) { return; } + if (requestPermissionsMethod == null) return; + + try + { + requestPermissionsMethod.invoke (this, permissions, requestCode); + } + catch (java.lang.IllegalArgumentException e) {} + catch (java.lang.IllegalAccessException e) {} + catch (java.lang.reflect.InvocationTargetException e) {} + } + + //============================================================================== + private native void launchApp (String appFile, String appDataDir); + private native void quitApp(); + private native void suspendApp(); + private native void resumeApp(); + private native void setScreenSize (int screenWidth, int screenHeight, int dpi); + private native void appActivityResult (int requestCode, int resultCode, Intent data); + private native void appNewIntent (Intent intent); + + //============================================================================== + private ViewHolder viewHolder; + private MidiDeviceManager midiDeviceManager = null; + private BluetoothManager bluetoothManager = null; + private boolean isScreenSaverEnabled; + private java.util.Timer keepAliveTimer; + + public final ComponentPeerView createNewView (boolean opaque, long host) + { + ComponentPeerView v = new ComponentPeerView (this, opaque, host); + viewHolder.addView (v); + addAppPausedResumedListener (v, host); + return v; + } + + public final void deleteView (ComponentPeerView view) + { + removeAppPausedResumedListener (view, view.host); + + view.host = 0; + + ViewGroup group = (ViewGroup) (view.getParent()); + + if (group != null) + group.removeView (view); + } + + public final void deleteNativeSurfaceView (NativeSurfaceView view) + { + ViewGroup group = (ViewGroup) (view.getParent()); + + if (group != null) + group.removeView (view); + } + + final class ViewHolder extends ViewGroup + { + public ViewHolder (Context context) + { + super (context); + setDescendantFocusability (ViewGroup.FOCUS_AFTER_DESCENDANTS); + setFocusable (false); + } + + protected final void onLayout (boolean changed, int left, int top, int right, int bottom) + { + setScreenSize (getWidth(), getHeight(), getDPI()); + + if (isFirstResize) + { + isFirstResize = false; + callAppLauncher(); + } + } + + private final int getDPI() + { + DisplayMetrics metrics = new DisplayMetrics(); + getWindowManager().getDefaultDisplay().getMetrics (metrics); + return metrics.densityDpi; + } + + private boolean isFirstResize = true; + } + + public final void excludeClipRegion (android.graphics.Canvas canvas, float left, float top, float right, float bottom) + { + canvas.clipRect (left, top, right, bottom, android.graphics.Region.Op.DIFFERENCE); + } + + //============================================================================== + public final void setScreenSaver (boolean enabled) + { + if (isScreenSaverEnabled != enabled) + { + isScreenSaverEnabled = enabled; + + if (keepAliveTimer != null) + { + keepAliveTimer.cancel(); + keepAliveTimer = null; + } + + if (enabled) + { + getWindow().clearFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); + } + else + { + getWindow().addFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); + + // If no user input is received after about 3 seconds, the OS will lower the + // task's priority, so this timer forces it to be kept active. + keepAliveTimer = new java.util.Timer(); + + keepAliveTimer.scheduleAtFixedRate (new TimerTask() + { + @Override + public void run() + { + android.app.Instrumentation instrumentation = new android.app.Instrumentation(); + + try + { + instrumentation.sendKeyDownUpSync (KeyEvent.KEYCODE_UNKNOWN); + } + catch (Exception e) + { + } + } + }, 2000, 2000); + } + } + } + + public final boolean getScreenSaver() + { + return isScreenSaverEnabled; + } + + //============================================================================== + public final String getClipboardContent() + { + ClipboardManager clipboard = (ClipboardManager) getSystemService (CLIPBOARD_SERVICE); + return clipboard.getText().toString(); + } + + public final void setClipboardContent (String newText) + { + ClipboardManager clipboard = (ClipboardManager) getSystemService (CLIPBOARD_SERVICE); + clipboard.setText (newText); + } + + //============================================================================== + public final void showMessageBox (String title, String message, final long callback) + { + AlertDialog.Builder builder = new AlertDialog.Builder (this); + builder.setTitle (title) + .setMessage (message) + .setCancelable (true) + .setOnCancelListener (new DialogInterface.OnCancelListener() + { + public void onCancel (DialogInterface dialog) + { + DemoRunner.this.alertDismissed (callback, 0); + } + }) + .setPositiveButton ("OK", new DialogInterface.OnClickListener() + { + public void onClick (DialogInterface dialog, int id) + { + dialog.dismiss(); + DemoRunner.this.alertDismissed (callback, 0); + } + }); + + builder.create().show(); + } + + public final void showOkCancelBox (String title, String message, final long callback, + String okButtonText, String cancelButtonText) + { + AlertDialog.Builder builder = new AlertDialog.Builder (this); + builder.setTitle (title) + .setMessage (message) + .setCancelable (true) + .setOnCancelListener (new DialogInterface.OnCancelListener() + { + public void onCancel (DialogInterface dialog) + { + DemoRunner.this.alertDismissed (callback, 0); + } + }) + .setPositiveButton (okButtonText.isEmpty() ? "OK" : okButtonText, new DialogInterface.OnClickListener() + { + public void onClick (DialogInterface dialog, int id) + { + dialog.dismiss(); + DemoRunner.this.alertDismissed (callback, 1); + } + }) + .setNegativeButton (cancelButtonText.isEmpty() ? "Cancel" : cancelButtonText, new DialogInterface.OnClickListener() + { + public void onClick (DialogInterface dialog, int id) + { + dialog.dismiss(); + DemoRunner.this.alertDismissed (callback, 0); + } + }); + + builder.create().show(); + } + + public final void showYesNoCancelBox (String title, String message, final long callback) + { + AlertDialog.Builder builder = new AlertDialog.Builder (this); + builder.setTitle (title) + .setMessage (message) + .setCancelable (true) + .setOnCancelListener (new DialogInterface.OnCancelListener() + { + public void onCancel (DialogInterface dialog) + { + DemoRunner.this.alertDismissed (callback, 0); + } + }) + .setPositiveButton ("Yes", new DialogInterface.OnClickListener() + { + public void onClick (DialogInterface dialog, int id) + { + dialog.dismiss(); + DemoRunner.this.alertDismissed (callback, 1); + } + }) + .setNegativeButton ("No", new DialogInterface.OnClickListener() + { + public void onClick (DialogInterface dialog, int id) + { + dialog.dismiss(); + DemoRunner.this.alertDismissed (callback, 2); + } + }) + .setNeutralButton ("Cancel", new DialogInterface.OnClickListener() + { + public void onClick (DialogInterface dialog, int id) + { + dialog.dismiss(); + DemoRunner.this.alertDismissed (callback, 0); + } + }); + + builder.create().show(); + } + + public native void alertDismissed (long callback, int id); + + //============================================================================== + public interface AppPausedResumedListener + { + void appPaused(); + void appResumed(); + } + + private Map appPausedResumedListeners; + + public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) + { + appPausedResumedListeners.put (new Long (listenerHost), l); + } + + public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) + { + appPausedResumedListeners.remove (new Long (listenerHost)); + } + + //============================================================================== + public final class ComponentPeerView extends ViewGroup + implements View.OnFocusChangeListener, AppPausedResumedListener + { + public ComponentPeerView (Context context, boolean opaque_, long host) + { + super (context); + this.host = host; + setWillNotDraw (false); + opaque = opaque_; + + setFocusable (true); + setFocusableInTouchMode (true); + setOnFocusChangeListener (this); + + // swap red and blue colours to match internal opengl texture format + ColorMatrix colorMatrix = new ColorMatrix(); + + float[] colorTransform = { 0, 0, 1.0f, 0, 0, + 0, 1.0f, 0, 0, 0, + 1.0f, 0, 0, 0, 0, + 0, 0, 0, 1.0f, 0 }; + + colorMatrix.set (colorTransform); + paint.setColorFilter (new ColorMatrixColorFilter (colorMatrix)); + + java.lang.reflect.Method method = null; + + try + { + method = getClass().getMethod ("setLayerType", int.class, Paint.class); + } + catch (SecurityException e) {} + catch (NoSuchMethodException e) {} + + if (method != null) + { + try + { + int layerTypeNone = 0; + method.invoke (this, layerTypeNone, null); + } + catch (java.lang.IllegalArgumentException e) {} + catch (java.lang.IllegalAccessException e) {} + catch (java.lang.reflect.InvocationTargetException e) {} + } + } + + //============================================================================== + private native void handlePaint (long host, Canvas canvas, Paint paint); + + @Override + public void onDraw (Canvas canvas) + { + if (host == 0) + return; + + handlePaint (host, canvas, paint); + } + + @Override + public boolean isOpaque() + { + return opaque; + } + + private boolean opaque; + private long host; + private Paint paint = new Paint(); + + //============================================================================== + private native void handleMouseDown (long host, int index, float x, float y, long time); + private native void handleMouseDrag (long host, int index, float x, float y, long time); + private native void handleMouseUp (long host, int index, float x, float y, long time); + + @Override + public boolean onTouchEvent (MotionEvent event) + { + if (host == 0) + return false; + + int action = event.getAction(); + long time = event.getEventTime(); + + switch (action & MotionEvent.ACTION_MASK) + { + case MotionEvent.ACTION_DOWN: + handleMouseDown (host, event.getPointerId(0), event.getX(), event.getY(), time); + return true; + + case MotionEvent.ACTION_CANCEL: + case MotionEvent.ACTION_UP: + handleMouseUp (host, event.getPointerId(0), event.getX(), event.getY(), time); + return true; + + case MotionEvent.ACTION_MOVE: + { + int n = event.getPointerCount(); + for (int i = 0; i < n; ++i) + handleMouseDrag (host, event.getPointerId(i), event.getX(i), event.getY(i), time); + + return true; + } + + case MotionEvent.ACTION_POINTER_UP: + { + int i = (action & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT; + handleMouseUp (host, event.getPointerId(i), event.getX(i), event.getY(i), time); + return true; + } + + case MotionEvent.ACTION_POINTER_DOWN: + { + int i = (action & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT; + handleMouseDown (host, event.getPointerId(i), event.getX(i), event.getY(i), time); + return true; + } + + default: + break; + } + + return false; + } + + //============================================================================== + private native void handleKeyDown (long host, int keycode, int textchar); + private native void handleKeyUp (long host, int keycode, int textchar); + private native void handleBackButton (long host); + private native void handleKeyboardHidden (long host); + + public void showKeyboard (String type) + { + InputMethodManager imm = (InputMethodManager) getSystemService (Context.INPUT_METHOD_SERVICE); + + if (imm != null) + { + if (type.length() > 0) + { + imm.showSoftInput (this, android.view.inputmethod.InputMethodManager.SHOW_IMPLICIT); + imm.setInputMethod (getWindowToken(), type); + keyboardDismissListener.startListening(); + } + else + { + imm.hideSoftInputFromWindow (getWindowToken(), 0); + keyboardDismissListener.stopListening(); + } + } + } + + public void backButtonPressed() + { + if (host == 0) + return; + + handleBackButton (host); + } + + @Override + public boolean onKeyDown (int keyCode, KeyEvent event) + { + if (host == 0) + return false; + + switch (keyCode) + { + case KeyEvent.KEYCODE_VOLUME_UP: + case KeyEvent.KEYCODE_VOLUME_DOWN: + return super.onKeyDown (keyCode, event); + case KeyEvent.KEYCODE_BACK: + { + ((Activity) getContext()).onBackPressed(); + return true; + } + + default: + break; + } + + handleKeyDown (host, keyCode, event.getUnicodeChar()); + return true; + } + + @Override + public boolean onKeyUp (int keyCode, KeyEvent event) + { + if (host == 0) + return false; + + handleKeyUp (host, keyCode, event.getUnicodeChar()); + return true; + } + + @Override + public boolean onKeyMultiple (int keyCode, int count, KeyEvent event) + { + if (host == 0) + return false; + + if (keyCode != KeyEvent.KEYCODE_UNKNOWN || event.getAction() != KeyEvent.ACTION_MULTIPLE) + return super.onKeyMultiple (keyCode, count, event); + + if (event.getCharacters() != null) + { + int utf8Char = event.getCharacters().codePointAt (0); + handleKeyDown (host, utf8Char, utf8Char); + return true; + } + + return false; + } + + //============================================================================== + private final class KeyboardDismissListener + { + public KeyboardDismissListener (ComponentPeerView viewToUse) + { + view = viewToUse; + } + + private void startListening() + { + view.getViewTreeObserver().addOnGlobalLayoutListener(viewTreeObserver); + } + + private void stopListening() + { + view.getViewTreeObserver().removeGlobalOnLayoutListener(viewTreeObserver); + } + + private class TreeObserver implements ViewTreeObserver.OnGlobalLayoutListener + { + TreeObserver() + { + keyboardShown = false; + } + + @Override + public void onGlobalLayout() + { + Rect r = new Rect(); + + ViewGroup parentView = (ViewGroup) getParent(); + + if (parentView == null) + return; + + parentView.getWindowVisibleDisplayFrame (r); + + int diff = parentView.getHeight() - (r.bottom - r.top); + + // Arbitrary threshold, surely keyboard would take more than 20 pix. + if (diff < 20 && keyboardShown) + { + keyboardShown = false; + handleKeyboardHidden (view.host); + } + + if (! keyboardShown && diff > 20) + keyboardShown = true; + }; + + private boolean keyboardShown; + }; + + private ComponentPeerView view; + private TreeObserver viewTreeObserver = new TreeObserver(); + } + + private KeyboardDismissListener keyboardDismissListener = new KeyboardDismissListener(this); + + // this is here to make keyboard entry work on a Galaxy Tab2 10.1 + @Override + public InputConnection onCreateInputConnection (EditorInfo outAttrs) + { + outAttrs.actionLabel = ""; + outAttrs.hintText = ""; + outAttrs.initialCapsMode = 0; + outAttrs.initialSelEnd = outAttrs.initialSelStart = -1; + outAttrs.label = ""; + outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_EXTRACT_UI; + outAttrs.inputType = InputType.TYPE_NULL; + + return new BaseInputConnection (this, false); + } + + //============================================================================== + @Override + protected void onSizeChanged (int w, int h, int oldw, int oldh) + { + if (host == 0) + return; + + super.onSizeChanged (w, h, oldw, oldh); + viewSizeChanged (host); + } + + @Override + protected void onLayout (boolean changed, int left, int top, int right, int bottom) + { + for (int i = getChildCount(); --i >= 0;) + requestTransparentRegion (getChildAt (i)); + } + + private native void viewSizeChanged (long host); + + @Override + public void onFocusChange (View v, boolean hasFocus) + { + if (host == 0) + return; + + if (v == this) + focusChanged (host, hasFocus); + } + + private native void focusChanged (long host, boolean hasFocus); + + public void setViewName (String newName) {} + + public void setSystemUiVisibilityCompat (int visibility) + { + Method systemUIVisibilityMethod = null; + try + { + systemUIVisibilityMethod = this.getClass().getMethod ("setSystemUiVisibility", int.class); + } + catch (SecurityException e) { return; } + catch (NoSuchMethodException e) { return; } + if (systemUIVisibilityMethod == null) return; + + try + { + systemUIVisibilityMethod.invoke (this, visibility); + } + catch (java.lang.IllegalArgumentException e) {} + catch (java.lang.IllegalAccessException e) {} + catch (java.lang.reflect.InvocationTargetException e) {} + } + + public boolean isVisible() { return getVisibility() == VISIBLE; } + public void setVisible (boolean b) { setVisibility (b ? VISIBLE : INVISIBLE); } + + public boolean containsPoint (int x, int y) + { + return true; //xxx needs to check overlapping views + } + + //============================================================================== + private native void handleAppPaused (long host); + private native void handleAppResumed (long host); + + @Override + public void appPaused() + { + if (host == 0) + return; + + handleAppPaused (host); + } + + @Override + public void appResumed() + { + if (host == 0) + return; + + // Ensure that navigation/status bar visibility is correctly restored. + handleAppResumed (host); + } + } + + //============================================================================== + public static class NativeSurfaceView extends SurfaceView + implements SurfaceHolder.Callback + { + private long nativeContext = 0; + + NativeSurfaceView (Context context, long nativeContextPtr) + { + super (context); + nativeContext = nativeContextPtr; + } + + public Surface getNativeSurface() + { + Surface retval = null; + + SurfaceHolder holder = getHolder(); + if (holder != null) + retval = holder.getSurface(); + + return retval; + } + + //============================================================================== + @Override + public void surfaceChanged (SurfaceHolder holder, int format, int width, int height) + { + surfaceChangedNative (nativeContext, holder, format, width, height); + } + + @Override + public void surfaceCreated (SurfaceHolder holder) + { + surfaceCreatedNative (nativeContext, holder); + } + + @Override + public void surfaceDestroyed (SurfaceHolder holder) + { + surfaceDestroyedNative (nativeContext, holder); + } + + @Override + protected void dispatchDraw (Canvas canvas) + { + super.dispatchDraw (canvas); + dispatchDrawNative (nativeContext, canvas); + } + + //============================================================================== + @Override + protected void onAttachedToWindow () + { + super.onAttachedToWindow(); + getHolder().addCallback (this); + } + + @Override + protected void onDetachedFromWindow () + { + super.onDetachedFromWindow(); + getHolder().removeCallback (this); + } + + //============================================================================== + private native void dispatchDrawNative (long nativeContextPtr, Canvas canvas); + private native void surfaceCreatedNative (long nativeContextptr, SurfaceHolder holder); + private native void surfaceDestroyedNative (long nativeContextptr, SurfaceHolder holder); + private native void surfaceChangedNative (long nativeContextptr, SurfaceHolder holder, + int format, int width, int height); + } + + public NativeSurfaceView createNativeSurfaceView (long nativeSurfacePtr) + { + return new NativeSurfaceView (this, nativeSurfacePtr); + } + + //============================================================================== + public final int[] renderGlyph (char glyph1, char glyph2, Paint paint, android.graphics.Matrix matrix, Rect bounds) + { + Path p = new Path(); + + char[] str = { glyph1, glyph2 }; + paint.getTextPath (str, 0, (glyph2 != 0 ? 2 : 1), 0.0f, 0.0f, p); + + RectF boundsF = new RectF(); + p.computeBounds (boundsF, true); + matrix.mapRect (boundsF); + + boundsF.roundOut (bounds); + bounds.left--; + bounds.right++; + + final int w = bounds.width(); + final int h = Math.max (1, bounds.height()); + + Bitmap bm = Bitmap.createBitmap (w, h, Bitmap.Config.ARGB_8888); + + Canvas c = new Canvas (bm); + matrix.postTranslate (-bounds.left, -bounds.top); + c.setMatrix (matrix); + c.drawPath (p, paint); + + final int sizeNeeded = w * h; + if (cachedRenderArray.length < sizeNeeded) + cachedRenderArray = new int [sizeNeeded]; + + bm.getPixels (cachedRenderArray, 0, w, 0, 0, w, h); + bm.recycle(); + return cachedRenderArray; + } + + private int[] cachedRenderArray = new int [256]; + + //============================================================================== + public static class NativeInvocationHandler implements InvocationHandler + { + public NativeInvocationHandler (Activity activityToUse, long nativeContextRef) + { + activity = activityToUse; + nativeContext = nativeContextRef; + } + + public void nativeContextDeleted() + { + nativeContext = 0; + } + + @Override + public void finalize() + { + activity.runOnUiThread (new Runnable() + { + @Override + public void run() + { + if (nativeContext != 0) + dispatchFinalize (nativeContext); + } + }); + } + + @Override + public Object invoke (Object proxy, Method method, Object[] args) throws Throwable + { + return dispatchInvoke (nativeContext, proxy, method, args); + } + + //============================================================================== + Activity activity; + private long nativeContext = 0; + + private native void dispatchFinalize (long nativeContextRef); + private native Object dispatchInvoke (long nativeContextRef, Object proxy, Method method, Object[] args); + } + + public InvocationHandler createInvocationHandler (long nativeContextRef) + { + return new NativeInvocationHandler (this, nativeContextRef); + } + + public void invocationHandlerContextDeleted (InvocationHandler handler) + { + ((NativeInvocationHandler) handler).nativeContextDeleted(); + } + + //============================================================================== + public static class HTTPStream + { + public HTTPStream (String address, boolean isPostToUse, byte[] postDataToUse, + String headersToUse, int timeOutMsToUse, + int[] statusCodeToUse, StringBuffer responseHeadersToUse, + int numRedirectsToFollowToUse, String httpRequestCmdToUse) throws IOException + { + isPost = isPostToUse; + postData = postDataToUse; + headers = headersToUse; + timeOutMs = timeOutMsToUse; + statusCode = statusCodeToUse; + responseHeaders = responseHeadersToUse; + totalLength = -1; + numRedirectsToFollow = numRedirectsToFollowToUse; + httpRequestCmd = httpRequestCmdToUse; + + connection = createConnection (address, isPost, postData, headers, timeOutMs, httpRequestCmd); + } + + private final HttpURLConnection createConnection (String address, boolean isPost, byte[] postData, + String headers, int timeOutMs, String httpRequestCmdToUse) throws IOException + { + HttpURLConnection newConnection = (HttpURLConnection) (new URL(address).openConnection()); + + try + { + newConnection.setInstanceFollowRedirects (false); + newConnection.setConnectTimeout (timeOutMs); + newConnection.setReadTimeout (timeOutMs); + + // headers - if not empty, this string is appended onto the headers that are used for the request. It must therefore be a valid set of HTML header directives, separated by newlines. + // So convert headers string to an array, with an element for each line + String headerLines[] = headers.split("\\n"); + + // Set request headers + for (int i = 0; i < headerLines.length; ++i) + { + int pos = headerLines[i].indexOf (":"); + + if (pos > 0 && pos < headerLines[i].length()) + { + String field = headerLines[i].substring (0, pos); + String value = headerLines[i].substring (pos + 1); + + if (value.length() > 0) + newConnection.setRequestProperty (field, value); + } + } + + newConnection.setRequestMethod (httpRequestCmd); + + if (isPost) + { + newConnection.setDoOutput (true); + + if (postData != null) + { + OutputStream out = newConnection.getOutputStream(); + out.write(postData); + out.flush(); + } + } + + return newConnection; + } + catch (Throwable e) + { + newConnection.disconnect(); + throw new IOException ("Connection error"); + } + } + + private final InputStream getCancellableStream (final boolean isInput) throws ExecutionException + { + synchronized (createFutureLock) + { + if (hasBeenCancelled.get()) + return null; + + streamFuture = executor.submit (new Callable() + { + @Override + public BufferedInputStream call() throws IOException + { + return new BufferedInputStream (isInput ? connection.getInputStream() + : connection.getErrorStream()); + } + }); + } + + try + { + return streamFuture.get(); + } + catch (InterruptedException e) + { + return null; + } + catch (CancellationException e) + { + return null; + } + } + + public final boolean connect() + { + boolean result = false; + int numFollowedRedirects = 0; + + while (true) + { + result = doConnect(); + + if (! result) + return false; + + if (++numFollowedRedirects > numRedirectsToFollow) + break; + + int status = statusCode[0]; + + if (status == 301 || status == 302 || status == 303 || status == 307) + { + // Assumes only one occurrence of "Location" + int pos1 = responseHeaders.indexOf ("Location:") + 10; + int pos2 = responseHeaders.indexOf ("\n", pos1); + + if (pos2 > pos1) + { + String currentLocation = connection.getURL().toString(); + String newLocation = responseHeaders.substring (pos1, pos2); + + try + { + // Handle newLocation whether it's absolute or relative + URL baseUrl = new URL (currentLocation); + URL newUrl = new URL (baseUrl, newLocation); + String transformedNewLocation = newUrl.toString(); + + if (transformedNewLocation != currentLocation) + { + // Clear responseHeaders before next iteration + responseHeaders.delete (0, responseHeaders.length()); + + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + connection.disconnect(); + + try + { + connection = createConnection (transformedNewLocation, isPost, + postData, headers, timeOutMs, + httpRequestCmd); + } + catch (Throwable e) + { + return false; + } + } + } + else + { + break; + } + } + catch (Throwable e) + { + return false; + } + } + else + { + break; + } + } + else + { + break; + } + } + + return result; + } + + private final boolean doConnect() + { + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + try + { + try + { + inputStream = getCancellableStream (true); + } + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally + { + statusCode[0] = connection.getResponseCode(); + } + + try + { + if (statusCode[0] >= 400) + inputStream = getCancellableStream (false); + else + inputStream = getCancellableStream (true); + } + catch (ExecutionException e) + {} + + for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) + { + if (entry.getKey() != null && entry.getValue() != null) + { + responseHeaders.append(entry.getKey() + ": " + + android.text.TextUtils.join(",", entry.getValue()) + "\n"); + + if (entry.getKey().compareTo ("Content-Length") == 0) + totalLength = Integer.decode (entry.getValue().get (0)); + } + } + + return true; + } + catch (IOException e) + { + return false; + } + } + } + + static class DisconnectionRunnable implements Runnable + { + public DisconnectionRunnable (HttpURLConnection theConnection, + InputStream theInputStream, + ReentrantLock theCreateStreamLock, + Object theCreateFutureLock, + Future theStreamFuture) + { + connectionToDisconnect = theConnection; + inputStream = theInputStream; + createStreamLock = theCreateStreamLock; + createFutureLock = theCreateFutureLock; + streamFuture = theStreamFuture; + } + + public void run() + { + try + { + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (connectionToDisconnect != null) + connectionToDisconnect.disconnect(); + + if (inputStream != null) + inputStream.close(); + } + catch (IOException e) + {} + finally + { + createStreamLock.unlock(); + } + } + + private HttpURLConnection connectionToDisconnect; + private InputStream inputStream; + private ReentrantLock createStreamLock; + private Object createFutureLock; + Future streamFuture; + } + + public final void release() + { + DisconnectionRunnable disconnectionRunnable = new DisconnectionRunnable (connection, + inputStream, + createStreamLock, + createFutureLock, + streamFuture); + + synchronized (createStreamLock) + { + hasBeenCancelled.set (true); + + connection = null; + } + + Thread disconnectionThread = new Thread(disconnectionRunnable); + disconnectionThread.start(); + } + + public final int read (byte[] buffer, int numBytes) + { + int num = 0; + + try + { + synchronized (createStreamLock) + { + if (inputStream != null) + num = inputStream.read (buffer, 0, numBytes); + } + } + catch (IOException e) + {} + + if (num > 0) + position += num; + + return num; + } + + public final long getPosition() { return position; } + public final long getTotalLength() { return totalLength; } + public final boolean isExhausted() { return false; } + public final boolean setPosition (long newPos) { return false; } + + private boolean isPost; + private byte[] postData; + private String headers; + private int timeOutMs; + String httpRequestCmd; + private HttpURLConnection connection; + private int[] statusCode; + private StringBuffer responseHeaders; + private int totalLength; + private int numRedirectsToFollow; + private InputStream inputStream; + private long position; + private final ReentrantLock createStreamLock = new ReentrantLock(); + private final Object createFutureLock = new Object(); + private AtomicBoolean hasBeenCancelled = new AtomicBoolean(); + + private final ExecutorService executor = Executors.newCachedThreadPool (Executors.defaultThreadFactory()); + Future streamFuture; + } + + public static final HTTPStream createHTTPStream (String address, boolean isPost, byte[] postData, + String headers, int timeOutMs, int[] statusCode, + StringBuffer responseHeaders, int numRedirectsToFollow, + String httpRequestCmd) + { + // timeout parameter of zero for HttpUrlConnection is a blocking connect (negative value for juce::URL) + if (timeOutMs < 0) + timeOutMs = 0; + else if (timeOutMs == 0) + timeOutMs = 30000; + + for (;;) + { + try + { + HTTPStream httpStream = new HTTPStream (address, isPost, postData, headers, + timeOutMs, statusCode, responseHeaders, + numRedirectsToFollow, httpRequestCmd); + + return httpStream; + } + catch (Throwable e) {} + + return null; + } + } + + public final void launchURL (String url) + { + startActivity (new Intent (Intent.ACTION_VIEW, Uri.parse (url))); + } + + private native boolean webViewPageLoadStarted (long host, WebView view, String url); + private native void webViewPageLoadFinished (long host, WebView view, String url); + private native void webViewReceivedError (long host, WebView view, WebResourceRequest request, WebResourceError error); private native void webViewReceivedHttpError (long host, WebView view, WebResourceRequest request, WebResourceResponse errorResponse); private native void webViewReceivedSslError (long host, WebView view, SslErrorHandler handler, SslError error); + private native void webViewCloseWindowRequest (long host, WebView view); + private native void webViewCreateWindowRequest (long host, WebView view); + + //============================================================================== + public class JuceWebViewClient extends WebViewClient + { + public JuceWebViewClient (long hostToUse) + { + host = hostToUse; + } + + public void hostDeleted() + { + synchronized (hostLock) + { + host = 0; + } + } + + @Override + public void onPageFinished (WebView view, String url) + { + if (host == 0) + return; + + webViewPageLoadFinished (host, view, url); + } + + @Override + public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) + { + if (host == 0) + return; + + webViewReceivedSslError (host, view, handler, error); + } + + @Override + public void onReceivedError (WebView view, WebResourceRequest request, WebResourceError error) + { + if (host == 0) + return; + + webViewReceivedError (host, view, request, error); + } + + @Override + public void onReceivedHttpError (WebView view, WebResourceRequest request, WebResourceResponse errorResponse) + { + if (host == 0) + return; + + webViewReceivedHttpError (host, view, request, errorResponse); + } + + @Override + public WebResourceResponse shouldInterceptRequest (WebView view, WebResourceRequest request) + { + synchronized (hostLock) + { + if (host != 0) + { + boolean shouldLoad = webViewPageLoadStarted (host, view, request.getUrl().toString()); + + if (shouldLoad) + return null; + } + } + + return new WebResourceResponse ("text/html", null, null); + } + + private long host; + private final Object hostLock = new Object(); + } + + public class JuceWebChromeClient extends WebChromeClient + { + public JuceWebChromeClient (long hostToUse) + { + host = hostToUse; + } + + @Override + public void onCloseWindow (WebView window) + { + webViewCloseWindowRequest (host, window); + } + + @Override + public boolean onCreateWindow (WebView view, boolean isDialog, + boolean isUserGesture, Message resultMsg) + { + webViewCreateWindowRequest (host, view); + return false; + } + + private long host; + private final Object hostLock = new Object(); + } + + + //============================================================================== + public class CameraDeviceStateCallback extends CameraDevice.StateCallback + { + private native void cameraDeviceStateClosed (long host, CameraDevice camera); + private native void cameraDeviceStateDisconnected (long host, CameraDevice camera); + private native void cameraDeviceStateError (long host, CameraDevice camera, int error); + private native void cameraDeviceStateOpened (long host, CameraDevice camera); + + CameraDeviceStateCallback (long hostToUse) + { + host = hostToUse; + } + + @Override + public void onClosed (CameraDevice camera) + { + cameraDeviceStateClosed (host, camera); + } + + @Override + public void onDisconnected (CameraDevice camera) + { + cameraDeviceStateDisconnected (host, camera); + } + + @Override + public void onError (CameraDevice camera, int error) + { + cameraDeviceStateError (host, camera, error); + } + + @Override + public void onOpened (CameraDevice camera) + { + cameraDeviceStateOpened (host, camera); + } + + private long host; + } + + //============================================================================== + public class CameraCaptureSessionStateCallback extends CameraCaptureSession.StateCallback + { + private native void cameraCaptureSessionActive (long host, CameraCaptureSession session); + private native void cameraCaptureSessionClosed (long host, CameraCaptureSession session); + private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session); + private native void cameraCaptureSessionConfigured (long host, CameraCaptureSession session); + private native void cameraCaptureSessionReady (long host, CameraCaptureSession session); + + CameraCaptureSessionStateCallback (long hostToUse) + { + host = hostToUse; + } + + @Override + public void onActive (CameraCaptureSession session) + { + cameraCaptureSessionActive (host, session); + } + + @Override + public void onClosed (CameraCaptureSession session) + { + cameraCaptureSessionClosed (host, session); + } + + @Override + public void onConfigureFailed (CameraCaptureSession session) + { + cameraCaptureSessionConfigureFailed (host, session); + } + + @Override + public void onConfigured (CameraCaptureSession session) + { + cameraCaptureSessionConfigured (host, session); + } + + @Override + public void onReady (CameraCaptureSession session) + { + cameraCaptureSessionReady (host, session); + } + + private long host; + } + + //============================================================================== + public class CameraCaptureSessionCaptureCallback extends CameraCaptureSession.CaptureCallback + { + private native void cameraCaptureSessionCaptureCompleted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, TotalCaptureResult result); + private native void cameraCaptureSessionCaptureFailed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureFailure failure); + private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureResult partialResult); + private native void cameraCaptureSessionCaptureStarted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, long timestamp, long frameNumber); + private native void cameraCaptureSessionCaptureSequenceAborted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId); + private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber); + + CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview) + { + host = hostToUse; + preview = shouldBePreview; + } + + @Override + public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request, + TotalCaptureResult result) + { + cameraCaptureSessionCaptureCompleted (host, preview, session, request, result); + } + + @Override + public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure) + { + cameraCaptureSessionCaptureFailed (host, preview, session, request, failure); + } + + @Override + public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request, + CaptureResult partialResult) + { + cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult); + } + + @Override + public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId) + { + cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId); + } + + @Override + public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber) + { + cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber); + } + + @Override + public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp, + long frameNumber) + { + cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber); + } + + private long host; + private boolean preview; + } + + //============================================================================== + public class JuceOrientationEventListener extends OrientationEventListener + { + private native void deviceOrientationChanged (long host, int orientation); + + public JuceOrientationEventListener (long hostToUse, Context context, int rate) + { + super (context, rate); + + host = hostToUse; + } + + @Override + public void onOrientationChanged (int orientation) + { + deviceOrientationChanged (host, orientation); + } + + private long host; + } + + + //============================================================================== + public static final String getLocaleValue (boolean isRegion) + { + java.util.Locale locale = java.util.Locale.getDefault(); + + return isRegion ? locale.getCountry() + : locale.getLanguage(); + } + + private static final String getFileLocation (String type) + { + return Environment.getExternalStoragePublicDirectory (type).getAbsolutePath(); + } + + public static final String getDocumentsFolder() + { + if (getAndroidSDKVersion() >= 19) + return getFileLocation ("Documents"); + + return Environment.getDataDirectory().getAbsolutePath(); + } + + public static final String getPicturesFolder() { return getFileLocation (Environment.DIRECTORY_PICTURES); } + public static final String getMusicFolder() { return getFileLocation (Environment.DIRECTORY_MUSIC); } + public static final String getMoviesFolder() { return getFileLocation (Environment.DIRECTORY_MOVIES); } + public static final String getDownloadsFolder() { return getFileLocation (Environment.DIRECTORY_DOWNLOADS); } + + //============================================================================== + @Override + protected void onActivityResult (int requestCode, int resultCode, Intent data) + { + appActivityResult (requestCode, resultCode, data); + } + + @Override + protected void onNewIntent (Intent intent) + { + super.onNewIntent(intent); + setIntent(intent); + + appNewIntent (intent); + } + + //============================================================================== + public final Typeface getTypeFaceFromAsset (String assetName) + { + try + { + return Typeface.createFromAsset (this.getResources().getAssets(), assetName); + } + catch (Throwable e) {} + + return null; + } + + final protected static char[] hexArray = "0123456789ABCDEF".toCharArray(); + + public static String bytesToHex (byte[] bytes) + { + char[] hexChars = new char[bytes.length * 2]; + + for (int j = 0; j < bytes.length; ++j) + { + int v = bytes[j] & 0xff; + hexChars[j * 2] = hexArray[v >>> 4]; + hexChars[j * 2 + 1] = hexArray[v & 0x0f]; + } + + return new String (hexChars); + } + + final private java.util.Map dataCache = new java.util.HashMap(); + + synchronized private final File getDataCacheFile (byte[] data) + { + try + { + java.security.MessageDigest digest = java.security.MessageDigest.getInstance ("MD5"); + digest.update (data); + + String key = bytesToHex (digest.digest()); + + if (dataCache.containsKey (key)) + return (File) dataCache.get (key); + + File f = new File (this.getCacheDir(), "bindata_" + key); + f.delete(); + FileOutputStream os = new FileOutputStream (f); + os.write (data, 0, data.length); + dataCache.put (key, f); + return f; + } + catch (Throwable e) {} + + return null; + } + + private final void clearDataCache() + { + java.util.Iterator it = dataCache.values().iterator(); + + while (it.hasNext()) + { + File f = (File) it.next(); + f.delete(); + } + } + + public final Typeface getTypeFaceFromByteArray (byte[] data) + { + try + { + File f = getDataCacheFile (data); + + if (f != null) + return Typeface.createFromFile (f); + } + catch (Exception e) + { + Log.e ("JUCE", e.toString()); + } + + return null; + } + + public static final int getAndroidSDKVersion() + { + return android.os.Build.VERSION.SDK_INT; + } + + public final String audioManagerGetProperty (String property) + { + Object obj = getSystemService (AUDIO_SERVICE); + if (obj == null) + return null; + + java.lang.reflect.Method method; + + try + { + method = obj.getClass().getMethod ("getProperty", String.class); + } + catch (SecurityException e) { return null; } + catch (NoSuchMethodException e) { return null; } + + if (method == null) + return null; + + try + { + return (String) method.invoke (obj, property); + } + catch (java.lang.IllegalArgumentException e) {} + catch (java.lang.IllegalAccessException e) {} + catch (java.lang.reflect.InvocationTargetException e) {} + + return null; + } + + public final boolean hasSystemFeature (String property) + { + return getPackageManager().hasSystemFeature (property); + } +} diff --git a/examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/SharingContentProvider.java b/examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/SharingContentProvider.java new file mode 100644 index 00000000..9afbbaaa --- /dev/null +++ b/examples/DemoRunner/Builds/Android/app/src/main/java/com/juce/demorunner/SharingContentProvider.java @@ -0,0 +1,138 @@ +package com.juce.demorunner; + +import android.content.ContentProvider; +import android.content.ContentValues; +import android.content.res.AssetFileDescriptor; +import android.content.res.Resources; +import android.database.Cursor; +import android.database.MatrixCursor; +import android.net.Uri; +import android.os.FileObserver; +import android.os.ParcelFileDescriptor; +import java.lang.String; + +public final class SharingContentProvider extends ContentProvider +{ + private Object lock = new Object(); + + private native void contentSharerFileObserverEvent (long host, int event, String path); + + private native Cursor contentSharerQuery (Uri uri, String[] projection, String selection, + String[] selectionArgs, String sortOrder); + + private native void contentSharerCursorClosed (long host); + + private native AssetFileDescriptor contentSharerOpenFile (Uri uri, String mode); + private native String[] contentSharerGetStreamTypes (Uri uri, String mimeTypeFilter); + + public final class ProviderFileObserver extends FileObserver + { + public ProviderFileObserver (long hostToUse, String path, int mask) + { + super (path, mask); + + host = hostToUse; + } + + public void onEvent (int event, String path) + { + contentSharerFileObserverEvent (host, event, path); + } + + private long host; + } + + public final class ProviderCursor extends MatrixCursor + { + ProviderCursor (long hostToUse, String[] columnNames) + { + super (columnNames); + + host = hostToUse; + } + + @Override + public void close() + { + super.close(); + + contentSharerCursorClosed (host); + } + + private long host; + } + + @Override + public boolean onCreate() + { + return true; + } + + @Override + public Cursor query (Uri url, String[] projection, String selection, + String[] selectionArgs, String sortOrder) + { + synchronized (lock) + { + return contentSharerQuery (url, projection, selection, selectionArgs, sortOrder); + } + } + + @Override + public Uri insert (Uri uri, ContentValues values) + { + return null; + } + + @Override + public int update (Uri uri, ContentValues values, String selection, + String[] selectionArgs) + { + return 0; + } + + @Override + public int delete (Uri uri, String selection, String[] selectionArgs) + { + return 0; + } + + @Override + public String getType (Uri uri) + { + return null; + } + + @Override + public AssetFileDescriptor openAssetFile (Uri uri, String mode) + { + synchronized (lock) + { + return contentSharerOpenFile (uri, mode); + } + } + + @Override + public ParcelFileDescriptor openFile (Uri uri, String mode) + { + synchronized (lock) + { + AssetFileDescriptor result = contentSharerOpenFile (uri, mode); + + if (result != null) + return result.getParcelFileDescriptor(); + + return null; + } + } + + @Override + public String[] getStreamTypes (Uri uri, String mimeTypeFilter) + { + synchronized (lock) + { + return contentSharerGetStreamTypes (uri, mimeTypeFilter); + } + } + +} diff --git a/examples/DemoRunner/Builds/Android/app/src/main/java/com/roli/juce/demorunner/DemoRunner.java b/examples/DemoRunner/Builds/Android/app/src/main/java/com/roli/juce/demorunner/DemoRunner.java index af0505a4..7e4f1ae9 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/java/com/roli/juce/demorunner/DemoRunner.java +++ b/examples/DemoRunner/Builds/Android/app/src/main/java/com/roli/juce/demorunner/DemoRunner.java @@ -30,6 +30,7 @@ import android.content.Intent; import android.content.res.Configuration; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; +import android.hardware.camera2.*; import android.net.http.SslError; import android.net.Uri; import android.os.Bundle; @@ -119,6 +120,7 @@ public class DemoRunner extends Activity private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2; private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3; private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4; + private static final int JUCE_PERMISSIONS_CAMERA = 5; private static String getAndroidPermissionName (int permissionID) { @@ -129,6 +131,7 @@ public class DemoRunner extends Activity // use string value as this is not defined in SDKs < 16 case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE"; case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE; + case JUCE_PERMISSIONS_CAMERA: return Manifest.permission.CAMERA; } // unknown permission ID! @@ -1205,6 +1208,7 @@ public class DemoRunner extends Activity setVolumeControlStream (AudioManager.STREAM_MUSIC); permissionCallbackPtrMap = new HashMap(); + appPausedResumedListeners = new HashMap(); } @Override @@ -1221,6 +1225,11 @@ public class DemoRunner extends Activity { suspendApp(); + Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); + + for (Long k : keys) + appPausedResumedListeners.get (k).appPaused(); + try { Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down @@ -1236,12 +1245,10 @@ public class DemoRunner extends Activity super.onResume(); resumeApp(); - // Ensure that navigation/status bar visibility is correctly restored. - for (int i = 0; i < viewHolder.getChildCount(); ++i) - { - if (viewHolder.getChildAt (i) instanceof ComponentPeerView) - ((ComponentPeerView) viewHolder.getChildAt (i)).appResumed(); - } + Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); + + for (Long k : keys) + appPausedResumedListeners.get (k).appResumed(); } @Override @@ -1368,11 +1375,14 @@ public class DemoRunner extends Activity { ComponentPeerView v = new ComponentPeerView (this, opaque, host); viewHolder.addView (v); + addAppPausedResumedListener (v, host); return v; } public final void deleteView (ComponentPeerView view) { + removeAppPausedResumedListener (view, view.host); + view.host = 0; ViewGroup group = (ViewGroup) (view.getParent()); @@ -1590,9 +1600,28 @@ public class DemoRunner extends Activity public native void alertDismissed (long callback, int id); + //============================================================================== + public interface AppPausedResumedListener + { + void appPaused(); + void appResumed(); + } + + private Map appPausedResumedListeners; + + public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) + { + appPausedResumedListeners.put (new Long (listenerHost), l); + } + + public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) + { + appPausedResumedListeners.remove (new Long (listenerHost)); + } + //============================================================================== public final class ComponentPeerView extends ViewGroup - implements View.OnFocusChangeListener + implements View.OnFocusChangeListener, AppPausedResumedListener { public ComponentPeerView (Context context, boolean opaque_, long host) { @@ -1940,13 +1969,25 @@ public class DemoRunner extends Activity } //============================================================================== + private native void handleAppPaused (long host); private native void handleAppResumed (long host); + @Override + public void appPaused() + { + if (host == 0) + return; + + handleAppPaused (host); + } + + @Override public void appResumed() { if (host == 0) return; + // Ensure that navigation/status bar visibility is correctly restored. handleAppResumed (host); } } @@ -2616,6 +2657,179 @@ public class DemoRunner extends Activity private final Object hostLock = new Object(); } + + //============================================================================== + public class CameraDeviceStateCallback extends CameraDevice.StateCallback + { + private native void cameraDeviceStateClosed (long host, CameraDevice camera); + private native void cameraDeviceStateDisconnected (long host, CameraDevice camera); + private native void cameraDeviceStateError (long host, CameraDevice camera, int error); + private native void cameraDeviceStateOpened (long host, CameraDevice camera); + + CameraDeviceStateCallback (long hostToUse) + { + host = hostToUse; + } + + @Override + public void onClosed (CameraDevice camera) + { + cameraDeviceStateClosed (host, camera); + } + + @Override + public void onDisconnected (CameraDevice camera) + { + cameraDeviceStateDisconnected (host, camera); + } + + @Override + public void onError (CameraDevice camera, int error) + { + cameraDeviceStateError (host, camera, error); + } + + @Override + public void onOpened (CameraDevice camera) + { + cameraDeviceStateOpened (host, camera); + } + + private long host; + } + + //============================================================================== + public class CameraCaptureSessionStateCallback extends CameraCaptureSession.StateCallback + { + private native void cameraCaptureSessionActive (long host, CameraCaptureSession session); + private native void cameraCaptureSessionClosed (long host, CameraCaptureSession session); + private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session); + private native void cameraCaptureSessionConfigured (long host, CameraCaptureSession session); + private native void cameraCaptureSessionReady (long host, CameraCaptureSession session); + + CameraCaptureSessionStateCallback (long hostToUse) + { + host = hostToUse; + } + + @Override + public void onActive (CameraCaptureSession session) + { + cameraCaptureSessionActive (host, session); + } + + @Override + public void onClosed (CameraCaptureSession session) + { + cameraCaptureSessionClosed (host, session); + } + + @Override + public void onConfigureFailed (CameraCaptureSession session) + { + cameraCaptureSessionConfigureFailed (host, session); + } + + @Override + public void onConfigured (CameraCaptureSession session) + { + cameraCaptureSessionConfigured (host, session); + } + + @Override + public void onReady (CameraCaptureSession session) + { + cameraCaptureSessionReady (host, session); + } + + private long host; + } + + //============================================================================== + public class CameraCaptureSessionCaptureCallback extends CameraCaptureSession.CaptureCallback + { + private native void cameraCaptureSessionCaptureCompleted (long host, boolean isPreview, CameraCaptureSession session, + CaptureRequest request, TotalCaptureResult result); + private native void cameraCaptureSessionCaptureFailed (long host, boolean isPreview, CameraCaptureSession session, + CaptureRequest request, CaptureFailure failure); + private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session, + CaptureRequest request, CaptureResult partialResult); + private native void cameraCaptureSessionCaptureSequenceAborted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId); + private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber); + private native void cameraCaptureSessionCaptureStarted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, + long timestamp, long frameNumber); + + CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview) + { + host = hostToUse; + preview = shouldBePreview; + } + + @Override + public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request, + TotalCaptureResult result) + { + cameraCaptureSessionCaptureCompleted (host, preview, session, request, result); + } + + @Override + public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure) + { + cameraCaptureSessionCaptureFailed (host, preview, session, request, failure); + } + + @Override + public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request, + CaptureResult partialResult) + { + cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult); + } + + @Override + public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId) + { + cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId); + } + + @Override + public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber) + { + cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber); + } + + @Override + public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp, + long frameNumber) + { + cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber); + } + + private long host; + private boolean preview; + } + + //============================================================================== + public class JuceOrientationEventListener extends OrientationEventListener + { + private native void deviceOrientationChanged (long host, int orientation); + + public JuceOrientationEventListener (long hostToUse, Context context, int rate) + { + super (context, rate); + + host = hostToUse; + } + + @Override + public void onOrientationChanged (int orientation) + { + deviceOrientationChanged (host, orientation); + } + + private long host; + } + + //============================================================================== public static final String getLocaleValue (boolean isRegion) { diff --git a/examples/DemoRunner/Builds/LinuxMakefile/Makefile b/examples/DemoRunner/Builds/LinuxMakefile/Makefile index 4943fc5b..56a39c08 100644 --- a/examples/DemoRunner/Builds/LinuxMakefile/Makefile +++ b/examples/DemoRunner/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.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) + 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) 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 @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.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) + 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) 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 diff --git a/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj b/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj index c4f0557f..9d9fc433 100644 --- a/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj +++ b/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj @@ -6,214 +6,230 @@ 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 = ""; }; - C69C98BDBD8901865A10D03D = {isa = PBXGroup; children = ( - E40C7EC0CD57D5F92EC9C806, - 497F44004821C9FDC0B1A337, - 56280EAEBEAF619C3E98B5C6, - 191B33D36B749639B0FBE856, - D869E1D6485900AB3406AF03, ); name = UI; sourceTree = ""; }; - 29499B4E21D547DC19E2AF25 = {isa = PBXGroup; children = ( - 5F0F17E75142C9F8EC4F9EA8, - C69C98BDBD8901865A10D03D, - 27FB5D78BF900B70101B3E48, - 53ED8C56ECA0B933135E6ED5, ); name = Source; sourceTree = ""; }; - 927472CBD503E38DD7E37090 = {isa = PBXGroup; children = ( - 29499B4E21D547DC19E2AF25, ); name = DemoRunner; sourceTree = ""; }; - 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 = ""; }; - 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 = ""; }; - FEE1C6574320FAB66F0238D2 = {isa = PBXGroup; children = ( - 8DA81A2479F1EF4B1064E3A0, - 8AC905F72A76E7D7275201A4, - 2945A953347C882A8294DF82, ); name = Resources; sourceTree = ""; }; - 17F11FE561BD8D6EB93B64D4 = {isa = PBXGroup; children = ( - E622C086CB768052D799CB95, - A70E204AA2B7B904F9C08770, - F10017EB39A3981DF2FFC565, - 61BF1C5B6EB2C49337A028E7, - 9647BC3EC0BFC192CD7D0643, - A65A103C9FA300E4AEF04066, - 5AB31D4FDB61420CFE50FD52, - BE800C80B08E6D722CACB487, - 95C3EC76835BB2151FA94A67, - 6D190D5FCC9592AB2135AC75, - BC2C11F10F5D2FB30550C95A, - DB13FF3C61C11971D3D61C9B, - 6142F838E6568F8450BC93DB, - 8EACCB8CF4A520630C49BF8A, ); name = Frameworks; sourceTree = ""; }; - 532CECDAA91A39864E7FFF80 = {isa = PBXGroup; children = ( - B953F5C249804F38B818AD2F, ); name = Products; sourceTree = ""; }; - 9979C8B054ED17C9E04C6BAB = {isa = PBXGroup; children = ( - 927472CBD503E38DD7E37090, - 178FF737E5519A4D16208DEB, - 16DD35D8533EE0BA94AAFBF8, - FEE1C6574320FAB66F0238D2, - 17F11FE561BD8D6EB93B64D4, - 532CECDAA91A39864E7FFF80, ); name = Source; sourceTree = ""; }; - 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 = ""; }; + 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 = ""; }; + 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 = ""; }; + 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 = ""; }; + 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 = ""; }; + 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 = ""; }; + BB12537403CC24C02622582C = {isa = PBXGroup; children = ( + E5BFC17E682AB426D203B3E6, + 1FCD2145DE3FCFCF4F55A8AD, + 25E5ED33876A2C752378C859, + EB68BD1224CD9748BFA332C0, + 7A5AAE9EE573FC6105CC4AAC, ); name = UI; sourceTree = ""; }; + 6F933968486D9AD9FE112622 = {isa = PBXGroup; children = ( + CD575607FAA297480EE95F13, + BB12537403CC24C02622582C, + 260481E972425474BB8155B0, + ECE79F1433E92BB6213C86F5, ); name = Source; sourceTree = ""; }; + 9683F931FA1B8B85FA8C4BD8 = {isa = PBXGroup; children = ( + 6F933968486D9AD9FE112622, ); name = DemoRunner; sourceTree = ""; }; + 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 = ""; }; + 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 = ""; }; + D87DCD5DA4EC8D78DFF37FCC = {isa = PBXGroup; children = ( + 0ECB4FCD24794CE516792552, + 388A8209DBB1B08594266121, + 5CD17151385A69F1E07FE85B, + 9EBAEBBD9093CB005D1692F2, + 7B3243C92248D379A0489AA4, + 4EC2782DE1779A130835B64D, + 9672FCE6167ADB567A9EB2F8, + E0A3F113BC27B7B4D6F1D693, ); name = Resources; sourceTree = ""; }; + 4452EAA652B65A9AE648288C = {isa = PBXGroup; children = ( + A04E4408525F24F7DCBA000E, + 470C3E4553B513FFEF752779, + DC192EFA899E6CBE6B5CD394, + 3B99CF94C44E2EE04635A439, + 440D507FD8F31DB62B1F95C7, + 02A2ED58B066B4D119F67913, + 4F0A137A4115946A346180E6, + 1CFE3935A3B810D5D68A2504, + 61AE09C749B007B70A265D9B, + 3DC90DA86565B0356B6E5E0B, + 71A91516AFD980FEE694C0E1, + 40BD06D4AB0D2C73E936A2F1, + 23CD1A3F9067C3A0ECE7BB67, + 96D99A08027CA35D6A4E5CFD, ); name = Frameworks; sourceTree = ""; }; + BFDAF16175D03695EEB466BC = {isa = PBXGroup; children = ( + CFF2BBEB242CC8B3B904B5F9, ); name = Products; sourceTree = ""; }; + 91A9A0FE9DF4F4E10009EEC7 = {isa = PBXGroup; children = ( + 9683F931FA1B8B85FA8C4BD8, + 5A0B2CEF393A25C6D4B1B76C, + 61F3057D838D7DABB0FA3D34, + D87DCD5DA4EC8D78DFF37FCC, + 4452EAA652B65A9AE648288C, + BFDAF16175D03695EEB466BC, ); name = Source; sourceTree = ""; }; + 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)"; @@ -226,8 +242,8 @@ "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", @@ -243,11 +259,12 @@ 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)"; @@ -260,8 +277,8 @@ "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", @@ -279,10 +296,10 @@ 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; @@ -320,7 +337,7 @@ 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; @@ -356,63 +373,68 @@ 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; } diff --git a/examples/DemoRunner/Builds/MacOSX/Info-App.plist b/examples/DemoRunner/Builds/MacOSX/Info-App.plist index 39ca56cc..bce688be 100644 --- a/examples/DemoRunner/Builds/MacOSX/Info-App.plist +++ b/examples/DemoRunner/Builds/MacOSX/Info-App.plist @@ -8,7 +8,7 @@ CFBundleIconFile Icon.icns CFBundleIdentifier - com.roli.juce.demorunner + com.juce.demorunner CFBundleName DemoRunner CFBundleDisplayName @@ -18,9 +18,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 5.3.1 + 5.3.2 CFBundleVersion - 5.3.1 + 5.3.2 NSHumanReadableCopyright Copyright (c) 2018 - ROLI Ltd. NSHighResolutionCapable diff --git a/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner.sln b/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner.sln index 47ffd1f9..ba7197df 100644 --- a/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner.sln +++ b/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner.sln @@ -1,7 +1,7 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2013 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{E3D4150A-FA75-0747-0E47-EDA1155AAAFF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.ActiveCfg = Debug|x64 - {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.Build.0 = Debug|x64 - {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.ActiveCfg = Release|x64 - {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.Build.0 = Release|x64 + {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.ActiveCfg = Debug|x64 + {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.Build.0 = Debug|x64 + {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.ActiveCfg = Release|x64 + {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj index c545c528..3ec1daea 100644 --- a/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj +++ b/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj @@ -14,7 +14,7 @@ - {E3D4150A-FA75-0747-0E47-EDA1155AAAFF} + {882FE2E3-F4EF-9825-1908-F6FEE5366B5C} v120 8.1 @@ -74,7 +74,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.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) + _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) MultiThreadedDebugDLL true @@ -115,7 +115,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.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) + _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) MultiThreadedDLL true @@ -772,6 +772,9 @@ true + + true + true @@ -2519,6 +2522,7 @@ + @@ -2836,6 +2840,7 @@ + diff --git a/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj.filters index a17949c3..b1ec6a79 100644 --- a/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2013/DemoRunner_App.vcxproj.filters @@ -1141,6 +1141,9 @@ JUCE Modules\juce_core\containers + + JUCE Modules\juce_core\containers + JUCE Modules\juce_core\containers @@ -3870,6 +3873,9 @@ JUCE Modules\juce_dsp\containers + + JUCE Modules\juce_dsp\containers + JUCE Modules\juce_dsp\filter_design @@ -4821,6 +4827,9 @@ JUCE Modules\juce_video\native + + JUCE Modules\juce_video\native + JUCE Modules\juce_video\native diff --git a/examples/DemoRunner/Builds/VisualStudio2013/resources.rc b/examples/DemoRunner/Builds/VisualStudio2013/resources.rc index d22ed611..0bf34edc 100644 --- a/examples/DemoRunner/Builds/VisualStudio2013/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2013/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,3,1,0 +FILEVERSION 5,3,2,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +16,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "Copyright (c) 2018 - ROLI Ltd.\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "5.3.1\0" + VALUE "FileVersion", "5.3.2\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "5.3.1\0" + VALUE "ProductVersion", "5.3.2\0" END END diff --git a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner.sln b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner.sln index fef93e70..48b38533 100644 --- a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner.sln +++ b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner.sln @@ -1,7 +1,7 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2015 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{E3D4150A-FA75-0747-0E47-EDA1155AAAFF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.ActiveCfg = Debug|x64 - {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.Build.0 = Debug|x64 - {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.ActiveCfg = Release|x64 - {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.Build.0 = Release|x64 + {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.ActiveCfg = Debug|x64 + {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.Build.0 = Debug|x64 + {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.ActiveCfg = Release|x64 + {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj index 71523961..6622326e 100644 --- a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj +++ b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj @@ -14,7 +14,7 @@ - {E3D4150A-FA75-0747-0E47-EDA1155AAAFF} + {882FE2E3-F4EF-9825-1908-F6FEE5366B5C} v140 8.1 @@ -74,7 +74,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.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) + _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) MultiThreadedDebugDLL true @@ -115,7 +115,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.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) + _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) MultiThreadedDLL true @@ -772,6 +772,9 @@ true + + true + true @@ -2519,6 +2522,7 @@ + @@ -2836,6 +2840,7 @@ + diff --git a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters index fe88ae00..f2d69a69 100644 --- a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters @@ -1141,6 +1141,9 @@ JUCE Modules\juce_core\containers + + JUCE Modules\juce_core\containers + JUCE Modules\juce_core\containers @@ -3870,6 +3873,9 @@ JUCE Modules\juce_dsp\containers + + JUCE Modules\juce_dsp\containers + JUCE Modules\juce_dsp\filter_design @@ -4821,6 +4827,9 @@ JUCE Modules\juce_video\native + + JUCE Modules\juce_video\native + JUCE Modules\juce_video\native diff --git a/examples/DemoRunner/Builds/VisualStudio2015/resources.rc b/examples/DemoRunner/Builds/VisualStudio2015/resources.rc index d22ed611..0bf34edc 100644 --- a/examples/DemoRunner/Builds/VisualStudio2015/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2015/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,3,1,0 +FILEVERSION 5,3,2,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +16,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "Copyright (c) 2018 - ROLI Ltd.\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "5.3.1\0" + VALUE "FileVersion", "5.3.2\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "5.3.1\0" + VALUE "ProductVersion", "5.3.2\0" END END diff --git a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner.sln b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner.sln index 371c21f3..cada37af 100644 --- a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner.sln +++ b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner.sln @@ -1,7 +1,7 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2017 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{E3D4150A-FA75-0747-0E47-EDA1155AAAFF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.ActiveCfg = Debug|x64 - {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.Build.0 = Debug|x64 - {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.ActiveCfg = Release|x64 - {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.Build.0 = Release|x64 + {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.ActiveCfg = Debug|x64 + {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.Build.0 = Debug|x64 + {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.ActiveCfg = Release|x64 + {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj index c340defe..f6537a8a 100644 --- a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj +++ b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj @@ -14,7 +14,7 @@ - {E3D4150A-FA75-0747-0E47-EDA1155AAAFF} + {882FE2E3-F4EF-9825-1908-F6FEE5366B5C} v141 10.0.16299.0 @@ -74,7 +74,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.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) + _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) MultiThreadedDebugDLL true @@ -115,7 +115,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.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) + _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) MultiThreaded true @@ -772,6 +772,9 @@ true + + true + true @@ -2519,6 +2522,7 @@ + @@ -2836,6 +2840,7 @@ + diff --git a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters index e7ed5a8e..00170e09 100644 --- a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters @@ -1141,6 +1141,9 @@ JUCE Modules\juce_core\containers + + JUCE Modules\juce_core\containers + JUCE Modules\juce_core\containers @@ -3870,6 +3873,9 @@ JUCE Modules\juce_dsp\containers + + JUCE Modules\juce_dsp\containers + JUCE Modules\juce_dsp\filter_design @@ -4821,6 +4827,9 @@ JUCE Modules\juce_video\native + + JUCE Modules\juce_video\native + JUCE Modules\juce_video\native diff --git a/examples/DemoRunner/Builds/VisualStudio2017/resources.rc b/examples/DemoRunner/Builds/VisualStudio2017/resources.rc index d22ed611..0bf34edc 100644 --- a/examples/DemoRunner/Builds/VisualStudio2017/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2017/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,3,1,0 +FILEVERSION 5,3,2,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +16,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "Copyright (c) 2018 - ROLI Ltd.\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "5.3.1\0" + VALUE "FileVersion", "5.3.2\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "5.3.1\0" + VALUE "ProductVersion", "5.3.2\0" END END diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj b/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj index 0cc6513c..9a62e890 100644 --- a/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj +++ b/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj @@ -6,227 +6,231 @@ 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 = ""; }; - 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 = ""; }; - C69C98BDBD8901865A10D03D = {isa = PBXGroup; children = ( - E40C7EC0CD57D5F92EC9C806, - 497F44004821C9FDC0B1A337, - 56280EAEBEAF619C3E98B5C6, - 191B33D36B749639B0FBE856, - D869E1D6485900AB3406AF03, ); name = UI; sourceTree = ""; }; - 29499B4E21D547DC19E2AF25 = {isa = PBXGroup; children = ( - 5F0F17E75142C9F8EC4F9EA8, - C69C98BDBD8901865A10D03D, - 27FB5D78BF900B70101B3E48, - 53ED8C56ECA0B933135E6ED5, ); name = Source; sourceTree = ""; }; - 927472CBD503E38DD7E37090 = {isa = PBXGroup; children = ( - 29499B4E21D547DC19E2AF25, ); name = DemoRunner; sourceTree = ""; }; - 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 = ""; }; - 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 = ""; }; - FEE1C6574320FAB66F0238D2 = {isa = PBXGroup; children = ( - A5C76AB7D5C174FB79974A8B, - 8DA81A2479F1EF4B1064E3A0, - AC925129DC8F53C3C3F6E0BF, - 2945A953347C882A8294DF82, ); name = Resources; sourceTree = ""; }; - 17F11FE561BD8D6EB93B64D4 = {isa = PBXGroup; children = ( - E622C086CB768052D799CB95, - A70E204AA2B7B904F9C08770, - F10017EB39A3981DF2FFC565, - 61BF1C5B6EB2C49337A028E7, - 5AB31D4FDB61420CFE50FD52, - 4400AFF27C798108026C3094, - C0349D711DBA26CB337AFDFC, - E087A95F121B72288CFE0150, - BE800C80B08E6D722CACB487, - 95C3EC76835BB2151FA94A67, - 0CD10A62A53B1C25DBFC9ECB, - 0F072771BD806EFDDADEBF26, - 0C3170AEED96E4A60DD8E49F, - F4929902D6A38E01A6B084E8, - 6142F838E6568F8450BC93DB, - 58E1DD950580FC057346CF2F, ); name = Frameworks; sourceTree = ""; }; - 532CECDAA91A39864E7FFF80 = {isa = PBXGroup; children = ( - B953F5C249804F38B818AD2F, ); name = Products; sourceTree = ""; }; - 9979C8B054ED17C9E04C6BAB = {isa = PBXGroup; children = ( - 352AF685E88FF055C4F20E16, - 927472CBD503E38DD7E37090, - 178FF737E5519A4D16208DEB, - 16DD35D8533EE0BA94AAFBF8, - FEE1C6574320FAB66F0238D2, - 17F11FE561BD8D6EB93B64D4, - 532CECDAA91A39864E7FFF80, ); name = Source; sourceTree = ""; }; - 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 = ""; }; + 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 = ""; }; + BB12537403CC24C02622582C = {isa = PBXGroup; children = ( + E5BFC17E682AB426D203B3E6, + 1FCD2145DE3FCFCF4F55A8AD, + 25E5ED33876A2C752378C859, + EB68BD1224CD9748BFA332C0, + 7A5AAE9EE573FC6105CC4AAC, ); name = UI; sourceTree = ""; }; + 6F933968486D9AD9FE112622 = {isa = PBXGroup; children = ( + CD575607FAA297480EE95F13, + BB12537403CC24C02622582C, + 260481E972425474BB8155B0, + ECE79F1433E92BB6213C86F5, ); name = Source; sourceTree = ""; }; + 9683F931FA1B8B85FA8C4BD8 = {isa = PBXGroup; children = ( + 6F933968486D9AD9FE112622, ); name = DemoRunner; sourceTree = ""; }; + 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 = ""; }; + 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 = ""; }; + D87DCD5DA4EC8D78DFF37FCC = {isa = PBXGroup; children = ( + 685A261BE78585293F3EAD36, + 4EC2782DE1779A130835B64D, + 8135645508EEFDBDCDF2ADC6, + E0A3F113BC27B7B4D6F1D693, ); name = Resources; sourceTree = ""; }; + 4452EAA652B65A9AE648288C = {isa = PBXGroup; children = ( + A04E4408525F24F7DCBA000E, + 470C3E4553B513FFEF752779, + DC192EFA899E6CBE6B5CD394, + 3B99CF94C44E2EE04635A439, + 4F0A137A4115946A346180E6, + B4389672DA4CC8E0A531062D, + 76A157A111866670A4678F04, + B28EFB9D1DF0B6D6499A7DEF, + 1CFE3935A3B810D5D68A2504, + 61AE09C749B007B70A265D9B, + 873F9DD54978E601102353B4, + 49ECA8B998B339A083674A22, + 7983C452610C1638B7E78F12, + 24D74AF1C95BEF957DC4FA77, + 34F1320BC5C23702C08DF9F0, + 23CD1A3F9067C3A0ECE7BB67, + F90C8B0233A54F1445343F67, ); name = Frameworks; sourceTree = ""; }; + BFDAF16175D03695EEB466BC = {isa = PBXGroup; children = ( + CFF2BBEB242CC8B3B904B5F9, ); name = Products; sourceTree = ""; }; + 91A9A0FE9DF4F4E10009EEC7 = {isa = PBXGroup; children = ( + 0CCFDC1D1C7B8A12BF4822F1, + 9683F931FA1B8B85FA8C4BD8, + 5A0B2CEF393A25C6D4B1B76C, + 61F3057D838D7DABB0FA3D34, + D87DCD5DA4EC8D78DFF37FCC, + 4452EAA652B65A9AE648288C, + BFDAF16175D03695EEB466BC, ); name = Source; sourceTree = ""; }; + 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; @@ -240,8 +244,8 @@ "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", @@ -254,12 +258,14 @@ 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; @@ -273,8 +279,8 @@ "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", @@ -289,9 +295,10 @@ 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; @@ -333,7 +340,7 @@ 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; @@ -373,66 +380,67 @@ 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; } diff --git a/examples/DemoRunner/Builds/iOS/Info-App.plist b/examples/DemoRunner/Builds/iOS/Info-App.plist index a864c56f..72a50cf5 100644 --- a/examples/DemoRunner/Builds/iOS/Info-App.plist +++ b/examples/DemoRunner/Builds/iOS/Info-App.plist @@ -7,12 +7,14 @@ NSMicrophoneUsageDescription This is an audio app which requires audio input. If you do not have a USB audio interface connected it will use the microphone. + NSCameraUsageDescription + This app requires camera usage to function properly. UIViewControllerBasedStatusBarAppearance CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - com.roli.juce.demorunner + com.juce.demorunner CFBundleName DemoRunner CFBundleDisplayName @@ -22,9 +24,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 5.3.1 + 5.3.2 CFBundleVersion - 5.3.1 + 5.3.2 NSHumanReadableCopyright Copyright (c) 2018 - ROLI Ltd. NSHighResolutionCapable @@ -39,6 +41,7 @@ UISupportedInterfaceOrientations + UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight diff --git a/examples/DemoRunner/DemoRunner.jucer b/examples/DemoRunner/DemoRunner.jucer index 5cfe6777..f4729cd8 100644 --- a/examples/DemoRunner/DemoRunner.jucer +++ b/examples/DemoRunner/DemoRunner.jucer @@ -1,9 +1,9 @@ + companyEmail="info@juce.com" id="yj7xMM" reportAppUsage="1"> @@ -30,7 +30,8 @@ + 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" + customXcodeResourceFolders="../Audio ../BLOCKS ../DSP ../GUI ../Utilities"> @@ -87,10 +88,10 @@ + smallIcon="YyqWd2" bigIcon="YyqWd2" cameraPermissionNeeded="1"> @@ -118,10 +119,10 @@ - + @@ -258,4 +259,7 @@ + + + diff --git a/examples/DemoRunner/JuceLibraryCode/AppConfig.h b/examples/DemoRunner/JuceLibraryCode/AppConfig.h index 42a1698d..de08905c 100644 --- a/examples/DemoRunner/JuceLibraryCode/AppConfig.h +++ b/examples/DemoRunner/JuceLibraryCode/AppConfig.h @@ -40,7 +40,7 @@ #endif #ifndef JUCE_REPORT_APP_USAGE - #define JUCE_REPORT_APP_USAGE 0 + #define JUCE_REPORT_APP_USAGE 1 #endif // END SECTION A @@ -156,6 +156,10 @@ //#define JUCE_PLUGINHOST_AU 0 #endif +#ifndef JUCE_PLUGINHOST_LADSPA + //#define JUCE_PLUGINHOST_LADSPA 0 +#endif + //============================================================================== // juce_audio_utils flags: diff --git a/examples/DemoRunner/JuceLibraryCode/JuceHeader.h b/examples/DemoRunner/JuceLibraryCode/JuceHeader.h index 55e3638b..e3f1c698 100644 --- a/examples/DemoRunner/JuceLibraryCode/JuceHeader.h +++ b/examples/DemoRunner/JuceLibraryCode/JuceHeader.h @@ -46,7 +46,7 @@ namespace ProjectInfo { const char* const projectName = "DemoRunner"; - const char* const versionString = "5.3.1"; - const int versionNumber = 0x50301; + const char* const versionString = "5.3.2"; + const int versionNumber = 0x50302; } #endif diff --git a/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp b/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp index c79f07bf..dc4577d4 100644 --- a/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp +++ b/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp @@ -42,7 +42,7 @@ #include "../../../Audio/MPEDemo.h" #include "../../../Audio/PluckedStringsDemo.h" -#if (defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)) && (defined (JUCE_HAS_CONSTEXPR)) +#if JUCE_HAS_CONSTEXPR #include "../../../Audio/SimpleFFTDemo.h" #include "../../../BLOCKS/BlocksDrawingDemo.h" #include "../../../BLOCKS/BlocksMonitorDemo.h" @@ -71,9 +71,7 @@ #include "../../../Utilities/LiveConstantDemo.h" #include "../../../Utilities/MultithreadingDemo.h" #include "../../../Utilities/NetworkingDemo.h" -#if defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT) - #include "../../../Utilities/OSCDemo.h" -#endif +#include "../../../Utilities/OSCDemo.h" #include "../../../Utilities/SystemInfoDemo.h" #include "../../../Utilities/TimersAndEventsDemo.h" #include "../../../Utilities/UnitTestsDemo.h" @@ -92,7 +90,7 @@ void registerDemos_One() noexcept REGISTER_DEMO (MPEDemo, Audio, false) REGISTER_DEMO (PluckedStringsDemo, Audio, false) - #if (defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)) && (defined (JUCE_HAS_CONSTEXPR)) + #if JUCE_HAS_CONSTEXPR REGISTER_DEMO (SimpleFFTDemo, Audio, false) REGISTER_DEMO (BlocksDrawingDemo, BLOCKS, false) REGISTER_DEMO (BlocksMonitorDemo, BLOCKS, false) @@ -120,9 +118,7 @@ void registerDemos_One() noexcept REGISTER_DEMO (LiveConstantDemo, Utilities, false) REGISTER_DEMO (MultithreadingDemo, Utilities, false) REGISTER_DEMO (NetworkingDemo, Utilities, false) - #if defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT) REGISTER_DEMO (OSCDemo, Utilities, false) - #endif REGISTER_DEMO (SystemInfoDemo, Utilities, false) REGISTER_DEMO (TimersAndEventsDemo, Utilities, false) REGISTER_DEMO_WITH_FILENAME (UnitTestClasses::UnitTestsDemo, Utilities, UnitTestsDemo, false) diff --git a/examples/DemoRunner/Source/Demos/DemoPIPs2.cpp b/examples/DemoRunner/Source/Demos/DemoPIPs2.cpp index 243724b6..98ed9383 100644 --- a/examples/DemoRunner/Source/Demos/DemoPIPs2.cpp +++ b/examples/DemoRunner/Source/Demos/DemoPIPs2.cpp @@ -34,7 +34,7 @@ #include "../../../GUI/AnimationAppDemo.h" #include "../../../GUI/AnimationDemo.h" #include "../../../GUI/BouncingBallWavetableDemo.h" -#if JUCE_MAC || JUCE_WINDOWS +#if JUCE_USE_CAMERA && ! JUCE_LINUX #include "../../../GUI/CameraDemo.h" #endif #if ! JUCE_ANDROID @@ -43,12 +43,10 @@ #include "../../../GUI/ComponentDemo.h" #include "../../../GUI/ComponentTransformsDemo.h" #include "../../../GUI/DialogsDemo.h" -#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS - #include "../../../GUI/FlexBoxDemo.h" -#endif +#include "../../../GUI/FlexBoxDemo.h" #include "../../../GUI/FontsDemo.h" #include "../../../GUI/GraphicsDemo.h" -#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS && JUCE_HAS_CONSTEXPR +#if JUCE_HAS_CONSTEXPR #include "../../../GUI/GridDemo.h" #endif #include "../../../GUI/ImagesDemo.h" @@ -75,7 +73,7 @@ void registerDemos_Two() noexcept REGISTER_DEMO (AnimationAppDemo, GUI, false) REGISTER_DEMO (AnimationDemo, GUI, false) REGISTER_DEMO (BouncingBallWavetableDemo, GUI, false) - #if JUCE_MAC || JUCE_WINDOWS + #if JUCE_USE_CAMERA && ! JUCE_LINUX REGISTER_DEMO (CameraDemo, GUI, true) #endif #if ! JUCE_ANDROID @@ -84,12 +82,10 @@ void registerDemos_Two() noexcept REGISTER_DEMO (ComponentDemo, GUI, false) REGISTER_DEMO (ComponentTransformsDemo, GUI, false) REGISTER_DEMO (DialogsDemo, GUI, false) - #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS REGISTER_DEMO (FlexBoxDemo, GUI, false) - #endif REGISTER_DEMO (FontsDemo, GUI, false) REGISTER_DEMO (GraphicsDemo, GUI, false) - #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS && JUCE_HAS_CONSTEXPR + #if JUCE_HAS_CONSTEXPR REGISTER_DEMO (GridDemo, GUI, false) #endif REGISTER_DEMO (ImagesDemo, GUI, false) diff --git a/examples/DemoRunner/Source/Demos/JUCEDemos.cpp b/examples/DemoRunner/Source/Demos/JUCEDemos.cpp index b8e8c9df..08a01f47 100644 --- a/examples/DemoRunner/Source/Demos/JUCEDemos.cpp +++ b/examples/DemoRunner/Source/Demos/JUCEDemos.cpp @@ -51,7 +51,12 @@ JUCEDemos::DemoCategory& JUCEDemos::getCategory (const String& name) void JUCEDemos::registerDemo (std::function constructorCallback, const String& filePath, const String& category, bool isHeavyweight) { - auto f = findExamplesDirectoryFromExecutable (File::getSpecialLocation (File::SpecialLocationType::currentApplicationFile)); + #if JUCE_MAC + auto f = File::getSpecialLocation (File::currentExecutableFile) + .getParentDirectory().getParentDirectory().getChildFile ("Resources").getChildFile (filePath); + #else + auto f = findExamplesDirectoryFromExecutable (File::getSpecialLocation (File::currentApplicationFile)); + #endif #if ! (JUCE_ANDROID || JUCE_IOS) if (f == File()) @@ -80,7 +85,7 @@ File JUCEDemos::findExamplesDirectoryFromExecutable (File exec) } //============================================================================== -ScopedPointer sharedAudioDeviceManager; +std::unique_ptr sharedAudioDeviceManager; static String getCurrentDefaultAudioDeviceName (AudioDeviceManager& deviceManager, bool isInput) { @@ -100,7 +105,7 @@ static String getCurrentDefaultAudioDeviceName (AudioDeviceManager& deviceManage AudioDeviceManager& getSharedAudioDeviceManager (int numInputChannels, int numOutputChannels) { if (sharedAudioDeviceManager == nullptr) - sharedAudioDeviceManager = new AudioDeviceManager(); + sharedAudioDeviceManager.reset (new AudioDeviceManager()); auto* currentDevice = sharedAudioDeviceManager->getCurrentAudioDevice(); diff --git a/examples/DemoRunner/Source/Demos/JUCEDemos.h b/examples/DemoRunner/Source/Demos/JUCEDemos.h index 2edae975..53db349e 100644 --- a/examples/DemoRunner/Source/Demos/JUCEDemos.h +++ b/examples/DemoRunner/Source/Demos/JUCEDemos.h @@ -36,7 +36,6 @@ #define REGISTER_DEMO(DemoName, category, heavyweight) JUCEDemos::registerDemo ([] { return new DemoName(); }, CREATE_FILEPATH(DemoName, category), JUCE_STRINGIFY (category), heavyweight); #define REGISTER_DEMO_WITH_FILENAME(DemoName, category, fileName, heavyweight) JUCEDemos::registerDemo ([] { return new DemoName(); }, CREATE_FILEPATH(fileName, category), JUCE_STRINGIFY (category), heavyweight); - //============================================================================== struct JUCEDemos { @@ -72,6 +71,6 @@ CodeEditorComponent::ColourScheme getDarkColourScheme(); CodeEditorComponent::ColourScheme getLightColourScheme(); //============================================================================== -extern ScopedPointer sharedAudioDeviceManager; +extern std::unique_ptr sharedAudioDeviceManager; AudioDeviceManager& getSharedAudioDeviceManager (int numInputChannels = -1, int numOutputChannels = -1); diff --git a/examples/DemoRunner/Source/Main.cpp b/examples/DemoRunner/Source/Main.cpp index d2d722e9..ad770d7e 100644 --- a/examples/DemoRunner/Source/Main.cpp +++ b/examples/DemoRunner/Source/Main.cpp @@ -93,9 +93,11 @@ public: // (This function call is for one of the demos, which involves launching a child process) if (invokeChildProcessDemo (commandLine)) return; + #else + ignoreUnused (commandLine); #endif - mainWindow = new MainAppWindow (getApplicationName()); + mainWindow.reset (new MainAppWindow (getApplicationName())); } void backButtonPressed() override { mainWindow->getMainComponent().getSidePanel().showOrHide (false); } @@ -120,6 +122,7 @@ private: #if JUCE_IOS || JUCE_ANDROID setFullScreen (true); + Desktop::getInstance().setOrientationsEnabled (Desktop::rotatedClockwise | Desktop::rotatedAntiClockwise); #else setBounds ((int) (0.1f * getParentWidth()), (int) (0.1f * getParentHeight()), @@ -131,7 +134,7 @@ private: setVisible (true); #if JUCE_WINDOWS || JUCE_LINUX || JUCE_MAC - taskbarIcon = new DemoTaskbarComponent(); + taskbarIcon.reset (new DemoTaskbarComponent()); #endif } @@ -141,12 +144,12 @@ private: MainComponent& getMainComponent() { return *dynamic_cast (getContentComponent()); } private: - ScopedPointer taskbarIcon; + std::unique_ptr taskbarIcon; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainAppWindow) }; - ScopedPointer mainWindow; + std::unique_ptr mainWindow; }; //============================================================================== diff --git a/examples/DemoRunner/Source/UI/DemoContentComponent.cpp b/examples/DemoRunner/Source/UI/DemoContentComponent.cpp index 68d93d43..19e61be7 100644 --- a/examples/DemoRunner/Source/UI/DemoContentComponent.cpp +++ b/examples/DemoRunner/Source/UI/DemoContentComponent.cpp @@ -45,7 +45,7 @@ struct DemoContent : public Component if (comp != nullptr) { - addAndMakeVisible (comp); + addAndMakeVisible (comp.get()); resized(); } } @@ -54,7 +54,7 @@ struct DemoContent : public Component void showHomeScreen() { setComponent (createIntroDemo()); } private: - ScopedPointer comp; + std::unique_ptr comp; }; //============================================================================== @@ -105,10 +105,12 @@ DemoContentComponent::DemoContentComponent (Component& mainComponent, std::funct : TabbedComponent (TabbedButtonBar::Orientation::TabsAtTop), demoChangedCallback (callback) { - addTab ("Demo", Colours::transparentBlack, demoContent = new DemoContent(), false); + demoContent.reset (new DemoContent()); + addTab ("Demo", Colours::transparentBlack, demoContent.get(), false); #if ! (JUCE_ANDROID || JUCE_IOS) - addTab ("Code", Colours::transparentBlack, codeContent = new CodeContent(), false); + codeContent.reset (new CodeContent()); + addTab ("Code", Colours::transparentBlack, codeContent.get(), false); #endif addTab ("Settings", Colours::transparentBlack, new SettingsContent (dynamic_cast (mainComponent)), true); diff --git a/examples/DemoRunner/Source/UI/DemoContentComponent.h b/examples/DemoRunner/Source/UI/DemoContentComponent.h index 9a2f8d22..680996c1 100644 --- a/examples/DemoRunner/Source/UI/DemoContentComponent.h +++ b/examples/DemoRunner/Source/UI/DemoContentComponent.h @@ -53,10 +53,10 @@ public: private: std::function demoChangedCallback; - ScopedPointer demoContent; + std::unique_ptr demoContent; #if ! (JUCE_ANDROID || JUCE_IOS) - ScopedPointer codeContent; + std::unique_ptr codeContent; #endif String currentDemoCategory; diff --git a/examples/DemoRunner/Source/UI/MainComponent.cpp b/examples/DemoRunner/Source/UI/MainComponent.cpp index d36aa047..a87daa9c 100644 --- a/examples/DemoRunner/Source/UI/MainComponent.cpp +++ b/examples/DemoRunner/Source/UI/MainComponent.cpp @@ -243,7 +243,7 @@ private: //============================================================================== MainComponent::MainComponent() { - contentComponent = new DemoContentComponent (*this, [this] (bool isHeavyweight) + contentComponent.reset (new DemoContentComponent (*this, [this] (bool isHeavyweight) { #if (JUCE_ANDROID || JUCE_IOS) demosPanel.showOrHide (false); @@ -260,12 +260,12 @@ MainComponent::MainComponent() isShowingHeavyweightDemo = isHeavyweight; resized(); - }); + })); demosPanel.setContent (new DemoList (*contentComponent)); demosPanel.setTitleBarComponent (new SidePanelHeader (*this), true); - addAndMakeVisible (contentComponent); + addAndMakeVisible (contentComponent.get()); addAndMakeVisible (showDemosButton); addAndMakeVisible (demosPanel); diff --git a/examples/DemoRunner/Source/UI/MainComponent.h b/examples/DemoRunner/Source/UI/MainComponent.h index 6a9d1576..30a89805 100644 --- a/examples/DemoRunner/Source/UI/MainComponent.h +++ b/examples/DemoRunner/Source/UI/MainComponent.h @@ -58,7 +58,7 @@ private: void updateRenderingEngine (int index); //============================================================================== - ScopedPointer contentComponent; + std::unique_ptr contentComponent; SidePanel demosPanel { "Demos", 250, true }; OpenGLContext openGLContext; diff --git a/examples/DemoRunner/Source/UI/SettingsContent.h b/examples/DemoRunner/Source/UI/SettingsContent.h index 5f8794de..fb9c18fb 100644 --- a/examples/DemoRunner/Source/UI/SettingsContent.h +++ b/examples/DemoRunner/Source/UI/SettingsContent.h @@ -98,8 +98,9 @@ private: rendererLabel.setJustificationType (Justification::centredRight); rendererLabel.attachToComponent (&rendererSelector, true); - addAndMakeVisible (audioSettings = new AudioDeviceSelectorComponent (getSharedAudioDeviceManager(), - 0, 256, 0, 256, true, true, true, false)); + audioSettings.reset (new AudioDeviceSelectorComponent (getSharedAudioDeviceManager(), + 0, 256, 0, 256, true, true, true, false)); + addAndMakeVisible (audioSettings.get()); audioSettings->setItemHeight (itemHeight); setOpaque (true); @@ -155,7 +156,7 @@ private: StringArray lookAndFeelNames; OwnedArray lookAndFeels; - ScopedPointer audioSettings; + std::unique_ptr audioSettings; //============================================================================== void refreshRenderingEngineSelector() diff --git a/examples/GUI/CameraDemo.h b/examples/GUI/CameraDemo.h index 301a619e..6c1ef609 100644 --- a/examples/GUI/CameraDemo.h +++ b/examples/GUI/CameraDemo.h @@ -31,7 +31,7 @@ dependencies: juce_core, juce_cryptography, juce_data_structures, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra, juce_video - exporters: xcode_mac, vs2017, linux_make + exporters: xcode_mac, vs2017, androidstudio, xcode_iphone moduleFlags: JUCE_USE_CAMERA=1 @@ -49,15 +49,18 @@ #include "../Assets/DemoUtilities.h" //============================================================================== -class CameraDemo : public Component, - private CameraDevice::Listener, - private AsyncUpdater +class CameraDemo : public Component { public: CameraDemo() { setOpaque (true); + #if JUCE_ANDROID + // Android requires exclusive access to the audio device when recording videos. + audioDeviceManager.closeAudioDevice(); + #endif + addAndMakeVisible (cameraSelectorComboBox); updateCameraList(); cameraSelectorComboBox.setSelectedId (1); @@ -76,6 +79,21 @@ public: cameraSelectorComboBox.setSelectedId (2); setSize (500, 500); + + #if JUCE_IOS || JUCE_ANDROID + setPortraitOrientationEnabled (true); + #endif + } + + ~CameraDemo() + { + #if JUCE_IOS || JUCE_ANDROID + setPortraitOrientationEnabled (false); + #endif + + #if JUCE_ANDROID + audioDeviceManager.restartLastAudioDevice(); + #endif } //============================================================================== @@ -101,26 +119,66 @@ public: recordMovieButton.setBounds (top.removeFromLeft (recordMovieButton.getWidth())); r.removeFromTop (4); - auto previewArea = r.removeFromTop (r.getHeight() / 2); + auto previewArea = shouldUseLandscapeLayout() ? r.removeFromLeft (r.getWidth() / 2) + : r.removeFromTop (r.getHeight() / 2); if (cameraPreviewComp.get() != nullptr) cameraPreviewComp->setBounds (previewArea); - r.removeFromTop (4); + if (shouldUseLandscapeLayout()) + r.removeFromLeft (4); + else + r.removeFromTop (4); + lastSnapshot.setBounds (r); } private: //============================================================================== - ScopedPointer cameraDevice; - ScopedPointer cameraPreviewComp; + // if this PIP is running inside the demo runner, we'll use the shared device manager instead + #ifndef JUCE_DEMO_RUNNER + AudioDeviceManager audioDeviceManager; + #else + AudioDeviceManager& audioDeviceManager { getSharedAudioDeviceManager (0, 2) }; + #endif + + std::unique_ptr cameraDevice; + std::unique_ptr cameraPreviewComp; ImageComponent lastSnapshot; ComboBox cameraSelectorComboBox { "Camera" }; TextButton snapshotButton { "Take a snapshot" }; + #if ! JUCE_ANDROID && ! JUCE_IOS TextButton recordMovieButton { "Record a movie (to your desktop)..." }; + #else + TextButton recordMovieButton { "Record a movie" }; + #endif bool recordingMovie = false; + File recordingFile; + bool contentSharingPending = false; + + void setPortraitOrientationEnabled (bool shouldBeEnabled) + { + auto allowedOrientations = Desktop::getInstance().getOrientationsEnabled(); + + if (shouldBeEnabled) + allowedOrientations |= Desktop::upright; + else + allowedOrientations &= ~Desktop::upright; + + Desktop::getInstance().setOrientationsEnabled (allowedOrientations); + } + + bool shouldUseLandscapeLayout() const noexcept + { + #if JUCE_ANDROID || JUCE_IOS + auto orientation = Desktop::getInstance().getCurrentOrientation(); + return orientation == Desktop::rotatedClockwise || orientation == Desktop::rotatedAntiClockwise; + #else + return false; + #endif + } void updateCameraList() { @@ -137,25 +195,68 @@ private: void cameraChanged() { // This is called when the user chooses a camera from the drop-down list. - cameraDevice .reset(); + #if JUCE_IOS + // On iOS, when switching camera, open the new camera first, so that it can + // share the underlying camera session with the old camera. Otherwise, the + // session would have to be closed first, which can take several seconds. + if (cameraSelectorComboBox.getSelectedId() == 1) + cameraDevice.reset(); + #else + cameraDevice.reset(); + #endif cameraPreviewComp.reset(); recordingMovie = false; if (cameraSelectorComboBox.getSelectedId() > 1) { - // Try to open the user's choice of camera.. - cameraDevice.reset (CameraDevice::openDevice (cameraSelectorComboBox.getSelectedId() - 2)); + #if JUCE_ANDROID || JUCE_IOS + openCameraAsync(); + #else + cameraDeviceOpenResult (CameraDevice::openDevice (cameraSelectorComboBox.getSelectedId() - 2), {}); + #endif + } + else + { + snapshotButton .setEnabled (cameraDevice != nullptr && ! contentSharingPending); + recordMovieButton.setEnabled (cameraDevice != nullptr && ! contentSharingPending); + resized(); + } + } - // and if it worked, create a preview component for it.. - if (cameraDevice.get() != nullptr) - { - cameraPreviewComp.reset (cameraDevice->createViewerComponent()); - addAndMakeVisible (cameraPreviewComp.get()); - } + void openCameraAsync() + { + SafePointer safeThis (this); + + CameraDevice::openDeviceAsync (cameraSelectorComboBox.getSelectedId() - 2, + [safeThis] (CameraDevice* device, const String& error) mutable + { + if (safeThis) + safeThis->cameraDeviceOpenResult (device, error); + }); + } + + void cameraDeviceOpenResult (CameraDevice* device, const String& error) + { + // If camera opening worked, create a preview component for it.. + cameraDevice.reset (device); + + if (cameraDevice.get() != nullptr) + { + #if JUCE_ANDROID + SafePointer safeThis (this); + cameraDevice->onErrorOccurred = [safeThis] (const String& error) mutable { if (safeThis) safeThis->errorOccurred (error); }; + #endif + cameraPreviewComp.reset (cameraDevice->createViewerComponent()); + addAndMakeVisible (cameraPreviewComp.get()); + } + else + { + AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, "Camera open failed", + "Camera open failed, reason: " + error); } - snapshotButton .setEnabled (cameraDevice.get() != nullptr); - recordMovieButton.setEnabled (cameraDevice.get() != nullptr); + snapshotButton .setEnabled (cameraDevice.get() != nullptr && ! contentSharingPending); + recordMovieButton.setEnabled (cameraDevice.get() != nullptr && ! contentSharingPending); resized(); } @@ -169,10 +270,20 @@ private: // Start recording to a file on the user's desktop.. recordingMovie = true; - auto file = File::getSpecialLocation (File::userDesktopDirectory) - .getNonexistentChildFile ("JuceCameraDemo", CameraDevice::getFileExtension()); + #if JUCE_ANDROID || JUCE_IOS + recordingFile = File::getSpecialLocation (File::tempDirectory) + #else + recordingFile = File::getSpecialLocation (File::userDesktopDirectory) + #endif + .getNonexistentChildFile ("JuceCameraVideoDemo", CameraDevice::getFileExtension()); + + #if JUCE_ANDROID + // Android does not support taking pictures while recording video. + snapshotButton.setEnabled (false); + #endif - cameraDevice->startRecordingToFile (file); + cameraSelectorComboBox.setEnabled (false); + cameraDevice->startRecordingToFile (recordingFile); recordMovieButton.setButtonText ("Stop Recording"); } else @@ -180,40 +291,99 @@ private: // Already recording, so stop... recordingMovie = false; cameraDevice->stopRecording(); + #if ! JUCE_ANDROID && ! JUCE_IOS recordMovieButton.setButtonText ("Start recording (to a file on your desktop)"); + #else + recordMovieButton.setButtonText ("Record a movie"); + #endif + cameraSelectorComboBox.setEnabled (true); + + #if JUCE_ANDROID + snapshotButton.setEnabled (true); + #endif + + #if JUCE_ANDROID || JUCE_IOS + URL url (recordingFile); + + snapshotButton .setEnabled (false); + recordMovieButton.setEnabled (false); + contentSharingPending = true; + + SafePointer safeThis (this); + + juce::ContentSharer::getInstance()->shareFiles ({url}, + [safeThis] (bool success, const String&) mutable + { + if (safeThis) + safeThis->sharingFinished (success, false); + }); + #endif } } } void takeSnapshot() { - // When the user clicks the snapshot button, we'll attach ourselves to - // the camera as a listener, and wait for an image to arrive... - cameraDevice->addListener (this); + SafePointer safeThis (this); + cameraDevice->takeStillPicture ([safeThis] (const Image& image) mutable { safeThis->imageReceived (image); }); } // This is called by the camera device when a new image arrives - void imageReceived (const Image& image) override + void imageReceived (const Image& image) { - // In this app we just want to take one image, so as soon as this happens, - // we'll unregister ourselves as a listener. - if (cameraDevice.get() != nullptr) - cameraDevice->removeListener (this); - - // This callback won't be on the message thread, so to get the image back to - // the message thread, we'll stash a pointer to it (which is reference-counted in - // a thead-safe way), and trigger an async callback which will then display the - // new image.. - incomingImage = image; - triggerAsyncUpdate(); + if (! image.isValid()) + return; + + lastSnapshot.setImage (image); + + #if JUCE_ANDROID || JUCE_IOS + auto imageFile = File::getSpecialLocation (File::tempDirectory).getNonexistentChildFile ("JuceCameraPhotoDemo", ".jpg"); + + if (auto stream = std::unique_ptr (imageFile.createOutputStream())) + { + if (JPEGImageFormat().writeImageToStream (image, *stream)) + { + URL url (imageFile); + + snapshotButton .setEnabled (false); + recordMovieButton.setEnabled (false); + contentSharingPending = true; + + SafePointer safeThis (this); + + juce::ContentSharer::getInstance()->shareFiles ({url}, + [safeThis] (bool success, const String&) mutable + { + if (safeThis) + safeThis->sharingFinished (success, true); + }); + } + } + #endif } - Image incomingImage; + void errorOccurred (const String& error) + { + AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon, + "Camera Device Error", + "An error has occurred: " + error + " Camera will be closed."); + + cameraDevice.reset(); + + cameraSelectorComboBox.setSelectedId (1); + snapshotButton .setEnabled (false); + recordMovieButton.setEnabled (false); + } - void handleAsyncUpdate() override + void sharingFinished (bool success, bool isCapture) { - if (incomingImage.isValid()) - lastSnapshot.setImage (incomingImage); + AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon, + isCapture ? "Image sharing result" : "Video sharing result", + success ? "Success!" : "Failed!"); + + contentSharingPending = false; + snapshotButton .setEnabled (true); + recordMovieButton.setEnabled (true); } JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CameraDemo) diff --git a/examples/GUI/CodeEditorDemo.h b/examples/GUI/CodeEditorDemo.h index 2ff9cf34..23993860 100644 --- a/examples/GUI/CodeEditorDemo.h +++ b/examples/GUI/CodeEditorDemo.h @@ -104,7 +104,7 @@ private: CPlusPlusCodeTokeniser cppTokeniser; // the editor component - ScopedPointer editor; + std::unique_ptr editor; FilenameComponent fileChooser { "File", {}, true, false, false, "*.cpp;*.h;*.hpp;*.c;*.mm;*.m", {}, "Choose a C++ file to open it in the editor" }; diff --git a/examples/GUI/ComponentTransformsDemo.h b/examples/GUI/ComponentTransformsDemo.h index c3a5e51e..f038de79 100644 --- a/examples/GUI/ComponentTransformsDemo.h +++ b/examples/GUI/ComponentTransformsDemo.h @@ -53,7 +53,7 @@ class ComponentTransformsDemo : public Component public: ComponentTransformsDemo() { - content.reset (new WidgetsDemo()); + content.reset (new WidgetsDemo (true)); addAndMakeVisible (content.get()); content->setSize (750, 500); @@ -94,7 +94,7 @@ public: } private: - ScopedPointer content; + std::unique_ptr content; struct CornerDragger : public Component { diff --git a/examples/GUI/DialogsDemo.h b/examples/GUI/DialogsDemo.h index 4c56ccdf..1c27591f 100644 --- a/examples/GUI/DialogsDemo.h +++ b/examples/GUI/DialogsDemo.h @@ -321,8 +321,8 @@ private: fileToSave = fileToSave.getChildFile ("JUCE.png"); fileToSave.deleteFile(); - ScopedPointer outStream (fileToSave.createOutputStream()); - ScopedPointer inStream (createAssetInputStream ("juce_icon.png")); + std::unique_ptr outStream (fileToSave.createOutputStream()); + std::unique_ptr inStream (createAssetInputStream ("juce_icon.png")); outStream->writeFromInputStream (*inStream, -1); } @@ -343,8 +343,8 @@ private: #if JUCE_ANDROID || JUCE_IOS if (! result.isEmpty()) { - ScopedPointer wi (fileToSave.createInputStream()); - ScopedPointer wo (result.createOutputStream()); + std::unique_ptr wi (fileToSave.createInputStream()); + std::unique_ptr wo (result.createOutputStream()); if (wi.get() != nullptr && wo.get() != nullptr) { @@ -442,7 +442,7 @@ private: } ImagePreviewComponent imagePreview; - ScopedPointer fc; + std::unique_ptr fc; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DialogsDemo) }; diff --git a/examples/GUI/FontsDemo.h b/examples/GUI/FontsDemo.h index 647df1dd..ab909267 100644 --- a/examples/GUI/FontsDemo.h +++ b/examples/GUI/FontsDemo.h @@ -223,7 +223,7 @@ private: ComboBox styleBox; StretchableLayoutManager verticalLayout; - ScopedPointer verticalDividerBar; + std::unique_ptr verticalDividerBar; //============================================================================== void refreshPreviewBoxFont() diff --git a/examples/GUI/GraphicsDemo.h b/examples/GUI/GraphicsDemo.h index b4724767..a5403242 100644 --- a/examples/GUI/GraphicsDemo.h +++ b/examples/GUI/GraphicsDemo.h @@ -490,7 +490,7 @@ public: ZipFile icons (createAssetInputStream ("icons.zip"), true); // Load a random SVG file from our embedded icons.zip file. - const ScopedPointer svgFileStream (icons.createStreamForEntry (Random::getSystemRandom().nextInt (icons.getNumEntries()))); + const std::unique_ptr svgFileStream (icons.createStreamForEntry (Random::getSystemRandom().nextInt (icons.getNumEntries()))); if (svgFileStream.get() != nullptr) { @@ -505,7 +505,7 @@ public: } Time lastSVGLoadTime; - ScopedPointer svgDrawable; + std::unique_ptr svgDrawable; }; //============================================================================== diff --git a/examples/GUI/MDIDemo.h b/examples/GUI/MDIDemo.h index 7f1049b9..35dd02f4 100644 --- a/examples/GUI/MDIDemo.h +++ b/examples/GUI/MDIDemo.h @@ -91,12 +91,10 @@ public: Result saveDocument (const File& file) override { // attempt to save the contents into the given file - FileOutputStream os (file); + if (file.replaceWithText (editor.getText())) + return Result::ok(); - if (os.openedOk()) - os.writeText (editor.getText(), false, false); - - return Result::ok(); + return Result::fail ("Can't write to file"); } File getLastDocumentOpened() override @@ -113,7 +111,9 @@ public: #if JUCE_MODAL_LOOPS_PERMITTED File getSuggestedSaveAsFile (const File&) override { - return File::getSpecialLocation (File::userDesktopDirectory).getChildFile (getName()).withFileExtension ("jnote"); + return File::getSpecialLocation (File::userDesktopDirectory) + .getChildFile (getName()) + .withFileExtension ("jnote"); } #endif diff --git a/examples/GUI/MenusDemo.h b/examples/GUI/MenusDemo.h index 279e97f2..35bc0742 100644 --- a/examples/GUI/MenusDemo.h +++ b/examples/GUI/MenusDemo.h @@ -314,7 +314,7 @@ public: private: ApplicationCommandManager commandManager; - ScopedPointer menuBar; + std::unique_ptr menuBar; MenuBarPosition menuBarPosition = MenuBarPosition::window; SidePanel sidePanel { "Menu", 300, false }; diff --git a/examples/GUI/OpenGLAppDemo.h b/examples/GUI/OpenGLAppDemo.h index d2b458a4..10cc2a89 100644 --- a/examples/GUI/OpenGLAppDemo.h +++ b/examples/GUI/OpenGLAppDemo.h @@ -181,7 +181,7 @@ public: " gl_FragColor = colour;\n" "}\n"; - ScopedPointer newShader (new OpenGLShaderProgram (openGLContext)); + std::unique_ptr newShader (new OpenGLShaderProgram (openGLContext)); String statusText; if (newShader->addVertexShader (OpenGLHelpers::translateVertexShaderToV3 (vertexShader)) @@ -265,7 +265,7 @@ private: if (textureCoordIn.get() != nullptr) glContext.extensions.glDisableVertexAttribArray (textureCoordIn->attributeID); } - ScopedPointer position, normal, sourceColour, textureCoordIn; + std::unique_ptr position, normal, sourceColour, textureCoordIn; private: static OpenGLShaderProgram::Attribute* createAttribute (OpenGLContext& openGLContext, @@ -289,7 +289,7 @@ private: viewMatrix .reset (createUniform (openGLContext, shaderProgram, "viewMatrix")); } - ScopedPointer projectionMatrix, viewMatrix; + std::unique_ptr projectionMatrix, viewMatrix; private: static OpenGLShaderProgram::Uniform* createUniform (OpenGLContext& openGLContext, @@ -397,10 +397,10 @@ private: const char* vertexShader; const char* fragmentShader; - ScopedPointer shader; - ScopedPointer shape; - ScopedPointer attributes; - ScopedPointer uniforms; + std::unique_ptr shader; + std::unique_ptr shape; + std::unique_ptr attributes; + std::unique_ptr uniforms; String newVertexShader, newFragmentShader; diff --git a/examples/GUI/OpenGLDemo.h b/examples/GUI/OpenGLDemo.h index 64c24493..9c6a87da 100644 --- a/examples/GUI/OpenGLDemo.h +++ b/examples/GUI/OpenGLDemo.h @@ -110,7 +110,7 @@ struct OpenGLDemoClasses if (textureCoordIn.get() != nullptr) openGLContext.extensions.glDisableVertexAttribArray (textureCoordIn->attributeID); } - ScopedPointer position, normal, sourceColour, textureCoordIn; + std::unique_ptr position, normal, sourceColour, textureCoordIn; private: static OpenGLShaderProgram::Attribute* createAttribute (OpenGLContext& openGLContext, @@ -137,7 +137,7 @@ struct OpenGLDemoClasses bouncingNumber .reset (createUniform (openGLContext, shader, "bouncingNumber")); } - ScopedPointer projectionMatrix, viewMatrix, texture, lightPosition, bouncingNumber; + std::unique_ptr projectionMatrix, viewMatrix, texture, lightPosition, bouncingNumber; private: static OpenGLShaderProgram::Uniform* createUniform (OpenGLContext& openGLContext, @@ -775,7 +775,7 @@ struct OpenGLDemoClasses void drawBackground2DStuff (float desktopScale) { // Create an OpenGLGraphicsContext that will draw into this GL window.. - ScopedPointer glRenderer (createOpenGLGraphicsContext (openGLContext, + std::unique_ptr glRenderer (createOpenGLGraphicsContext (openGLContext, roundToInt (desktopScale * getWidth()), roundToInt (desktopScale * getHeight()))); @@ -810,14 +810,14 @@ struct OpenGLDemoClasses OpenGLContext openGLContext; - ScopedPointer controlsOverlay; + std::unique_ptr controlsOverlay; float rotation = 0.0f; - ScopedPointer shader; - ScopedPointer shape; - ScopedPointer attributes; - ScopedPointer uniforms; + std::unique_ptr shader; + std::unique_ptr shape; + std::unique_ptr attributes; + std::unique_ptr uniforms; OpenGLTexture texture; DemoTexture* textureToUse = nullptr; @@ -837,7 +837,7 @@ struct OpenGLDemoClasses { if (newVertexShader.isNotEmpty() || newFragmentShader.isNotEmpty()) { - ScopedPointer newShader (new OpenGLShaderProgram (openGLContext)); + std::unique_ptr newShader (new OpenGLShaderProgram (openGLContext)); if (newShader->addVertexShader (OpenGLHelpers::translateVertexShaderToV3 (newVertexShader)) && newShader->addFragmentShader (OpenGLHelpers::translateFragmentShaderToV3 (newFragmentShader)) diff --git a/examples/GUI/OpenGLDemo2D.h b/examples/GUI/OpenGLDemo2D.h index e9d4ad57..6452ecb6 100644 --- a/examples/GUI/OpenGLDemo2D.h +++ b/examples/GUI/OpenGLDemo2D.h @@ -143,7 +143,7 @@ public: startTimer (1); } - ScopedPointer shader; + std::unique_ptr shader; Label statusLabel, presetLabel { {}, "Shader Preset:" }; ComboBox presetBox; diff --git a/examples/GUI/WebBrowserDemo.h b/examples/GUI/WebBrowserDemo.h index f0ab4fe0..41a1ca1e 100644 --- a/examples/GUI/WebBrowserDemo.h +++ b/examples/GUI/WebBrowserDemo.h @@ -131,7 +131,7 @@ public: } private: - ScopedPointer webView; + std::unique_ptr webView; TextEditor addressTextBox; diff --git a/examples/GUI/WidgetsDemo.h b/examples/GUI/WidgetsDemo.h index bc978b3b..70461e8a 100644 --- a/examples/GUI/WidgetsDemo.h +++ b/examples/GUI/WidgetsDemo.h @@ -50,26 +50,8 @@ //============================================================================== static void showBubbleMessage (Component& targetComponent, const String& textToShow, - ScopedPointer& bmc) -{ - bmc.reset (new BubbleMessageComponent()); - - if (Desktop::canUseSemiTransparentWindows()) - { - bmc->setAlwaysOnTop (true); - bmc->addToDesktop (0); - } - else - { - targetComponent.getTopLevelComponent()->addChildComponent (bmc.get()); - } - - AttributedString text (textToShow); - text.setJustification (Justification::centred); - text.setColour (targetComponent.findColour (TextButton::textColourOffId)); - - bmc->showAt (&targetComponent, text, 2000, true, false); -} + std::unique_ptr& bmc, + bool isRunningComponentTransformDemo); //============================================================================== /** To demonstrate how sliders can have custom snapping applied to their values, @@ -272,7 +254,7 @@ private: //============================================================================== struct ButtonsPage : public Component { - ButtonsPage() + ButtonsPage (bool isRunningComponentTransformDemo) { { auto* group = addToList (new GroupComponent ("group", "Radio buttons")); @@ -374,14 +356,15 @@ struct ButtonsPage : public Component down.setImage (getImageFromAssets ("juce_icon.png")); down.setOverlayColour (Colours::black.withAlpha (0.3f)); - auto popupMessageCallback = [this] + auto popupMessageCallback = [this, isRunningComponentTransformDemo] { if (auto* focused = Component::getCurrentlyFocusedComponent()) showBubbleMessage (*focused, "This is a demo of the BubbleMessageComponent, which lets you pop up a message pointing " "at a component or somewhere on the screen.\n\n" "The message bubbles will disappear after a timeout period, or when the mouse is clicked.", - this->bubbleMessage); + this->bubbleMessage, + isRunningComponentTransformDemo); }; { @@ -450,7 +433,7 @@ struct ButtonsPage : public Component private: OwnedArray components; - ScopedPointer bubbleMessage; + std::unique_ptr bubbleMessage; // This little function avoids a bit of code-duplication by adding a component to // our list as well as calling addAndMakeVisible on it.. @@ -675,7 +658,7 @@ private: for (int i = 0; i < icons.getNumEntries(); ++i) { - ScopedPointer svgFileStream (icons.createStreamForEntry (i)); + std::unique_ptr svgFileStream (icons.createStreamForEntry (i)); if (svgFileStream.get() != nullptr) { @@ -920,7 +903,7 @@ private: TableListBox table; // the table component itself Font font { 14.0f }; - ScopedPointer demoData; // This is the XML document loaded from the embedded file "demo table data.xml" + std::unique_ptr demoData; // This is the XML document loaded from the embedded file "demo table data.xml" XmlElement* columnList = nullptr; // A pointer to the sub-node of demoData that contains the list of columns XmlElement* dataList = nullptr; // A pointer to the sub-node of demoData that contains the list of data rows int numRows; // The number of rows of data we've got @@ -1277,19 +1260,20 @@ private: //============================================================================== struct DemoTabbedComponent : public TabbedComponent { - DemoTabbedComponent() + DemoTabbedComponent (bool isRunningComponenTransformsDemo) : TabbedComponent (TabbedButtonBar::TabsAtTop) { auto colour = findColour (ResizableWindow::backgroundColourId); - addTab ("Buttons", colour, new ButtonsPage(), true); - addTab ("Sliders", colour, new SlidersPage(), true); - addTab ("Toolbars", colour, new ToolbarDemoComp(), true); - addTab ("Misc", colour, new MiscPage(), true); - addTab ("Tables", colour, new TableDemoComponent(), true); - addTab ("Drag & Drop", colour, new DragAndDropDemo(), true); + addTab ("Buttons", colour, new ButtonsPage (isRunningComponenTransformsDemo), true); + addTab ("Sliders", colour, new SlidersPage(), true); + addTab ("Toolbars", colour, new ToolbarDemoComp(), true); + addTab ("Misc", colour, new MiscPage(), true); + addTab ("Tables", colour, new TableDemoComponent(), true); + addTab ("Drag & Drop", colour, new DragAndDropDemo(), true); - getTabbedButtonBar().getTabButton (5)->setExtraComponent (new CustomTabButton(), TabBarButton::afterText); + getTabbedButtonBar().getTabButton (5)->setExtraComponent (new CustomTabButton (isRunningComponenTransformsDemo), + TabBarButton::afterText); } // This is a small star button that is put inside one of the tabs. You can @@ -1297,7 +1281,8 @@ struct DemoTabbedComponent : public TabbedComponent class CustomTabButton : public Component { public: - CustomTabButton() + CustomTabButton (bool isRunningComponenTransformsDemo) + : runningComponenTransformsDemo (isRunningComponenTransformsDemo) { setSize (20, 20); } @@ -1318,10 +1303,12 @@ struct DemoTabbedComponent : public TabbedComponent "\n" "You can use these to implement things like close-buttons " "or status displays for your tabs.", - bubbleMessage); + bubbleMessage, + runningComponenTransformsDemo); } private: - ScopedPointer bubbleMessage; + bool runningComponenTransformsDemo; + std::unique_ptr bubbleMessage; }; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DemoTabbedComponent) @@ -1330,7 +1317,8 @@ struct DemoTabbedComponent : public TabbedComponent //============================================================================== struct WidgetsDemo : public Component { - WidgetsDemo() + WidgetsDemo (bool isRunningComponenTransformsDemo = false) + : tabs (isRunningComponenTransformsDemo) { setOpaque (true); addAndMakeVisible (tabs); @@ -1352,3 +1340,31 @@ struct WidgetsDemo : public Component JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WidgetsDemo) }; + +//============================================================================== +void showBubbleMessage (Component& targetComponent, const String& textToShow, + std::unique_ptr& bmc, + bool isRunningComponentTransformDemo) +{ + bmc.reset (new BubbleMessageComponent()); + + if (isRunningComponentTransformDemo) + { + targetComponent.findParentComponentOfClass()->addChildComponent (bmc.get()); + } + else if (Desktop::canUseSemiTransparentWindows()) + { + bmc->setAlwaysOnTop (true); + bmc->addToDesktop (0); + } + else + { + targetComponent.getTopLevelComponent()->addChildComponent (bmc.get()); + } + + AttributedString text (textToShow); + text.setJustification (Justification::centred); + text.setColour (targetComponent.findColour (TextButton::textColourOffId)); + + bmc->showAt (&targetComponent, text, 2000, true, false); +} diff --git a/examples/Plugins/AUv3SynthPluginDemo.h b/examples/Plugins/AUv3SynthPluginDemo.h index 7a41bfcb..822c2d47 100644 --- a/examples/Plugins/AUv3SynthPluginDemo.h +++ b/examples/Plugins/AUv3SynthPluginDemo.h @@ -195,7 +195,7 @@ public: if (auto* assetStream = createAssetInputStream ("proaudio.path")) { - ScopedPointer fileStream (assetStream); + std::unique_ptr fileStream (assetStream); Path proAudioPath; proAudioPath.loadPathFromStream (*fileStream); @@ -415,7 +415,7 @@ private: void loadNewSample (InputStream* soundBuffer, const char* format) { - ScopedPointer formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true)); + std::unique_ptr formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true)); BigInteger midiNotes; midiNotes.setRange (0, 126, true); @@ -431,7 +431,7 @@ private: auto* stream = new MemoryOutputStream (mb, true); { - ScopedPointer writer (formatManager.findFormatForFileExtension ("wav")->createWriterFor (stream, lastSampleRate, 1, 16, + std::unique_ptr writer (formatManager.findFormatForFileExtension ("wav")->createWriterFor (stream, lastSampleRate, 1, 16, StringPairArray(), 0)); writer->writeFromAudioSampleBuffer (currentRecording, 0, currentRecording.getNumSamples()); writer->flush(); diff --git a/examples/Plugins/AudioPluginDemo.h b/examples/Plugins/AudioPluginDemo.h index 861d3f75..6d01d6ba 100644 --- a/examples/Plugins/AudioPluginDemo.h +++ b/examples/Plugins/AudioPluginDemo.h @@ -307,7 +307,7 @@ public: // whose contents will have been created by the getStateInformation() call. // This getXmlFromBinary() helper function retrieves our XML from the binary blob.. - ScopedPointer xmlState (getXmlFromBinary (data, sizeInBytes)); + std::unique_ptr xmlState (getXmlFromBinary (data, sizeInBytes)); if (xmlState.get() != nullptr) { @@ -499,7 +499,7 @@ private: gainLabel { {}, "Throughput level:" }, delayLabel { {}, "Delay:" }; - ScopedPointer gainSlider, delaySlider; + std::unique_ptr gainSlider, delaySlider; Colour backgroundColour; //============================================================================== diff --git a/examples/Plugins/DSPModulePluginDemo.h b/examples/Plugins/DSPModulePluginDemo.h index af8c215a..ff2cd7ce 100644 --- a/examples/Plugins/DSPModulePluginDemo.h +++ b/examples/Plugins/DSPModulePluginDemo.h @@ -272,7 +272,8 @@ public: auto maxSize = static_cast (roundToInt (getSampleRate() * (8192.0 / 44100.0))); auto assetName = (type == 0 ? "Impulse1.wav" : "Impulse2.wav"); - ScopedPointer assetInputStream (createAssetInputStream (assetName)); + std::unique_ptr assetInputStream (createAssetInputStream (assetName)); + if (assetInputStream != nullptr) { currentCabinetData.reset(); @@ -478,7 +479,7 @@ private: //============================================================================== DspModulePluginDemoAudioProcessor& processor; - ScopedPointer inputVolumeSlider, outputVolumeSlider, + std::unique_ptr inputVolumeSlider, outputVolumeSlider, lowPassFilterFreqSlider, highPassFilterFreqSlider; ComboBox stereoBox, slopeBox, waveshaperBox, cabinetTypeBox; ToggleButton cabinetSimButton, oversamplingButton; @@ -555,7 +556,7 @@ private: dsp::Gain inputVolume, outputVolume; - ScopedPointer> oversampling; + std::unique_ptr> oversampling; bool audioCurrentlyOversampled = false; Atomic cabinetType; diff --git a/examples/Plugins/InterAppAudioEffectPluginDemo.h b/examples/Plugins/InterAppAudioEffectPluginDemo.h index 30588d4c..429bff10 100644 --- a/examples/Plugins/InterAppAudioEffectPluginDemo.h +++ b/examples/Plugins/InterAppAudioEffectPluginDemo.h @@ -236,13 +236,13 @@ public: //============================================================================== void getStateInformation (MemoryBlock& destData) override { - auto xml = ScopedPointer (parameters.state.createXml()); + auto xml = std::unique_ptr (parameters.state.createXml()); copyXmlToBinary (*xml, destData); } void setStateInformation (const void* data, int sizeInBytes) override { - auto xmlState = ScopedPointer (getXmlFromBinary (data, sizeInBytes)); + auto xmlState = std::unique_ptr (getXmlFromBinary (data, sizeInBytes)); if (xmlState.get() != nullptr) if (xmlState->hasTagName (parameters.state.getType())) diff --git a/examples/Plugins/MultiOutSynthPluginDemo.h b/examples/Plugins/MultiOutSynthPluginDemo.h index 5db3df56..db8a8a39 100644 --- a/examples/Plugins/MultiOutSynthPluginDemo.h +++ b/examples/Plugins/MultiOutSynthPluginDemo.h @@ -157,7 +157,7 @@ private: void loadNewSample (InputStream* soundBuffer, const char* format) { - ScopedPointer formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true)); + std::unique_ptr formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true)); BigInteger midiNotes; midiNotes.setRange (0, 126, true); diff --git a/examples/Plugins/SamplerPluginDemo.h b/examples/Plugins/SamplerPluginDemo.h index 06c37973..4d677d87 100644 --- a/examples/Plugins/SamplerPluginDemo.h +++ b/examples/Plugins/SamplerPluginDemo.h @@ -2006,8 +2006,7 @@ private: loopKindLabel { {}, "Looping Mode" }; - FileChooser fileChooser { "Select a file to load...", - File::nonexistent, + FileChooser fileChooser { "Select a file to load...", File(), dataModel.getAudioFormatManager().getWildcardForAllFormats() }; UndoManager* undoManager; @@ -2065,7 +2064,7 @@ public: { if (auto* asset = createAssetInputStream ("cello.wav")) { - ScopedPointer inputStream (asset); + std::unique_ptr inputStream (asset); inputStream->readIntoMemoryBlock (mb); readerFactory.reset (new MemoryAudioFormatReaderFactory (mb.getData(), mb.getSize())); diff --git a/examples/Utilities/AnalyticsCollectionDemo.h b/examples/Utilities/AnalyticsCollectionDemo.h index 349977df..88837810 100644 --- a/examples/Utilities/AnalyticsCollectionDemo.h +++ b/examples/Utilities/AnalyticsCollectionDemo.h @@ -211,7 +211,7 @@ private: // method is called on app shutdown so it needs to complete quickly! XmlDocument previouslySavedEvents (savedEventsFile); - ScopedPointer xml (previouslySavedEvents.getDocumentElement()); + std::unique_ptr xml (previouslySavedEvents.getDocumentElement()); if (xml.get() == nullptr || xml->getTagName() != "events") xml.reset (new XmlElement ("events")); @@ -247,7 +247,7 @@ private: void restoreUnloggedEvents (std::deque& restoredEventQueue) override { XmlDocument savedEvents (savedEventsFile); - ScopedPointer xml (savedEvents.getDocumentElement()); + std::unique_ptr xml (savedEvents.getDocumentElement()); if (xml.get() == nullptr || xml->getTagName() != "events") return; @@ -292,7 +292,7 @@ private: CriticalSection webStreamCreation; bool shouldExit = false; - ScopedPointer webStream; + std::unique_ptr webStream; String apiKey; @@ -365,7 +365,7 @@ private: } TextButton eventButton { "Press me!" }, crashButton { "Simulate crash!" }; - ScopedPointer logEventButtonPress; + std::unique_ptr logEventButtonPress; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AnalyticsCollectionDemo) }; diff --git a/examples/Utilities/Box2DDemo.h b/examples/Utilities/Box2DDemo.h index 362f98c8..362543d2 100644 --- a/examples/Utilities/Box2DDemo.h +++ b/examples/Utilities/Box2DDemo.h @@ -83,7 +83,7 @@ struct Test virtual void Keyboard (unsigned char /*key*/) {} virtual void KeyboardUp (unsigned char /*key*/) {} - ScopedPointer m_world { new b2World (b2Vec2 (0.0f, -10.0f)) }; + std::unique_ptr m_world { new b2World (b2Vec2 (0.0f, -10.0f)) }; }; #include "../Assets/Box2DTests/AddPair.h" @@ -149,7 +149,7 @@ struct Box2DRenderComponent : public Component } } - ScopedPointer currentTest; + std::unique_ptr currentTest; }; //============================================================================== diff --git a/examples/Utilities/ChildProcessDemo.h b/examples/Utilities/ChildProcessDemo.h index 704abaf4..50cc3796 100644 --- a/examples/Utilities/ChildProcessDemo.h +++ b/examples/Utilities/ChildProcessDemo.h @@ -67,7 +67,7 @@ static MemoryBlock valueTreeToMemoryBlock (const ValueTree& v) static String valueTreeToString (const ValueTree& v) { - ScopedPointer xml (v.createXml()); + std::unique_ptr xml (v.createXml()); if (xml.get() != nullptr) return xml->createDocument ({}, true, false); @@ -201,7 +201,7 @@ public: }; //============================================================================== - ScopedPointer masterProcess; + std::unique_ptr masterProcess; private: TextButton launchButton { "Launch Child Process" }; @@ -284,7 +284,7 @@ public: */ bool invokeChildProcessDemo (const String& commandLine) { - ScopedPointer slave (new DemoSlaveProcess()); + std::unique_ptr slave (new DemoSlaveProcess()); if (slave->initialiseFromCommandLine (commandLine, demoCommandLineUID)) { @@ -316,7 +316,7 @@ bool invokeChildProcessDemo (const String& commandLine) if (invokeChildProcessDemo (commandLine)) return; - mainWindow = new MainWindow ("ChildProcessDemo", new ChildProcessDemo()); + mainWindow.reset (new MainWindow ("ChildProcessDemo", new ChildProcessDemo())); } void shutdown() override { mainWindow = nullptr; } @@ -346,7 +346,8 @@ bool invokeChildProcessDemo (const String& commandLine) private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow) }; - ScopedPointer mainWindow; + + std::unique_ptr mainWindow; }; //============================================================================== diff --git a/examples/Utilities/InAppPurchasesDemo.h b/examples/Utilities/InAppPurchasesDemo.h index d70c78af..68f2783c 100644 --- a/examples/Utilities/InAppPurchasesDemo.h +++ b/examples/Utilities/InAppPurchasesDemo.h @@ -382,8 +382,7 @@ public: if (auto* assetStream = createAssetInputStream (String ("Purchases/" + String (imageResourceName)).toRawUTF8())) { - ScopedPointer fileStream (assetStream); - + std::unique_ptr fileStream (assetStream); avatar = PNGImageFormat().decodeImage (*fileStream); } } @@ -557,7 +556,7 @@ private: if (auto* assetStream = createAssetInputStream (assetName.toRawUTF8())) { - ScopedPointer fileStream (assetStream); + std::unique_ptr fileStream (assetStream); currentPhraseData.reset(); fileStream->readIntoMemoryBlock (currentPhraseData); @@ -572,7 +571,7 @@ private: Label phraseLabel { "phraseLabel", NEEDS_TRANS ("Phrases:") }; ListBox phraseListBox { "phraseListBox" }; - ScopedPointer phraseModel { new PhraseModel() }; + std::unique_ptr phraseModel { new PhraseModel() }; TextButton playStopButton { "Play" }; SoundPlayer player; @@ -581,7 +580,7 @@ private: Label voiceLabel { "voiceLabel", NEEDS_TRANS ("Voices:") }; ListBox voiceListBox { "voiceListBox" }; - ScopedPointer voiceModel { new VoiceModel (purchases) }; + std::unique_ptr voiceModel { new VoiceModel (purchases) }; MemoryBlock currentPhraseData; diff --git a/examples/Utilities/JavaScriptDemo.h b/examples/Utilities/JavaScriptDemo.h index 6a5749a5..47a1f6f1 100644 --- a/examples/Utilities/JavaScriptDemo.h +++ b/examples/Utilities/JavaScriptDemo.h @@ -154,7 +154,7 @@ public: private: CodeDocument codeDocument; - ScopedPointer editor; + std::unique_ptr editor; TextEditor outputDisplay; void codeDocumentTextInserted (const String&, int) override { startTimer (300); } diff --git a/examples/Utilities/NetworkingDemo.h b/examples/Utilities/NetworkingDemo.h index bbfb348c..8cd1fca1 100644 --- a/examples/Utilities/NetworkingDemo.h +++ b/examples/Utilities/NetworkingDemo.h @@ -101,7 +101,7 @@ public: StringPairArray responseHeaders; int statusCode = 0; - ScopedPointer stream (url.createInputStream (false, nullptr, nullptr, {}, + std::unique_ptr stream (url.createInputStream (false, nullptr, nullptr, {}, 10000, // timeout in millisecs &responseHeaders, &statusCode)); if (stream.get() != nullptr) diff --git a/examples/Utilities/UnitTestsDemo.h b/examples/Utilities/UnitTestsDemo.h index e8e22601..066d0c40 100644 --- a/examples/Utilities/UnitTestsDemo.h +++ b/examples/Utilities/UnitTestsDemo.h @@ -220,7 +220,7 @@ struct UnitTestClasses } private: - ScopedPointer currentTestThread; + std::unique_ptr currentTestThread; TextButton startTestButton { "Run Unit Tests..." }; ComboBox categoriesBox; diff --git a/examples/Utilities/ValueTreesDemo.h b/examples/Utilities/ValueTreesDemo.h index 4bef4120..7143bbaa 100644 --- a/examples/Utilities/ValueTreesDemo.h +++ b/examples/Utilities/ValueTreesDemo.h @@ -109,7 +109,7 @@ public: { if (items.size() > 0) { - ScopedPointer oldOpenness (treeView.getOpennessState (false)); + std::unique_ptr oldOpenness (treeView.getOpennessState (false)); for (auto* v : items) { @@ -291,7 +291,7 @@ private: TextButton undoButton { "Undo" }, redoButton { "Redo" }; - ScopedPointer rootItem; + std::unique_ptr rootItem; UndoManager undoManager; void timerCallback() override diff --git a/examples/Utilities/XMLandJSONDemo.h b/examples/Utilities/XMLandJSONDemo.h index 0fc695f0..f22235f9 100644 --- a/examples/Utilities/XMLandJSONDemo.h +++ b/examples/Utilities/XMLandJSONDemo.h @@ -303,13 +303,13 @@ private: CodeEditorComponent codeDocumentComponent { codeDocument, nullptr }; TreeView resultsTree; - ScopedPointer rootItem; - ScopedPointer parsedXml; + std::unique_ptr rootItem; + std::unique_ptr parsedXml; TextEditor errorMessage; void rebuildTree() { - ScopedPointer openness; + std::unique_ptr openness; if (rootItem.get() != nullptr) openness.reset (rootItem->getOpennessState()); diff --git a/extras/AudioPerformanceTest/AudioPerformanceTest.jucer b/extras/AudioPerformanceTest/AudioPerformanceTest.jucer index f050db30..862fe1f2 100644 --- a/extras/AudioPerformanceTest/AudioPerformanceTest.jucer +++ b/extras/AudioPerformanceTest/AudioPerformanceTest.jucer @@ -49,25 +49,25 @@ - + - - + + - - + + + - - - - - - + + + + + - + @@ -126,4 +126,7 @@ + + + diff --git a/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt b/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt index 1acb8f22..f688f097 100644 --- a/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt +++ b/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt @@ -399,6 +399,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h" "../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" "../../../../../modules/juce_core/containers/juce_SortedSet.h" + "../../../../../modules/juce_core/containers/juce_SparseSet.cpp" "../../../../../modules/juce_core/containers/juce_SparseSet.h" "../../../../../modules/juce_core/containers/juce_Variant.cpp" "../../../../../modules/juce_core/containers/juce_Variant.h" @@ -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) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_SortedSet.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.h" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/juce/audioperformancetest/AudioPerformanceTest.java b/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/juce/audioperformancetest/AudioPerformanceTest.java index 28e29b64..2ca9c6d9 100644 --- a/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/juce/audioperformancetest/AudioPerformanceTest.java +++ b/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/juce/audioperformancetest/AudioPerformanceTest.java @@ -30,6 +30,7 @@ import android.content.Intent; import android.content.res.Configuration; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; +import android.hardware.camera2.*; import android.net.http.SslError; import android.net.Uri; import android.os.Bundle; @@ -119,6 +120,7 @@ public class AudioPerformanceTest extends Activity private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2; private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3; private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4; + private static final int JUCE_PERMISSIONS_CAMERA = 5; private static String getAndroidPermissionName (int permissionID) { @@ -129,6 +131,7 @@ public class AudioPerformanceTest extends Activity // use string value as this is not defined in SDKs < 16 case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE"; case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE; + case JUCE_PERMISSIONS_CAMERA: return Manifest.permission.CAMERA; } // unknown permission ID! @@ -1205,6 +1208,7 @@ public class AudioPerformanceTest extends Activity setVolumeControlStream (AudioManager.STREAM_MUSIC); permissionCallbackPtrMap = new HashMap(); + appPausedResumedListeners = new HashMap(); } @Override @@ -1221,6 +1225,11 @@ public class AudioPerformanceTest extends Activity { suspendApp(); + Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); + + for (Long k : keys) + appPausedResumedListeners.get (k).appPaused(); + try { Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down @@ -1236,12 +1245,10 @@ public class AudioPerformanceTest extends Activity super.onResume(); resumeApp(); - // Ensure that navigation/status bar visibility is correctly restored. - for (int i = 0; i < viewHolder.getChildCount(); ++i) - { - if (viewHolder.getChildAt (i) instanceof ComponentPeerView) - ((ComponentPeerView) viewHolder.getChildAt (i)).appResumed(); - } + Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); + + for (Long k : keys) + appPausedResumedListeners.get (k).appResumed(); } @Override @@ -1368,11 +1375,14 @@ public class AudioPerformanceTest extends Activity { ComponentPeerView v = new ComponentPeerView (this, opaque, host); viewHolder.addView (v); + addAppPausedResumedListener (v, host); return v; } public final void deleteView (ComponentPeerView view) { + removeAppPausedResumedListener (view, view.host); + view.host = 0; ViewGroup group = (ViewGroup) (view.getParent()); @@ -1590,9 +1600,28 @@ public class AudioPerformanceTest extends Activity public native void alertDismissed (long callback, int id); + //============================================================================== + public interface AppPausedResumedListener + { + void appPaused(); + void appResumed(); + } + + private Map appPausedResumedListeners; + + public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) + { + appPausedResumedListeners.put (new Long (listenerHost), l); + } + + public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) + { + appPausedResumedListeners.remove (new Long (listenerHost)); + } + //============================================================================== public final class ComponentPeerView extends ViewGroup - implements View.OnFocusChangeListener + implements View.OnFocusChangeListener, AppPausedResumedListener { public ComponentPeerView (Context context, boolean opaque_, long host) { @@ -1940,13 +1969,25 @@ public class AudioPerformanceTest extends Activity } //============================================================================== + private native void handleAppPaused (long host); private native void handleAppResumed (long host); + @Override + public void appPaused() + { + if (host == 0) + return; + + handleAppPaused (host); + } + + @Override public void appResumed() { if (host == 0) return; + // Ensure that navigation/status bar visibility is correctly restored. handleAppResumed (host); } } @@ -2616,6 +2657,175 @@ public class AudioPerformanceTest extends Activity private final Object hostLock = new Object(); } + + //============================================================================== + public class CameraDeviceStateCallback extends CameraDevice.StateCallback + { + private native void cameraDeviceStateClosed (long host, CameraDevice camera); + private native void cameraDeviceStateDisconnected (long host, CameraDevice camera); + private native void cameraDeviceStateError (long host, CameraDevice camera, int error); + private native void cameraDeviceStateOpened (long host, CameraDevice camera); + + CameraDeviceStateCallback (long hostToUse) + { + host = hostToUse; + } + + @Override + public void onClosed (CameraDevice camera) + { + cameraDeviceStateClosed (host, camera); + } + + @Override + public void onDisconnected (CameraDevice camera) + { + cameraDeviceStateDisconnected (host, camera); + } + + @Override + public void onError (CameraDevice camera, int error) + { + cameraDeviceStateError (host, camera, error); + } + + @Override + public void onOpened (CameraDevice camera) + { + cameraDeviceStateOpened (host, camera); + } + + private long host; + } + + //============================================================================== + public class CameraCaptureSessionStateCallback extends CameraCaptureSession.StateCallback + { + private native void cameraCaptureSessionActive (long host, CameraCaptureSession session); + private native void cameraCaptureSessionClosed (long host, CameraCaptureSession session); + private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session); + private native void cameraCaptureSessionConfigured (long host, CameraCaptureSession session); + private native void cameraCaptureSessionReady (long host, CameraCaptureSession session); + + CameraCaptureSessionStateCallback (long hostToUse) + { + host = hostToUse; + } + + @Override + public void onActive (CameraCaptureSession session) + { + cameraCaptureSessionActive (host, session); + } + + @Override + public void onClosed (CameraCaptureSession session) + { + cameraCaptureSessionClosed (host, session); + } + + @Override + public void onConfigureFailed (CameraCaptureSession session) + { + cameraCaptureSessionConfigureFailed (host, session); + } + + @Override + public void onConfigured (CameraCaptureSession session) + { + cameraCaptureSessionConfigured (host, session); + } + + @Override + public void onReady (CameraCaptureSession session) + { + cameraCaptureSessionReady (host, session); + } + + private long host; + } + + //============================================================================== + public class CameraCaptureSessionCaptureCallback extends CameraCaptureSession.CaptureCallback + { + private native void cameraCaptureSessionCaptureCompleted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, TotalCaptureResult result); + private native void cameraCaptureSessionCaptureFailed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureFailure failure); + private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureResult partialResult); + private native void cameraCaptureSessionCaptureStarted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, long timestamp, long frameNumber); + private native void cameraCaptureSessionCaptureSequenceAborted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId); + private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber); + + CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview) + { + host = hostToUse; + preview = shouldBePreview; + } + + @Override + public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request, + TotalCaptureResult result) + { + cameraCaptureSessionCaptureCompleted (host, preview, session, request, result); + } + + @Override + public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure) + { + cameraCaptureSessionCaptureFailed (host, preview, session, request, failure); + } + + @Override + public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request, + CaptureResult partialResult) + { + cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult); + } + + @Override + public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId) + { + cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId); + } + + @Override + public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber) + { + cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber); + } + + @Override + public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp, + long frameNumber) + { + cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber); + } + + private long host; + private boolean preview; + } + + //============================================================================== + public class JuceOrientationEventListener extends OrientationEventListener + { + private native void deviceOrientationChanged (long host, int orientation); + + public JuceOrientationEventListener (long hostToUse, Context context, int rate) + { + super (context, rate); + + host = hostToUse; + } + + @Override + public void onOrientationChanged (int orientation) + { + deviceOrientationChanged (host, orientation); + } + + private long host; + } + + //============================================================================== public static final String getLocaleValue (boolean isRegion) { diff --git a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj b/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj index ac92da83..7f38502a 100644 --- a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj +++ b/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj @@ -125,6 +125,7 @@ 1DFEAF972822E305E013CC06, ); name = Source; sourceTree = ""; }; 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)"; @@ -156,6 +157,7 @@ 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)"; @@ -298,7 +300,7 @@ C86DD529EC94922C2AB61742, 6C2BE2DE2ECC96615ED827AB, 409D569C572B6EF7F4F1702D, ); buildRules = ( ); dependencies = ( ); name = "AudioPerformanceTest - App"; productName = AudioPerformanceTest; productReference = 614F2084407B35D62101F69F; productType = "com.apple.product-type.application"; }; - 9CE2A44801B5B4BE7A9667DA = {isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; attributes = { LastUpgradeCheck = 0830; 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 index 00000000..ee79a7aa --- /dev/null +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest.sln @@ -0,0 +1,20 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2017 + +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioPerformanceTest - App", "AudioPerformanceTest_App.vcxproj", "{78607AE9-F43B-3DDB-0FE1-D745771AF527}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Debug|x64.ActiveCfg = Debug|x64 + {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Debug|x64.Build.0 = Debug|x64 + {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Release|x64.ActiveCfg = Release|x64 + {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj b/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj new file mode 100644 index 00000000..a7c1f197 --- /dev/null +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj @@ -0,0 +1,2348 @@ + + + + + + Debug + x64 + + + Release + x64 + + + + {78607AE9-F43B-3DDB-0FE1-D745771AF527} + v141 + 10.0.16299.0 + + + + Application + false + false + v141 + v141 + 10.0.16299.0 + + + Application + false + true + v141 + v141 + 10.0.16299.0 + + + + + + + + v141 + 10.0.16299.0 + + + <_ProjectFileVersion>10.0.30319.1 + .exe + $(SolutionDir)$(Platform)\$(Configuration)\App\ + $(Platform)\$(Configuration)\App\ + AudioPerformanceTest + true + $(SolutionDir)$(Platform)\$(Configuration)\App\ + $(Platform)\$(Configuration)\App\ + AudioPerformanceTest + true + v141 + 10.0.16299.0 + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Disabled + ProgramDatabase + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + stdcpp14 + + + _DEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\AudioPerformanceTest.exe + true + libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) + true + $(IntDir)\AudioPerformanceTest.pdb + Windows + true + + + true + $(IntDir)\AudioPerformanceTest.bsc + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Full + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_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) + MultiThreadedDLL + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + stdcpp14 + + + NDEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\AudioPerformanceTest.exe + true + %(IgnoreSpecificDefaultLibraries) + false + $(IntDir)\AudioPerformanceTest.pdb + Windows + true + true + true + + + true + $(IntDir)\AudioPerformanceTest.bsc + + + + + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj.filters b/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj.filters new file mode 100644 index 00000000..f5930652 --- /dev/null +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2017/AudioPerformanceTest_App.vcxproj.filters @@ -0,0 +1,3848 @@ + + + + + + {D163E404-6FE0-D71C-79C0-B2C2204C6939} + + + {EA26FD9B-DE67-F842-284B-F11CFEA08C63} + + + {EB58F05A-A968-CEBE-40C4-107CDD8F240F} + + + {5FCF559E-451A-CB1E-B177-A5DC5A0005BB} + + + {31054003-EA72-6A9D-D650-56451D9820E6} + + + {D78296AF-218E-B17E-7F8B-9D148601188D} + + + {B96EBA26-E668-FFAF-FC53-1EC1337DAF5A} + + + {D8532E5E-469E-5042-EFC8-238241704735} + + + {777B5D1D-9AF0-B22B-8894-034603EE97F5} + + + {8292766D-2459-2E7E-7615-17216318BA93} + + + {10472B2C-9888-D269-F351-0D0AC3BCD16C} + + + {BF23FC10-1D57-2A9B-706F-6DD8A7B593D4} + + + {092EFC17-7C95-7E04-0ACA-0D61A462EE81} + + + {0AFC1CE8-F6E6-9817-8C21-8432B2A375DA} + + + {0D1AF264-3AC1-78A2-B2A4-AE6171F9194A} + + + {9A5DB854-CFFB-5F88-C566-0E10F994DDB3} + + + {38A5DDC7-416E-548F-39DA-887875FE6B20} + + + {980FE2DB-05D3-5FDA-79DA-067A56F5D19D} + + + {F336DC25-747A-0663-93D6-E3EB9AA0CBF8} + + + {7D78546A-80FC-4DCA-00B9-F191F0AB2179} + + + {9EB3EC7F-2AB7-DDAA-3C05-DF382B728D3F} + + + {02D37B85-7DE2-C8E7-A274-A5A0FBE99D69} + + + {DAF3BAAF-5207-4C34-61B9-A97DDC930D50} + + + {C7885588-8436-4C21-DC1E-58879BF53BDC} + + + {E4ECEA39-0EFF-2443-91B3-1E5DA7AD5AE4} + + + {210B8D25-68E0-32C3-1449-6A40F109C5E9} + + + {378AD911-E8E4-D230-E76B-34542849509D} + + + {F6CED5B6-0A8C-56D2-C1AC-DED6BE774A13} + + + {E684D858-09E8-0251-8E86-5657129641E1} + + + {1EF1BF17-F941-243A-04D1-EE617D140CBA} + + + {344DB016-679C-FBD0-3EC6-4570C47522DE} + + + {3D9758A0-9359-1710-87C1-05D475C08B17} + + + {E824435F-FC7B-10BE-5D1A-5DACC51A8836} + + + {86737735-F6BA-F64A-5EC7-5C9F36755F79} + + + {6B7BE34D-1BC1-C7B9-111F-C55CA8250943} + + + {9B6B6D54-D378-80C2-8CC9-D1D8FB44C2A8} + + + {D0584AC3-6837-14F6-90BF-5EA604D1F074} + + + {794B64EC-B809-32E3-AD00-4EE6A74802CA} + + + {67BE498C-9E1F-C73A-B99A-387C034CE680} + + + {1A9C8538-959B-25E3-473D-B462C9A9D458} + + + {AA9F594C-DFAF-C0A7-0CCD-9F90E54D3A01} + + + {230BF784-34F4-3BE8-46D4-54E6B67E5E9E} + + + {39F680F3-5161-4D1C-EAD0-3911ED808874} + + + {3197198B-A978-E330-C7FB-07E5CE8236C7} + + + {42F7BE9D-3C8A-AE26-289B-8F355C068036} + + + {7868764A-6572-381A-906C-9C26792A4C29} + + + {03678508-A517-48BB-FB4A-485628C34E08} + + + {07D27C1D-3227-F527-356C-17DA11551A99} + + + {6146D580-99D2-A6C8-5908-30DC355BB6BA} + + + {C67003E8-BEA8-2188-F4B3-A122F4B4FA3F} + + + {09B91E68-1FF4-C7ED-9055-D4D96E66A0BA} + + + {4F24EEED-AA33-AC6C-9A39-72E71CF83EF0} + + + {0F70B1A9-BB50-23F5-2AE7-F95E51A00389} + + + {D4C8DC40-2CD2-04B6-05D0-1E7A88841390} + + + {58BED6AF-DB89-7560-B2B8-D937C1C0825A} + + + {B958F86B-6926-8D9B-2FC6-8BFD4BDC72C9} + + + {DB624F7D-D513-25AC-C13C-B9062EB3BEEE} + + + {89AA9B6C-4029-A34F-C1B0-3B5D8691F4D4} + + + {1A7F541C-B032-9C66-C320-A13B2A8A9866} + + + {4BAB7C18-51AB-0D9D-83CD-9C37F28D2E38} + + + {5523922E-8B0C-A52B-477C-752C09F8197F} + + + {857B6D8B-0ECB-FE9E-D1EB-D5E45E72F057} + + + {BAA582FA-40B7-320E-EE7A-4C3892C7BE72} + + + {632B4C79-AF7D-BFB5-D006-5AE67F607130} + + + {B10E20C2-4583-2B79-60B7-FE4D4B044313} + + + {CFB54F15-8A8A-0505-9B7F-ECA41CEE38E8} + + + {911F0159-A7A8-4A43-3FD4-154F62F4A44B} + + + {9D5816C2-E2B2-2E3F-B095-AC8BD1100D29} + + + {3FDCD000-763F-8477-9AF8-70ABA2E91E5E} + + + {0947506F-66FA-EF8D-8A4E-4D48BCDBB226} + + + {E4B6AED3-F54C-3FF2-069F-640BACAE0E08} + + + {D5EADBCC-6A1C-C940-0206-26E49110AF08} + + + {D27DC92D-5BEB-9294-DCD1-81D54E245AD5} + + + {BCD73D20-42B1-6CDB-DE66-B06236A60F47} + + + {20DC13F6-2369-8841-9F0B-D13FA14EEE74} + + + {A302A8DB-120F-9EBB-A3D5-2C29963AA56B} + + + {45489C2A-6E0E-CCDC-6638-0DACEEB63CCA} + + + {F1B90726-DB55-0293-BFAF-C65C7DF5489C} + + + {2C55FD42-0ACD-B0B8-7EAE-EB17F09BAEEC} + + + {B68CD2B2-701F-9AB7-4638-2485D6E06BCF} + + + {B0B7C78E-729E-0FFA-D611-82AE8BC7FE2C} + + + {0A4F7E12-220C-14EF-0026-9C0629FA9C17} + + + {37F49E10-4E62-6D5C-FF70-722D0CA3D97E} + + + {160D9882-0F68-278D-C5F9-8960FD7421D2} + + + {4CED05DA-E0A2-E548-F753-1F2EF299A8E3} + + + {294E4CD5-B06F-97D1-04A3-51871CEA507C} + + + {77228F15-BD91-06FF-2C7E-0377D25C2C94} + + + {5CB531E6-BF9A-2C50-056C-EE5A525D28D3} + + + {E4EA47E5-B41C-2A19-1783-7E9104096ECD} + + + {46A17AC9-0BFF-B5CE-26D6-B9D1992C88AC} + + + {D90A8DF7-FBAB-D363-13C0-6707BB22B72B} + + + {8AE77C40-6839-EC37-4515-BD3CC269BCE4} + + + {0EAD99DB-011F-09E5-45A2-365F646EB004} + + + {F57590C6-3B90-1BE1-1006-488BA33E8BD9} + + + {7C319D73-0D93-5842-0874-398D2D3038D5} + + + {2CB4DB0C-DD3B-6195-D822-76EC7A5C88D2} + + + {FE3CB19C-EF43-5CF5-DAF0-09D4E43D0AB9} + + + {895C2D33-E08D-B1BA-BB36-FC4CA65090C8} + + + {D64A57DB-A956-5519-1929-1D929B56E1B0} + + + {5A99CC24-AC45-7ED6-C11A-B8B86E76D884} + + + {7A131EEC-25A7-22F6-2839-A2194DDF3007} + + + {EA9DB76C-CEF7-6BFC-2070-28B7DF8E8063} + + + {3C206A40-6F1B-E683-ACF1-DEC3703D0140} + + + {DF95D4BF-E18C-125A-5EBB-8993A06E232C} + + + {118946F2-AC24-0F09-62D5-753DF87A60CD} + + + {07329F9B-7D3D-CEB3-C771-714842076140} + + + {08BBBECB-B0D1-7611-37EC-F57E1D0CE2A2} + + + {268E8F2A-980C-BF2F-B161-AACABC9D91F3} + + + {A4D76113-9EDC-DA60-D89B-5BACF7F1C426} + + + {FE955B6B-68AC-AA07-70D8-2413F6DB65C8} + + + {7ED5A90E-41AF-A1EF-659B-37CEEAB9BA61} + + + + + AudioPerformanceTest\Source + + + JUCE Modules\juce_audio_basics\buffers + + + JUCE Modules\juce_audio_basics\buffers + + + JUCE Modules\juce_audio_basics\buffers + + + JUCE Modules\juce_audio_basics\effects + + + JUCE Modules\juce_audio_basics\effects + + + JUCE Modules\juce_audio_basics\effects + + + JUCE Modules\juce_audio_basics\midi + + + JUCE Modules\juce_audio_basics\midi + + + JUCE Modules\juce_audio_basics\midi + + + JUCE Modules\juce_audio_basics\midi + + + JUCE Modules\juce_audio_basics\midi + + + JUCE Modules\juce_audio_basics\midi + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\synthesisers + + + JUCE Modules\juce_audio_basics + + + JUCE Modules\juce_audio_basics + + + JUCE Modules\juce_audio_devices\audio_io + + + JUCE Modules\juce_audio_devices\audio_io + + + JUCE Modules\juce_audio_devices\audio_io + + + JUCE Modules\juce_audio_devices\midi_io + + + JUCE Modules\juce_audio_devices\midi_io + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\sources + + + JUCE Modules\juce_audio_devices\sources + + + JUCE Modules\juce_audio_devices + + + JUCE Modules\juce_audio_devices + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\format + + + JUCE Modules\juce_audio_formats\format + + + JUCE Modules\juce_audio_formats\format + + + JUCE Modules\juce_audio_formats\format + + + JUCE Modules\juce_audio_formats\format + + + JUCE Modules\juce_audio_formats\format + + + JUCE Modules\juce_audio_formats\format + + + JUCE Modules\juce_audio_formats\sampler + + + JUCE Modules\juce_audio_formats + + + JUCE Modules\juce_audio_formats + + + JUCE Modules\juce_audio_processors\format + + + JUCE Modules\juce_audio_processors\format + + + JUCE Modules\juce_audio_processors\format_types + + + JUCE Modules\juce_audio_processors\format_types + + + JUCE Modules\juce_audio_processors\format_types + + + JUCE Modules\juce_audio_processors\format_types + + + JUCE Modules\juce_audio_processors\format_types + + + JUCE Modules\juce_audio_processors\processors + + + JUCE Modules\juce_audio_processors\processors + + + JUCE Modules\juce_audio_processors\processors + + + JUCE Modules\juce_audio_processors\processors + + + JUCE Modules\juce_audio_processors\processors + + + JUCE Modules\juce_audio_processors\processors + + + JUCE Modules\juce_audio_processors\scanning + + + JUCE Modules\juce_audio_processors\scanning + + + JUCE Modules\juce_audio_processors\scanning + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors + + + JUCE Modules\juce_audio_processors + + + JUCE Modules\juce_audio_utils\audio_cd + + + JUCE Modules\juce_audio_utils\gui + + + JUCE Modules\juce_audio_utils\gui + + + JUCE Modules\juce_audio_utils\gui + + + JUCE Modules\juce_audio_utils\gui + + + JUCE Modules\juce_audio_utils\gui + + + JUCE Modules\juce_audio_utils\gui + + + JUCE Modules\juce_audio_utils\native + + + JUCE Modules\juce_audio_utils\native + + + JUCE Modules\juce_audio_utils\native + + + JUCE Modules\juce_audio_utils\native + + + JUCE Modules\juce_audio_utils\native + + + JUCE Modules\juce_audio_utils\native + + + JUCE Modules\juce_audio_utils\native + + + JUCE Modules\juce_audio_utils\native + + + JUCE Modules\juce_audio_utils\native + + + JUCE Modules\juce_audio_utils\native + + + JUCE Modules\juce_audio_utils\players + + + JUCE Modules\juce_audio_utils\players + + + JUCE Modules\juce_audio_utils + + + JUCE Modules\juce_audio_utils + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\javascript + + + JUCE Modules\juce_core\javascript + + + JUCE Modules\juce_core\logging + + + JUCE Modules\juce_core\logging + + + JUCE Modules\juce_core\maths + + + JUCE Modules\juce_core\maths + + + JUCE Modules\juce_core\maths + + + JUCE Modules\juce_core\memory + + + JUCE Modules\juce_core\misc + + + JUCE Modules\juce_core\misc + + + JUCE Modules\juce_core\misc + + + JUCE Modules\juce_core\misc + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\network + + + JUCE Modules\juce_core\network + + + JUCE Modules\juce_core\network + + + JUCE Modules\juce_core\network + + + JUCE Modules\juce_core\network + + + JUCE Modules\juce_core\network + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\system + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\time + + + JUCE Modules\juce_core\time + + + JUCE Modules\juce_core\time + + + JUCE Modules\juce_core\unit_tests + + + JUCE Modules\juce_core\xml + + + JUCE Modules\juce_core\xml + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip + + + JUCE Modules\juce_core\zip + + + JUCE Modules\juce_core\zip + + + JUCE Modules\juce_core + + + JUCE Modules\juce_core + + + JUCE Modules\juce_data_structures\app_properties + + + JUCE Modules\juce_data_structures\app_properties + + + JUCE Modules\juce_data_structures\undomanager + + + JUCE Modules\juce_data_structures\values + + + JUCE Modules\juce_data_structures\values + + + JUCE Modules\juce_data_structures\values + + + JUCE Modules\juce_data_structures\values + + + JUCE Modules\juce_data_structures + + + JUCE Modules\juce_data_structures + + + JUCE Modules\juce_events\broadcasters + + + JUCE Modules\juce_events\broadcasters + + + JUCE Modules\juce_events\broadcasters + + + JUCE Modules\juce_events\interprocess + + + JUCE Modules\juce_events\interprocess + + + JUCE Modules\juce_events\interprocess + + + JUCE Modules\juce_events\messages + + + JUCE Modules\juce_events\messages + + + JUCE Modules\juce_events\messages + + + JUCE Modules\juce_events\messages + + + JUCE Modules\juce_events\native + + + JUCE Modules\juce_events\native + + + JUCE Modules\juce_events\native + + + JUCE Modules\juce_events\native + + + JUCE Modules\juce_events\native + + + JUCE Modules\juce_events\native + + + JUCE Modules\juce_events\timers + + + JUCE Modules\juce_events\timers + + + JUCE Modules\juce_events + + + JUCE Modules\juce_events + + + JUCE Modules\juce_graphics\colour + + + JUCE Modules\juce_graphics\colour + + + JUCE Modules\juce_graphics\colour + + + JUCE Modules\juce_graphics\colour + + + JUCE Modules\juce_graphics\contexts + + + JUCE Modules\juce_graphics\contexts + + + JUCE Modules\juce_graphics\contexts + + + JUCE Modules\juce_graphics\effects + + + JUCE Modules\juce_graphics\effects + + + JUCE Modules\juce_graphics\fonts + + + JUCE Modules\juce_graphics\fonts + + + JUCE Modules\juce_graphics\fonts + + + JUCE Modules\juce_graphics\fonts + + + JUCE Modules\juce_graphics\fonts + + + JUCE Modules\juce_graphics\fonts + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats + + + JUCE Modules\juce_graphics\image_formats + + + JUCE Modules\juce_graphics\image_formats + + + JUCE Modules\juce_graphics\images + + + JUCE Modules\juce_graphics\images + + + JUCE Modules\juce_graphics\images + + + JUCE Modules\juce_graphics\images + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\placement + + + JUCE Modules\juce_graphics + + + JUCE Modules\juce_graphics + + + JUCE Modules\juce_gui_basics\application + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\commands + + + JUCE Modules\juce_gui_basics\commands + + + JUCE Modules\juce_gui_basics\commands + + + JUCE Modules\juce_gui_basics\commands + + + JUCE Modules\juce_gui_basics\components + + + JUCE Modules\juce_gui_basics\components + + + JUCE Modules\juce_gui_basics\components + + + JUCE Modules\juce_gui_basics\components + + + JUCE Modules\juce_gui_basics\drawables + + + JUCE Modules\juce_gui_basics\drawables + + + JUCE Modules\juce_gui_basics\drawables + + + JUCE Modules\juce_gui_basics\drawables + + + JUCE Modules\juce_gui_basics\drawables + + + JUCE Modules\juce_gui_basics\drawables + + + JUCE Modules\juce_gui_basics\drawables + + + JUCE Modules\juce_gui_basics\drawables + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\keyboard + + + JUCE Modules\juce_gui_basics\keyboard + + + JUCE Modules\juce_gui_basics\keyboard + + + JUCE Modules\juce_gui_basics\keyboard + + + JUCE Modules\juce_gui_basics\keyboard + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\lookandfeel + + + JUCE Modules\juce_gui_basics\lookandfeel + + + JUCE Modules\juce_gui_basics\lookandfeel + + + JUCE Modules\juce_gui_basics\lookandfeel + + + JUCE Modules\juce_gui_basics\lookandfeel + + + JUCE Modules\juce_gui_basics\menus + + + JUCE Modules\juce_gui_basics\menus + + + JUCE Modules\juce_gui_basics\menus + + + JUCE Modules\juce_gui_basics\menus + + + JUCE Modules\juce_gui_basics\misc + + + JUCE Modules\juce_gui_basics\misc + + + JUCE Modules\juce_gui_basics\misc + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\positioning + + + JUCE Modules\juce_gui_basics\positioning + + + JUCE Modules\juce_gui_basics\positioning + + + JUCE Modules\juce_gui_basics\positioning + + + JUCE Modules\juce_gui_basics\positioning + + + JUCE Modules\juce_gui_basics\positioning + + + JUCE Modules\juce_gui_basics\positioning + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics + + + JUCE Modules\juce_gui_basics + + + JUCE Modules\juce_gui_extra\code_editor + + + JUCE Modules\juce_gui_extra\code_editor + + + JUCE Modules\juce_gui_extra\code_editor + + + JUCE Modules\juce_gui_extra\code_editor + + + JUCE Modules\juce_gui_extra\code_editor + + + JUCE Modules\juce_gui_extra\documents + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra + + + JUCE Modules\juce_gui_extra + + + JUCE Library Code + + + JUCE Library Code + + + JUCE Library Code + + + JUCE Library Code + + + JUCE Library Code + + + JUCE Library Code + + + JUCE Library Code + + + JUCE Library Code + + + JUCE Library Code + + + JUCE Library Code + + + JUCE Library Code + + + + + AudioPerformanceTest\Source + + + JUCE Modules\juce_audio_basics\audio_play_head + + + JUCE Modules\juce_audio_basics\buffers + + + JUCE Modules\juce_audio_basics\buffers + + + JUCE Modules\juce_audio_basics\buffers + + + JUCE Modules\juce_audio_basics\buffers + + + JUCE Modules\juce_audio_basics\effects + + + JUCE Modules\juce_audio_basics\effects + + + JUCE Modules\juce_audio_basics\effects + + + JUCE Modules\juce_audio_basics\effects + + + JUCE Modules\juce_audio_basics\effects + + + JUCE Modules\juce_audio_basics\effects + + + JUCE Modules\juce_audio_basics\midi + + + JUCE Modules\juce_audio_basics\midi + + + JUCE Modules\juce_audio_basics\midi + + + JUCE Modules\juce_audio_basics\midi + + + JUCE Modules\juce_audio_basics\midi + + + JUCE Modules\juce_audio_basics\midi + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\mpe + + + JUCE Modules\juce_audio_basics\native + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\sources + + + JUCE Modules\juce_audio_basics\synthesisers + + + JUCE Modules\juce_audio_basics + + + JUCE Modules\juce_audio_devices\audio_io + + + JUCE Modules\juce_audio_devices\audio_io + + + JUCE Modules\juce_audio_devices\audio_io + + + JUCE Modules\juce_audio_devices\audio_io + + + JUCE Modules\juce_audio_devices\midi_io + + + JUCE Modules\juce_audio_devices\midi_io + + + JUCE Modules\juce_audio_devices\midi_io + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\native + + + JUCE Modules\juce_audio_devices\sources + + + JUCE Modules\juce_audio_devices\sources + + + JUCE Modules\juce_audio_devices + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected + + + JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected + + + JUCE Modules\juce_audio_formats\codecs\flac + + + JUCE Modules\juce_audio_formats\codecs\flac + + + JUCE Modules\juce_audio_formats\codecs\flac + + + JUCE Modules\juce_audio_formats\codecs\flac + + + JUCE Modules\juce_audio_formats\codecs\flac + + + JUCE Modules\juce_audio_formats\codecs\flac + + + JUCE Modules\juce_audio_formats\codecs\flac + + + JUCE Modules\juce_audio_formats\codecs\flac + + + JUCE Modules\juce_audio_formats\codecs\flac + + + JUCE Modules\juce_audio_formats\codecs\flac + + + JUCE Modules\juce_audio_formats\codecs\flac + + + JUCE Modules\juce_audio_formats\codecs\flac + + + JUCE Modules\juce_audio_formats\codecs\flac + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\floor + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\uncoupled + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\codecs + + + JUCE Modules\juce_audio_formats\format + + + JUCE Modules\juce_audio_formats\format + + + JUCE Modules\juce_audio_formats\format + + + JUCE Modules\juce_audio_formats\format + + + JUCE Modules\juce_audio_formats\format + + + JUCE Modules\juce_audio_formats\format + + + JUCE Modules\juce_audio_formats\format + + + JUCE Modules\juce_audio_formats\format + + + JUCE Modules\juce_audio_formats\sampler + + + JUCE Modules\juce_audio_formats + + + JUCE Modules\juce_audio_processors\format + + + JUCE Modules\juce_audio_processors\format + + + JUCE Modules\juce_audio_processors\format_types + + + JUCE Modules\juce_audio_processors\format_types + + + JUCE Modules\juce_audio_processors\format_types + + + JUCE Modules\juce_audio_processors\format_types + + + JUCE Modules\juce_audio_processors\format_types + + + JUCE Modules\juce_audio_processors\format_types + + + JUCE Modules\juce_audio_processors\format_types + + + JUCE Modules\juce_audio_processors\format_types + + + JUCE Modules\juce_audio_processors\format_types + + + JUCE Modules\juce_audio_processors\processors + + + JUCE Modules\juce_audio_processors\processors + + + JUCE Modules\juce_audio_processors\processors + + + JUCE Modules\juce_audio_processors\processors + + + JUCE Modules\juce_audio_processors\processors + + + JUCE Modules\juce_audio_processors\processors + + + JUCE Modules\juce_audio_processors\processors + + + JUCE Modules\juce_audio_processors\processors + + + JUCE Modules\juce_audio_processors\scanning + + + JUCE Modules\juce_audio_processors\scanning + + + JUCE Modules\juce_audio_processors\scanning + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors\utilities + + + JUCE Modules\juce_audio_processors + + + JUCE Modules\juce_audio_utils\audio_cd + + + JUCE Modules\juce_audio_utils\audio_cd + + + JUCE Modules\juce_audio_utils\gui + + + JUCE Modules\juce_audio_utils\gui + + + JUCE Modules\juce_audio_utils\gui + + + JUCE Modules\juce_audio_utils\gui + + + JUCE Modules\juce_audio_utils\gui + + + JUCE Modules\juce_audio_utils\gui + + + JUCE Modules\juce_audio_utils\gui + + + JUCE Modules\juce_audio_utils\gui + + + JUCE Modules\juce_audio_utils\players + + + JUCE Modules\juce_audio_utils\players + + + JUCE Modules\juce_audio_utils + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\containers + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\files + + + JUCE Modules\juce_core\javascript + + + JUCE Modules\juce_core\javascript + + + JUCE Modules\juce_core\logging + + + JUCE Modules\juce_core\logging + + + JUCE Modules\juce_core\maths + + + JUCE Modules\juce_core\maths + + + JUCE Modules\juce_core\maths + + + JUCE Modules\juce_core\maths + + + JUCE Modules\juce_core\maths + + + JUCE Modules\juce_core\maths + + + JUCE Modules\juce_core\maths + + + JUCE Modules\juce_core\memory + + + JUCE Modules\juce_core\memory + + + JUCE Modules\juce_core\memory + + + JUCE Modules\juce_core\memory + + + JUCE Modules\juce_core\memory + + + JUCE Modules\juce_core\memory + + + JUCE Modules\juce_core\memory + + + JUCE Modules\juce_core\memory + + + JUCE Modules\juce_core\memory + + + JUCE Modules\juce_core\memory + + + JUCE Modules\juce_core\memory + + + JUCE Modules\juce_core\memory + + + JUCE Modules\juce_core\memory + + + JUCE Modules\juce_core\misc + + + JUCE Modules\juce_core\misc + + + JUCE Modules\juce_core\misc + + + JUCE Modules\juce_core\misc + + + JUCE Modules\juce_core\misc + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\native + + + JUCE Modules\juce_core\network + + + JUCE Modules\juce_core\network + + + JUCE Modules\juce_core\network + + + JUCE Modules\juce_core\network + + + JUCE Modules\juce_core\network + + + JUCE Modules\juce_core\network + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\streams + + + JUCE Modules\juce_core\system + + + JUCE Modules\juce_core\system + + + JUCE Modules\juce_core\system + + + JUCE Modules\juce_core\system + + + JUCE Modules\juce_core\system + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\text + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\threads + + + JUCE Modules\juce_core\time + + + JUCE Modules\juce_core\time + + + JUCE Modules\juce_core\time + + + JUCE Modules\juce_core\unit_tests + + + JUCE Modules\juce_core\xml + + + JUCE Modules\juce_core\xml + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip\zlib + + + JUCE Modules\juce_core\zip + + + JUCE Modules\juce_core\zip + + + JUCE Modules\juce_core\zip + + + JUCE Modules\juce_core + + + JUCE Modules\juce_data_structures\app_properties + + + JUCE Modules\juce_data_structures\app_properties + + + JUCE Modules\juce_data_structures\undomanager + + + JUCE Modules\juce_data_structures\undomanager + + + JUCE Modules\juce_data_structures\values + + + JUCE Modules\juce_data_structures\values + + + JUCE Modules\juce_data_structures\values + + + JUCE Modules\juce_data_structures\values + + + JUCE Modules\juce_data_structures\values + + + JUCE Modules\juce_data_structures + + + JUCE Modules\juce_events\broadcasters + + + JUCE Modules\juce_events\broadcasters + + + JUCE Modules\juce_events\broadcasters + + + JUCE Modules\juce_events\broadcasters + + + JUCE Modules\juce_events\broadcasters + + + JUCE Modules\juce_events\interprocess + + + JUCE Modules\juce_events\interprocess + + + JUCE Modules\juce_events\interprocess + + + JUCE Modules\juce_events\messages + + + JUCE Modules\juce_events\messages + + + JUCE Modules\juce_events\messages + + + JUCE Modules\juce_events\messages + + + JUCE Modules\juce_events\messages + + + JUCE Modules\juce_events\messages + + + JUCE Modules\juce_events\messages + + + JUCE Modules\juce_events\messages + + + JUCE Modules\juce_events\messages + + + JUCE Modules\juce_events\native + + + JUCE Modules\juce_events\native + + + JUCE Modules\juce_events\native + + + JUCE Modules\juce_events\native + + + JUCE Modules\juce_events\timers + + + JUCE Modules\juce_events\timers + + + JUCE Modules\juce_events + + + JUCE Modules\juce_graphics\colour + + + JUCE Modules\juce_graphics\colour + + + JUCE Modules\juce_graphics\colour + + + JUCE Modules\juce_graphics\colour + + + JUCE Modules\juce_graphics\colour + + + JUCE Modules\juce_graphics\contexts + + + JUCE Modules\juce_graphics\contexts + + + JUCE Modules\juce_graphics\contexts + + + JUCE Modules\juce_graphics\contexts + + + JUCE Modules\juce_graphics\effects + + + JUCE Modules\juce_graphics\effects + + + JUCE Modules\juce_graphics\effects + + + JUCE Modules\juce_graphics\fonts + + + JUCE Modules\juce_graphics\fonts + + + JUCE Modules\juce_graphics\fonts + + + JUCE Modules\juce_graphics\fonts + + + JUCE Modules\juce_graphics\fonts + + + JUCE Modules\juce_graphics\fonts + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\geometry + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + JUCE Modules\juce_graphics\images + + + JUCE Modules\juce_graphics\images + + + JUCE Modules\juce_graphics\images + + + JUCE Modules\juce_graphics\images + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\native + + + JUCE Modules\juce_graphics\placement + + + JUCE Modules\juce_graphics\placement + + + JUCE Modules\juce_graphics + + + JUCE Modules\juce_gui_basics\application + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\buttons + + + JUCE Modules\juce_gui_basics\commands + + + JUCE Modules\juce_gui_basics\commands + + + JUCE Modules\juce_gui_basics\commands + + + JUCE Modules\juce_gui_basics\commands + + + JUCE Modules\juce_gui_basics\commands + + + JUCE Modules\juce_gui_basics\components + + + JUCE Modules\juce_gui_basics\components + + + JUCE Modules\juce_gui_basics\components + + + JUCE Modules\juce_gui_basics\components + + + JUCE Modules\juce_gui_basics\components + + + JUCE Modules\juce_gui_basics\drawables + + + JUCE Modules\juce_gui_basics\drawables + + + JUCE Modules\juce_gui_basics\drawables + + + JUCE Modules\juce_gui_basics\drawables + + + JUCE Modules\juce_gui_basics\drawables + + + JUCE Modules\juce_gui_basics\drawables + + + JUCE Modules\juce_gui_basics\drawables + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\filebrowser + + + JUCE Modules\juce_gui_basics\keyboard + + + JUCE Modules\juce_gui_basics\keyboard + + + JUCE Modules\juce_gui_basics\keyboard + + + JUCE Modules\juce_gui_basics\keyboard + + + JUCE Modules\juce_gui_basics\keyboard + + + JUCE Modules\juce_gui_basics\keyboard + + + JUCE Modules\juce_gui_basics\keyboard + + + JUCE Modules\juce_gui_basics\keyboard + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\layout + + + JUCE Modules\juce_gui_basics\lookandfeel + + + JUCE Modules\juce_gui_basics\lookandfeel + + + JUCE Modules\juce_gui_basics\lookandfeel + + + JUCE Modules\juce_gui_basics\lookandfeel + + + JUCE Modules\juce_gui_basics\lookandfeel + + + JUCE Modules\juce_gui_basics\menus + + + JUCE Modules\juce_gui_basics\menus + + + JUCE Modules\juce_gui_basics\menus + + + JUCE Modules\juce_gui_basics\menus + + + JUCE Modules\juce_gui_basics\misc + + + JUCE Modules\juce_gui_basics\misc + + + JUCE Modules\juce_gui_basics\misc + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\mouse + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\native + + + JUCE Modules\juce_gui_basics\positioning + + + JUCE Modules\juce_gui_basics\positioning + + + JUCE Modules\juce_gui_basics\positioning + + + JUCE Modules\juce_gui_basics\positioning + + + JUCE Modules\juce_gui_basics\positioning + + + JUCE Modules\juce_gui_basics\positioning + + + JUCE Modules\juce_gui_basics\positioning + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\properties + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\widgets + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics\windows + + + JUCE Modules\juce_gui_basics + + + JUCE Modules\juce_gui_extra\code_editor + + + JUCE Modules\juce_gui_extra\code_editor + + + JUCE Modules\juce_gui_extra\code_editor + + + JUCE Modules\juce_gui_extra\code_editor + + + JUCE Modules\juce_gui_extra\code_editor + + + JUCE Modules\juce_gui_extra\code_editor + + + JUCE Modules\juce_gui_extra\code_editor + + + JUCE Modules\juce_gui_extra\documents + + + JUCE Modules\juce_gui_extra\embedding + + + JUCE Modules\juce_gui_extra\embedding + + + JUCE Modules\juce_gui_extra\embedding + + + JUCE Modules\juce_gui_extra\embedding + + + JUCE Modules\juce_gui_extra\embedding + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\misc + + + JUCE Modules\juce_gui_extra\native + + + JUCE Modules\juce_gui_extra + + + JUCE Library Code + + + JUCE Library Code + + + + + JUCE Modules\juce_audio_formats\codecs\flac + + + JUCE Modules\juce_audio_formats\codecs\oggvorbis + + + JUCE Modules\juce_graphics\image_formats\jpglib + + + JUCE Modules\juce_graphics\image_formats\pnglib + + + + + JUCE Library Code + + + diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2017/resources.rc b/extras/AudioPerformanceTest/Builds/VisualStudio2017/resources.rc new file mode 100644 index 00000000..2dec1429 --- /dev/null +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2017/resources.rc @@ -0,0 +1,31 @@ +#ifdef JUCE_USER_DEFINED_RC_FILE + #include JUCE_USER_DEFINED_RC_FILE +#else + +#undef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#include + +VS_VERSION_INFO VERSIONINFO +FILEVERSION 1,0,0,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "ROLI Ltd.\0" + VALUE "LegalCopyright", "ROLI Ltd.\0" + VALUE "FileDescription", "AudioPerformanceTest\0" + VALUE "FileVersion", "1.0.0\0" + VALUE "ProductName", "AudioPerformanceTest\0" + VALUE "ProductVersion", "1.0.0\0" + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif diff --git a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj b/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj index 933386d7..6e39bf51 100644 --- a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj +++ b/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj @@ -136,6 +136,7 @@ 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)"; @@ -166,6 +167,7 @@ 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)"; @@ -316,7 +318,7 @@ C86DD529EC94922C2AB61742, 6C2BE2DE2ECC96615ED827AB, 409D569C572B6EF7F4F1702D, ); buildRules = ( ); dependencies = ( ); name = "AudioPerformanceTest - App"; productName = AudioPerformanceTest; productReference = 614F2084407B35D62101F69F; productType = "com.apple.product-type.application"; }; - 9CE2A44801B5B4BE7A9667DA = {isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; attributes = { LastUpgradeCheck = 0830; 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/JuceLibraryCode/AppConfig.h b/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h index 109ec4a7..29b0ea00 100644 --- a/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h +++ b/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h @@ -147,6 +147,10 @@ //#define JUCE_PLUGINHOST_AU 0 #endif +#ifndef JUCE_PLUGINHOST_LADSPA + //#define JUCE_PLUGINHOST_LADSPA 0 +#endif + //============================================================================== // juce_audio_utils flags: diff --git a/extras/AudioPerformanceTest/Source/Main.cpp b/extras/AudioPerformanceTest/Source/Main.cpp index c7a96755..bfce625b 100644 --- a/extras/AudioPerformanceTest/Source/Main.cpp +++ b/extras/AudioPerformanceTest/Source/Main.cpp @@ -43,7 +43,7 @@ public: //============================================================================== void initialise (const String&) override { - mainWindow = new MainWindow (getApplicationName()); + mainWindow.reset (new MainWindow (getApplicationName())); } void shutdown() override @@ -88,7 +88,7 @@ public: }; private: - ScopedPointer mainWindow; + std::unique_ptr mainWindow; }; //============================================================================== diff --git a/extras/AudioPluginHost/AudioPluginHost.jucer b/extras/AudioPluginHost/AudioPluginHost.jucer index 19fbee32..074a4754 100644 --- a/extras/AudioPluginHost/AudioPluginHost.jucer +++ b/extras/AudioPluginHost/AudioPluginHost.jucer @@ -211,7 +211,8 @@ + JUCE_PLUGINHOST_AU="1" JUCE_WEB_BROWSER="0" JUCE_PLUGINHOST_VST3="1" + JUCE_PLUGINHOST_LADSPA="1"/> @@ -228,4 +229,7 @@ + + + diff --git a/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt b/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt index 11a1f09e..3b05e76a 100644 --- a/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt +++ b/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt @@ -415,6 +415,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h" "../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" "../../../../../modules/juce_core/containers/juce_SortedSet.h" + "../../../../../modules/juce_core/containers/juce_SparseSet.cpp" "../../../../../modules/juce_core/containers/juce_SparseSet.h" "../../../../../modules/juce_core/containers/juce_Variant.cpp" "../../../../../modules/juce_core/containers/juce_Variant.h" @@ -1250,6 +1251,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_video/capture/juce_CameraDevice.cpp" "../../../../../modules/juce_video/capture/juce_CameraDevice.h" "../../../../../modules/juce_video/native/juce_android_CameraDevice.h" + "../../../../../modules/juce_video/native/juce_ios_CameraDevice.h" "../../../../../modules/juce_video/native/juce_mac_CameraDevice.h" "../../../../../modules/juce_video/native/juce_mac_Video.h" "../../../../../modules/juce_video/native/juce_win32_CameraDevice.h" @@ -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) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_SortedSet.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -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) set_source_files_properties("../../../../../modules/juce_video/capture/juce_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_video/native/juce_android_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_video/native/juce_ios_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_video/native/juce_mac_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_video/native/juce_mac_Video.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_video/native/juce_win32_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/extras/AudioPluginHost/Builds/Android/app/src/main/java/com/roli/juce/pluginhost/AudioPluginHost.java b/extras/AudioPluginHost/Builds/Android/app/src/main/java/com/roli/juce/pluginhost/AudioPluginHost.java index 11134d24..2b62f5a5 100644 --- a/extras/AudioPluginHost/Builds/Android/app/src/main/java/com/roli/juce/pluginhost/AudioPluginHost.java +++ b/extras/AudioPluginHost/Builds/Android/app/src/main/java/com/roli/juce/pluginhost/AudioPluginHost.java @@ -30,6 +30,7 @@ import android.content.Intent; import android.content.res.Configuration; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; +import android.hardware.camera2.*; import android.net.http.SslError; import android.net.Uri; import android.os.Bundle; @@ -119,6 +120,7 @@ public class AudioPluginHost extends Activity private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2; private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3; private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4; + private static final int JUCE_PERMISSIONS_CAMERA = 5; private static String getAndroidPermissionName (int permissionID) { @@ -129,6 +131,7 @@ public class AudioPluginHost extends Activity // use string value as this is not defined in SDKs < 16 case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE"; case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE; + case JUCE_PERMISSIONS_CAMERA: return Manifest.permission.CAMERA; } // unknown permission ID! @@ -1205,6 +1208,7 @@ public class AudioPluginHost extends Activity setVolumeControlStream (AudioManager.STREAM_MUSIC); permissionCallbackPtrMap = new HashMap(); + appPausedResumedListeners = new HashMap(); } @Override @@ -1221,6 +1225,11 @@ public class AudioPluginHost extends Activity { suspendApp(); + Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); + + for (Long k : keys) + appPausedResumedListeners.get (k).appPaused(); + try { Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down @@ -1236,12 +1245,10 @@ public class AudioPluginHost extends Activity super.onResume(); resumeApp(); - // Ensure that navigation/status bar visibility is correctly restored. - for (int i = 0; i < viewHolder.getChildCount(); ++i) - { - if (viewHolder.getChildAt (i) instanceof ComponentPeerView) - ((ComponentPeerView) viewHolder.getChildAt (i)).appResumed(); - } + Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); + + for (Long k : keys) + appPausedResumedListeners.get (k).appResumed(); } @Override @@ -1368,11 +1375,14 @@ public class AudioPluginHost extends Activity { ComponentPeerView v = new ComponentPeerView (this, opaque, host); viewHolder.addView (v); + addAppPausedResumedListener (v, host); return v; } public final void deleteView (ComponentPeerView view) { + removeAppPausedResumedListener (view, view.host); + view.host = 0; ViewGroup group = (ViewGroup) (view.getParent()); @@ -1590,9 +1600,28 @@ public class AudioPluginHost extends Activity public native void alertDismissed (long callback, int id); + //============================================================================== + public interface AppPausedResumedListener + { + void appPaused(); + void appResumed(); + } + + private Map appPausedResumedListeners; + + public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) + { + appPausedResumedListeners.put (new Long (listenerHost), l); + } + + public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) + { + appPausedResumedListeners.remove (new Long (listenerHost)); + } + //============================================================================== public final class ComponentPeerView extends ViewGroup - implements View.OnFocusChangeListener + implements View.OnFocusChangeListener, AppPausedResumedListener { public ComponentPeerView (Context context, boolean opaque_, long host) { @@ -1940,13 +1969,25 @@ public class AudioPluginHost extends Activity } //============================================================================== + private native void handleAppPaused (long host); private native void handleAppResumed (long host); + @Override + public void appPaused() + { + if (host == 0) + return; + + handleAppPaused (host); + } + + @Override public void appResumed() { if (host == 0) return; + // Ensure that navigation/status bar visibility is correctly restored. handleAppResumed (host); } } @@ -2616,6 +2657,175 @@ public class AudioPluginHost extends Activity private final Object hostLock = new Object(); } + + //============================================================================== + public class CameraDeviceStateCallback extends CameraDevice.StateCallback + { + private native void cameraDeviceStateClosed (long host, CameraDevice camera); + private native void cameraDeviceStateDisconnected (long host, CameraDevice camera); + private native void cameraDeviceStateError (long host, CameraDevice camera, int error); + private native void cameraDeviceStateOpened (long host, CameraDevice camera); + + CameraDeviceStateCallback (long hostToUse) + { + host = hostToUse; + } + + @Override + public void onClosed (CameraDevice camera) + { + cameraDeviceStateClosed (host, camera); + } + + @Override + public void onDisconnected (CameraDevice camera) + { + cameraDeviceStateDisconnected (host, camera); + } + + @Override + public void onError (CameraDevice camera, int error) + { + cameraDeviceStateError (host, camera, error); + } + + @Override + public void onOpened (CameraDevice camera) + { + cameraDeviceStateOpened (host, camera); + } + + private long host; + } + + //============================================================================== + public class CameraCaptureSessionStateCallback extends CameraCaptureSession.StateCallback + { + private native void cameraCaptureSessionActive (long host, CameraCaptureSession session); + private native void cameraCaptureSessionClosed (long host, CameraCaptureSession session); + private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session); + private native void cameraCaptureSessionConfigured (long host, CameraCaptureSession session); + private native void cameraCaptureSessionReady (long host, CameraCaptureSession session); + + CameraCaptureSessionStateCallback (long hostToUse) + { + host = hostToUse; + } + + @Override + public void onActive (CameraCaptureSession session) + { + cameraCaptureSessionActive (host, session); + } + + @Override + public void onClosed (CameraCaptureSession session) + { + cameraCaptureSessionClosed (host, session); + } + + @Override + public void onConfigureFailed (CameraCaptureSession session) + { + cameraCaptureSessionConfigureFailed (host, session); + } + + @Override + public void onConfigured (CameraCaptureSession session) + { + cameraCaptureSessionConfigured (host, session); + } + + @Override + public void onReady (CameraCaptureSession session) + { + cameraCaptureSessionReady (host, session); + } + + private long host; + } + + //============================================================================== + public class CameraCaptureSessionCaptureCallback extends CameraCaptureSession.CaptureCallback + { + private native void cameraCaptureSessionCaptureCompleted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, TotalCaptureResult result); + private native void cameraCaptureSessionCaptureFailed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureFailure failure); + private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureResult partialResult); + private native void cameraCaptureSessionCaptureStarted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, long timestamp, long frameNumber); + private native void cameraCaptureSessionCaptureSequenceAborted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId); + private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber); + + CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview) + { + host = hostToUse; + preview = shouldBePreview; + } + + @Override + public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request, + TotalCaptureResult result) + { + cameraCaptureSessionCaptureCompleted (host, preview, session, request, result); + } + + @Override + public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure) + { + cameraCaptureSessionCaptureFailed (host, preview, session, request, failure); + } + + @Override + public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request, + CaptureResult partialResult) + { + cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult); + } + + @Override + public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId) + { + cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId); + } + + @Override + public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber) + { + cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber); + } + + @Override + public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp, + long frameNumber) + { + cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber); + } + + private long host; + private boolean preview; + } + + //============================================================================== + public class JuceOrientationEventListener extends OrientationEventListener + { + private native void deviceOrientationChanged (long host, int orientation); + + public JuceOrientationEventListener (long hostToUse, Context context, int rate) + { + super (context, rate); + + host = hostToUse; + } + + @Override + public void onOrientationChanged (int orientation) + { + deviceOrientationChanged (host, orientation); + } + + private long host; + } + + //============================================================================== public static final String getLocaleValue (boolean isRegion) { diff --git a/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj b/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj index 8fe60e82..58f02ecb 100644 --- a/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj +++ b/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj @@ -197,6 +197,7 @@ D85C0D11EE4F6C73B9EB5BCD, ); name = Source; sourceTree = ""; }; 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)"; @@ -229,6 +230,7 @@ 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)"; @@ -388,7 +390,7 @@ 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; } diff --git a/extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj index dcc1d5dd..5a140583 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj @@ -601,6 +601,9 @@ true + + true + true @@ -2433,6 +2436,7 @@ + diff --git a/extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj.filters index 74159567..d73bb1e3 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2013/AudioPluginHost_App.vcxproj.filters @@ -874,6 +874,9 @@ JUCE Modules\juce_core\containers + + JUCE Modules\juce_core\containers + JUCE Modules\juce_core\containers @@ -4062,6 +4065,9 @@ JUCE Modules\juce_video\native + + JUCE Modules\juce_video\native + JUCE Modules\juce_video\native diff --git a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj index a27197c8..03cea25f 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj @@ -601,6 +601,9 @@ true + + true + true @@ -2433,6 +2436,7 @@ + diff --git a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters index 87f7846b..3425cca7 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters @@ -874,6 +874,9 @@ JUCE Modules\juce_core\containers + + JUCE Modules\juce_core\containers + JUCE Modules\juce_core\containers @@ -4062,6 +4065,9 @@ JUCE Modules\juce_video\native + + JUCE Modules\juce_video\native + JUCE Modules\juce_video\native diff --git a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj index 98960716..5d76b059 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj @@ -601,6 +601,9 @@ true + + true + true @@ -2433,6 +2436,7 @@ + diff --git a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters index 87a6356e..33384a78 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters @@ -874,6 +874,9 @@ JUCE Modules\juce_core\containers + + JUCE Modules\juce_core\containers + JUCE Modules\juce_core\containers @@ -4062,6 +4065,9 @@ JUCE Modules\juce_video\native + + JUCE Modules\juce_video\native + JUCE Modules\juce_video\native diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj index ddd00def..a3452b3e 100644 --- a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj +++ b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj @@ -199,6 +199,7 @@ 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)"; @@ -229,6 +230,7 @@ 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)"; @@ -392,7 +394,7 @@ 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; } diff --git a/extras/AudioPluginHost/JuceLibraryCode/AppConfig.h b/extras/AudioPluginHost/JuceLibraryCode/AppConfig.h index a319a11e..6b8cbf5e 100644 --- a/extras/AudioPluginHost/JuceLibraryCode/AppConfig.h +++ b/extras/AudioPluginHost/JuceLibraryCode/AppConfig.h @@ -152,6 +152,10 @@ #define JUCE_PLUGINHOST_AU 1 #endif +#ifndef JUCE_PLUGINHOST_LADSPA + #define JUCE_PLUGINHOST_LADSPA 1 +#endif + //============================================================================== // juce_audio_utils flags: diff --git a/extras/AudioPluginHost/JuceLibraryCode/BinaryData.cpp b/extras/AudioPluginHost/JuceLibraryCode/BinaryData.cpp index 8d0192f8..07ae322a 100644 --- a/extras/AudioPluginHost/JuceLibraryCode/BinaryData.cpp +++ b/extras/AudioPluginHost/JuceLibraryCode/BinaryData.cpp @@ -657,7 +657,7 @@ static const unsigned char temp_binary_data_0[] = const char* JUCEAppIcon_png = (const char*) temp_binary_data_0; -const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) noexcept +const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) { unsigned int hash = 0; if (resourceNameUTF8 != 0) @@ -684,7 +684,7 @@ const char* originalFilenames[] = "JUCEAppIcon.png" }; -const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept +const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) { for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i) { diff --git a/extras/AudioPluginHost/JuceLibraryCode/BinaryData.h b/extras/AudioPluginHost/JuceLibraryCode/BinaryData.h index 60258e0a..10d01a63 100644 --- a/extras/AudioPluginHost/JuceLibraryCode/BinaryData.h +++ b/extras/AudioPluginHost/JuceLibraryCode/BinaryData.h @@ -22,9 +22,9 @@ namespace BinaryData // If you provide the name of one of the binary resource variables above, this function will // return the corresponding data and its size (or a null pointer if the name isn't found). - const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) noexcept; + const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes); // If you provide the name of one of the binary resource variables above, this function will // return the corresponding original, non-mangled filename (or a null pointer if the name isn't found). - const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept; + const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8); } diff --git a/extras/AudioPluginHost/Source/Filters/FilterGraph.cpp b/extras/AudioPluginHost/Source/Filters/FilterGraph.cpp index c894505d..47a32237 100644 --- a/extras/AudioPluginHost/Source/Filters/FilterGraph.cpp +++ b/extras/AudioPluginHost/Source/Filters/FilterGraph.cpp @@ -212,7 +212,7 @@ void FilterGraph::newDocument() Result FilterGraph::loadDocument (const File& file) { XmlDocument doc (file); - ScopedPointer xml (doc.getDocumentElement()); + std::unique_ptr xml (doc.getDocumentElement()); if (xml == nullptr || ! xml->hasTagName ("FILTERGRAPH")) return Result::fail ("Not a valid filter graph file"); @@ -223,7 +223,7 @@ Result FilterGraph::loadDocument (const File& file) Result FilterGraph::saveDocument (const File& file) { - ScopedPointer xml (createXml()); + std::unique_ptr xml (createXml()); if (! xml->writeToFile (file, {})) return Result::fail ("Couldn't write to the file"); diff --git a/extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.cpp b/extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.cpp index 3261ba9e..db17db82 100644 --- a/extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.cpp +++ b/extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.cpp @@ -448,10 +448,16 @@ FilterIOConfigurationWindow::FilterIOConfigurationWindow (AudioProcessor& p) } if (p.getBusCount (true) > 0 || p.canAddBus (true)) - addAndMakeVisible (inConfig = new InputOutputConfig (*this, true)); + { + inConfig.reset (new InputOutputConfig (*this, true)); + addAndMakeVisible (inConfig.get()); + } if (p.getBusCount (false) > 0 || p.canAddBus (false)) - addAndMakeVisible (outConfig = new InputOutputConfig (*this, false)); + { + outConfig.reset (new InputOutputConfig (*this, false)); + addAndMakeVisible (outConfig.get()); + } currentLayout = p.getBusesLayout(); setSize (400, (inConfig != nullptr && outConfig != nullptr ? 160 : 0) + 200); diff --git a/extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.h b/extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.h index 4666ddc7..4fcf3ba6 100644 --- a/extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.h +++ b/extras/AudioPluginHost/Source/Filters/FilterIOConfiguration.h @@ -46,9 +46,9 @@ private: AudioProcessor::BusesLayout currentLayout; Label title; - ScopedPointer inConfig, outConfig; + std::unique_ptr inConfig, outConfig; - InputOutputConfig* getConfig (bool isInput) noexcept { return isInput ? inConfig : outConfig; } + InputOutputConfig* getConfig (bool isInput) noexcept { return isInput ? inConfig.get() : outConfig.get(); } void update(); MainHostWindow* getMainWindow() const; diff --git a/extras/AudioPluginHost/Source/HostStartup.cpp b/extras/AudioPluginHost/Source/HostStartup.cpp index b350f642..63e8713b 100644 --- a/extras/AudioPluginHost/Source/HostStartup.cpp +++ b/extras/AudioPluginHost/Source/HostStartup.cpp @@ -49,14 +49,14 @@ public: options.filenameSuffix = "settings"; options.osxLibrarySubFolder = "Preferences"; - appProperties = new ApplicationProperties(); + appProperties.reset (new ApplicationProperties()); appProperties->setStorageParameters (options); - mainWindow = new MainHostWindow(); + mainWindow.reset (new MainHostWindow()); mainWindow->setUsingNativeTitleBar (true); commandManager.registerAllCommandsForTarget (this); - commandManager.registerAllCommandsForTarget (mainWindow); + commandManager.registerAllCommandsForTarget (mainWindow.get()); mainWindow->menuItemsChanged(); @@ -137,10 +137,10 @@ public: bool moreThanOneInstanceAllowed() override { return true; } ApplicationCommandManager commandManager; - ScopedPointer appProperties; + std::unique_ptr appProperties; private: - ScopedPointer mainWindow; + std::unique_ptr mainWindow; }; static PluginHostApp& getApp() { return *dynamic_cast(JUCEApplication::getInstance()); } diff --git a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp index dfd81552..cd51a8bb 100644 --- a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp +++ b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp @@ -47,7 +47,7 @@ KnownPluginList& knownPluginList; AudioUnitPluginFormat formatToScan; - ScopedPointer scanner; + std::unique_ptr scanner; FileSearchPath paths; ThreadPool pool; @@ -57,8 +57,8 @@ auto deadMansPedalFile = getAppProperties().getUserSettings() ->getFile().getSiblingFile ("RecentlyCrashedPluginsList"); - scanner = new PluginDirectoryScanner (knownPluginList, formatToScan, paths, - true, deadMansPedalFile, true); + scanner.reset (new PluginDirectoryScanner (knownPluginList, formatToScan, paths, + true, deadMansPedalFile, true)); for (int i = 5; --i >= 0;) pool.addJob (new ScanJob (*this), true); @@ -399,7 +399,7 @@ struct GraphEditorPanel::FilterComponent : public Component, void showPopupMenu() { - menu = new PopupMenu; + menu.reset (new PopupMenu); menu->addItem (1, "Delete this filter"); menu->addItem (2, "Disconnect all pins"); menu->addItem (3, "Toggle Bypass"); @@ -485,7 +485,7 @@ struct GraphEditorPanel::FilterComponent : public Component, Font font { 13.0f, Font::bold }; int numIns = 0, numOuts = 0; DropShadowEffect shadow; - ScopedPointer menu; + std::unique_ptr menu; }; @@ -820,7 +820,7 @@ void GraphEditorPanel::updateComponents() void GraphEditorPanel::showPopupMenu (Point mousePos) { - menu = new PopupMenu; + menu.reset (new PopupMenu); if (auto* mainWindow = findParentComponentOfClass()) { @@ -842,15 +842,15 @@ void GraphEditorPanel::beginConnectorDrag (AudioProcessorGraph::NodeAndChannel s { auto* c = dynamic_cast (e.originalComponent); connectors.removeObject (c, false); - draggingConnector = c; + draggingConnector.reset (c); if (draggingConnector == nullptr) - draggingConnector = new ConnectorComponent (*this); + draggingConnector.reset (new ConnectorComponent (*this)); draggingConnector->setInput (source); draggingConnector->setOutput (dest); - addAndMakeVisible (draggingConnector); + addAndMakeVisible (draggingConnector.get()); draggingConnector->toFront (false); dragConnector (e); @@ -1081,7 +1081,7 @@ struct GraphDocumentComponent::PluginListBoxModel : public ListBoxModel, owner.addMouseListener (this, true); #if JUCE_IOS - scanner = new AUScanner (knownPlugins); + scanner.reset (new AUScanner (knownPlugins)); #endif } @@ -1133,7 +1133,7 @@ struct GraphDocumentComponent::PluginListBoxModel : public ListBoxModel, bool isOverSelectedRow = false; #if JUCE_IOS - ScopedPointer scanner; + std::unique_ptr scanner; #endif }; @@ -1148,31 +1148,37 @@ GraphDocumentComponent::GraphDocumentComponent (AudioPluginFormatManager& fm, { init(); - deviceManager.addChangeListener (graphPanel); + deviceManager.addChangeListener (graphPanel.get()); deviceManager.addAudioCallback (&graphPlayer); deviceManager.addMidiInputCallback (String(), &graphPlayer.getMidiMessageCollector()); } void GraphDocumentComponent::init() { - addAndMakeVisible (graphPanel = new GraphEditorPanel (*graph)); + graphPanel.reset (new GraphEditorPanel (*graph)); + addAndMakeVisible (graphPanel.get()); graphPlayer.setProcessor (&graph->graph); keyState.addListener (&graphPlayer.getMidiMessageCollector()); - addAndMakeVisible (keyboardComp = new MidiKeyboardComponent (keyState, MidiKeyboardComponent::horizontalKeyboard)); - addAndMakeVisible (statusBar = new TooltipBar()); + keyboardComp.reset (new MidiKeyboardComponent (keyState, MidiKeyboardComponent::horizontalKeyboard)); + addAndMakeVisible (keyboardComp.get()); + statusBar.reset (new TooltipBar()); + addAndMakeVisible (statusBar.get()); graphPanel->updateComponents(); if (isOnTouchDevice()) { if (isOnTouchDevice()) - addAndMakeVisible (titleBarComponent = new TitleBarComponent (*this)); + { + titleBarComponent.reset (new TitleBarComponent (*this)); + addAndMakeVisible (titleBarComponent.get()); + } - pluginListBoxModel = new PluginListBoxModel (pluginListBox, pluginList); + pluginListBoxModel.reset (new PluginListBoxModel (pluginListBox, pluginList)); - pluginListBox.setModel (pluginListBoxModel); + pluginListBox.setModel (pluginListBoxModel.get()); pluginListBox.setRowHeight (40); pluginListSidePanel.setContent (&pluginListBox, false); @@ -1230,7 +1236,7 @@ void GraphDocumentComponent::releaseGraph() if (graphPanel != nullptr) { - deviceManager.removeChangeListener (graphPanel); + deviceManager.removeChangeListener (graphPanel.get()); graphPanel = nullptr; } diff --git a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.h b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.h index cf24387f..7112e05a 100644 --- a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.h +++ b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.h @@ -76,8 +76,8 @@ private: OwnedArray nodes; OwnedArray connectors; - ScopedPointer draggingConnector; - ScopedPointer menu; + std::unique_ptr draggingConnector; + std::unique_ptr menu; FilterComponent* getComponentForFilter (AudioProcessorGraph::NodeID) const; ConnectorComponent* getComponentForConnection (const AudioProcessorGraph::Connection&) const; @@ -115,7 +115,7 @@ public: bool closeAnyOpenPluginWindows(); //============================================================================== - ScopedPointer graph; + std::unique_ptr graph; void resized() override; void unfocusKeyboardComponent(); @@ -126,8 +126,8 @@ public: void itemDropped (const SourceDetails&) override; //============================================================================== - ScopedPointer graphPanel; - ScopedPointer keyboardComp; + std::unique_ptr graphPanel; + std::unique_ptr keyboardComp; //============================================================================== void showSidePanel (bool isSettingsPanel); @@ -144,14 +144,14 @@ private: MidiKeyboardState keyState; struct TooltipBar; - ScopedPointer statusBar; + std::unique_ptr statusBar; class TitleBarComponent; - ScopedPointer titleBarComponent; + std::unique_ptr titleBarComponent; //============================================================================== struct PluginListBoxModel; - ScopedPointer pluginListBoxModel; + std::unique_ptr pluginListBoxModel; ListBox pluginListBox; diff --git a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp index 23f99fca..9abd73a3 100644 --- a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp +++ b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp @@ -84,10 +84,10 @@ MainHostWindow::MainHostWindow() RuntimePermissions::request (RuntimePermissions::recordAudio, [safeThis = SafePointer (this)] (bool granted) mutable { - ScopedPointer savedAudioState (getAppProperties().getUserSettings() - ->getXmlValue ("audioDeviceState")); + std::unique_ptr savedAudioState (getAppProperties().getUserSettings() + ->getXmlValue ("audioDeviceState")); - safeThis->deviceManager.initialise (granted ? 256 : 0, 256, savedAudioState, true); + safeThis->deviceManager.initialise (granted ? 256 : 0, 256, savedAudioState.get(), true); }); #if JUCE_IOS || JUCE_ANDROID @@ -98,9 +98,9 @@ MainHostWindow::MainHostWindow() centreWithSize (800, 600); #endif - graphHolder = new GraphDocumentComponent (formatManager, deviceManager, knownPluginList); + graphHolder.reset (new GraphDocumentComponent (formatManager, deviceManager, knownPluginList)); - setContentNonOwned (graphHolder, false); + setContentNonOwned (graphHolder.get(), false); restoreWindowStateFromString (getAppProperties().getUserSettings()->getValue ("mainWindowPos")); @@ -109,7 +109,7 @@ MainHostWindow::MainHostWindow() InternalPluginFormat internalFormat; internalFormat.getAllTypes (internalTypes); - ScopedPointer savedPluginList (getAppProperties().getUserSettings()->getXmlValue ("pluginList")); + std::unique_ptr savedPluginList (getAppProperties().getUserSettings()->getXmlValue ("pluginList")); if (savedPluginList != nullptr) knownPluginList.recreateFromXml (*savedPluginList); @@ -220,15 +220,15 @@ void MainHostWindow::changeListenerCallback (ChangeBroadcaster* changed) // save the plugin list every time it gets changed, so that if we're scanning // and it crashes, we've still saved the previous ones - ScopedPointer savedPluginList (knownPluginList.createXml()); + std::unique_ptr savedPluginList (knownPluginList.createXml()); if (savedPluginList != nullptr) { - getAppProperties().getUserSettings()->setValue ("pluginList", savedPluginList); + getAppProperties().getUserSettings()->setValue ("pluginList", savedPluginList.get()); getAppProperties().saveIfNeeded(); } } - else if (graphHolder != nullptr && changed == graphHolder->graph) + else if (graphHolder != nullptr && changed == graphHolder->graph.get()) { auto title = JUCEApplication::getInstance()->getApplicationName(); auto f = graphHolder->graph->getFile(); @@ -506,7 +506,7 @@ bool MainHostWindow::perform (const InvocationInfo& info) case CommandIDs::showPluginListEditor: if (pluginListWindow == nullptr) - pluginListWindow = new PluginListWindow (*this, formatManager); + pluginListWindow.reset (new PluginListWindow (*this, formatManager)); pluginListWindow->toFront (true); break; @@ -577,9 +577,9 @@ void MainHostWindow::showAudioSettings() ModalCallbackFunction::create ([safeThis = SafePointer (this)] (int) { - ScopedPointer audioState (safeThis->deviceManager.createStateXml()); + std::unique_ptr audioState (safeThis->deviceManager.createStateXml()); - getAppProperties().getUserSettings()->setValue ("audioDeviceState", audioState); + getAppProperties().getUserSettings()->setValue ("audioDeviceState", audioState.get()); getAppProperties().getUserSettings()->saveIfNeeded(); if (safeThis->graphHolder != nullptr) diff --git a/extras/AudioPluginHost/Source/UI/MainHostWindow.h b/extras/AudioPluginHost/Source/UI/MainHostWindow.h index 7b64ff32..78e87e89 100644 --- a/extras/AudioPluginHost/Source/UI/MainHostWindow.h +++ b/extras/AudioPluginHost/Source/UI/MainHostWindow.h @@ -92,7 +92,7 @@ public: bool isDoublePrecisionProcessing(); void updatePrecisionMenuItem (ApplicationCommandInfo& info); - ScopedPointer graphHolder; + std::unique_ptr graphHolder; private: //============================================================================== @@ -104,7 +104,7 @@ private: KnownPluginList::SortMethod pluginSortMethod; class PluginListWindow; - ScopedPointer pluginListWindow; + std::unique_ptr pluginListWindow; void showAudioSettings(); diff --git a/extras/BinaryBuilder/BinaryBuilder.jucer b/extras/BinaryBuilder/BinaryBuilder.jucer index 004beb57..bbbbf3cb 100644 --- a/extras/BinaryBuilder/BinaryBuilder.jucer +++ b/extras/BinaryBuilder/BinaryBuilder.jucer @@ -44,4 +44,7 @@ + + + diff --git a/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj b/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj index 91fed965..a88b2269 100644 --- a/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj +++ b/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj @@ -47,6 +47,7 @@ 70A875922C34E55D4F48A196, ); name = Source; sourceTree = ""; }; 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)"; @@ -198,7 +200,7 @@ 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; } diff --git a/extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj b/extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj index 32491102..151ce86a 100644 --- a/extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj +++ b/extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj @@ -164,6 +164,9 @@ true + + true + true diff --git a/extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj.filters b/extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj.filters index 427c4c83..1150273d 100644 --- a/extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj.filters +++ b/extras/BinaryBuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj.filters @@ -91,6 +91,9 @@ JUCE Modules\juce_core\containers + + JUCE Modules\juce_core\containers + JUCE Modules\juce_core\containers diff --git a/extras/BinaryBuilder/Source/Main.cpp b/extras/BinaryBuilder/Source/Main.cpp index eaf759cc..e6c4aeaa 100644 --- a/extras/BinaryBuilder/Source/Main.cpp +++ b/extras/BinaryBuilder/Source/Main.cpp @@ -81,7 +81,7 @@ static int addFile (const File& file, cppStream << "const char* " << classname << "::" << name << " = (const char*) temp" << tempNum << ";\r\n\r\n"; - return mb.getSize(); + return (int) mb.getSize(); } static bool isHiddenFile (const File& f, const File& root) @@ -159,7 +159,7 @@ int main (int argc, char* argv[]) headerFile.deleteFile(); cppFile.deleteFile(); - ScopedPointer header (headerFile.createOutputStream()); + std::unique_ptr header (headerFile.createOutputStream()); if (header == nullptr) { @@ -168,7 +168,7 @@ int main (int argc, char* argv[]) return 0; } - ScopedPointer cpp (cppFile.createOutputStream()); + std::unique_ptr cpp (cppFile.createOutputStream()); if (cpp == nullptr) { diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt b/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt index da821bb3..0b94bf62 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt +++ b/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt @@ -403,6 +403,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h" "../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" "../../../../../modules/juce_core/containers/juce_SortedSet.h" + "../../../../../modules/juce_core/containers/juce_SparseSet.cpp" "../../../../../modules/juce_core/containers/juce_SparseSet.h" "../../../../../modules/juce_core/containers/juce_Variant.cpp" "../../../../../modules/juce_core/containers/juce_Variant.h" @@ -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) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_SortedSet.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.h" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/JUCENetworkGraphicsDemo.java b/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/JUCENetworkGraphicsDemo.java index e37f33ec..fb24cf73 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/JUCENetworkGraphicsDemo.java +++ b/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/JUCENetworkGraphicsDemo.java @@ -113,6 +113,7 @@ public class JUCENetworkGraphicsDemo extends Activity private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2; private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3; private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4; + private static final int JUCE_PERMISSIONS_CAMERA = 5; private static String getAndroidPermissionName (int permissionID) { @@ -123,6 +124,7 @@ public class JUCENetworkGraphicsDemo extends Activity // use string value as this is not defined in SDKs < 16 case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE"; case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE; + case JUCE_PERMISSIONS_CAMERA: return Manifest.permission.CAMERA; } // unknown permission ID! @@ -273,6 +275,7 @@ public class JUCENetworkGraphicsDemo extends Activity setVolumeControlStream (AudioManager.STREAM_MUSIC); permissionCallbackPtrMap = new HashMap(); + appPausedResumedListeners = new HashMap(); } @Override @@ -289,6 +292,11 @@ public class JUCENetworkGraphicsDemo extends Activity { suspendApp(); + Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); + + for (Long k : keys) + appPausedResumedListeners.get (k).appPaused(); + try { Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down @@ -304,12 +312,10 @@ public class JUCENetworkGraphicsDemo extends Activity super.onResume(); resumeApp(); - // Ensure that navigation/status bar visibility is correctly restored. - for (int i = 0; i < viewHolder.getChildCount(); ++i) - { - if (viewHolder.getChildAt (i) instanceof ComponentPeerView) - ((ComponentPeerView) viewHolder.getChildAt (i)).appResumed(); - } + Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]); + + for (Long k : keys) + appPausedResumedListeners.get (k).appResumed(); } @Override @@ -436,11 +442,14 @@ public class JUCENetworkGraphicsDemo extends Activity { ComponentPeerView v = new ComponentPeerView (this, opaque, host); viewHolder.addView (v); + addAppPausedResumedListener (v, host); return v; } public final void deleteView (ComponentPeerView view) { + removeAppPausedResumedListener (view, view.host); + view.host = 0; ViewGroup group = (ViewGroup) (view.getParent()); @@ -658,9 +667,28 @@ public class JUCENetworkGraphicsDemo extends Activity public native void alertDismissed (long callback, int id); + //============================================================================== + public interface AppPausedResumedListener + { + void appPaused(); + void appResumed(); + } + + private Map appPausedResumedListeners; + + public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) + { + appPausedResumedListeners.put (new Long (listenerHost), l); + } + + public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost) + { + appPausedResumedListeners.remove (new Long (listenerHost)); + } + //============================================================================== public final class ComponentPeerView extends ViewGroup - implements View.OnFocusChangeListener + implements View.OnFocusChangeListener, AppPausedResumedListener { public ComponentPeerView (Context context, boolean opaque_, long host) { @@ -1008,13 +1036,25 @@ public class JUCENetworkGraphicsDemo extends Activity } //============================================================================== + private native void handleAppPaused (long host); private native void handleAppResumed (long host); + @Override + public void appPaused() + { + if (host == 0) + return; + + handleAppPaused (host); + } + + @Override public void appResumed() { if (host == 0) return; + // Ensure that navigation/status bar visibility is correctly restored. handleAppResumed (host); } } @@ -1656,6 +1696,7 @@ public class JUCENetworkGraphicsDemo extends Activity private final Object hostLock = new Object(); } + //============================================================================== public static final String getLocaleValue (boolean isRegion) { diff --git a/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj b/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj index da7e019c..c783ae58 100644 --- a/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj +++ b/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj @@ -159,6 +159,7 @@ 8B59A884C62D960EE9DFEF47, ); name = Source; sourceTree = ""; }; 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)"; @@ -190,6 +191,7 @@ 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)"; @@ -338,7 +340,7 @@ 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; } diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo_App.vcxproj b/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo_App.vcxproj index 68a37b87..deec8db8 100644 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo_App.vcxproj +++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo_App.vcxproj @@ -596,6 +596,9 @@ true + + true + true diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo_App.vcxproj.filters b/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo_App.vcxproj.filters index 0694a1b5..fdeb11f1 100644 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo_App.vcxproj.filters +++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2013/NetworkGraphicsDemo_App.vcxproj.filters @@ -847,6 +847,9 @@ JUCE Modules\juce_core\containers + + JUCE Modules\juce_core\containers + JUCE Modules\juce_core\containers diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo_App.vcxproj b/extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo_App.vcxproj index db60810d..2eaf232c 100644 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo_App.vcxproj +++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo_App.vcxproj @@ -596,6 +596,9 @@ true + + true + true diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo_App.vcxproj.filters b/extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo_App.vcxproj.filters index 0801a22d..70136663 100644 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo_App.vcxproj.filters +++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2017/NetworkGraphicsDemo_App.vcxproj.filters @@ -847,6 +847,9 @@ JUCE Modules\juce_core\containers + + JUCE Modules\juce_core\containers + JUCE Modules\juce_core\containers diff --git a/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj b/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj index cf45e138..590ad901 100644 --- a/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj +++ b/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj @@ -170,6 +170,7 @@ 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)"; @@ -200,6 +201,7 @@ 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)"; @@ -356,7 +358,7 @@ 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; } diff --git a/extras/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h b/extras/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h index a7d5fe14..4efb82c6 100644 --- a/extras/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h +++ b/extras/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h @@ -150,6 +150,10 @@ //#define JUCE_PLUGINHOST_AU 0 #endif +#ifndef JUCE_PLUGINHOST_LADSPA + //#define JUCE_PLUGINHOST_LADSPA 0 +#endif + //============================================================================== // juce_audio_utils flags: diff --git a/extras/NetworkGraphicsDemo/JuceLibraryCode/BinaryData.cpp b/extras/NetworkGraphicsDemo/JuceLibraryCode/BinaryData.cpp index 73cf0656..b2aadd3b 100644 --- a/extras/NetworkGraphicsDemo/JuceLibraryCode/BinaryData.cpp +++ b/extras/NetworkGraphicsDemo/JuceLibraryCode/BinaryData.cpp @@ -657,7 +657,7 @@ static const unsigned char temp_binary_data_0[] = const char* juce_icon_png = (const char*) temp_binary_data_0; -const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) noexcept +const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) { unsigned int hash = 0; if (resourceNameUTF8 != 0) @@ -684,7 +684,7 @@ const char* originalFilenames[] = "juce_icon.png" }; -const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept +const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) { for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i) { diff --git a/extras/NetworkGraphicsDemo/JuceLibraryCode/BinaryData.h b/extras/NetworkGraphicsDemo/JuceLibraryCode/BinaryData.h index dd1ad0e9..b0f133c7 100644 --- a/extras/NetworkGraphicsDemo/JuceLibraryCode/BinaryData.h +++ b/extras/NetworkGraphicsDemo/JuceLibraryCode/BinaryData.h @@ -22,9 +22,9 @@ namespace BinaryData // If you provide the name of one of the binary resource variables above, this function will // return the corresponding data and its size (or a null pointer if the name isn't found). - const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) noexcept; + const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes); // If you provide the name of one of the binary resource variables above, this function will // return the corresponding original, non-mangled filename (or a null pointer if the name isn't found). - const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept; + const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8); } diff --git a/extras/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer b/extras/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer index 3e9ef3e1..8eeee6b7 100644 --- a/extras/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer +++ b/extras/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer @@ -169,4 +169,7 @@ + + + diff --git a/extras/NetworkGraphicsDemo/Source/Demos.h b/extras/NetworkGraphicsDemo/Source/Demos.h index b2e07974..24517755 100644 --- a/extras/NetworkGraphicsDemo/Source/Demos.h +++ b/extras/NetworkGraphicsDemo/Source/Demos.h @@ -84,8 +84,8 @@ struct BackgroundLogo : public AnimatedContent )blahblah"; - ScopedPointer svg (XmlDocument::parse (logoData)); - logo = Drawable::createFromSVG (*svg); + std::unique_ptr svg (XmlDocument::parse (logoData)); + logo.reset (Drawable::createFromSVG (*svg)); } String getName() const override { return "Background Image"; } @@ -97,7 +97,7 @@ struct BackgroundLogo : public AnimatedContent logo->drawWithin (g, canvas.getLimits().reduced (3.0f), RectanglePlacement (RectanglePlacement::centred), 0.6f); } - ScopedPointer logo; + std::unique_ptr logo; }; //============================================================================== @@ -205,18 +205,18 @@ struct FlockDemo : public BackgroundLogo { Bird() { - Random rng; - pos.x = rng.nextFloat() * 10.0f - 5.0f; - pos.y = rng.nextFloat() * 10.0f - 5.0f; - velocity.x = rng.nextFloat() * 0.001f; - velocity.y = rng.nextFloat() * 0.001f; + Random randGen; + pos.x = randGen.nextFloat() * 10.0f - 5.0f; + pos.y = randGen.nextFloat() * 10.0f - 5.0f; + velocity.x = randGen.nextFloat() * 0.001f; + velocity.y = randGen.nextFloat() * 0.001f; - colour = Colour::fromHSV (rng.nextFloat(), 0.2f, 0.9f, rng.nextFloat() * 0.4f + 0.2f); + colour = Colour::fromHSV (randGen.nextFloat(), 0.2f, 0.9f, randGen.nextFloat() * 0.4f + 0.2f); shape.addTriangle (0.0f, 0.0f, -0.3f, 1.0f, 0.3f, 1.0f); shape = shape.createPathWithRoundedCorners (0.2f); - shape.applyTransform (AffineTransform::scale (rng.nextFloat() + 1.0f)); + shape.applyTransform (AffineTransform::scale (randGen.nextFloat() + 1.0f)); } Point pos, velocity, acc; @@ -410,8 +410,8 @@ struct FlockWithText : public FlockDemo as.append (text, Font (textSize * scale), Colour (0x80ffffff).withMultipliedAlpha (alpha)); as.setJustification (Justification::centred); - auto centre = canvas.clients[clientIndex % canvas.clients.size()].centre * scale; - as.draw (g, Rectangle (textBlockWidth * scale, textBlockWidth * scale).withCentre (centre)); + auto middle = canvas.clients[clientIndex % canvas.clients.size()].centre * scale; + as.draw (g, Rectangle (textBlockWidth * scale, textBlockWidth * scale).withCentre (middle)); } void tick() diff --git a/extras/NetworkGraphicsDemo/Source/MasterComponent.h b/extras/NetworkGraphicsDemo/Source/MasterComponent.h index c260e759..8464f669 100644 --- a/extras/NetworkGraphicsDemo/Source/MasterComponent.h +++ b/extras/NetworkGraphicsDemo/Source/MasterComponent.h @@ -42,8 +42,8 @@ struct MasterContentComponent : public Component, createAllDemos (demos); setContent (0); - setSize (15.0f * currentCanvas.getLimits().getWidth(), - 15.0f * currentCanvas.getLimits().getHeight()); + setSize ((int) (15.0f * currentCanvas.getLimits().getWidth()), + (int) (15.0f * currentCanvas.getLimits().getHeight())); if (! OSCSender::connect (getBroadcastIPAddress(), masterPortNumber)) error = "Master app OSC sender: network connection error."; @@ -348,7 +348,7 @@ private: updateCanvasInfo (currentCanvas); { - ScopedPointer context (new CanvasGeneratingContext (currentCanvas)); + std::unique_ptr context (new CanvasGeneratingContext (currentCanvas)); Graphics g (*context); if (content != nullptr) diff --git a/extras/Projucer/Builds/LinuxMakefile/Makefile b/extras/Projucer/Builds/LinuxMakefile/Makefile index d714b215..18739e54 100644 --- a/extras/Projucer/Builds/LinuxMakefile/Makefile +++ b/extras/Projucer/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.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) + 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) 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 @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.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) + 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) 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 diff --git a/extras/Projucer/Builds/MacOSX/Info-App.plist b/extras/Projucer/Builds/MacOSX/Info-App.plist index 57fa3f92..34a5755c 100644 --- a/extras/Projucer/Builds/MacOSX/Info-App.plist +++ b/extras/Projucer/Builds/MacOSX/Info-App.plist @@ -33,9 +33,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 5.3.1 + 5.3.2 CFBundleVersion - 5.3.1 + 5.3.2 NSHumanReadableCopyright ROLI Ltd. NSHighResolutionCapable diff --git a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj index 1aaba299..27a8ec62 100644 --- a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj +++ b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj @@ -814,8 +814,8 @@ "_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", @@ -847,8 +847,8 @@ "_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", @@ -1036,7 +1036,7 @@ C262D0F297DDE25326F5AC81, 5CB869A8DA78BE6FA2757034, D150288A32EE596408C2B99F, ); buildRules = ( ); dependencies = ( ); name = "Projucer - App"; productName = Projucer; productReference = 09DE066936CF037E9709ADB1; productType = "com.apple.product-type.application"; }; - 74EA481348A24104E6ACE009 = {isa = PBXProject; buildConfigurationList = F90407F24422C589DA251604; attributes = { LastUpgradeCheck = 0830; 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; } diff --git a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj index c442d2a2..2f2992ca 100644 --- a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj @@ -74,7 +74,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _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) + _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) MultiThreadedDebugDLL true @@ -115,7 +115,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _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) + _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) MultiThreaded true @@ -276,6 +276,9 @@ true + + true + true diff --git a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters index 695f3e93..4163efab 100644 --- a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters @@ -541,6 +541,9 @@ JUCE Modules\juce_core\containers + + JUCE Modules\juce_core\containers + JUCE Modules\juce_core\containers diff --git a/extras/Projucer/Builds/VisualStudio2013/resources.rc b/extras/Projucer/Builds/VisualStudio2013/resources.rc index a1f43a9b..1c354c76 100644 --- a/extras/Projucer/Builds/VisualStudio2013/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2013/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,3,1,0 +FILEVERSION 5,3,2,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +16,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "ROLI Ltd.\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "5.3.1\0" + VALUE "FileVersion", "5.3.2\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "5.3.1\0" + VALUE "ProductVersion", "5.3.2\0" END END diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj index a57dea78..a7039ba2 100644 --- a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj @@ -74,7 +74,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _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) + _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) MultiThreadedDebugDLL true @@ -115,7 +115,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _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) + _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) MultiThreaded true @@ -276,6 +276,9 @@ true + + true + true diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters index 22073c7a..8d2da9e4 100644 --- a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters @@ -541,6 +541,9 @@ JUCE Modules\juce_core\containers + + JUCE Modules\juce_core\containers + JUCE Modules\juce_core\containers diff --git a/extras/Projucer/Builds/VisualStudio2015/resources.rc b/extras/Projucer/Builds/VisualStudio2015/resources.rc index a1f43a9b..1c354c76 100644 --- a/extras/Projucer/Builds/VisualStudio2015/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2015/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,3,1,0 +FILEVERSION 5,3,2,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +16,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "ROLI Ltd.\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "5.3.1\0" + VALUE "FileVersion", "5.3.2\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "5.3.1\0" + VALUE "ProductVersion", "5.3.2\0" END END diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj index 055a65ae..cd8b1d4a 100644 --- a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj @@ -74,7 +74,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _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) + _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) MultiThreadedDebug true @@ -115,7 +115,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _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) + _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) MultiThreaded true @@ -276,6 +276,9 @@ true + + true + true diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters index ecaaaa4f..42313cdb 100644 --- a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters @@ -541,6 +541,9 @@ JUCE Modules\juce_core\containers + + JUCE Modules\juce_core\containers + JUCE Modules\juce_core\containers diff --git a/extras/Projucer/Builds/VisualStudio2017/resources.rc b/extras/Projucer/Builds/VisualStudio2017/resources.rc index a1f43a9b..1c354c76 100644 --- a/extras/Projucer/Builds/VisualStudio2017/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2017/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,3,1,0 +FILEVERSION 5,3,2,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +16,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "ROLI Ltd.\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "5.3.1\0" + VALUE "FileVersion", "5.3.2\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "5.3.1\0" + VALUE "ProductVersion", "5.3.2\0" END END diff --git a/extras/Projucer/JuceLibraryCode/BinaryData.cpp b/extras/Projucer/JuceLibraryCode/BinaryData.cpp index a143ceaf..ff35bfd9 100644 --- a/extras/Projucer/JuceLibraryCode/BinaryData.cpp +++ b/extras/Projucer/JuceLibraryCode/BinaryData.cpp @@ -6498,7 +6498,7 @@ static const unsigned char temp_binary_data_42[] = " {\r\n" " // This method is where you should put your application's initialisation code..\r\n" "\r\n" -" mainWindow = new MainWindow (getApplicationName());\r\n" +" mainWindow.reset (new MainWindow (getApplicationName()));\r\n" " }\r\n" "\r\n" " void shutdown() override\r\n" @@ -6564,7 +6564,7 @@ static const unsigned char temp_binary_data_42[] = " };\r\n" "\r\n" "private:\r\n" -" ScopedPointer mainWindow;\r\n" +" std::unique_ptr mainWindow;\r\n" "};\r\n" "\r\n" "//==============================================================================\r\n" @@ -6603,7 +6603,7 @@ static const unsigned char temp_binary_data_43[] = " {\r\n" " // This method is where you should put your application's initialisation code..\r\n" "\r\n" -" mainWindow = new MainWindow (getApplicationName());\r\n" +" mainWindow.reset (new MainWindow (getApplicationName()));\r\n" " }\r\n" "\r\n" " void shutdown() override\r\n" @@ -6668,7 +6668,7 @@ static const unsigned char temp_binary_data_43[] = " };\r\n" "\r\n" "private:\r\n" -" ScopedPointer mainWindow;\r\n" +" std::unique_ptr mainWindow;\r\n" "};\r\n" "\r\n" "//==============================================================================\r\n" @@ -7224,7 +7224,8 @@ static const unsigned char temp_binary_data_53[] = " //==============================================================================\r\n" " JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)\r\n" " };\r\n" -" ScopedPointer mainWindow;\r\n" +"\r\n" +" std::unique_ptr mainWindow;\r\n" "};\r\n" "\r\n" "//==============================================================================\r\n" @@ -7583,7 +7584,7 @@ static const unsigned char temp_binary_data_60[] = const char* RecentFilesMenuTemplate_nib = (const char*) temp_binary_data_60; -const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) noexcept +const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) { unsigned int hash = 0; if (resourceNameUTF8 != 0) @@ -7634,8 +7635,8 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) noexc case 0x28d496ad: numBytes = 1233; return jucer_InlineComponentTemplate_h; case 0x8905395b: numBytes = 473; return jucer_MainConsoleAppTemplate_cpp; case 0x5e5ea047: numBytes = 2021; return jucer_MainTemplate_NoWindow_cpp; - case 0xda2391f8: numBytes = 4004; return jucer_MainTemplate_SimpleWindow_cpp; - case 0x400bc026: numBytes = 3964; return jucer_MainTemplate_Window_cpp; + case 0xda2391f8: numBytes = 4012; return jucer_MainTemplate_SimpleWindow_cpp; + case 0x400bc026: numBytes = 3972; return jucer_MainTemplate_Window_cpp; case 0xf4842835: numBytes = 1491; return jucer_NewComponentTemplate_cpp; case 0xe7bf237a: numBytes = 646; return jucer_NewComponentTemplate_h; case 0x02a2a077: numBytes = 278; return jucer_NewCppFileTemplate_cpp; @@ -7645,7 +7646,7 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) noexc case 0x7fbac252: numBytes = 1665; return jucer_OpenGLComponentTemplate_cpp; case 0x491fa0d7: numBytes = 1263; return jucer_OpenGLComponentTemplate_h; case 0xbc050edc: numBytes = 4926; return jucer_PIPAudioProcessorTemplate_h; - case 0xf4ca9e9a: numBytes = 2443; return jucer_PIPMain_cpp; + case 0xf4ca9e9a: numBytes = 2447; return jucer_PIPMain_cpp; case 0x0b16e320: numBytes = 517; return jucer_PIPTemplate_h; case 0x763d39dc: numBytes = 1050; return colourscheme_dark_xml; case 0xe8b08520: numBytes = 1050; return colourscheme_light_xml; @@ -7790,7 +7791,7 @@ const char* originalFilenames[] = "RecentFilesMenuTemplate.nib" }; -const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept +const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) { for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i) { diff --git a/extras/Projucer/JuceLibraryCode/BinaryData.h b/extras/Projucer/JuceLibraryCode/BinaryData.h index 4c0adcd9..79fa6ece 100644 --- a/extras/Projucer/JuceLibraryCode/BinaryData.h +++ b/extras/Projucer/JuceLibraryCode/BinaryData.h @@ -135,10 +135,10 @@ namespace BinaryData const int jucer_MainTemplate_NoWindow_cppSize = 2021; extern const char* jucer_MainTemplate_SimpleWindow_cpp; - const int jucer_MainTemplate_SimpleWindow_cppSize = 4004; + const int jucer_MainTemplate_SimpleWindow_cppSize = 4012; extern const char* jucer_MainTemplate_Window_cpp; - const int jucer_MainTemplate_Window_cppSize = 3964; + const int jucer_MainTemplate_Window_cppSize = 3972; extern const char* jucer_NewComponentTemplate_cpp; const int jucer_NewComponentTemplate_cppSize = 1491; @@ -168,7 +168,7 @@ namespace BinaryData const int jucer_PIPAudioProcessorTemplate_hSize = 4926; extern const char* jucer_PIPMain_cpp; - const int jucer_PIPMain_cppSize = 2443; + const int jucer_PIPMain_cppSize = 2447; extern const char* jucer_PIPTemplate_h; const int jucer_PIPTemplate_hSize = 517; @@ -202,9 +202,9 @@ namespace BinaryData // If you provide the name of one of the binary resource variables above, this function will // return the corresponding data and its size (or a null pointer if the name isn't found). - const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) noexcept; + const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes); // If you provide the name of one of the binary resource variables above, this function will // return the corresponding original, non-mangled filename (or a null pointer if the name isn't found). - const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept; + const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8); } diff --git a/extras/Projucer/JuceLibraryCode/JuceHeader.h b/extras/Projucer/JuceLibraryCode/JuceHeader.h index e7fa6cc2..c62718af 100644 --- a/extras/Projucer/JuceLibraryCode/JuceHeader.h +++ b/extras/Projucer/JuceLibraryCode/JuceHeader.h @@ -35,7 +35,7 @@ namespace ProjectInfo { const char* const projectName = "Projucer"; - const char* const versionString = "5.3.1"; - const int versionNumber = 0x50301; + const char* const versionString = "5.3.2"; + const int versionNumber = 0x50302; } #endif diff --git a/extras/Projucer/Projucer.jucer b/extras/Projucer/Projucer.jucer index b1c11a2d..9444f710 100644 --- a/extras/Projucer/Projucer.jucer +++ b/extras/Projucer/Projucer.jucer @@ -1,7 +1,7 @@ diff --git a/extras/Projucer/Source/Application/Windows/jucer_AboutWindowComponent.h b/extras/Projucer/Source/Application/Windows/jucer_AboutWindowComponent.h index df2db4a5..aa33c486 100644 --- a/extras/Projucer/Source/Application/Windows/jucer_AboutWindowComponent.h +++ b/extras/Projucer/Source/Application/Windows/jucer_AboutWindowComponent.h @@ -132,11 +132,11 @@ private: Rectangle huckleberryLogoBounds, juceLogoBounds; - ScopedPointer juceLogo { Drawable::createFromImageData (BinaryData::juce_icon_png, - BinaryData::juce_icon_pngSize) }; + std::unique_ptr juceLogo { Drawable::createFromImageData (BinaryData::juce_icon_png, + BinaryData::juce_icon_pngSize) }; - ScopedPointer huckleberryLogo { Drawable::createFromImageData (BinaryData::huckleberry_icon_svg, - BinaryData::huckleberry_icon_svgSize) }; + std::unique_ptr huckleberryLogo { Drawable::createFromImageData (BinaryData::huckleberry_icon_svg, + BinaryData::huckleberry_icon_svgSize) }; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AboutWindowComponent) }; diff --git a/extras/Projucer/Source/Application/Windows/jucer_ApplicationUsageDataWindowComponent.h b/extras/Projucer/Source/Application/Windows/jucer_ApplicationUsageDataWindowComponent.h index 3e784c6e..15ccb5b1 100644 --- a/extras/Projucer/Source/Application/Windows/jucer_ApplicationUsageDataWindowComponent.h +++ b/extras/Projucer/Source/Application/Windows/jucer_ApplicationUsageDataWindowComponent.h @@ -64,7 +64,8 @@ public: if (showCheckbox) { - addAndMakeVisible (shareApplicationUsageDataToggle = new ToggleButton()); + shareApplicationUsageDataToggle.reset (new ToggleButton()); + addAndMakeVisible (shareApplicationUsageDataToggle.get()); auto* controller = ProjucerApplication::getApp().licenseController.get(); @@ -151,7 +152,7 @@ private: Label headerLabel, bodyLabel; HyperlinkButton juceEULALink, privacyPolicyLink; Label shareApplicationUsageDataLabel { {}, "Help JUCE to improve its software and services by sharing my application usage data" }; - ScopedPointer shareApplicationUsageDataToggle; + std::unique_ptr shareApplicationUsageDataToggle; TextButton okButton { "OK" }, upgradeLicenseButton { "Upgrade License" }; void lookAndFeelChanged() override diff --git a/extras/Projucer/Source/Application/Windows/jucer_EditorColourSchemeWindowComponent.h b/extras/Projucer/Source/Application/Windows/jucer_EditorColourSchemeWindowComponent.h index beca635c..97832474 100644 --- a/extras/Projucer/Source/Application/Windows/jucer_EditorColourSchemeWindowComponent.h +++ b/extras/Projucer/Source/Application/Windows/jucer_EditorColourSchemeWindowComponent.h @@ -60,7 +60,7 @@ public: } private: - ScopedPointer content; + std::unique_ptr content; //============================================================================== struct AppearanceEditor diff --git a/extras/Projucer/Source/Application/Windows/jucer_FloatingToolWindow.h b/extras/Projucer/Source/Application/Windows/jucer_FloatingToolWindow.h index 99208f30..ff2fdb3a 100644 --- a/extras/Projucer/Source/Application/Windows/jucer_FloatingToolWindow.h +++ b/extras/Projucer/Source/Application/Windows/jucer_FloatingToolWindow.h @@ -33,7 +33,7 @@ struct FloatingToolWindow : public DialogWindow FloatingToolWindow (const String& title, const String& windowPosPropertyName, Component* content, - ScopedPointer& ownerPointer, + std::unique_ptr& ownerPointer, bool shouldBeResizable, int defaultW, int defaultH, int minW, int minH, @@ -84,7 +84,7 @@ struct FloatingToolWindow : public DialogWindow private: String windowPosProperty; - ScopedPointer& owner; + std::unique_ptr& owner; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FloatingToolWindow) }; diff --git a/extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h b/extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h index 184c04bf..b439d75c 100644 --- a/extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h +++ b/extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h @@ -63,7 +63,8 @@ class PIPCreatorWindowComponent : public Component, public: PIPCreatorWindowComponent() { - setLookAndFeel (lf = new PIPCreatorLookAndFeel()); + lf.reset (new PIPCreatorLookAndFeel()); + setLookAndFeel (lf.get()); addAndMakeVisible (propertyViewport); propertyViewport.setViewedComponent (&propertyGroup, false); @@ -306,7 +307,7 @@ private: } //============================================================================== - ScopedPointer lf; + std::unique_ptr lf; Viewport propertyViewport; PropertyGroupComponent propertyGroup { "PIP Creator", { getIcons().juceLogo, Colours::transparentBlack } }; diff --git a/extras/Projucer/Source/Application/Windows/jucer_SVGPathDataWindowComponent.h b/extras/Projucer/Source/Application/Windows/jucer_SVGPathDataWindowComponent.h index 7c48ecb7..fed80a62 100644 --- a/extras/Projucer/Source/Application/Windows/jucer_SVGPathDataWindowComponent.h +++ b/extras/Projucer/Source/Application/Windows/jucer_SVGPathDataWindowComponent.h @@ -163,11 +163,13 @@ public: dragOver = false; repaint(); - if (ScopedPointer e = XmlDocument::parse (File (files[0]))) + std::unique_ptr element (XmlDocument::parse (File (files[0]))); + + if (element != nullptr) { - if (auto* ePath = e->getChildByName ("path")) + if (auto* ePath = element->getChildByName ("path")) userText.setText (ePath->getStringAttribute ("d"), true); - else if (auto* ePolygon = e->getChildByName ("polygon")) + else if (auto* ePolygon = element->getChildByName ("polygon")) userText.setText (ePolygon->getStringAttribute ("points"), true); } } diff --git a/extras/Projucer/Source/Application/jucer_Application.cpp b/extras/Projucer/Source/Application/jucer_Application.cpp index f9a7647e..c606b225 100644 --- a/extras/Projucer/Source/Application/jucer_Application.cpp +++ b/extras/Projucer/Source/Application/jucer_Application.cpp @@ -85,7 +85,7 @@ void ProjucerApplication::initialise (const String& commandLine) isRunningCommandLine = commandLine.isNotEmpty(); - licenseController = new LicenseController; + licenseController.reset (new LicenseController); licenseController->addLicenseStatusChangedCallback (this); if (isRunningCommandLine) @@ -111,10 +111,10 @@ void ProjucerApplication::initialise (const String& commandLine) openDocumentManager.registerType (new ProjucerAppClasses::LiveBuildCodeEditorDocument::Type(), 2); - childProcessCache = new ChildProcessCache(); + childProcessCache.reset (new ChildProcessCache()); initCommandManager(); - menuModel = new MainMenuModel(); + menuModel.reset (new MainMenuModel()); settings->appearance.refreshPresetSchemeList(); @@ -131,9 +131,9 @@ void ProjucerApplication::initialiseBasics() { LookAndFeel::setDefaultLookAndFeel (&lookAndFeel); - settings = new StoredSettings(); + settings.reset (new StoredSettings()); ImageCache::setCacheTimeout (30 * 1000); - icons = new Icons(); + icons.reset (new Icons()); tooltipWindow.setMillisecondsBeforeTipAppears (1200); } @@ -147,10 +147,10 @@ bool ProjucerApplication::initialiseLogger (const char* filePrefix) String folder = "com.juce.projucer"; #endif - logger = FileLogger::createDateStampedLogger (folder, filePrefix, ".txt", - getApplicationName() + " " + getApplicationVersion() - + " --- Build date: " __DATE__); - Logger::setCurrentLogger (logger); + logger.reset (FileLogger::createDateStampedLogger (folder, filePrefix, ".txt", + getApplicationName() + " " + getApplicationVersion() + + " --- Build date: " __DATE__)); + Logger::setCurrentLogger (logger.get()); } return logger != nullptr; @@ -167,10 +167,10 @@ void ProjucerApplication::handleAsyncUpdate() // workaround broken "Open Recent" submenu: not passing the // submenu's title here avoids the defect in JuceMainMenuHandler::addMenuItem - MenuBarModel::setMacMainMenu (menuModel, &extraAppleMenuItems); //, "Open Recent"); + MenuBarModel::setMacMainMenu (menuModel.get(), &extraAppleMenuItems); //, "Open Recent"); #endif - versionChecker = new LatestVersionChecker(); + versionChecker.reset (new LatestVersionChecker()); if (licenseController != nullptr) { @@ -334,7 +334,7 @@ ProjucerApplication& ProjucerApplication::getApp() ApplicationCommandManager& ProjucerApplication::getCommandManager() { - ApplicationCommandManager* cm = ProjucerApplication::getApp().commandManager; + auto* cm = ProjucerApplication::getApp().commandManager.get(); jassert (cm != nullptr); return *cm; } @@ -378,11 +378,11 @@ void ProjucerApplication::createMenu (PopupMenu& menu, const String& menuName) void ProjucerApplication::createFileMenu (PopupMenu& menu) { - menu.addCommandItem (commandManager, CommandIDs::newProject); - menu.addCommandItem (commandManager, CommandIDs::newProjectFromClipboard); - menu.addCommandItem (commandManager, CommandIDs::newPIP); + menu.addCommandItem (commandManager.get(), CommandIDs::newProject); + menu.addCommandItem (commandManager.get(), CommandIDs::newProjectFromClipboard); + menu.addCommandItem (commandManager.get(), CommandIDs::newPIP); menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::open); + menu.addCommandItem (commandManager.get(), CommandIDs::open); { PopupMenu recentFiles; @@ -392,7 +392,7 @@ void ProjucerApplication::createFileMenu (PopupMenu& menu) if (recentFiles.getNumItems() > 0) { recentFiles.addSeparator(); - recentFiles.addCommandItem (commandManager, CommandIDs::clearRecentFiles); + recentFiles.addCommandItem (commandManager.get(), CommandIDs::clearRecentFiles); } menu.addSubMenu ("Open Recent", recentFiles); @@ -406,58 +406,58 @@ void ProjucerApplication::createFileMenu (PopupMenu& menu) } menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::closeDocument); - menu.addCommandItem (commandManager, CommandIDs::saveDocument); - menu.addCommandItem (commandManager, CommandIDs::saveDocumentAs); - menu.addCommandItem (commandManager, CommandIDs::saveAll); + menu.addCommandItem (commandManager.get(), CommandIDs::closeDocument); + menu.addCommandItem (commandManager.get(), CommandIDs::saveDocument); + menu.addCommandItem (commandManager.get(), CommandIDs::saveDocumentAs); + menu.addCommandItem (commandManager.get(), CommandIDs::saveAll); menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::closeProject); - menu.addCommandItem (commandManager, CommandIDs::saveProject); + menu.addCommandItem (commandManager.get(), CommandIDs::closeProject); + menu.addCommandItem (commandManager.get(), CommandIDs::saveProject); menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::openInIDE); - menu.addCommandItem (commandManager, CommandIDs::saveAndOpenInIDE); + menu.addCommandItem (commandManager.get(), CommandIDs::openInIDE); + menu.addCommandItem (commandManager.get(), CommandIDs::saveAndOpenInIDE); menu.addSeparator(); #if ! JUCER_ENABLE_GPL_MODE - menu.addCommandItem (commandManager, CommandIDs::loginLogout); + menu.addCommandItem (commandManager.get(), CommandIDs::loginLogout); #endif #if ! JUCE_MAC - menu.addCommandItem (commandManager, CommandIDs::showAboutWindow); - menu.addCommandItem (commandManager, CommandIDs::showAppUsageWindow); - menu.addCommandItem (commandManager, CommandIDs::showGlobalPathsWindow); + menu.addCommandItem (commandManager.get(), CommandIDs::showAboutWindow); + menu.addCommandItem (commandManager.get(), CommandIDs::showAppUsageWindow); + menu.addCommandItem (commandManager.get(), CommandIDs::showGlobalPathsWindow); menu.addSeparator(); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::quit); + menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::quit); #endif } void ProjucerApplication::createEditMenu (PopupMenu& menu) { - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::undo); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::redo); + menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::undo); + menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::redo); menu.addSeparator(); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::cut); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::copy); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::paste); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::del); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::selectAll); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::deselectAll); + menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::cut); + menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::copy); + menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::paste); + menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::del); + menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::selectAll); + menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::deselectAll); menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::showFindPanel); - menu.addCommandItem (commandManager, CommandIDs::findSelection); - menu.addCommandItem (commandManager, CommandIDs::findNext); - menu.addCommandItem (commandManager, CommandIDs::findPrevious); + menu.addCommandItem (commandManager.get(), CommandIDs::showFindPanel); + menu.addCommandItem (commandManager.get(), CommandIDs::findSelection); + menu.addCommandItem (commandManager.get(), CommandIDs::findNext); + menu.addCommandItem (commandManager.get(), CommandIDs::findPrevious); } void ProjucerApplication::createViewMenu (PopupMenu& menu) { - menu.addCommandItem (commandManager, CommandIDs::showProjectSettings); - menu.addCommandItem (commandManager, CommandIDs::showProjectTab); - menu.addCommandItem (commandManager, CommandIDs::showBuildTab); - menu.addCommandItem (commandManager, CommandIDs::showFileExplorerPanel); - menu.addCommandItem (commandManager, CommandIDs::showModulesPanel); - menu.addCommandItem (commandManager, CommandIDs::showExportersPanel); - menu.addCommandItem (commandManager, CommandIDs::showExporterSettings); + menu.addCommandItem (commandManager.get(), CommandIDs::showProjectSettings); + menu.addCommandItem (commandManager.get(), CommandIDs::showProjectTab); + menu.addCommandItem (commandManager.get(), CommandIDs::showBuildTab); + menu.addCommandItem (commandManager.get(), CommandIDs::showFileExplorerPanel); + menu.addCommandItem (commandManager.get(), CommandIDs::showModulesPanel); + menu.addCommandItem (commandManager.get(), CommandIDs::showExportersPanel); + menu.addCommandItem (commandManager.get(), CommandIDs::showExporterSettings); menu.addSeparator(); createColourSchemeItems (menu); @@ -465,19 +465,19 @@ void ProjucerApplication::createViewMenu (PopupMenu& menu) void ProjucerApplication::createBuildMenu (PopupMenu& menu) { - menu.addCommandItem (commandManager, CommandIDs::toggleBuildEnabled); - menu.addCommandItem (commandManager, CommandIDs::buildNow); - menu.addCommandItem (commandManager, CommandIDs::toggleContinuousBuild); + menu.addCommandItem (commandManager.get(), CommandIDs::toggleBuildEnabled); + menu.addCommandItem (commandManager.get(), CommandIDs::buildNow); + menu.addCommandItem (commandManager.get(), CommandIDs::toggleContinuousBuild); menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::launchApp); - menu.addCommandItem (commandManager, CommandIDs::killApp); - menu.addCommandItem (commandManager, CommandIDs::cleanAll); + menu.addCommandItem (commandManager.get(), CommandIDs::launchApp); + menu.addCommandItem (commandManager.get(), CommandIDs::killApp); + menu.addCommandItem (commandManager.get(), CommandIDs::cleanAll); menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::reinstantiateComp); - menu.addCommandItem (commandManager, CommandIDs::showWarnings); + menu.addCommandItem (commandManager.get(), CommandIDs::reinstantiateComp); + menu.addCommandItem (commandManager.get(), CommandIDs::showWarnings); menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::nextError); - menu.addCommandItem (commandManager, CommandIDs::prevError); + menu.addCommandItem (commandManager.get(), CommandIDs::nextError); + menu.addCommandItem (commandManager.get(), CommandIDs::prevError); } void ProjucerApplication::createColourSchemeItems (PopupMenu& menu) @@ -518,9 +518,9 @@ void ProjucerApplication::createColourSchemeItems (PopupMenu& menu) void ProjucerApplication::createWindowMenu (PopupMenu& menu) { - menu.addCommandItem (commandManager, CommandIDs::goToPreviousWindow); - menu.addCommandItem (commandManager, CommandIDs::goToNextWindow); - menu.addCommandItem (commandManager, CommandIDs::closeWindow); + menu.addCommandItem (commandManager.get(), CommandIDs::goToPreviousWindow); + menu.addCommandItem (commandManager.get(), CommandIDs::goToNextWindow); + menu.addCommandItem (commandManager.get(), CommandIDs::closeWindow); menu.addSeparator(); int counter = 0; @@ -534,14 +534,14 @@ void ProjucerApplication::createWindowMenu (PopupMenu& menu) } menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::closeAllWindows); + menu.addCommandItem (commandManager.get(), CommandIDs::closeAllWindows); } void ProjucerApplication::createDocumentMenu (PopupMenu& menu) { - menu.addCommandItem (commandManager, CommandIDs::goToPreviousDoc); - menu.addCommandItem (commandManager, CommandIDs::goToNextDoc); - menu.addCommandItem (commandManager, CommandIDs::goToCounterpart); + menu.addCommandItem (commandManager.get(), CommandIDs::goToPreviousDoc); + menu.addCommandItem (commandManager.get(), CommandIDs::goToNextDoc); + menu.addCommandItem (commandManager.get(), CommandIDs::goToCounterpart); menu.addSeparator(); auto numDocs = jmin (50, openDocumentManager.getNumOpenDocuments()); @@ -553,31 +553,31 @@ void ProjucerApplication::createDocumentMenu (PopupMenu& menu) } menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::closeAllDocuments); + menu.addCommandItem (commandManager.get(), CommandIDs::closeAllDocuments); } void ProjucerApplication::createToolsMenu (PopupMenu& menu) { - menu.addCommandItem (commandManager, CommandIDs::showUTF8Tool); - menu.addCommandItem (commandManager, CommandIDs::showSVGPathTool); - menu.addCommandItem (commandManager, CommandIDs::showTranslationTool); + menu.addCommandItem (commandManager.get(), CommandIDs::showUTF8Tool); + menu.addCommandItem (commandManager.get(), CommandIDs::showSVGPathTool); + menu.addCommandItem (commandManager.get(), CommandIDs::showTranslationTool); } void ProjucerApplication::createHelpMenu (PopupMenu& menu) { - menu.addCommandItem (commandManager, CommandIDs::showForum); + menu.addCommandItem (commandManager.get(), CommandIDs::showForum); menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::showAPIModules); - menu.addCommandItem (commandManager, CommandIDs::showAPIClasses); - menu.addCommandItem (commandManager, CommandIDs::showTutorials); + menu.addCommandItem (commandManager.get(), CommandIDs::showAPIModules); + menu.addCommandItem (commandManager.get(), CommandIDs::showAPIClasses); + menu.addCommandItem (commandManager.get(), CommandIDs::showTutorials); } void ProjucerApplication::createExtraAppleMenuItems (PopupMenu& menu) { - menu.addCommandItem (commandManager, CommandIDs::showAboutWindow); - menu.addCommandItem (commandManager, CommandIDs::showAppUsageWindow); + menu.addCommandItem (commandManager.get(), CommandIDs::showAboutWindow); + menu.addCommandItem (commandManager.get(), CommandIDs::showAppUsageWindow); menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::showGlobalPathsWindow); + menu.addCommandItem (commandManager.get(), CommandIDs::showGlobalPathsWindow); } void ProjucerApplication::createExamplesPopupMenu (PopupMenu& menu) noexcept @@ -602,7 +602,7 @@ void ProjucerApplication::createExamplesPopupMenu (PopupMenu& menu) noexcept else { menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::launchDemoRunner); + menu.addCommandItem (commandManager.get(), CommandIDs::launchDemoRunner); } } @@ -809,16 +809,16 @@ void ProjucerApplication::launchDemoRunner() else if (findDemoRunnerProject() != File()) { auto& lf = Desktop::getInstance().getDefaultLookAndFeel(); - demoRunnerAlert = lf.createAlertWindow ("Open Project", - "Couldn't find a compiled version of the Demo Runner." - #if JUCE_LINUX - " Do you want to build it now?", "Build project", "Cancel", - #else - " Do you want to open the project?", "Open project", "Cancel", - #endif - {}, - AlertWindow::QuestionIcon, 2, - mainWindowList.getFrontmostWindow (false)); + demoRunnerAlert.reset (lf.createAlertWindow ("Open Project", + "Couldn't find a compiled version of the Demo Runner." + #if JUCE_LINUX + " Do you want to build it now?", "Build project", "Cancel", + #else + " Do you want to open the project?", "Open project", "Cancel", + #endif + {}, + AlertWindow::QuestionIcon, 2, + mainWindowList.getFrontmostWindow (false))); demoRunnerAlert->enterModalState (true, ModalCallbackFunction::create ([this] (int retVal) { @@ -1327,7 +1327,7 @@ void ProjucerApplication::updateAllBuildTabs() void ProjucerApplication::initCommandManager() { - commandManager = new ApplicationCommandManager(); + commandManager.reset (new ApplicationCommandManager()); commandManager->registerAllCommandsForTarget (this); { @@ -1386,11 +1386,11 @@ void ProjucerApplication::setupAnalytics() void ProjucerApplication::showSetJUCEPathAlert() { auto& lf = Desktop::getInstance().getDefaultLookAndFeel(); - pathAlert = lf.createAlertWindow ("Set JUCE Path", "Your global JUCE path is invalid. This path is used to access the JUCE examples and demo project - " - "would you like to set it now?", - "Set path", "Cancel", "Don't ask again", - AlertWindow::WarningIcon, 3, - mainWindowList.getFrontmostWindow (false)); + 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 - " + "would you like to set it now?", + "Set path", "Cancel", "Don't ask again", + AlertWindow::WarningIcon, 3, + mainWindowList.getFrontmostWindow (false))); pathAlert->enterModalState (true, ModalCallbackFunction::create ([this] (int retVal) { diff --git a/extras/Projucer/Source/Application/jucer_Application.h b/extras/Projucer/Source/Application/jucer_Application.h index 97b1871c..6689d45f 100644 --- a/extras/Projucer/Source/Application/jucer_Application.h +++ b/extras/Projucer/Source/Application/jucer_Application.h @@ -141,29 +141,29 @@ public: //============================================================================== ProjucerLookAndFeel lookAndFeel; - ScopedPointer settings; - ScopedPointer icons; + std::unique_ptr settings; + std::unique_ptr icons; struct MainMenuModel; - ScopedPointer menuModel; + std::unique_ptr menuModel; MainWindowList mainWindowList; OpenDocumentManager openDocumentManager; - ScopedPointer commandManager; + std::unique_ptr commandManager; - ScopedPointer utf8Window, svgPathWindow, aboutWindow, applicationUsageDataWindow, + std::unique_ptr utf8Window, svgPathWindow, aboutWindow, applicationUsageDataWindow, pathsWindow, editorColourSchemeWindow, pipCreatorWindow; - ScopedPointer logger; + std::unique_ptr logger; bool isRunningCommandLine; - ScopedPointer childProcessCache; - ScopedPointer licenseController; + std::unique_ptr childProcessCache; + std::unique_ptr licenseController; private: void* server = nullptr; - ScopedPointer versionChecker; + std::unique_ptr versionChecker; TooltipWindow tooltipWindow; void loginOrLogout(); @@ -191,7 +191,7 @@ private: void launchDemoRunner(); int numExamples = 0; - ScopedPointer demoRunnerAlert; + std::unique_ptr demoRunnerAlert; #if JUCE_LINUX ChildProcess makeProcess; @@ -201,7 +201,7 @@ private: void setupAnalytics(); void showSetJUCEPathAlert(); - ScopedPointer pathAlert; + std::unique_ptr pathAlert; //============================================================================== void setColourScheme (int index, bool saveSetting); diff --git a/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp b/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp index 59451251..1d406044 100644 --- a/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp +++ b/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp @@ -178,7 +178,7 @@ public: const int maxRedirects = 5; // we need to do the redirecting manually due to inconsistencies on the way headers are handled on redirects - ScopedPointer in; + std::unique_ptr in; for (int redirect = 0; redirect < maxRedirects; ++redirect) { @@ -214,7 +214,7 @@ public: total += written; - setStatusMessage (String (TRANS ("Downloading... (123)")) + setStatusMessage (String (TRANS("Downloading... (123)")) .replace ("123", File::descriptionOfSizeInBytes (total))); } @@ -243,36 +243,42 @@ public: const char* overwriteFolderPath) : hasOverwriteButton (overwriteFolderPath != nullptr) { - addAndMakeVisible (titleLabel = new Label ("Title Label", - TRANS ("Download \"123\" version 456?").replace ("123", productName) - .replace ("456", version.toString()))); + titleLabel.reset (new Label ("Title Label", + TRANS("Download \"123\" version 456?") + .replace ("123", productName) + .replace ("456", version.toString()))); + addAndMakeVisible (titleLabel.get()); titleLabel->setFont (Font (15.00f, Font::bold)); titleLabel->setJustificationType (Justification::centredLeft); titleLabel->setEditable (false, false, false); - addAndMakeVisible (contentLabel = new Label ("Content Label", - TRANS ("A new version of \"123\" is available - would you like to download it?") - .replace ("123", productName))); + contentLabel.reset(new Label ("Content Label", + TRANS("A new version of \"123\" is available - would you like to download it?") + .replace ("123", productName))); + addAndMakeVisible (contentLabel.get()); contentLabel->setFont (Font (15.00f, Font::plain)); contentLabel->setJustificationType (Justification::topLeft); contentLabel->setEditable (false, false, false); - addAndMakeVisible (okButton = new TextButton ("OK Button")); + okButton.reset (new TextButton ("OK Button")); + addAndMakeVisible (okButton.get()); okButton->setButtonText (TRANS(hasOverwriteButton ? "Choose Another Folder..." : "OK")); okButton->onClick = [this] { exitParentDialog (2); }; - addAndMakeVisible (cancelButton = new TextButton ("Cancel Button")); + cancelButton.reset (new TextButton ("Cancel Button")); + addAndMakeVisible (cancelButton.get()); cancelButton->setButtonText (TRANS("Cancel")); cancelButton->onClick = [this] { exitParentDialog (-1); }; - addAndMakeVisible (changeLogLabel = new Label ("Change Log Label", - TRANS("Release Notes:"))); + changeLogLabel.reset (new Label ("Change Log Label", TRANS("Release Notes:"))); + addAndMakeVisible (changeLogLabel.get()); changeLogLabel->setFont (Font (15.00f, Font::plain)); changeLogLabel->setJustificationType (Justification::topLeft); changeLogLabel->setEditable (false, false, false); - addAndMakeVisible (changeLog = new TextEditor ("Change Log")); + changeLog.reset (new TextEditor ("Change Log")); + addAndMakeVisible (changeLog.get()); changeLog->setMultiLine (true); changeLog->setReturnKeyStartsNewLine (true); changeLog->setReadOnly (true); @@ -283,24 +289,27 @@ public: if (hasOverwriteButton) { - addAndMakeVisible (overwriteLabel = new Label ("Overwrite Label", - TRANS("Updating will overwrite everything in the following folder:"))); + overwriteLabel.reset (new Label ("Overwrite Label", + TRANS("Updating will overwrite everything in the following folder:"))); + addAndMakeVisible (overwriteLabel.get()); overwriteLabel->setFont (Font (15.00f, Font::plain)); overwriteLabel->setJustificationType (Justification::topLeft); overwriteLabel->setEditable (false, false, false); - addAndMakeVisible (overwritePath = new Label ("Overwrite Path", overwriteFolderPath)); + overwritePath.reset (new Label ("Overwrite Path", overwriteFolderPath)); + addAndMakeVisible (overwritePath.get()); overwritePath->setFont (Font (15.00f, Font::bold)); overwritePath->setJustificationType (Justification::topLeft); overwritePath->setEditable (false, false, false); - addAndMakeVisible (overwriteButton = new TextButton ("Overwrite Button")); + overwriteButton.reset (new TextButton ("Overwrite Button")); + addAndMakeVisible (overwriteButton.get()); overwriteButton->setButtonText (TRANS("Overwrite")); overwriteButton->onClick = [this] { exitParentDialog (1); }; } - juceIcon = Drawable::createFromImageData (BinaryData::juce_icon_png, - BinaryData::juce_icon_pngSize); + juceIcon.reset (Drawable::createFromImageData (BinaryData::juce_icon_png, + BinaryData::juce_icon_pngSize)); setSize (518, overwritePath != nullptr ? 345 : 269); @@ -371,7 +380,7 @@ public: releaseNotes, overwritePath), true); DialogWindow::LaunchOptions lo; - lo.dialogTitle = TRANS ("Download \"123\" version 456?").replace ("456", version.toString()) + lo.dialogTitle = TRANS("Download \"123\" version 456?").replace ("456", version.toString()) .replace ("123", productName); lo.dialogBackgroundColour = userDialog->findColour (backgroundColourId); lo.content = userDialog; @@ -386,11 +395,11 @@ public: private: bool hasOverwriteButton; - ScopedPointer diff --git a/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp b/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp index 14027d35..ec53fabb 100644 --- a/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp +++ b/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp @@ -89,20 +89,24 @@ void ThreadedAnalyticsDestination::EventDispatcher::run() while (! threadShouldExit()) { - auto eventsToSendCapacity = maxBatchSize - eventsToSend.size(); - - if (eventsToSendCapacity > 0) { - const ScopedLock lock (queueAccess); - - const auto numEventsInQueue = (int) eventQueue.size(); + const auto numEventsInBatch = eventsToSend.size(); + const auto freeBatchCapacity = maxBatchSize - numEventsInBatch; - if (numEventsInQueue > 0) + if (freeBatchCapacity > 0) { - const auto numEventsToAdd = jmin (eventsToSendCapacity, numEventsInQueue); + const auto numNewEvents = (int) eventQueue.size() - numEventsInBatch; + + if (numNewEvents > 0) + { + const ScopedLock lock (queueAccess); + + const auto numEventsToAdd = jmin (numNewEvents, freeBatchCapacity); + const auto newBatchSize = numEventsInBatch + numEventsToAdd; - for (size_t i = 0; i < (size_t) numEventsToAdd; ++i) - eventsToSend.add (eventQueue[i]); + for (auto i = numEventsInBatch; i < newBatchSize; ++i) + eventsToSend.add (eventQueue[(size_t) i]); + } } } diff --git a/modules/juce_analytics/juce_analytics.h b/modules/juce_analytics/juce_analytics.h index 6bc6b3d0..546a3f09 100644 --- a/modules/juce_analytics/juce_analytics.h +++ b/modules/juce_analytics/juce_analytics.h @@ -35,7 +35,7 @@ ID: juce_analytics vendor: juce - version: 5.3.1 + version: 5.3.2 name: JUCE analytics classes description: Classes to collect analytics and send to destinations website: http://www.juce.com/juce diff --git a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp index e8fc19fb..4b7b4683 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp +++ b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp @@ -514,8 +514,8 @@ public: } // convert data from the source to dest format.. - ScopedPointer conv (new AudioData::ConverterInstance , - AudioData::Pointer>()); + std::unique_ptr conv (new AudioData::ConverterInstance , + AudioData::Pointer>()); conv->convertSamples (inPlace ? reversed : converted, original, numSamples); // ..and back again.. diff --git a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h index ddf53198..45c6c309 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h +++ b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h @@ -308,7 +308,7 @@ public: class NonConst { public: - typedef void VoidType; + using VoidType = void; static inline void* toVoidPtr (VoidType* v) noexcept { return v; } enum { isConst = 0 }; }; @@ -316,7 +316,7 @@ public: class Const { public: - typedef const void VoidType; + using VoidType = const void; static inline void* toVoidPtr (VoidType* v) noexcept { return const_cast (v); } enum { isConst = 1 }; }; diff --git a/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h b/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h index 8ad74ea8..1c2ce7f8 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h +++ b/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h @@ -1062,7 +1062,7 @@ public: //============================================================================== /** This allows templated code that takes an AudioBuffer to access its sample type. */ - typedef Type SampleType; + using SampleType = Type; private: //============================================================================== @@ -1125,12 +1125,12 @@ private: /** A multi-channel buffer of 32-bit floating point audio samples. - This typedef is here for backwards compatibility with the older AudioSampleBuffer + This type is here for backwards compatibility with the older AudioSampleBuffer class, which was fixed for 32-bit data, but is otherwise the same as the new templated AudioBuffer class. @see AudioBuffer */ -typedef AudioBuffer AudioSampleBuffer; +using AudioSampleBuffer = AudioBuffer; } // namespace juce diff --git a/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp b/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp index 4dc3a86d..4dc44c1b 100644 --- a/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp +++ b/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp @@ -37,9 +37,9 @@ namespace FloatVectorHelpers struct BasicOps32 { - typedef float Type; - typedef __m128 ParallelType; - typedef __m128 IntegerType; + using Type = float; + using ParallelType = __m128; + using IntegerType = __m128; enum { numParallel = 4 }; // Integer and parallel types are the same for SSE. On neon they have different types @@ -69,9 +69,9 @@ namespace FloatVectorHelpers struct BasicOps64 { - typedef double Type; - typedef __m128d ParallelType; - typedef __m128d IntegerType; + using Type = double; + using ParallelType = __m128d; + using IntegerType = __m128d; enum { numParallel = 2 }; // Integer and parallel types are the same for SSE. On neon they have different types @@ -102,7 +102,7 @@ namespace FloatVectorHelpers #define JUCE_BEGIN_VEC_OP \ - typedef FloatVectorHelpers::ModeType::Mode Mode; \ + using Mode = FloatVectorHelpers::ModeType::Mode; \ { \ const int numLongOps = num / Mode::numParallel; @@ -202,9 +202,9 @@ namespace FloatVectorHelpers struct BasicOps32 { - typedef float Type; - typedef float32x4_t ParallelType; - typedef uint32x4_t IntegerType; + using Type = float; + using ParallelType = float32x4_t; + using IntegerType = uint32x4_t; union signMaskUnion { ParallelType f; IntegerType i; }; enum { numParallel = 4 }; @@ -234,9 +234,9 @@ namespace FloatVectorHelpers struct BasicOps64 { - typedef double Type; - typedef double ParallelType; - typedef uint64 IntegerType; + using Type = double; + using ParallelType = double; + using IntegerType = uint64; union signMaskUnion { ParallelType f; IntegerType i; }; enum { numParallel = 1 }; @@ -265,7 +265,7 @@ namespace FloatVectorHelpers }; #define JUCE_BEGIN_VEC_OP \ - typedef FloatVectorHelpers::ModeType::Mode Mode; \ + using Mode = FloatVectorHelpers::ModeType::Mode; \ if (Mode::numParallel > 1) \ { \ const int numLongOps = num / Mode::numParallel; @@ -353,14 +353,14 @@ namespace FloatVectorHelpers union signMask64 { double d; uint64 i; }; #if JUCE_USE_SSE_INTRINSICS || JUCE_USE_ARM_NEON - template struct ModeType { typedef BasicOps32 Mode; }; - template<> struct ModeType<8> { typedef BasicOps64 Mode; }; + template struct ModeType { using Mode = BasicOps32; }; + template<> struct ModeType<8> { using Mode = BasicOps64; }; template struct MinMax { - typedef typename Mode::Type Type; - typedef typename Mode::ParallelType ParallelType; + using Type = typename Mode::Type; + using ParallelType = typename Mode::ParallelType; static Type findMinOrMax (const Type* src, int num, const bool isMinimum) noexcept { diff --git a/modules/juce_audio_basics/juce_audio_basics.h b/modules/juce_audio_basics/juce_audio_basics.h index f86e1255..3662bc36 100644 --- a/modules/juce_audio_basics/juce_audio_basics.h +++ b/modules/juce_audio_basics/juce_audio_basics.h @@ -31,7 +31,7 @@ ID: juce_audio_basics vendor: juce - version: 5.3.1 + version: 5.3.2 name: JUCE audio and MIDI data classes description: Classes for audio buffer manipulation, midi message handling, synthesis, etc. website: http://www.juce.com/juce diff --git a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp index b730f421..b2f2cb6a 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp @@ -2062,7 +2062,8 @@ private: class UnitTestInstrument : public MPEInstrument, private MPEInstrument::Listener { - typedef MPEInstrument Base; + using Base = MPEInstrument; + public: UnitTestInstrument() : noteOnCallCounter (0), noteOffCallCounter (0), pitchbendCallCounter (0), @@ -2150,7 +2151,7 @@ private: bool lastSustainPedalValueReceived, lastSostenutoPedalValueReceived; MPEValue lastMPEValueReceived; - ScopedPointer lastNoteFinished; + std::unique_ptr lastNoteFinished; private: //============================================================================== diff --git a/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h b/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h index c11c11d0..ca4c026e 100644 --- a/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h +++ b/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h @@ -165,7 +165,7 @@ public: void setLegacyModePitchbendRange (int pitchbendRange); //============================================================================== - typedef MPEInstrument::TrackingMode TrackingMode; + using TrackingMode = MPEInstrument::TrackingMode; /** Set the MPE tracking mode for the pressure dimension. */ void setPressureTrackingMode (TrackingMode modeToUse); @@ -195,7 +195,7 @@ protected: protected: //============================================================================== /** @internal */ - ScopedPointer instrument; + std::unique_ptr instrument; private: //============================================================================== diff --git a/modules/juce_audio_basics/mpe/juce_MPEUtils.h b/modules/juce_audio_basics/mpe/juce_MPEUtils.h index 4bb656c5..7cbfd2b1 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEUtils.h +++ b/modules/juce_audio_basics/mpe/juce_MPEUtils.h @@ -73,7 +73,7 @@ public: private: bool isLegacy = false; - ScopedPointer zone; + std::unique_ptr zone; int channelIncrement, numChannels, firstChannel, lastChannel, midiChannelLastAssigned; //============================================================================== diff --git a/modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp b/modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp index ae33bea0..740d7ba8 100644 --- a/modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp +++ b/modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp @@ -25,20 +25,14 @@ namespace juce BufferingAudioSource::BufferingAudioSource (PositionableAudioSource* s, TimeSliceThread& thread, - const bool deleteSourceWhenDeleted, - const int bufferSizeSamples, - const int numChannels, + bool deleteSourceWhenDeleted, + int bufferSizeSamples, + int numChannels, bool prefillBufferOnPrepareToPlay) : source (s, deleteSourceWhenDeleted), backgroundThread (thread), numberOfSamplesToBuffer (jmax (1024, bufferSizeSamples)), numberOfChannels (numChannels), - bufferValidStart (0), - bufferValidEnd (0), - nextPlayPos (0), - sampleRate (0), - wasSourceLooping (false), - isPrepared (false), prefillBuffer (prefillBufferOnPrepareToPlay) { jassert (source != nullptr); @@ -55,7 +49,7 @@ BufferingAudioSource::~BufferingAudioSource() //============================================================================== void BufferingAudioSource::prepareToPlay (int samplesPerBlockExpected, double newSampleRate) { - const int bufferSizeNeeded = jmax (samplesPerBlockExpected * 2, numberOfSamplesToBuffer); + auto bufferSizeNeeded = jmax (samplesPerBlockExpected * 2, numberOfSamplesToBuffer); if (newSampleRate != sampleRate || bufferSizeNeeded != buffer.getNumSamples() @@ -104,8 +98,12 @@ void BufferingAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& info { const ScopedLock sl (bufferStartPosLock); - const int validStart = (int) (jlimit (bufferValidStart, bufferValidEnd, nextPlayPos) - nextPlayPos); - const int validEnd = (int) (jlimit (bufferValidStart, bufferValidEnd, nextPlayPos + info.numSamples) - nextPlayPos); + auto start = bufferValidStart.load(); + auto end = bufferValidEnd.load(); + auto pos = nextPlayPos.load(); + + auto validStart = (int) (jlimit (start, end, pos) - pos); + auto validEnd = (int) (jlimit (start, end, pos + info.numSamples) - pos); if (validStart == validEnd) { @@ -126,8 +124,8 @@ void BufferingAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& info for (int chan = jmin (numberOfChannels, info.buffer->getNumChannels()); --chan >= 0;) { jassert (buffer.getNumSamples() > 0); - const int startBufferIndex = (int) ((validStart + nextPlayPos) % buffer.getNumSamples()); - const int endBufferIndex = (int) ((validEnd + nextPlayPos) % buffer.getNumSamples()); + auto startBufferIndex = (int) ((validStart + nextPlayPos) % buffer.getNumSamples()); + auto endBufferIndex = (int) ((validEnd + nextPlayPos) % buffer.getNumSamples()); if (startBufferIndex < endBufferIndex) { @@ -138,7 +136,7 @@ void BufferingAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& info } else { - const int initialSize = buffer.getNumSamples() - startBufferIndex; + auto initialSize = buffer.getNumSamples() - startBufferIndex; info.buffer->copyFrom (chan, info.startSample + validStart, buffer, @@ -157,7 +155,7 @@ void BufferingAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& info } } -bool BufferingAudioSource::waitForNextAudioBlockReady (const AudioSourceChannelInfo& info, const uint32 timeout) +bool BufferingAudioSource::waitForNextAudioBlockReady (const AudioSourceChannelInfo& info, uint32 timeout) { if (!source || source->getTotalLength() <= 0) return false; @@ -168,26 +166,28 @@ bool BufferingAudioSource::waitForNextAudioBlockReady (const AudioSourceChannelI if (! isLooping() && nextPlayPos > getTotalLength()) return true; - uint32 now = Time::getMillisecondCounter(); - const uint32 startTime = now; + auto now = Time::getMillisecondCounter(); + auto startTime = now; - uint32 elapsed = (now >= startTime ? now - startTime - : (std::numeric_limits::max() - startTime) + now); + auto elapsed = (now >= startTime ? now - startTime + : (std::numeric_limits::max() - startTime) + now); while (elapsed <= timeout) { { const ScopedLock sl (bufferStartPosLock); - const int validStart = static_cast (jlimit (bufferValidStart, bufferValidEnd, nextPlayPos) - nextPlayPos); - const int validEnd = static_cast (jlimit (bufferValidStart, bufferValidEnd, nextPlayPos + info.numSamples) - nextPlayPos); + auto start = bufferValidStart.load(); + auto end = bufferValidEnd.load(); + auto pos = nextPlayPos.load(); + + auto validStart = static_cast (jlimit (start, end, pos) - pos); + auto validEnd = static_cast (jlimit (start, end, pos + info.numSamples) - pos); if (validStart <= 0 && validStart < validEnd && validEnd >= info.numSamples) return true; } - - if (elapsed < timeout && (! bufferReadyEvent.wait (static_cast (timeout - elapsed)))) return false; @@ -202,9 +202,11 @@ bool BufferingAudioSource::waitForNextAudioBlockReady (const AudioSourceChannelI int64 BufferingAudioSource::getNextReadPosition() const { jassert (source->getTotalLength() > 0); + auto pos = nextPlayPos.load(); + return (source->isLooping() && nextPlayPos > 0) - ? nextPlayPos % source->getTotalLength() - : nextPlayPos; + ? pos % source->getTotalLength() + : pos; } void BufferingAudioSource::setNextReadPosition (int64 newPosition) @@ -229,7 +231,7 @@ bool BufferingAudioSource::readNextBufferChunk() bufferValidEnd = 0; } - newBVS = jmax ((int64) 0, nextPlayPos); + newBVS = jmax ((int64) 0, nextPlayPos.load()); newBVE = newBVS + buffer.getNumSamples() - 4; sectionToReadStart = 0; sectionToReadEnd = 0; @@ -255,7 +257,7 @@ bool BufferingAudioSource::readNextBufferChunk() sectionToReadEnd = newBVE; bufferValidStart = newBVS; - bufferValidEnd = jmin (bufferValidEnd, newBVE); + bufferValidEnd = jmin (bufferValidEnd.load(), newBVE); } } @@ -263,8 +265,8 @@ bool BufferingAudioSource::readNextBufferChunk() return false; jassert (buffer.getNumSamples() > 0); - const int bufferIndexStart = (int) (sectionToReadStart % buffer.getNumSamples()); - const int bufferIndexEnd = (int) (sectionToReadEnd % buffer.getNumSamples()); + auto bufferIndexStart = (int) (sectionToReadStart % buffer.getNumSamples()); + auto bufferIndexEnd = (int) (sectionToReadEnd % buffer.getNumSamples()); if (bufferIndexStart < bufferIndexEnd) { @@ -274,7 +276,7 @@ bool BufferingAudioSource::readNextBufferChunk() } else { - const int initialSize = buffer.getNumSamples() - bufferIndexStart; + auto initialSize = buffer.getNumSamples() - bufferIndexStart; readBufferSection (sectionToReadStart, initialSize, @@ -293,11 +295,10 @@ bool BufferingAudioSource::readNextBufferChunk() } bufferReadyEvent.signal(); - return true; } -void BufferingAudioSource::readBufferSection (const int64 start, const int length, const int bufferOffset) +void BufferingAudioSource::readBufferSection (int64 start, int length, int bufferOffset) { if (source->getNextReadPosition() != start) source->setNextReadPosition (start); diff --git a/modules/juce_audio_basics/sources/juce_BufferingAudioSource.h b/modules/juce_audio_basics/sources/juce_BufferingAudioSource.h index bf272969..bc6f5abe 100644 --- a/modules/juce_audio_basics/sources/juce_BufferingAudioSource.h +++ b/modules/juce_audio_basics/sources/juce_BufferingAudioSource.h @@ -105,9 +105,9 @@ private: AudioBuffer buffer; CriticalSection bufferStartPosLock; WaitableEvent bufferReadyEvent; - int64 volatile bufferValidStart, bufferValidEnd, nextPlayPos; - double volatile sampleRate; - bool wasSourceLooping, isPrepared, prefillBuffer; + std::atomic bufferValidStart { 0 }, bufferValidEnd { 0 }, nextPlayPos { 0 }; + double sampleRate = 0; + bool wasSourceLooping = false, isPrepared = false, prefillBuffer; bool readNextBufferChunk(); void readBufferSection (int64 start, int length, int bufferOffset); diff --git a/modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp b/modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp index ed2918e4..96d9fe8a 100644 --- a/modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp +++ b/modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp @@ -61,7 +61,7 @@ void MixerAudioSource::removeInputSource (AudioSource* const input) { if (input != nullptr) { - ScopedPointer toDelete; + std::unique_ptr toDelete; { const ScopedLock sl (lock); diff --git a/modules/juce_audio_basics/sources/juce_ReverbAudioSource.h b/modules/juce_audio_basics/sources/juce_ReverbAudioSource.h index ddddb546..99fc422d 100644 --- a/modules/juce_audio_basics/sources/juce_ReverbAudioSource.h +++ b/modules/juce_audio_basics/sources/juce_ReverbAudioSource.h @@ -66,7 +66,7 @@ private: CriticalSection lock; OptionalScopedPointer input; Reverb reverb; - volatile bool bypass; + std::atomic bypass; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ReverbAudioSource) }; diff --git a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h index c056896e..3215d100 100644 --- a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h +++ b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h @@ -64,7 +64,7 @@ public: virtual bool appliesToChannel (int midiChannel) = 0; /** The class is reference-counted, so this is a handy pointer class for it. */ - typedef ReferenceCountedObjectPtr Ptr; + using Ptr = ReferenceCountedObjectPtr; private: diff --git a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp index 4685e435..e2fb0b41 100644 --- a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp +++ b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp @@ -722,7 +722,7 @@ void AudioDeviceManager::audioDeviceIOCallbackInt (const float** inputChannelDat cpuUsageMs += filterAmount * (msTaken - cpuUsageMs); if (msTaken > msPerBlock) - xruns++; + ++xruns; } else { @@ -960,7 +960,7 @@ double AudioDeviceManager::LevelMeter::getCurrentLevel() const noexcept void AudioDeviceManager::playTestSound() { { // cunningly nested to swap, unlock and delete in that order. - ScopedPointer> oldSound; + std::unique_ptr> oldSound; { const ScopedLock sl (audioCallbackLock); @@ -996,7 +996,7 @@ void AudioDeviceManager::playTestSound() int AudioDeviceManager::getXRunCount() const noexcept { auto deviceXRuns = (currentAudioDevice != nullptr ? currentAudioDevice->getXRunCount() : -1); - return (deviceXRuns >= 0 ? deviceXRuns : xruns); + return jmax (0, deviceXRuns) + xruns; } } // namespace juce diff --git a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h index ca735e7d..adbfa99f 100644 --- a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h +++ b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h @@ -416,12 +416,11 @@ public: */ struct LevelMeter : public ReferenceCountedObject { - typedef ReferenceCountedObjectPtr Ptr; - LevelMeter() noexcept; - double getCurrentLevel() const noexcept; + using Ptr = ReferenceCountedObjectPtr; + private: friend class AudioDeviceManager; @@ -471,12 +470,12 @@ private: OwnedArray lastDeviceTypeConfigs; AudioDeviceSetup currentSetup; - ScopedPointer currentAudioDevice; + std::unique_ptr currentAudioDevice; Array callbacks; int numInputChansNeeded = 0, numOutputChansNeeded = 2; String currentDeviceType; BigInteger inputChannels, outputChannels; - ScopedPointer lastExplicitSettings; + std::unique_ptr lastExplicitSettings; mutable bool listNeedsScanning = true; AudioBuffer tempBuffer; @@ -491,10 +490,10 @@ private: Array midiCallbacks; String defaultMidiOutputName; - ScopedPointer defaultMidiOutput; + std::unique_ptr defaultMidiOutput; CriticalSection audioCallbackLock, midiCallbackLock; - ScopedPointer> testSound; + std::unique_ptr> testSound; int testSoundPosition = 0; double cpuUsageMs = 0, timeToCpuScale = 0, msPerBlock = 0; @@ -507,7 +506,7 @@ private: class CallbackHandler; friend class CallbackHandler; friend struct ContainerDeletePolicy; - ScopedPointer callbackHandler; + std::unique_ptr callbackHandler; void audioDeviceIOCallbackInt (const float** inputChannelData, int totalNumInputChannels, float** outputChannelData, int totalNumOutputChannels, int numSamples); diff --git a/modules/juce_audio_devices/juce_audio_devices.h b/modules/juce_audio_devices/juce_audio_devices.h index 611f6539..1ab48aa5 100644 --- a/modules/juce_audio_devices/juce_audio_devices.h +++ b/modules/juce_audio_devices/juce_audio_devices.h @@ -31,7 +31,7 @@ ID: juce_audio_devices vendor: juce - version: 5.3.1 + version: 5.3.2 name: JUCE audio and MIDI I/O device classes description: Classes to play and record from audio and MIDI I/O devices website: http://www.juce.com/juce diff --git a/modules/juce_audio_devices/midi_io/juce_MidiOutput.cpp b/modules/juce_audio_devices/midi_io/juce_MidiOutput.cpp index 36b7cf64..98fdd6cd 100644 --- a/modules/juce_audio_devices/midi_io/juce_MidiOutput.cpp +++ b/modules/juce_audio_devices/midi_io/juce_MidiOutput.cpp @@ -25,7 +25,7 @@ namespace juce struct MidiOutput::PendingMessage { - PendingMessage (const void* const data, const int len, const double timeStamp) + PendingMessage (const void* data, int len, double timeStamp) : message (data, len, timeStamp) {} @@ -33,11 +33,8 @@ struct MidiOutput::PendingMessage PendingMessage* next; }; -MidiOutput::MidiOutput (const String& midiName) - : Thread ("midi out"), - internal (nullptr), - firstMessage (nullptr), - name (midiName) +MidiOutput::MidiOutput (const String& deviceName) + : Thread ("midi out"), name (deviceName) { } @@ -52,7 +49,7 @@ void MidiOutput::sendBlockOfMessagesNow (const MidiBuffer& buffer) } void MidiOutput::sendBlockOfMessages (const MidiBuffer& buffer, - const double millisecondCounterToStartAt, + double millisecondCounterToStartAt, double samplesPerSecondForBuffer) { // You've got to call startBackgroundThread() for this to actually work.. @@ -61,18 +58,15 @@ void MidiOutput::sendBlockOfMessages (const MidiBuffer& buffer, // this needs to be a value in the future - RTFM for this method! jassert (millisecondCounterToStartAt > 0); - const double timeScaleFactor = 1000.0 / samplesPerSecondForBuffer; - - MidiBuffer::Iterator i (buffer); + auto timeScaleFactor = 1000.0 / samplesPerSecondForBuffer; const uint8* data; int len, time; - while (i.getNextEvent (data, len, time)) + for (MidiBuffer::Iterator i (buffer); i.getNextEvent (data, len, time);) { - const double eventTime = millisecondCounterToStartAt + timeScaleFactor * time; - - PendingMessage* const m = new PendingMessage (data, len, eventTime); + auto eventTime = millisecondCounterToStartAt + timeScaleFactor * time; + auto* m = new PendingMessage (data, len, eventTime); const ScopedLock sl (lock); @@ -83,7 +77,7 @@ void MidiOutput::sendBlockOfMessages (const MidiBuffer& buffer, } else { - PendingMessage* mm = firstMessage; + auto* mm = firstMessage; while (mm->next != nullptr && mm->next->message.getTimeStamp() <= eventTime) mm = mm->next; @@ -102,7 +96,7 @@ void MidiOutput::clearAllPendingMessages() while (firstMessage != nullptr) { - PendingMessage* const m = firstMessage; + auto* m = firstMessage; firstMessage = firstMessage->next; delete m; } @@ -150,7 +144,7 @@ void MidiOutput::run() if (message != nullptr) { - const ScopedPointer messageDeleter (message); + std::unique_ptr messageDeleter (message); if (eventTime > now) { diff --git a/modules/juce_audio_devices/midi_io/juce_MidiOutput.h b/modules/juce_audio_devices/midi_io/juce_MidiOutput.h index 3a102990..5c8e6214 100644 --- a/modules/juce_audio_devices/midi_io/juce_MidiOutput.h +++ b/modules/juce_audio_devices/midi_io/juce_MidiOutput.h @@ -133,7 +133,7 @@ private: void* internal = nullptr; CriticalSection lock; struct PendingMessage; - PendingMessage* firstMessage; + PendingMessage* firstMessage = nullptr; String name; MidiOutput (const String& midiName); // These objects are created with the openDevice() method. diff --git a/modules/juce_audio_devices/native/juce_android_Audio.cpp b/modules/juce_audio_devices/native/juce_android_Audio.cpp index 40a9725b..7a58d65b 100644 --- a/modules/juce_audio_devices/native/juce_android_Audio.cpp +++ b/modules/juce_audio_devices/native/juce_android_Audio.cpp @@ -462,12 +462,12 @@ public: AudioIODevice* createDevice (const String& outputDeviceName, const String& inputDeviceName) { - ScopedPointer dev; + std::unique_ptr dev; if (outputDeviceName.isNotEmpty() || inputDeviceName.isNotEmpty()) { - dev = new AndroidAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName - : inputDeviceName); + dev.reset (new AndroidAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName + : inputDeviceName)); if (dev->getCurrentSampleRate() <= 0 || dev->getDefaultBufferSize() <= 0) dev = nullptr; diff --git a/modules/juce_audio_devices/native/juce_android_Midi.cpp b/modules/juce_audio_devices/native/juce_android_Midi.cpp index 6b750896..a178abf0 100644 --- a/modules/juce_audio_devices/native/juce_android_Midi.cpp +++ b/modules/juce_audio_devices/native/juce_android_Midi.cpp @@ -202,7 +202,7 @@ public: { if (jobject dm = deviceManager.get()) { - ScopedPointer androidMidiInput (new AndroidMidiInput (juceMidiInput, idx, callback, dm)); + std::unique_ptr androidMidiInput (new AndroidMidiInput (juceMidiInput, idx, callback, dm)); if (androidMidiInput->isOpen()) return androidMidiInput.release(); @@ -221,22 +221,6 @@ public: } private: - static StringArray javaStringArrayToJuce (jobjectArray jStrings) - { - StringArray retval; - - JNIEnv* env = getEnv(); - const int count = env->GetArrayLength (jStrings); - - for (int i = 0; i < count; ++i) - { - LocalRef string ((jstring) env->GetObjectArrayElement (jStrings, i)); - retval.add (juceString (string)); - } - - return retval; - } - GlobalRef deviceManager; }; @@ -327,7 +311,7 @@ MidiInput* MidiInput::openDevice (int index, juce::MidiInputCallback* callback) AndroidMidiDeviceManager manager; - String midiInputName = manager.getInputPortNameForJuceIndex (index); + String midiInputName (manager.getInputPortNameForJuceIndex (index)); if (midiInputName.isEmpty()) { @@ -336,9 +320,9 @@ MidiInput* MidiInput::openDevice (int index, juce::MidiInputCallback* callback) return nullptr; } - ScopedPointer midiInput (new MidiInput (midiInputName)); + std::unique_ptr midiInput (new MidiInput (midiInputName)); - midiInput->internal = manager.openMidiInputPortWithIndex (index, midiInput, callback); + midiInput->internal = manager.openMidiInputPortWithIndex (index, midiInput.get(), callback); return midiInput->internal != nullptr ? midiInput.release() : nullptr; diff --git a/modules/juce_audio_devices/native/juce_android_Oboe.cpp b/modules/juce_audio_devices/native/juce_android_Oboe.cpp index c242495a..09f3530e 100644 --- a/modules/juce_audio_devices/native/juce_android_Oboe.cpp +++ b/modules/juce_audio_devices/native/juce_android_Oboe.cpp @@ -48,8 +48,8 @@ struct OboeAudioIODeviceBufferHelpers { for (int i = 0; i < audioBuffer.getNumChannels(); ++i) { - typedef AudioData::Pointer DstSampleType; - typedef AudioData::Pointer SrcSampleType; + using DstSampleType = AudioData::Pointer; + using SrcSampleType = AudioData::Pointer; DstSampleType dstData (audioBuffer.getWritePointer (i)); SrcSampleType srcData (srcInterleaved + i, audioBuffer.getNumChannels()); @@ -61,8 +61,8 @@ struct OboeAudioIODeviceBufferHelpers { for (int i = 0; i < audioBuffer.getNumChannels(); ++i) { - typedef AudioData::Pointer DstSampleType; - typedef AudioData::Pointer SrcSampleType; + using DstSampleType = AudioData::Pointer; + using SrcSampleType = AudioData::Pointer; DstSampleType dstData (dstInterleaved + i, audioBuffer.getNumChannels()); SrcSampleType srcData (audioBuffer.getReadPointer (i)); @@ -95,8 +95,8 @@ struct OboeAudioIODeviceBufferHelpers for (int i = 0; i < audioBuffer.getNumChannels(); ++i) { - typedef AudioData::Pointer DstSampleType; - typedef AudioData::Pointer SrcSampleType; + using DstSampleType = AudioData::Pointer; + using SrcSampleType = AudioData::Pointer; DstSampleType dstData (audioBuffer.getWritePointer (i)); SrcSampleType srcData (srcInterleaved + i, audioBuffer.getNumChannels()); @@ -115,8 +115,8 @@ struct OboeAudioIODeviceBufferHelpers for (int i = 0; i < audioBuffer.getNumChannels(); ++i) { - typedef AudioData::Pointer DstSampleType; - typedef AudioData::Pointer SrcSampleType; + using DstSampleType = AudioData::Pointer; + using SrcSampleType = AudioData::Pointer; DstSampleType dstData (dstInterleaved + i, audioBuffer.getNumChannels()); SrcSampleType srcData (audioBuffer.getReadPointer (i)); diff --git a/modules/juce_audio_devices/native/juce_android_OpenSL.cpp b/modules/juce_audio_devices/native/juce_android_OpenSL.cpp index 23441cf8..fa610109 100644 --- a/modules/juce_audio_devices/native/juce_android_OpenSL.cpp +++ b/modules/juce_audio_devices/native/juce_android_OpenSL.cpp @@ -87,7 +87,7 @@ public: private: //============================================================================== - struct ControlBlock : ReferenceCountedObject { ScopedPointer ptr; ControlBlock() {} ControlBlock (SLObjectItf o) : ptr (o) {} }; + struct ControlBlock : ReferenceCountedObject { std::unique_ptr ptr; ControlBlock() {} ControlBlock (SLObjectItf o) : ptr (o) {} }; ReferenceCountedObjectPtr cb; }; @@ -172,8 +172,8 @@ struct BufferHelpers { for (int i = 0; i < audioBuffer.getNumChannels(); ++i) { - typedef AudioData::Pointer DstSampleType; - typedef AudioData::Pointer SrcSampleType; + using DstSampleType = AudioData::Pointer; + using SrcSampleType = AudioData::Pointer; DstSampleType dstData (audioBuffer.getWritePointer (i)); SrcSampleType srcData (srcInterleaved + i, audioBuffer.getNumChannels()); @@ -185,8 +185,8 @@ struct BufferHelpers { for (int i = 0; i < audioBuffer.getNumChannels(); ++i) { - typedef AudioData::Pointer DstSampleType; - typedef AudioData::Pointer SrcSampleType; + using DstSampleType = AudioData::Pointer; + using SrcSampleType = AudioData::Pointer; DstSampleType dstData (dstInterleaved + i, audioBuffer.getNumChannels()); SrcSampleType srcData (audioBuffer.getReadPointer (i)); @@ -231,8 +231,8 @@ struct BufferHelpers for (int i = 0; i < audioBuffer.getNumChannels(); ++i) { - typedef AudioData::Pointer DstSampleType; - typedef AudioData::Pointer SrcSampleType; + using DstSampleType = AudioData::Pointer; + using SrcSampleType = AudioData::Pointer; DstSampleType dstData (audioBuffer.getWritePointer (i)); SrcSampleType srcData (srcInterleaved + i, audioBuffer.getNumChannels()); @@ -250,8 +250,8 @@ struct BufferHelpers for (int i = 0; i < audioBuffer.getNumChannels(); ++i) { - typedef AudioData::Pointer DstSampleType; - typedef AudioData::Pointer SrcSampleType; + using DstSampleType = AudioData::Pointer; + using SrcSampleType = AudioData::Pointer; DstSampleType dstData (dstInterleaved + i, audioBuffer.getNumChannels()); SrcSampleType srcData (audioBuffer.getReadPointer (i)); @@ -383,7 +383,7 @@ public: template struct OpenSLQueueRunnerPlayer : OpenSLQueueRunner, SLPlayItf_> { - typedef OpenSLQueueRunner, SLPlayItf_> Base; + using Base = OpenSLQueueRunner, SLPlayItf_>; enum { isPlayer = 1 }; @@ -425,7 +425,7 @@ public: template struct OpenSLQueueRunnerRecorder : OpenSLQueueRunner, SLRecordItf_> { - typedef OpenSLQueueRunner, SLRecordItf_> Base; + using Base = OpenSLQueueRunner, SLRecordItf_>; enum { isPlayer = 0 }; @@ -586,7 +586,7 @@ public: int numBuffersToUse); //============================================================================== - typedef SLresult (*CreateEngineFunc)(SLObjectItf*,SLuint32,const SLEngineOption*,SLuint32,const SLInterfaceID*,const SLboolean*); + typedef SLresult (*CreateEngineFunc)(SLObjectItf*, SLuint32, const SLEngineOption*, SLuint32, const SLInterfaceID*, const SLboolean*); //============================================================================== int inputChannels, outputChannels; @@ -617,7 +617,7 @@ public: { if (inputChannels > 0) { - recorder = new OpenSLQueueRunnerRecorder(*this, inputChannels); + recorder.reset (new OpenSLQueueRunnerRecorder (*this, inputChannels)); if (! recorder->init()) { @@ -628,7 +628,7 @@ public: if (outputChannels > 0) { - player = new OpenSLQueueRunnerPlayer(*this, outputChannels); + player.reset (new OpenSLQueueRunnerPlayer (*this, outputChannels)); if (! player->init()) { @@ -755,8 +755,8 @@ public: } //============================================================================== - ScopedPointer> player; - ScopedPointer> recorder; + std::unique_ptr> player; + std::unique_ptr> recorder; Atomic guard; jmethodID getUnderrunCount = 0; }; @@ -876,8 +876,8 @@ public: lastError = "Error opening OpenSL input device: the app was not granted android.permission.RECORD_AUDIO"; } - session = OpenSLSession::create (slLibrary, numInputChannels, numOutputChannels, - sampleRate, actualBufferSize, audioBuffersToEnqueue); + session.reset (OpenSLSession::create (slLibrary, numInputChannels, numOutputChannels, + sampleRate, actualBufferSize, audioBuffersToEnqueue)); if (session != nullptr) session->setAudioPreprocessingEnabled (audioProcessingEnabled); else @@ -888,8 +888,8 @@ public: activeInputChans = BigInteger(0); numInputChannels = 0; - session = OpenSLSession::create(slLibrary, numInputChannels, numOutputChannels, - sampleRate, actualBufferSize, audioBuffersToEnqueue); + session.reset (OpenSLSession::create (slLibrary, numInputChannels, numOutputChannels, + sampleRate, actualBufferSize, audioBuffersToEnqueue)); } } @@ -1008,7 +1008,7 @@ private: BigInteger activeOutputChans, activeInputChans; AudioIODeviceCallback* callback; - ScopedPointer session; + std::unique_ptr session; enum { @@ -1122,14 +1122,14 @@ OpenSLAudioIODevice::OpenSLSession* OpenSLAudioIODevice::OpenSLSession::create ( double samleRateToUse, int bufferSizeToUse, int numBuffersToUse) { - ScopedPointer retval; + std::unique_ptr retval; auto sdkVersion = getEnv()->GetStaticIntField (AndroidBuildVersion, AndroidBuildVersion.SDK_INT); // SDK versions 21 and higher should natively support floating point... if (sdkVersion >= 21) { - retval = new OpenSLSessionT (slLibrary, numInputChannels, numOutputChannels, samleRateToUse, - bufferSizeToUse, numBuffersToUse); + retval.reset (new OpenSLSessionT (slLibrary, numInputChannels, numOutputChannels, samleRateToUse, + bufferSizeToUse, numBuffersToUse)); // ...however, some devices lie so re-try without floating point if (retval != nullptr && (! retval->openedOK())) @@ -1138,8 +1138,8 @@ OpenSLAudioIODevice::OpenSLSession* OpenSLAudioIODevice::OpenSLSession::create ( if (retval == nullptr) { - retval = new OpenSLSessionT (slLibrary, numInputChannels, numOutputChannels, samleRateToUse, - bufferSizeToUse, numBuffersToUse); + retval.reset (new OpenSLSessionT (slLibrary, numInputChannels, numOutputChannels, samleRateToUse, + bufferSizeToUse, numBuffersToUse)); if (retval != nullptr && (! retval->openedOK())) retval = nullptr; @@ -1165,11 +1165,11 @@ public: AudioIODevice* createDevice (const String& outputDeviceName, const String& inputDeviceName) override { - ScopedPointer dev; + std::unique_ptr dev; if (outputDeviceName.isNotEmpty() || inputDeviceName.isNotEmpty()) - dev = new OpenSLAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName - : inputDeviceName); + dev.reset (new OpenSLAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName + : inputDeviceName)); return dev.release(); } @@ -1363,7 +1363,7 @@ private: pthread_t juce_createRealtimeAudioThread (void* (*entry) (void*), void* userPtr) { - ScopedPointer thread (new SLRealtimeThread); + std::unique_ptr thread (new SLRealtimeThread); if (! thread->isOK()) return 0; diff --git a/modules/juce_audio_devices/native/juce_ios_Audio.cpp b/modules/juce_audio_devices/native/juce_ios_Audio.cpp index e5d105ad..23d8d4ff 100644 --- a/modules/juce_audio_devices/native/juce_ios_Audio.cpp +++ b/modules/juce_audio_devices/native/juce_ios_Audio.cpp @@ -969,6 +969,18 @@ struct iOSAudioIODevice::Pimpl : public AudioPlayHead, dispatchAudioUnitPropertyChange, this); jassert (err == noErr); + + AudioOutputUnitMIDICallbacks midiCallbacks; + midiCallbacks.userData = this; + midiCallbacks.MIDIEventProc = midiEventCallback; + midiCallbacks.MIDISysExProc = midiSysExCallback; + err = AudioUnitSetProperty (audioUnit, + kAudioOutputUnitProperty_MIDICallbacks, + kAudioUnitScope_Global, + 0, + &midiCallbacks, + sizeof (midiCallbacks)); + jassert (err == noErr); #endif if (channelData.areInputChannelsAvailable()) @@ -1125,10 +1137,9 @@ struct iOSAudioIODevice::Pimpl : public AudioPlayHead, static_cast (data)->handleAudioUnitPropertyChange (unit, propertyID, scope, element); } - void handleMidiMessage (MidiMessage msg) + static double getTimestampForMIDI() { - if (messageCollector != nullptr) - messageCollector->addMessageToQueue (msg); + return Time::getMillisecondCounter() / 1000.0; } static void midiEventCallback (void *client, UInt32 status, UInt32 data1, UInt32 data2, UInt32) @@ -1136,7 +1147,18 @@ struct iOSAudioIODevice::Pimpl : public AudioPlayHead, return static_cast (client)->handleMidiMessage (MidiMessage ((int) status, (int) data1, (int) data2, - Time::getMillisecondCounter() / 1000.0)); + getTimestampForMIDI())); + } + + static void midiSysExCallback (void *client, const UInt8 *data, UInt32 length) + { + return static_cast (client)->handleMidiMessage (MidiMessage (data, (int) length, getTimestampForMIDI())); + } + + void handleMidiMessage (MidiMessage msg) + { + if (messageCollector != nullptr) + messageCollector->addMessageToQueue (msg); } struct IOChannelData @@ -1231,8 +1253,8 @@ struct iOSAudioIODevice::Pimpl : public AudioPlayHead, void reconfigure (const BigInteger requiredInputChannels, const BigInteger requiredOutputChannels) { - inputs = new IOChannelConfig (true, requiredInputChannels); - outputs = new IOChannelConfig (false, requiredOutputChannels); + inputs .reset (new IOChannelConfig (true, requiredInputChannels)); + outputs.reset (new IOChannelConfig (false, requiredOutputChannels)); audioData.setSize (inputs->numActiveChannels + outputs->numActiveChannels, audioData.getNumSamples()); @@ -1253,8 +1275,8 @@ struct iOSAudioIODevice::Pimpl : public AudioPlayHead, return inputs->areChannelsAccessible && inputs->numActiveChannels > 0; } - ScopedPointer inputs; - ScopedPointer outputs; + std::unique_ptr inputs; + std::unique_ptr outputs; AudioBuffer audioData { 0, 0 }; }; @@ -1350,7 +1372,7 @@ int iOSAudioIODevice::getOutputLatencyInSamples() { return rou int iOSAudioIODevice::getXRunCount() const noexcept { return pimpl->xrun; } void iOSAudioIODevice::setMidiMessageCollector (MidiMessageCollector* collector) { pimpl->messageCollector = collector; } -AudioPlayHead* iOSAudioIODevice::getAudioPlayHead() const { return pimpl; } +AudioPlayHead* iOSAudioIODevice::getAudioPlayHead() const { return pimpl.get(); } bool iOSAudioIODevice::isInterAppAudioConnected() const { return pimpl->interAppAudioConnected; } #if JUCE_MODULE_AVAILABLE_juce_graphics diff --git a/modules/juce_audio_devices/native/juce_ios_Audio.h b/modules/juce_audio_devices/native/juce_ios_Audio.h index 8f50e9e3..e3f86943 100644 --- a/modules/juce_audio_devices/native/juce_ios_Audio.h +++ b/modules/juce_audio_devices/native/juce_ios_Audio.h @@ -85,7 +85,7 @@ private: struct Pimpl; friend struct Pimpl; - ScopedPointer pimpl; + std::unique_ptr pimpl; JUCE_DECLARE_NON_COPYABLE (iOSAudioIODevice) }; diff --git a/modules/juce_audio_devices/native/juce_linux_ALSA.cpp b/modules/juce_audio_devices/native/juce_linux_ALSA.cpp index 3b9a11a1..b971afc7 100644 --- a/modules/juce_audio_devices/native/juce_linux_ALSA.cpp +++ b/modules/juce_audio_devices/native/juce_linux_ALSA.cpp @@ -58,7 +58,7 @@ static void getDeviceSampleRates (snd_pcm_t* handle, Array& rates) for (int i = 0; ratesToTry[i] != 0; ++i) { if (snd_pcm_hw_params_any (handle, hwParams) >= 0 - && snd_pcm_hw_params_test_rate (handle, hwParams, (unsigned int) ratesToTry[i], 0) == 0) + && snd_pcm_hw_params_test_rate (handle, hwParams, (unsigned int) ratesToTry[i], 0) == 0) { rates.addIfNotAlreadyThere ((double) ratesToTry[i]); } @@ -240,12 +240,12 @@ public: const int type = formatsToTry [i + 1]; bitDepth = type & 255; - converter = createConverter (isInput, bitDepth, - (type & isFloatBit) != 0, - (type & isLittleEndianBit) != 0, - (type & onlyUseLower24Bits) != 0, - numChannels, - isInterleaved); + converter.reset (createConverter (isInput, bitDepth, + (type & isFloatBit) != 0, + (type & isLittleEndianBit) != 0, + (type & onlyUseLower24Bits) != 0, + numChannels, + isInterleaved)); break; } } @@ -358,7 +358,7 @@ public: scratch.ensureSize ((size_t) ((int) sizeof (float) * numSamples * numChannelsRunning), false); scratch.fillWith (0); // (not clearing this data causes warnings in valgrind) - snd_pcm_sframes_t num = snd_pcm_readi (handle, scratch.getData(), (snd_pcm_uframes_t) numSamples); + auto num = snd_pcm_readi (handle, scratch.getData(), (snd_pcm_uframes_t) numSamples); if (num < 0) { @@ -378,7 +378,7 @@ public: } else { - snd_pcm_sframes_t num = snd_pcm_readn (handle, (void**) data, (snd_pcm_uframes_t) numSamples); + auto num = snd_pcm_readn (handle, (void**) data, (snd_pcm_uframes_t) numSamples); if (num < 0) { @@ -411,7 +411,7 @@ private: const bool isInput; bool isInterleaved; MemoryBlock scratch; - ScopedPointer converter; + std::unique_ptr converter; //============================================================================== template @@ -431,7 +431,7 @@ private: { if (forInput) { - typedef AudioData::Pointer DestType; + using DestType = AudioData::Pointer ; if (isLittleEndian) return new AudioData::ConverterInstance , DestType> (numInterleavedChannels, 1); @@ -439,7 +439,7 @@ private: return new AudioData::ConverterInstance , DestType> (numInterleavedChannels, 1); } - typedef AudioData::Pointer SourceType; + using SourceType = AudioData::Pointer ; if (isLittleEndian) return new AudioData::ConverterInstance > (1, numInterleavedChannels); @@ -488,17 +488,8 @@ class ALSAThread : public Thread public: ALSAThread (const String& inputDeviceID, const String& outputDeviceID) : Thread ("JUCE ALSA"), - sampleRate (0), - bufferSize (0), - outputLatency (0), - inputLatency (0), - callback (0), inputId (inputDeviceID), - outputId (outputDeviceID), - numCallbacks (0), - audioIoInProgress (false), - inputChannelBuffer (1, 1), - outputChannelBuffer (1, 1) + outputId (outputDeviceID) { initialiseRatesAndChannels(); } @@ -510,8 +501,8 @@ public: void open (BigInteger inputChannels, BigInteger outputChannels, - const double newSampleRate, - const int newBufferSize) + double newSampleRate, + int newBufferSize) { close(); @@ -549,6 +540,35 @@ public: outputChannelDataForCallback.clear(); currentOutputChans.clear(); + // Note that the input device is opened before an output, because we've heard + // of drivers where doing it in the reverse order mysteriously fails.. If this + // order also causes problems, let us know and we'll see if we can find a compromise! + + if (inputChannelDataForCallback.size() > 0 && inputId.isNotEmpty()) + { + inputDevice.reset (new ALSADevice (inputId, true)); + + if (inputDevice->error.isNotEmpty()) + { + error = inputDevice->error; + inputDevice.reset(); + return; + } + + ensureMinimumNumBitsSet (currentInputChans, (int) minChansIn); + + if (! inputDevice->setParameters ((unsigned int) sampleRate, + jlimit ((int) minChansIn, (int) maxChansIn, currentInputChans.getHighestBit() + 1), + bufferSize)) + { + error = inputDevice->error; + inputDevice.reset(); + return; + } + + inputLatency = inputDevice->latency; + } + if (outputChannels.getHighestBit() >= 0) { for (int i = 0; i < maxOutputsRequested; ++i) @@ -563,12 +583,12 @@ public: if (outputChannelDataForCallback.size() > 0 && outputId.isNotEmpty()) { - outputDevice = new ALSADevice (outputId, false); + outputDevice.reset (new ALSADevice (outputId, false)); if (outputDevice->error.isNotEmpty()) { error = outputDevice->error; - outputDevice = nullptr; + outputDevice.reset(); return; } @@ -578,38 +598,13 @@ public: bufferSize)) { error = outputDevice->error; - outputDevice = nullptr; + outputDevice.reset(); return; } outputLatency = outputDevice->latency; } - if (inputChannelDataForCallback.size() > 0 && inputId.isNotEmpty()) - { - inputDevice = new ALSADevice (inputId, true); - - if (inputDevice->error.isNotEmpty()) - { - error = inputDevice->error; - inputDevice = nullptr; - return; - } - - ensureMinimumNumBitsSet (currentInputChans, (int) minChansIn); - - if (! inputDevice->setParameters ((unsigned int) sampleRate, - jlimit ((int) minChansIn, (int) maxChansIn, currentInputChans.getHighestBit() + 1), - bufferSize)) - { - error = inputDevice->error; - inputDevice = nullptr; - return; - } - - inputLatency = inputDevice->latency; - } - if (outputDevice == nullptr && inputDevice == nullptr) { error = "no channels"; @@ -664,8 +659,8 @@ public: stopThread (6000); - inputDevice = nullptr; - outputDevice = nullptr; + inputDevice.reset(); + outputDevice.reset(); inputChannelBuffer.setSize (1, 1); outputChannelBuffer.setSize (1, 1); @@ -692,7 +687,7 @@ public: if (threadShouldExit()) break; - snd_pcm_sframes_t avail = snd_pcm_avail_update (inputDevice->handle); + auto avail = snd_pcm_avail_update (inputDevice->handle); if (avail < 0) JUCE_ALSA_FAILED (snd_pcm_recover (inputDevice->handle, (int) avail, 0)); @@ -738,7 +733,7 @@ public: if (threadShouldExit()) break; - snd_pcm_sframes_t avail = snd_pcm_avail_update (outputDevice->handle); + auto avail = snd_pcm_avail_update (outputDevice->handle); if (avail < 0) JUCE_ALSA_FAILED (snd_pcm_recover (outputDevice->handle, (int) avail, 0)); @@ -784,20 +779,20 @@ public: //============================================================================== String error; - double sampleRate; - int bufferSize, outputLatency, inputLatency; + double sampleRate = 0; + int bufferSize = 0, outputLatency = 0, inputLatency = 0; BigInteger currentInputChans, currentOutputChans; Array sampleRates; StringArray channelNamesOut, channelNamesIn; - AudioIODeviceCallback* callback; + AudioIODeviceCallback* callback = nullptr; private: //============================================================================== const String inputId, outputId; - ScopedPointer outputDevice, inputDevice; - int numCallbacks; - bool audioIoInProgress; + std::unique_ptr outputDevice, inputDevice; + int numCallbacks = 0; + bool audioIoInProgress = false; CriticalSection callbackLock; @@ -805,8 +800,8 @@ private: Array inputChannelDataForCallback; Array outputChannelDataForCallback; - unsigned int minChansOut, maxChansOut; - unsigned int minChansIn, maxChansIn; + unsigned int minChansOut = 0, maxChansOut = 0; + unsigned int minChansIn = 0, maxChansIn = 0; bool failed (const int errorNum) { @@ -854,8 +849,6 @@ public: : AudioIODevice (deviceName, deviceTypeName), inputId (inputDeviceID), outputId (outputDeviceID), - isOpen_ (false), - isStarted (false), internal (inputDeviceID, outputDeviceID) { } @@ -958,7 +951,7 @@ public: void stop() override { - AudioIODeviceCallback* const oldCallback = internal.callback; + auto oldCallback = internal.callback; start (nullptr); @@ -969,7 +962,7 @@ public: String inputId, outputId; private: - bool isOpen_, isStarted; + bool isOpen_ = false, isStarted = false; ALSAThread internal; }; @@ -1030,7 +1023,7 @@ public: { jassert (hasScanned); // need to call scanForDevices() before doing this - const int idx = (forInput ? inputIds : outputIds).indexOf ("default"); + auto idx = (forInput ? inputIds : outputIds).indexOf ("default"); return idx >= 0 ? idx : 0; } @@ -1052,8 +1045,8 @@ public: { jassert (hasScanned); // need to call scanForDevices() before doing this - const int inputIndex = inputNames.indexOf (inputDeviceName); - const int outputIndex = outputNames.indexOf (outputDeviceName); + auto inputIndex = inputNames.indexOf (inputDeviceName); + auto outputIndex = outputNames.indexOf (outputDeviceName); String deviceName (outputIndex >= 0 ? outputDeviceName : inputDeviceName); @@ -1069,7 +1062,8 @@ public: private: //============================================================================== StringArray inputNames, outputNames, inputIds, outputIds; - bool hasScanned = false, listOnlySoundcards; + bool hasScanned = false; + const bool listOnlySoundcards; bool testDevice (const String& id, const String& outputName, const String& inputName) { @@ -1264,7 +1258,7 @@ private: testDevice ("pulse", "Pulseaudio output", "Pulseaudio input"); // make sure the default device is listed first, and followed by the pulse device (if present) - int idx = outputIds.indexOf ("pulse"); + auto idx = outputIds.indexOf ("pulse"); outputIds.move (idx, 0); outputNames.move (idx, 0); @@ -1283,8 +1277,8 @@ private: static String hintToString (const void* hints, const char* type) { - char* const hint = snd_device_name_get_hint (hints, type); - const String s (String::fromUTF8 (hint)); + char* hint = snd_device_name_get_hint (hints, type); + auto s = String::fromUTF8 (hint); ::free (hint); return s; } diff --git a/modules/juce_audio_devices/native/juce_linux_Midi.cpp b/modules/juce_audio_devices/native/juce_linux_Midi.cpp index eeecf9ce..289bb414 100644 --- a/modules/juce_audio_devices/native/juce_linux_Midi.cpp +++ b/modules/juce_audio_devices/native/juce_linux_Midi.cpp @@ -35,24 +35,17 @@ namespace { //============================================================================== -class AlsaClient : public ReferenceCountedObject +class AlsaClient : public ReferenceCountedObject { public: - typedef ReferenceCountedObjectPtr Ptr; + using Ptr = ReferenceCountedObjectPtr; //============================================================================== // represents an input or output port of the supplied AlsaClient - class Port + struct Port { - public: Port (AlsaClient& c, bool forInput) noexcept - : portId (-1), - callbackEnabled (false), - client (c), - isInput (forInput), - callback (nullptr), - maxEventSize (4 * 1024), - midiInput (nullptr) + : client (c), isInput (forInput) {} ~Port() @@ -81,10 +74,9 @@ public: return client.get() != nullptr && portId >= 0; } - void setupInput(MidiInput* input, MidiInputCallback* cb) + void setupInput (MidiInput* input, MidiInputCallback* cb) { - jassert (cb && input); - + jassert (cb != nullptr && input != nullptr); callback = cb; midiInput = input; } @@ -92,7 +84,6 @@ public: void setupOutput() { jassert (! isInput); - snd_midi_event_new ((size_t) maxEventSize, &midiParser); } @@ -121,15 +112,15 @@ public: snd_seq_event_t event; snd_seq_ev_clear (&event); - long numBytes = (long) message.getRawDataSize(); + auto numBytes = (long) message.getRawDataSize(); const uint8* data = message.getRawData(); - snd_seq_t* seqHandle = client.get(); + auto* seqHandle = client.get(); bool success = true; while (numBytes > 0) { - const long numSent = snd_midi_event_encode (midiParser, data, numBytes, &event); + auto numSent = snd_midi_event_encode (midiParser, data, numBytes, &event); if (numSent <= 0) { @@ -161,22 +152,9 @@ public: return portId != -1 && portId == lhs.portId; } - int portId; - bool callbackEnabled; - - private: - friend class AlsaClient; - - AlsaClient& client; - bool isInput; - MidiInputCallback* callback; - snd_midi_event_t* midiParser; - int maxEventSize; - MidiInput* midiInput; - void createPort (const String& name, bool enableSubscription) { - if (snd_seq_t* seqHandle = client.get()) + if (auto* seqHandle = client.get()) { const unsigned int caps = isInput @@ -197,6 +175,15 @@ public: { callback->handlePartialSysexMessage (midiInput, messageData, numBytesSoFar, timeStamp); } + + AlsaClient& client; + MidiInputCallback* callback = nullptr; + snd_midi_event_t* midiParser = nullptr; + MidiInput* midiInput = nullptr; + int maxEventSize = 4096; + int portId = -1; + bool callbackEnabled = false; + bool isInput = false; }; static Ptr getInstance() @@ -210,23 +197,23 @@ public: void registerCallback() { if (inputThread == nullptr) - inputThread = new MidiInputThread (*this); + inputThread.reset (new MidiInputThread (*this)); - if (++activeCallbacks - 1 == 0) + if (++activeCallbacks == 1) inputThread->startThread(); } void unregisterCallback() { jassert (activeCallbacks.get() > 0); + if (--activeCallbacks == 0 && inputThread->isThreadRunning()) inputThread->signalThreadShouldExit(); } void handleIncomingMidiMessage (snd_seq_event* event, const MidiMessage& message) { - if (event->dest.port < ports.size() - && ports[event->dest.port]->callbackEnabled) + if (event->dest.port < ports.size() && ports[event->dest.port]->callbackEnabled) ports[event->dest.port]->handleIncomingMidiMessage (message); } @@ -242,7 +229,7 @@ public: Port* createPort (const String& name, bool forInput, bool enableSubscription) { - Port* port = new Port (*this, forInput); + auto port = new Port (*this, forInput); port->createPort (name, enableSubscription); ports.set (port->portId, port); incReferenceCount(); @@ -256,8 +243,8 @@ public: } private: - snd_seq_t* handle; - int clientId; + snd_seq_t* handle = nullptr; + int clientId = 0; OwnedArray ports; Atomic activeCallbacks; CriticalSection callbackLock; @@ -269,8 +256,6 @@ private: friend struct ContainerDeletePolicy; AlsaClient() - : handle (nullptr), - inputThread (nullptr) { jassert (instance == nullptr); @@ -303,7 +288,7 @@ private: { public: MidiInputThread (AlsaClient& c) - : Thread ("JUCE MIDI Input"), client (c), concatenator (2048) + : Thread ("JUCE MIDI Input"), client (c) { jassert (client.get() != nullptr); } @@ -358,10 +343,10 @@ private: private: AlsaClient& client; - MidiDataConcatenator concatenator; + MidiDataConcatenator concatenator { 2048 }; }; - ScopedPointer inputThread; + std::unique_ptr inputThread; }; AlsaClient* AlsaClient::instance = nullptr; @@ -369,9 +354,9 @@ AlsaClient* AlsaClient::instance = nullptr; //============================================================================== static AlsaClient::Port* iterateMidiClient (const AlsaClient::Ptr& client, snd_seq_client_info_t* clientInfo, - const bool forInput, + bool forInput, StringArray& deviceNamesFound, - const int deviceIndexToOpen) + int deviceIndexToOpen) { AlsaClient::Port* port = nullptr; @@ -380,8 +365,8 @@ static AlsaClient::Port* iterateMidiClient (const AlsaClient::Ptr& client, snd_seq_port_info_alloca (&portInfo); jassert (portInfo); - int numPorts = snd_seq_client_info_get_num_ports (clientInfo); - const int sourceClient = snd_seq_client_info_get_client (clientInfo); + auto numPorts = snd_seq_client_info_get_num_ports (clientInfo); + auto sourceClient = snd_seq_client_info_get_client (clientInfo); snd_seq_port_info_set_client (portInfo, sourceClient); snd_seq_port_info_set_port (portInfo, -1); @@ -392,13 +377,14 @@ static AlsaClient::Port* iterateMidiClient (const AlsaClient::Ptr& client, && (snd_seq_port_info_get_capability (portInfo) & (forInput ? SND_SEQ_PORT_CAP_SUBS_READ : SND_SEQ_PORT_CAP_SUBS_WRITE)) != 0) { - const String portName = snd_seq_port_info_get_name(portInfo); + String portName = snd_seq_port_info_get_name(portInfo); deviceNamesFound.add (portName); if (deviceNamesFound.size() == deviceIndexToOpen + 1) { - const int sourcePort = snd_seq_port_info_get_port (portInfo); + auto sourcePort = snd_seq_port_info_get_port (portInfo); + if (sourcePort != -1) { port = client->createPort (portName, forInput, false); @@ -413,37 +399,39 @@ static AlsaClient::Port* iterateMidiClient (const AlsaClient::Ptr& client, return port; } -static AlsaClient::Port* iterateMidiDevices (const bool forInput, +static AlsaClient::Port* iterateMidiDevices (bool forInput, StringArray& deviceNamesFound, - const int deviceIndexToOpen) + int deviceIndexToOpen) { AlsaClient::Port* port = nullptr; - const AlsaClient::Ptr client (AlsaClient::getInstance()); + auto client = AlsaClient::getInstance(); - if (snd_seq_t* const seqHandle = client->get()) + if (auto* seqHandle = client->get()) { snd_seq_system_info_t* systemInfo = nullptr; snd_seq_client_info_t* clientInfo = nullptr; snd_seq_system_info_alloca (&systemInfo); - jassert(systemInfo); + jassert (systemInfo != nullptr); + if (snd_seq_system_info (seqHandle, systemInfo) == 0) { snd_seq_client_info_alloca (&clientInfo); - jassert(clientInfo); - int numClients = snd_seq_system_info_get_cur_clients (systemInfo); + jassert (clientInfo != nullptr); + + auto numClients = snd_seq_system_info_get_cur_clients (systemInfo); while (--numClients >= 0) { if (snd_seq_query_next_client (seqHandle, clientInfo) == 0) { - const int sourceClient = snd_seq_client_info_get_client (clientInfo); - if (sourceClient != client->getId() - && sourceClient != SND_SEQ_CLIENT_SYSTEM) + auto sourceClient = snd_seq_client_info_get_client (clientInfo); + + if (sourceClient != client->getId() && sourceClient != SND_SEQ_CLIENT_SYSTEM) { port = iterateMidiClient (client, clientInfo, forInput, deviceNamesFound, deviceIndexToOpen); - if (port) + if (port != nullptr) break; } } @@ -475,7 +463,7 @@ MidiOutput* MidiOutput::openDevice (int deviceIndex) MidiOutput* newDevice = nullptr; StringArray devices; - AlsaClient::Port* port = iterateMidiDevices (false, devices, deviceIndex); + auto* port = iterateMidiDevices (false, devices, deviceIndex); if (port == nullptr) return nullptr; @@ -492,12 +480,9 @@ MidiOutput* MidiOutput::openDevice (int deviceIndex) MidiOutput* MidiOutput::createNewDevice (const String& deviceName) { MidiOutput* newDevice = nullptr; - - const AlsaClient::Ptr client (AlsaClient::getInstance()); - - AlsaClient::Port* port = client->createPort (deviceName, false, true); - - jassert (port->isValid()); + auto client = AlsaClient::getInstance(); + auto* port = client->createPort (deviceName, false, true); + jassert (port != nullptr && port->isValid()); newDevice = new MidiOutput (deviceName); port->setupOutput(); @@ -509,9 +494,7 @@ MidiOutput* MidiOutput::createNewDevice (const String& deviceName) MidiOutput::~MidiOutput() { stopBackgroundThread(); - - AlsaClient::Ptr client (AlsaClient::getInstance()); - client->deletePort (static_cast (internal)); + AlsaClient::getInstance()->deletePort (static_cast (internal)); } void MidiOutput::sendMessageNow (const MidiMessage& message) @@ -528,8 +511,7 @@ MidiInput::MidiInput (const String& nm) MidiInput::~MidiInput() { stop(); - AlsaClient::Ptr client (AlsaClient::getInstance()); - client->deletePort (static_cast (internal)); + AlsaClient::getInstance()->deletePort (static_cast (internal)); } void MidiInput::start() @@ -559,7 +541,7 @@ MidiInput* MidiInput::openDevice (int deviceIndex, MidiInputCallback* callback) MidiInput* newDevice = nullptr; StringArray devices; - AlsaClient::Port* port = iterateMidiDevices (true, devices, deviceIndex); + auto* port = iterateMidiDevices (true, devices, deviceIndex); if (port == nullptr) return nullptr; @@ -577,9 +559,8 @@ MidiInput* MidiInput::createNewDevice (const String& deviceName, MidiInputCallba { MidiInput* newDevice = nullptr; - AlsaClient::Ptr client (AlsaClient::getInstance()); - - AlsaClient::Port* port = client->createPort (deviceName, true, true); + auto client = AlsaClient::getInstance(); + auto* port = client->createPort (deviceName, true, true); jassert (port->isValid()); diff --git a/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp b/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp index acb6d13c..e08b170b 100644 --- a/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp +++ b/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp @@ -1145,7 +1145,7 @@ public: int inputIndex, outputIndex; private: - ScopedPointer internal; + std::unique_ptr internal; bool isOpen_, isStarted; String lastError; AudioIODeviceCallback* previousCallback = nullptr; @@ -1972,7 +1972,7 @@ private: void audioDeviceError (const String& errorMessage) override { owner.handleAudioDeviceError (errorMessage); } AudioIODeviceCombiner& owner; - ScopedPointer device; + std::unique_ptr device; int inputIndex = 0, numInputChans = 0, outputIndex = 0, numOutputChans = 0; bool useInputs = false, useOutputs = false; AbstractFifo inputFifo { 32 }, outputFifo { 32 }; @@ -2157,7 +2157,7 @@ public: if (inputDeviceID == outputDeviceID) return new CoreAudioIODevice (*this, combinedName, inputDeviceID, inputIndex, outputDeviceID, outputIndex); - ScopedPointer in, out; + std::unique_ptr in, out; if (inputDeviceID != 0) in.reset (new CoreAudioIODevice (*this, inputDeviceName, inputDeviceID, inputIndex, 0, -1)); @@ -2168,7 +2168,7 @@ public: if (in == nullptr) return out.release(); if (out == nullptr) return in.release(); - ScopedPointer combo (new AudioIODeviceCombiner (combinedName, *this)); + std::unique_ptr combo (new AudioIODeviceCombiner (combinedName, *this)); combo->addDevice (in.release(), true, false); combo->addDevice (out.release(), false, true); return combo.release(); diff --git a/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp b/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp index a0c7ea7f..f285b0c2 100644 --- a/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp +++ b/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp @@ -29,7 +29,7 @@ namespace juce namespace CoreMidiHelpers { - static bool checkError (const OSStatus err, const int lineNum) + static bool checkError (OSStatus err, int lineNum) { if (err == noErr) return true; @@ -48,10 +48,10 @@ namespace CoreMidiHelpers //============================================================================== struct ScopedCFString { - ScopedCFString() noexcept : cfString (nullptr) {} + ScopedCFString() noexcept {} ~ScopedCFString() noexcept { if (cfString != nullptr) CFRelease (cfString); } - CFStringRef cfString; + CFStringRef cfString = {}; }; static String getMidiObjectName (MIDIObjectRef entity) @@ -87,7 +87,7 @@ namespace CoreMidiHelpers static String getEndpointName (MIDIEndpointRef endpoint, bool isExternal) { - String result (getMidiObjectName (endpoint)); + auto result = getMidiObjectName (endpoint); MIDIEntityRef entity = 0; // NB: don't attempt to use nullptr for refs - it fails in some types of build. MIDIEndpointGetEntity (endpoint, &entity); @@ -104,7 +104,7 @@ namespace CoreMidiHelpers if (device != 0) { - const String deviceName (getMidiObjectName (device)); + auto deviceName = getMidiObjectName (device); if (deviceName.isNotEmpty()) { @@ -141,14 +141,14 @@ namespace CoreMidiHelpers if (numConnections > 0) { - const SInt32* pid = reinterpret_cast (CFDataGetBytePtr (connections)); + auto pid = reinterpret_cast (CFDataGetBytePtr (connections)); for (int i = 0; i < numConnections; ++i, ++pid) { - MIDIUniqueID uid = (MIDIUniqueID) ByteOrder::swapIfLittleEndian ((uint32) *pid); + auto uid = (MIDIUniqueID) ByteOrder::swapIfLittleEndian ((uint32) *pid); MIDIObjectRef connObject; MIDIObjectType connObjectType; - OSStatus err = MIDIObjectFindByUniqueID (uid, &connObject, &connObjectType); + auto err = MIDIObjectFindByUniqueID (uid, &connObject, &connObjectType); if (err == noErr) { @@ -192,11 +192,12 @@ namespace CoreMidiHelpers #if defined (JucePlugin_CFBundleIdentifier) portUniqueId = JUCE_STRINGIFY (JucePlugin_CFBundleIdentifier); #else - File appBundle (File::getSpecialLocation (File::currentApplicationFile)); - CFURLRef bundleURL = CFURLCreateWithFileSystemPath (kCFAllocatorDefault, appBundle.getFullPathName().toCFString(), kCFURLPOSIXPathStyle, true); - if (bundleURL != nullptr) + auto appBundle = File::getSpecialLocation (File::currentApplicationFile); + + if (auto bundleURL = CFURLCreateWithFileSystemPath (kCFAllocatorDefault, appBundle.getFullPathName().toCFString(), + kCFURLPOSIXPathStyle, true)) { - CFBundleRef bundleRef = CFBundleCreate (kCFAllocatorDefault, bundleURL); + auto bundleRef = CFBundleCreate (kCFAllocatorDefault, bundleURL); CFRelease (bundleURL); if (bundleRef != nullptr) @@ -211,31 +212,30 @@ namespace CoreMidiHelpers if (portUniqueId.isNotEmpty()) { - portUniqueId += (String ("." + portName + String (isInput ? ".input" : ".output"))); + portUniqueId += "." + portName + (isInput ? ".input" : ".output"); CHECK_ERROR (MIDIObjectSetStringProperty (device, kMIDIPropertyUniqueID, portUniqueId.toCFString())); } } - static StringArray findDevices (const bool forInput) + static StringArray findDevices (bool forInput) { // It seems that OSX can be a bit picky about the thread that's first used to // search for devices. It's safest to use the message thread for calling this. jassert (MessageManager::getInstance()->isThisTheMessageThread()); + StringArray s; enableSimulatorMidiSession(); - const ItemCount num = forInput ? MIDIGetNumberOfSources() - : MIDIGetNumberOfDestinations(); - StringArray s; + auto num = forInput ? MIDIGetNumberOfSources() + : MIDIGetNumberOfDestinations(); for (ItemCount i = 0; i < num; ++i) { - MIDIEndpointRef dest = forInput ? MIDIGetSource (i) - : MIDIGetDestination (i); String name; - if (dest != 0) + if (auto dest = forInput ? MIDIGetSource (i) + : MIDIGetDestination (i)) name = getConnectedEndpointName (dest); if (name.isEmpty()) @@ -298,7 +298,7 @@ namespace CoreMidiHelpers MIDIEndpointDispose (endPoint); } - void send (const MIDIPacketList* const packets) noexcept + void send (const MIDIPacketList* packets) noexcept { if (port != 0) MIDISend (port, endPoint, packets); @@ -311,16 +311,13 @@ namespace CoreMidiHelpers }; //============================================================================== - class MidiPortAndCallback; + struct MidiPortAndCallback; CriticalSection callbackLock; Array activeCallbacks; - class MidiPortAndCallback + struct MidiPortAndCallback { - public: - MidiPortAndCallback (MidiInputCallback& cb) : callback (cb) - { - } + MidiPortAndCallback (MidiInputCallback& cb) : callback (cb) {} ~MidiPortAndCallback() { @@ -335,7 +332,7 @@ namespace CoreMidiHelpers CHECK_ERROR (MIDIPortDisconnectSource (portAndEndpoint->port, portAndEndpoint->endPoint)); } - void handlePackets (const MIDIPacketList* const pktlist) + void handlePackets (const MIDIPacketList* pktlist) { auto time = Time::getMillisecondCounterHiRes() * 0.001; @@ -356,8 +353,8 @@ namespace CoreMidiHelpers } MidiInput* input = nullptr; - ScopedPointer portAndEndpoint; - volatile bool active = false; + std::unique_ptr portAndEndpoint; + std::atomic active { false }; private: MidiInputCallback& callback; @@ -380,15 +377,15 @@ MidiOutput* MidiOutput::openDevice (int index) if (isPositiveAndBelow (index, MIDIGetNumberOfDestinations())) { - MIDIEndpointRef endPoint = MIDIGetDestination ((ItemCount) index); + auto endPoint = MIDIGetDestination ((ItemCount) index); CoreMidiHelpers::ScopedCFString pname; if (CHECK_ERROR (MIDIObjectGetStringProperty (endPoint, kMIDIPropertyName, &pname.cfString))) { - MIDIClientRef client = CoreMidiHelpers::getGlobalMidiClient(); + auto client = CoreMidiHelpers::getGlobalMidiClient(); MIDIPortRef port; - String deviceName = CoreMidiHelpers::getConnectedEndpointName (endPoint); + auto deviceName = CoreMidiHelpers::getConnectedEndpointName (endPoint); if (client != 0 && CHECK_ERROR (MIDIOutputPortCreate (client, pname.cfString, &port))) { @@ -413,7 +410,7 @@ MidiOutput* MidiOutput::createNewDevice (const String& deviceName) { CoreMidiHelpers::setUniqueIdForMidiPort (endPoint, deviceName, false); - MidiOutput* mo = new MidiOutput (deviceName); + auto mo = new MidiOutput (deviceName); mo->internal = new CoreMidiHelpers::MidiPortAndEndpoint (0, endPoint); return mo; } @@ -438,8 +435,8 @@ void MidiOutput::sendMessageNow (const MidiMessage& message) HeapBlock allocatedPackets; MIDIPacketList stackPacket; - MIDIPacketList* packetToSend = &stackPacket; - const size_t dataSize = (size_t) message.getRawDataSize(); + auto* packetToSend = &stackPacket; + auto dataSize = (size_t) message.getRawDataSize(); if (message.isSysEx()) { @@ -450,7 +447,7 @@ void MidiOutput::sendMessageNow (const MidiMessage& message) packetToSend = allocatedPackets; packetToSend->numPackets = (UInt32) numPackets; - MIDIPacket* p = packetToSend->packet; + auto* p = packetToSend->packet; for (int i = 0; i < numPackets; ++i) { @@ -464,7 +461,7 @@ void MidiOutput::sendMessageNow (const MidiMessage& message) } else if (dataSize < 65536) // max packet size { - const size_t stackCapacity = sizeof (stackPacket.packet->data); + auto stackCapacity = sizeof (stackPacket.packet->data); if (dataSize > stackCapacity) { @@ -473,7 +470,7 @@ void MidiOutput::sendMessageNow (const MidiMessage& message) } packetToSend->numPackets = 1; - MIDIPacket& p = *(packetToSend->packet); + auto& p = *(packetToSend->packet); p.timeStamp = timeStamp; p.length = (UInt16) dataSize; memcpy (p.data, message.getRawData(), dataSize); @@ -500,16 +497,16 @@ MidiInput* MidiInput::openDevice (int index, MidiInputCallback* callback) if (isPositiveAndBelow (index, MIDIGetNumberOfSources())) { - if (MIDIEndpointRef endPoint = MIDIGetSource ((ItemCount) index)) + if (auto endPoint = MIDIGetSource ((ItemCount) index)) { ScopedCFString name; if (CHECK_ERROR (MIDIObjectGetStringProperty (endPoint, kMIDIPropertyName, &name.cfString))) { - if (MIDIClientRef client = getGlobalMidiClient()) + if (auto client = getGlobalMidiClient()) { MIDIPortRef port; - ScopedPointer mpc (new MidiPortAndCallback (*callback)); + std::unique_ptr mpc (new MidiPortAndCallback (*callback)); if (CHECK_ERROR (MIDIInputPortCreate (client, name.cfString, midiInputProc, mpc.get(), &port))) { @@ -540,13 +537,11 @@ MidiInput* MidiInput::openDevice (int index, MidiInputCallback* callback) MidiInput* MidiInput::createNewDevice (const String& deviceName, MidiInputCallback* callback) { jassert (callback != nullptr); - using namespace CoreMidiHelpers; - MidiInput* mi = nullptr; - if (MIDIClientRef client = getGlobalMidiClient()) + if (auto client = getGlobalMidiClient()) { - ScopedPointer mpc (new MidiPortAndCallback (*callback)); + std::unique_ptr mpc (new MidiPortAndCallback (*callback)); mpc->active = false; MIDIEndpointRef endPoint; @@ -555,20 +550,22 @@ MidiInput* MidiInput::createNewDevice (const String& deviceName, MidiInputCallba if (CHECK_ERROR (MIDIDestinationCreate (client, name.cfString, midiInputProc, mpc.get(), &endPoint))) { - CoreMidiHelpers::setUniqueIdForMidiPort (endPoint, deviceName, true); + setUniqueIdForMidiPort (endPoint, deviceName, true); mpc->portAndEndpoint.reset (new MidiPortAndEndpoint (0, endPoint)); - mi = new MidiInput (deviceName); + auto mi = new MidiInput (deviceName); mpc->input = mi; mi->internal = mpc.get(); const ScopedLock sl (callbackLock); activeCallbacks.add (mpc.release()); + + return mi; } } - return mi; + return nullptr; } MidiInput::MidiInput (const String& nm) : name (nm) diff --git a/modules/juce_audio_devices/native/juce_win32_ASIO.cpp b/modules/juce_audio_devices/native/juce_win32_ASIO.cpp index b110de6f..35c357d0 100644 --- a/modules/juce_audio_devices/native/juce_win32_ASIO.cpp +++ b/modules/juce_audio_devices/native/juce_win32_ASIO.cpp @@ -77,11 +77,7 @@ struct ASIOSampleFormat { ASIOSampleFormat() noexcept {} - ASIOSampleFormat (const long type) noexcept - : bitDepth (24), - littleEndian (true), - formatIsFloat (false), - byteStride (4) + ASIOSampleFormat (long type) noexcept { switch (type) { @@ -114,7 +110,7 @@ struct ASIOSampleFormat } } - void convertToFloat (const void* const src, float* const dst, const int samps) const noexcept + void convertToFloat (const void* src, float* dst, int samps) const noexcept { if (formatIsFloat) { @@ -132,7 +128,7 @@ struct ASIOSampleFormat } } - void convertFromFloat (const float* const src, void* const dst, const int samps) const noexcept + void convertFromFloat (const float* src, void* dst, int samps) const noexcept { if (formatIsFloat) { @@ -150,18 +146,18 @@ struct ASIOSampleFormat } } - void clear (void* dst, const int numSamps) noexcept + void clear (void* dst, int numSamps) noexcept { if (dst != nullptr) zeromem (dst, numSamps * byteStride); } - int bitDepth, byteStride; - bool formatIsFloat, littleEndian; + int bitDepth = 24, byteStride = 4; + bool formatIsFloat = false, littleEndian = true; private: - static void convertInt16ToFloat (const char* src, float* dest, const int srcStrideBytes, - int numSamples, const bool littleEndian) noexcept + static void convertInt16ToFloat (const char* src, float* dest, int srcStrideBytes, + int numSamples, bool littleEndian) noexcept { const double g = 1.0 / 32768.0; @@ -183,8 +179,8 @@ private: } } - static void convertFloatToInt16 (const float* src, char* dest, const int dstStrideBytes, - int numSamples, const bool littleEndian) noexcept + static void convertFloatToInt16 (const float* src, char* dest, int dstStrideBytes, + int numSamples, bool littleEndian) noexcept { const double maxVal = (double) 0x7fff; @@ -206,8 +202,8 @@ private: } } - static void convertInt24ToFloat (const char* src, float* dest, const int srcStrideBytes, - int numSamples, const bool littleEndian) noexcept + static void convertInt24ToFloat (const char* src, float* dest, int srcStrideBytes, + int numSamples, bool littleEndian) noexcept { const double g = 1.0 / 0x7fffff; @@ -229,8 +225,8 @@ private: } } - static void convertFloatToInt24 (const float* src, char* dest, const int dstStrideBytes, - int numSamples, const bool littleEndian) noexcept + static void convertFloatToInt24 (const float* src, char* dest, int dstStrideBytes, + int numSamples, bool littleEndian) noexcept { const double maxVal = (double) 0x7fffff; @@ -252,8 +248,8 @@ private: } } - static void convertInt32ToFloat (const char* src, float* dest, const int srcStrideBytes, - int numSamples, const bool littleEndian) noexcept + static void convertInt32ToFloat (const char* src, float* dest, int srcStrideBytes, + int numSamples, bool littleEndian) noexcept { const double g = 1.0 / 0x7fffffff; @@ -275,8 +271,8 @@ private: } } - static void convertFloatToInt32 (const float* src, char* dest, const int dstStrideBytes, - int numSamples, const bool littleEndian) noexcept + static void convertFloatToInt32 (const float* src, char* dest, int dstStrideBytes, + int numSamples, bool littleEndian) noexcept { const double maxVal = (double) 0x7fffffff; @@ -300,8 +296,9 @@ private: }; //============================================================================== +constexpr int maxNumASIODevices = 16; class ASIOAudioIODevice; -static ASIOAudioIODevice* volatile currentASIODev[16] = { 0 }; +static ASIOAudioIODevice* currentASIODev[maxNumASIODevices] = {}; extern HWND juce_messageWindowHandle; @@ -314,33 +311,10 @@ class ASIOAudioIODevice : public AudioIODevice, { public: ASIOAudioIODevice (ASIOAudioIODeviceType* ownerType, const String& devName, - const CLSID clsID, const int slotNumber) + CLSID clsID, int slotNumber) : AudioIODevice (devName, "ASIO"), owner (ownerType), - asioObject (nullptr), - classId (clsID), - inputLatency (0), - outputLatency (0), - minBufferSize (0), maxBufferSize (0), - preferredBufferSize (0), - bufferGranularity (0), - numClockSources (0), - currentBlockSizeSamples (0), - currentBitDepth (16), - currentSampleRate (0), - currentCallback (nullptr), - bufferIndex (0), - numActiveInputChans (0), - numActiveOutputChans (0), - deviceIsOpen (false), - isStarted (false), - buffersCreated (false), - calledback (false), - littleEndian (false), - postOutput (true), - needToReset (false), - insideControlPanelModalLoop (false), - shouldUsePreferredSize (false) + classId (clsID) { ::CoInitialize (nullptr); @@ -348,15 +322,15 @@ public: inBuffers.calloc (4); outBuffers.calloc (4); - jassert (currentASIODev [slotNumber] == nullptr); - currentASIODev [slotNumber] = this; + jassert (currentASIODev[slotNumber] == nullptr); + currentASIODev[slotNumber] = this; openDevice(); } ~ASIOAudioIODevice() { - for (int i = 0; i < numElementsInArray (currentASIODev); ++i) + for (int i = 0; i < maxNumASIODevices; ++i) if (currentASIODev[i] == this) currentASIODev[i] = nullptr; @@ -381,7 +355,7 @@ public: if (newRates.isEmpty()) { - double cr = getSampleRate(); + auto cr = getSampleRate(); JUCE_ASIO_LOG ("No sample rates supported - current rate: " + String ((int) cr)); if (cr > 0) @@ -394,8 +368,9 @@ public: #if JUCE_ASIO_DEBUGGING StringArray s; - for (int i = 0; i < sampleRates.size(); ++i) - s.add (String (sampleRates.getUnchecked(i))); + + for (auto r : sampleRates) + s.add (String (r)); JUCE_ASIO_LOG ("Rates: " + s.joinIntoString (" ")); #endif @@ -425,21 +400,20 @@ public: if (asioObject == nullptr) { - const String openingError (openDevice()); + auto openingError = openDevice(); if (asioObject == nullptr) return openingError; } isStarted = false; - bufferIndex = -1; - long err = asioObject->getChannels (&totalNumInputChans, &totalNumOutputChans); + auto err = asioObject->getChannels (&totalNumInputChans, &totalNumOutputChans); jassert (err == ASE_OK); bufferSizeSamples = readBufferSizes (bufferSizeSamples); - double sampleRate = sr; + auto sampleRate = sr; currentSampleRate = sampleRate; currentBlockSizeSamples = bufferSizeSamples; currentChansOut.clear(); @@ -450,9 +424,11 @@ public: if (sampleRate == 0 || (sampleRates.size() > 0 && ! sampleRates.contains (sampleRate))) sampleRate = sampleRates[0]; - jassert (sampleRate != 0); if (sampleRate == 0) + { + jassertfalse; sampleRate = 44100.0; + } updateClockSources(); currentSampleRate = getSampleRate(); @@ -486,7 +462,7 @@ public: needToReset = false; } - const int totalBuffers = resetBuffers (inputChannels, outputChannels); + auto totalBuffers = resetBuffers (inputChannels, outputChannels); setCallbackFunctions(); @@ -508,7 +484,7 @@ public: if (err == ASE_OK) { buffersCreated = true; - tempBuffer.calloc (totalBuffers * currentBlockSizeSamples + 32); + ioBufferSpace.calloc (totalBuffers * currentBlockSizeSamples + 32); int n = 0; Array types; @@ -518,7 +494,7 @@ public: { if (inputChannels[i]) { - inBuffers[n] = tempBuffer + (currentBlockSizeSamples * n); + inBuffers[n] = ioBufferSpace + (currentBlockSizeSamples * n); ASIOChannelInfo channelInfo = { 0 }; channelInfo.channel = i; @@ -540,7 +516,7 @@ public: { if (outputChannels[i]) { - outBuffers[n] = tempBuffer + (currentBlockSizeSamples * (numActiveInputChans + n)); + outBuffers[n] = ioBufferSpace + (currentBlockSizeSamples * (numActiveInputChans + n)); ASIOChannelInfo channelInfo = { 0 }; channelInfo.channel = i; @@ -564,8 +540,8 @@ public: for (int i = 0; i < numActiveOutputChans; ++i) { - outputFormat[i].clear (bufferInfos [numActiveInputChans + i].buffers[0], currentBlockSizeSamples); - outputFormat[i].clear (bufferInfos [numActiveInputChans + i].buffers[1], currentBlockSizeSamples); + outputFormat[i].clear (bufferInfos[numActiveInputChans + i].buffers[0], currentBlockSizeSamples); + outputFormat[i].clear (bufferInfos[numActiveInputChans + i].buffers[1], currentBlockSizeSamples); } readLatencies(); @@ -615,7 +591,7 @@ public: isStarted = false; deviceIsOpen = false; - const String errorCopy (error); + auto errorCopy = error; close(); // (this resets the error string) error = errorCopy; } @@ -678,7 +654,7 @@ public: void stop() override { - AudioIODeviceCallback* const lastCallback = currentCallback; + auto* lastCallback = currentCallback; { const ScopedLock sl (callbackLock); @@ -698,15 +674,13 @@ public: bool done = false; insideControlPanelModalLoop = true; - - const uint32 started = Time::getMillisecondCounter(); + auto started = Time::getMillisecondCounter(); if (asioObject != nullptr) { asioObject->controlPanel(); - const int spent = (int) Time::getMillisecondCounter() - (int) started; - + auto spent = (int) (Time::getMillisecondCounter() - started); JUCE_ASIO_LOG ("spent: " + String (spent)); if (spent > 300) @@ -730,13 +704,10 @@ public: if (! insideControlPanelModalLoop) { stopTimer(); - JUCE_ASIO_LOG ("restart request!"); - AudioIODeviceCallback* const oldCallback = currentCallback; - + auto* oldCallback = currentCallback; close(); - needToReset = true; open (BigInteger (currentChansIn), BigInteger (currentChansOut), currentSampleRate, currentBlockSizeSamples); @@ -757,51 +728,49 @@ public: private: //============================================================================== WeakReference owner; - IASIO* volatile asioObject; + IASIO* asioObject = {}; ASIOCallbacks callbacks; CLSID classId; String error; - long totalNumInputChans, totalNumOutputChans; + long totalNumInputChans = 0, totalNumOutputChans = 0; StringArray inputChannelNames, outputChannelNames; Array sampleRates; Array bufferSizes; - long inputLatency, outputLatency; - long minBufferSize, maxBufferSize, preferredBufferSize, bufferGranularity; - ASIOClockSource clocks[32]; - int numClockSources; - - int volatile currentBlockSizeSamples; - int volatile currentBitDepth; - double volatile currentSampleRate; + long inputLatency = 0, outputLatency = 0; + long minBufferSize = 0, maxBufferSize = 0, preferredBufferSize = 0, bufferGranularity = 0; + ASIOClockSource clocks[32] = {}; + int numClockSources = 0; + + int currentBlockSizeSamples = 0; + int currentBitDepth = 16; + double currentSampleRate = 0; BigInteger currentChansOut, currentChansIn; - AudioIODeviceCallback* volatile currentCallback; + AudioIODeviceCallback* currentCallback = {}; CriticalSection callbackLock; HeapBlock bufferInfos; HeapBlock inBuffers, outBuffers; + HeapBlock ioBufferSpace; HeapBlock inputFormat, outputFormat; + int numActiveInputChans = 0, numActiveOutputChans = 0; - WaitableEvent event1; - HeapBlock tempBuffer; - int volatile bufferIndex, numActiveInputChans, numActiveOutputChans; - - bool deviceIsOpen, isStarted, buffersCreated; - bool volatile calledback; - bool volatile littleEndian, postOutput, needToReset; - bool volatile insideControlPanelModalLoop; - bool volatile shouldUsePreferredSize; + bool deviceIsOpen = false, isStarted = false, buffersCreated = false; + std::atomic calledback { false }; + bool littleEndian = false, postOutput = true, needToReset = false; + bool insideControlPanelModalLoop = false; + bool shouldUsePreferredSize = false; int xruns = 0; //============================================================================== - static String convertASIOString (char* const text, int length) + static String convertASIOString (char* text, int length) { if (CharPointer_UTF8::isValidString (text, length)) return String::fromUTF8 (text, length); - WCHAR wideVersion [64] = { 0 }; + WCHAR wideVersion[64] = {}; MultiByteToWideChar (CP_ACP, 0, text, length, wideVersion, numElementsInArray (wideVersion)); return wideVersion; } @@ -867,7 +836,7 @@ private: if (shouldUsePreferredSize) { JUCE_ASIO_LOG ("Using preferred size for buffer.."); - long err = refreshBufferSizes(); + auto err = refreshBufferSizes(); if (err == ASE_OK) { @@ -890,8 +859,8 @@ private: { numActiveInputChans = 0; numActiveOutputChans = 0; + auto* info = bufferInfos.get(); - ASIOBufferInfo* info = bufferInfos; for (int i = 0; i < totalNumInputChans; ++i) { if (inputChannels[i]) @@ -952,7 +921,7 @@ private: double getSampleRate() const { double cr = 0; - long err = asioObject->getSampleRate (&cr); + auto err = asioObject->getSampleRate (&cr); JUCE_ASIO_LOG_ERROR ("getSampleRate", err); return cr; } @@ -962,7 +931,7 @@ private: if (currentSampleRate != newRate) { JUCE_ASIO_LOG ("rate change: " + String (currentSampleRate) + " to " + String (newRate)); - long err = asioObject->setSampleRate (newRate); + auto err = asioObject->setSampleRate (newRate); if (err == ASE_NoClock && numClockSources > 0) { @@ -970,7 +939,6 @@ private: Thread::sleep (10); err = asioObject->setClockSource (clocks[0].index); JUCE_ASIO_LOG_ERROR ("setClockSource2", err); - Thread::sleep (10); err = asioObject->setSampleRate (newRate); } @@ -1009,7 +977,7 @@ private: if (numClockSources > 1 && ! isSourceSet) { JUCE_ASIO_LOG ("setting clock source"); - long err = asioObject->setClockSource (clocks[0].index); + auto err = asioObject->setClockSource (clocks[0].index); JUCE_ASIO_LOG_ERROR ("setClockSource1", err); Thread::sleep (20); } @@ -1035,7 +1003,7 @@ private: numActiveInputChans = 0; numActiveOutputChans = 0; - ASIOBufferInfo* info = bufferInfos; + auto* info = bufferInfos.get(); int numChans = 0; for (int i = 0; i < jmin (2, (int) totalNumInputChans); ++i) @@ -1064,7 +1032,7 @@ private: if (preferredSize > 0) { - long err = asioObject->createBuffers (bufferInfos, numChans, preferredSize, &callbacks); + auto err = asioObject->createBuffers (bufferInfos, numChans, preferredSize, &callbacks); JUCE_ASIO_LOG_ERROR ("dummy buffers", err); } @@ -1094,8 +1062,8 @@ private: if (i < 2) { // clear the channels that are used with the dummy stuff - outputFormat[i].clear (bufferInfos [outputBufferIndex + i].buffers[0], preferredBufferSize); - outputFormat[i].clear (bufferInfos [outputBufferIndex + i].buffers[1], preferredBufferSize); + outputFormat[i].clear (bufferInfos[outputBufferIndex + i].buffers[0], preferredBufferSize); + outputFormat[i].clear (bufferInfos[outputBufferIndex + i].buffers[1], preferredBufferSize); } } } @@ -1140,7 +1108,7 @@ private: String getLastDriverError() const { jassert (asioObject != nullptr); - char buffer [512] = { 0 }; + char buffer[512] = {}; asioObject->getErrorMessage (buffer); return String (buffer, sizeof (buffer) - 1); } @@ -1163,7 +1131,7 @@ private: if (driverError.isEmpty()) { - char buffer [512]; + char buffer[512] = {}; asioObject->getDriverName (buffer); // just in case any flimsy drivers expect this to be called.. } @@ -1187,7 +1155,6 @@ private: numActiveOutputChans = 0; xruns = 0; currentCallback = nullptr; - error.clear(); if (getName().isEmpty()) @@ -1220,7 +1187,7 @@ private: { addBufferSizes (minBufferSize, maxBufferSize, preferredBufferSize, bufferGranularity); - double currentRate = getSampleRate(); + auto currentRate = getSampleRate(); if (currentRate < 1.0 || currentRate > 192001.0) { @@ -1232,13 +1199,12 @@ private: } currentSampleRate = currentRate; - postOutput = (asioObject->outputReady() == 0); + if (postOutput) JUCE_ASIO_LOG ("outputReady true"); updateSampleRates(); - readLatencies(); // ..doing these steps because cubase does so at this stage createDummyBuffers (preferredBufferSize); // in initialisation, and some devices fail if we don't. readLatencies(); @@ -1294,12 +1260,11 @@ private: } //============================================================================== - void JUCE_ASIOCALLBACK callback (const long index) + void JUCE_ASIOCALLBACK callback (long index) { if (isStarted) { - bufferIndex = index; - processBuffer(); + processBuffer (index); } else { @@ -1310,23 +1275,21 @@ private: calledback = true; } - void processBuffer() + void processBuffer (long bufferIndex) { - const ASIOBufferInfo* const infos = bufferInfos; - const int bi = bufferIndex; - const ScopedLock sl (callbackLock); - if (bi >= 0) + if (bufferIndex >= 0) { - const int samps = currentBlockSizeSamples; + auto* infos = bufferInfos.get(); + auto samps = currentBlockSizeSamples; if (currentCallback != nullptr) { for (int i = 0; i < numActiveInputChans; ++i) { jassert (inBuffers[i] != nullptr); - inputFormat[i].convertToFloat (infos[i].buffers[bi], inBuffers[i], samps); + inputFormat[i].convertToFloat (infos[i].buffers[bufferIndex], inBuffers[i], samps); } currentCallback->audioDeviceIOCallback (const_cast (inBuffers.getData()), numActiveInputChans, @@ -1335,13 +1298,13 @@ private: for (int i = 0; i < numActiveOutputChans; ++i) { jassert (outBuffers[i] != nullptr); - outputFormat[i].convertFromFloat (outBuffers[i], infos [numActiveInputChans + i].buffers[bi], samps); + outputFormat[i].convertFromFloat (outBuffers[i], infos[numActiveInputChans + i].buffers[bufferIndex], samps); } } else { for (int i = 0; i < numActiveOutputChans; ++i) - outputFormat[i].clear (infos[numActiveInputChans + i].buffers[bi], samps); + outputFormat[i].clear (infos[numActiveInputChans + i].buffers[bufferIndex], samps); } } @@ -1359,15 +1322,15 @@ private: return 1; break; - case kAsioBufferSizeChange: JUCE_ASIO_LOG ("kAsioBufferSizeChange"); resetRequest(); return 1; - case kAsioResetRequest: JUCE_ASIO_LOG ("kAsioResetRequest"); resetRequest(); return 1; - case kAsioResyncRequest: JUCE_ASIO_LOG ("kAsioResyncRequest"); resetRequest(); return 1; - case kAsioLatenciesChanged: JUCE_ASIO_LOG ("kAsioLatenciesChanged"); return 1; - case kAsioEngineVersion: return 2; + case kAsioBufferSizeChange: JUCE_ASIO_LOG ("kAsioBufferSizeChange"); resetRequest(); return 1; + case kAsioResetRequest: JUCE_ASIO_LOG ("kAsioResetRequest"); resetRequest(); return 1; + case kAsioResyncRequest: JUCE_ASIO_LOG ("kAsioResyncRequest"); resetRequest(); return 1; + case kAsioLatenciesChanged: JUCE_ASIO_LOG ("kAsioLatenciesChanged"); return 1; + case kAsioEngineVersion: return 2; case kAsioSupportsTimeInfo: case kAsioSupportsTimeCode: return 0; - case kAsioOverload: xruns++; return 1; + case kAsioOverload: ++xruns; return 1; } return 0; @@ -1379,29 +1342,30 @@ private: { static ASIOTime* JUCE_ASIOCALLBACK bufferSwitchTimeInfoCallback (ASIOTime*, long index, long) { - if (currentASIODev[deviceIndex] != nullptr) - currentASIODev[deviceIndex]->callback (index); + if (auto* d = currentASIODev[deviceIndex]) + d->callback (index); - return nullptr; + return {}; } static void JUCE_ASIOCALLBACK bufferSwitchCallback (long index, long) { - if (currentASIODev[deviceIndex] != nullptr) - currentASIODev[deviceIndex]->callback (index); + if (auto* d = currentASIODev[deviceIndex]) + d->callback (index); } static long JUCE_ASIOCALLBACK asioMessagesCallback (long selector, long value, void*, double*) { - return currentASIODev[deviceIndex] != nullptr - ? currentASIODev[deviceIndex]->asioMessagesCallback (selector, value) - : 0; + if (auto* d = currentASIODev[deviceIndex]) + return d->asioMessagesCallback (selector, value); + + return {}; } static void JUCE_ASIOCALLBACK sampleRateChangedCallback (ASIOSampleRate) { - if (currentASIODev[deviceIndex] != nullptr) - currentASIODev[deviceIndex]->resetRequest(); + if (auto* d = currentASIODev[deviceIndex]) + d->resetRequest(); } static void setCallbacks (ASIOCallbacks& callbacks) noexcept @@ -1430,7 +1394,7 @@ private: }; template <> -struct ASIOAudioIODevice::ASIOCallbackFunctions +struct ASIOAudioIODevice::ASIOCallbackFunctions { static void setCallbacksForDevice (ASIOCallbacks&, ASIOAudioIODevice*) noexcept {} }; @@ -1442,10 +1406,9 @@ public: ASIOAudioIODeviceType() : AudioIODeviceType ("ASIO") {} //============================================================================== - void scanForDevices() + void scanForDevices() override { hasScanned = true; - deviceNames.clear(); classIds.clear(); @@ -1454,7 +1417,7 @@ public: if (RegOpenKey (HKEY_LOCAL_MACHINE, _T("software\\asio"), &hk) == ERROR_SUCCESS) { - TCHAR name [256]; + TCHAR name[256] = {}; while (RegEnumKey (hk, index++, name, numElementsInArray (name)) == ERROR_SUCCESS) addDriverInfo (name, hk); @@ -1463,14 +1426,13 @@ public: } } - StringArray getDeviceNames (bool /*wantInputNames*/) const + StringArray getDeviceNames (bool /*wantInputNames*/) const override { jassert (hasScanned); // need to call scanForDevices() before doing this - return deviceNames; } - int getDefaultDeviceIndex (bool) const + int getDefaultDeviceIndex (bool) const override { jassert (hasScanned); // need to call scanForDevices() before doing this @@ -1489,8 +1451,8 @@ public: static int findFreeSlot() { - for (int i = 0; i < numElementsInArray (currentASIODev); ++i) - if (currentASIODev[i] == 0) + for (int i = 0; i < maxNumASIODevices; ++i) + if (currentASIODev[i] == nullptr) return i; jassertfalse; // unfortunately you can only have a finite number @@ -1498,29 +1460,29 @@ public: return -1; } - int getIndexOfDevice (AudioIODevice* d, bool /*asInput*/) const + int getIndexOfDevice (AudioIODevice* d, bool /*asInput*/) const override { jassert (hasScanned); // need to call scanForDevices() before doing this return d == nullptr ? -1 : deviceNames.indexOf (d->getName()); } - bool hasSeparateInputsAndOutputs() const { return false; } + bool hasSeparateInputsAndOutputs() const override { return false; } AudioIODevice* createDevice (const String& outputDeviceName, - const String& inputDeviceName) + const String& inputDeviceName) override { // ASIO can't open two different devices for input and output - they must be the same one. jassert (inputDeviceName == outputDeviceName || outputDeviceName.isEmpty() || inputDeviceName.isEmpty()); jassert (hasScanned); // need to call scanForDevices() before doing this - const String deviceName (outputDeviceName.isNotEmpty() ? outputDeviceName - : inputDeviceName); - const int index = deviceNames.indexOf (deviceName); + auto deviceName = outputDeviceName.isNotEmpty() ? outputDeviceName + : inputDeviceName; + auto index = deviceNames.indexOf (deviceName); if (index >= 0) { - const int freeSlot = findFreeSlot(); + auto freeSlot = findFreeSlot(); if (freeSlot >= 0) return new ASIOAudioIODevice (this, deviceName, @@ -1552,7 +1514,7 @@ private: if (RegOpenKey (HKEY_CLASSES_ROOT, _T("clsid"), &hk) == ERROR_SUCCESS) { int index = 0; - TCHAR name [512]; + TCHAR name[512] = {}; while (RegEnumKey (hk, index++, name, numElementsInArray (name)) == ERROR_SUCCESS) { @@ -1564,7 +1526,7 @@ private: { if (RegOpenKeyEx (subKey, _T("InprocServer32"), 0, KEY_READ, &pathKey) == ERROR_SUCCESS) { - TCHAR pathName [1024] = { 0 }; + TCHAR pathName[1024] = {}; DWORD dtype = REG_SZ; DWORD dsize = sizeof (pathName); @@ -1596,7 +1558,7 @@ private: if (RegOpenKeyEx (hk, keyName.toWideCharPointer(), 0, KEY_READ, &subKey) == ERROR_SUCCESS) { - TCHAR buf [256] = { 0 }; + TCHAR buf[256] = {}; DWORD dtype = REG_SZ; DWORD dsize = sizeof (buf); @@ -1605,6 +1567,7 @@ private: if (dsize > 0 && checkClassIsOk (buf)) { CLSID classId; + if (CLSIDFromString ((LPOLESTR) buf, &classId) == S_OK) { dtype = REG_SZ; diff --git a/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp b/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp index ed457f52..914215eb 100644 --- a/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp +++ b/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp @@ -23,7 +23,7 @@ extern "C" { // Declare just the minimum number of interfaces for the DSound objects that we need.. - typedef struct typeDSBUFFERDESC + struct DSBUFFERDESC { DWORD dwSize; DWORD dwFlags; @@ -31,7 +31,7 @@ extern "C" DWORD dwReserved; LPWAVEFORMATEX lpwfxFormat; GUID guid3DAlgorithm; - } DSBUFFERDESC; + }; struct IDirectSoundBuffer; @@ -80,14 +80,14 @@ extern "C" }; //============================================================================== - typedef struct typeDSCBUFFERDESC + struct DSCBUFFERDESC { DWORD dwSize; DWORD dwFlags; DWORD dwBufferBytes; DWORD dwReserved; LPWAVEFORMATEX lpwfxFormat; - } DSCBUFFERDESC; + }; struct IDirectSoundCaptureBuffer; diff --git a/modules/juce_audio_devices/native/juce_win32_Midi.cpp b/modules/juce_audio_devices/native/juce_win32_Midi.cpp index 6a7d2bb8..f820dce8 100644 --- a/modules/juce_audio_devices/native/juce_win32_Midi.cpp +++ b/modules/juce_audio_devices/native/juce_win32_Midi.cpp @@ -48,244 +48,330 @@ struct MidiServiceType virtual StringArray getDevices (bool) = 0; virtual int getDefaultDeviceIndex (bool) = 0; - virtual InputWrapper* createInputWrapper (MidiInput*, int, MidiInputCallback*) = 0; + virtual InputWrapper* createInputWrapper (MidiInput&, int, MidiInputCallback&) = 0; virtual OutputWrapper* createOutputWrapper (int) = 0; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiServiceType) }; //============================================================================== -class WindowsMidiService : public MidiServiceType +struct Win32MidiService : public MidiServiceType, + private Timer { + Win32MidiService() {} + + StringArray getDevices (bool isInput) override + { + return isInput ? Win32InputWrapper::getDevices() + : Win32OutputWrapper::getDevices(); + } + + int getDefaultDeviceIndex (bool isInput) override + { + return isInput ? Win32InputWrapper::getDefaultDeviceIndex() + : Win32OutputWrapper::getDefaultDeviceIndex(); + } + + InputWrapper* createInputWrapper (MidiInput& input, int index, MidiInputCallback& callback) override + { + return new Win32InputWrapper (*this, input, index, callback); + } + + OutputWrapper* createOutputWrapper (int index) override + { + return new Win32OutputWrapper (*this, index); + } + private: - struct WindowsInputWrapper : public InputWrapper + struct Win32InputWrapper; + + //============================================================================== + struct MidiInCollector : public ReferenceCountedObject { - struct MidiInCollector + MidiInCollector (Win32MidiService& s, const String& name) : deviceName (name), midiService (s) {} + + ~MidiInCollector() { - MidiInCollector (WindowsMidiService& s, - MidiInput* const inputDevice, - MidiInputCallback& cb) - : midiService (s), - input (inputDevice), - callback (cb) - { - } + stop(); - ~MidiInCollector() + if (deviceHandle != 0) { - stop(); - - if (deviceHandle != 0) + for (int count = 5; --count >= 0;) { - for (int count = 5; --count >= 0;) - { - if (midiInClose (deviceHandle) == MMSYSERR_NOERROR) - break; + if (midiInClose (deviceHandle) == MMSYSERR_NOERROR) + break; - Sleep (20); - } + Sleep (20); } } + } - void handleMessage (const uint8* bytes, const uint32 timeStamp) + using Ptr = ReferenceCountedObjectPtr; + + void addClient (Win32InputWrapper* c) + { + const ScopedLock sl (clientLock); + jassert (! clients.contains (c)); + clients.add (c); + } + + void removeClient (Win32InputWrapper* c) + { + const ScopedLock sl (clientLock); + clients.removeFirstMatchingValue (c); + startOrStop(); + midiService.asyncCheckForUnusedCollectors(); + } + + void handleMessage (const uint8* bytes, uint32 timeStamp) + { + if (bytes[0] >= 0x80 && isStarted.load()) { - if (bytes[0] >= 0x80 && isStarted) { - concatenator.pushMidiData (bytes, - MidiMessage::getMessageLengthFromFirstByte (bytes[0]), - convertTimeStamp (timeStamp), - input, - callback); - writeFinishedBlocks(); + auto len = MidiMessage::getMessageLengthFromFirstByte (bytes[0]); + auto time = convertTimeStamp (timeStamp); + const ScopedLock sl (clientLock); + + for (auto* c : clients) + c->pushMidiData (bytes, len, time); } + + writeFinishedBlocks(); } + } - void handleSysEx (MIDIHDR* const hdr, const uint32 timeStamp) + void handleSysEx (MIDIHDR* hdr, uint32 timeStamp) + { + if (isStarted.load() && hdr->dwBytesRecorded > 0) { - if (isStarted && hdr->dwBytesRecorded > 0) { - concatenator.pushMidiData (hdr->lpData, (int) hdr->dwBytesRecorded, - convertTimeStamp (timeStamp), input, callback); - writeFinishedBlocks(); + auto time = convertTimeStamp (timeStamp); + const ScopedLock sl (clientLock); + + for (auto* c : clients) + c->pushMidiData (hdr->lpData, (int) hdr->dwBytesRecorded, time); } + + writeFinishedBlocks(); } + } - void start() - { - if (deviceHandle != 0 && ! isStarted) - { - midiService.activeMidiCollectors.addIfNotAlreadyThere (this); + void startOrStop() + { + const ScopedLock sl (clientLock); - for (int i = 0; i < (int) numHeaders; ++i) - { - headers[i].prepare (deviceHandle); - headers[i].write (deviceHandle); - } + if (countRunningClients() == 0) + stop(); + else + start(); + } - startTime = Time::getMillisecondCounterHiRes(); - MMRESULT res = midiInStart (deviceHandle); + void start() + { + if (deviceHandle != 0 && ! isStarted.load()) + { + activeMidiCollectors.addIfNotAlreadyThere (this); - if (res == MMSYSERR_NOERROR) - { - concatenator.reset(); - isStarted = true; - } - else - { - unprepareAllHeaders(); - } + for (int i = 0; i < (int) numHeaders; ++i) + { + headers[i].prepare (deviceHandle); + headers[i].write (deviceHandle); } - } - void stop() - { - if (isStarted) - { - isStarted = false; - midiInReset (deviceHandle); - midiInStop (deviceHandle); - midiService.activeMidiCollectors.removeFirstMatchingValue (this); + startTime = Time::getMillisecondCounterHiRes(); + auto res = midiInStart (deviceHandle); + + if (res == MMSYSERR_NOERROR) + isStarted = true; + else unprepareAllHeaders(); - concatenator.reset(); - } } + } - static void CALLBACK midiInCallback (HMIDIIN, UINT uMsg, DWORD_PTR dwInstance, - DWORD_PTR midiMessage, DWORD_PTR timeStamp) + void stop() + { + if (isStarted.load()) { - auto* collector = reinterpret_cast (dwInstance); - - if (collector->midiService.activeMidiCollectors.contains (collector)) - { - if (uMsg == MIM_DATA) - collector->handleMessage ((const uint8*) &midiMessage, (uint32) timeStamp); - else if (uMsg == MIM_LONGDATA) - collector->handleSysEx ((MIDIHDR*) midiMessage, (uint32) timeStamp); - } + isStarted = false; + midiInReset (deviceHandle); + midiInStop (deviceHandle); + activeMidiCollectors.removeFirstMatchingValue (this); + unprepareAllHeaders(); } + } - HMIDIIN deviceHandle = 0; - - private: - WindowsMidiService& midiService; - MidiInput* input; - MidiInputCallback& callback; - MidiDataConcatenator concatenator { 4096 }; - bool volatile isStarted = false; - double startTime = 0; + static void CALLBACK midiInCallback (HMIDIIN, UINT uMsg, DWORD_PTR dwInstance, + DWORD_PTR midiMessage, DWORD_PTR timeStamp) + { + auto* collector = reinterpret_cast (dwInstance); - struct MidiHeader + // This is primarily a check for the collector being a dangling + // pointer, as the callback can sometimes be delayed + if (activeMidiCollectors.contains (collector)) { - MidiHeader() {} + if (uMsg == MIM_DATA) + collector->handleMessage ((const uint8*) &midiMessage, (uint32) timeStamp); + else if (uMsg == MIM_LONGDATA) + collector->handleSysEx ((MIDIHDR*) midiMessage, (uint32) timeStamp); + } + } - void prepare (HMIDIIN device) - { - zerostruct (hdr); - hdr.lpData = data; - hdr.dwBufferLength = (DWORD) numElementsInArray (data); + String deviceName; + HMIDIIN deviceHandle = 0; - midiInPrepareHeader (device, &hdr, sizeof (hdr)); - } + private: + Win32MidiService& midiService; + CriticalSection clientLock; + Array clients; + std::atomic isStarted { false }; + double startTime = 0; - void unprepare (HMIDIIN device) - { - if ((hdr.dwFlags & WHDR_DONE) != 0) - { - int c = 10; - while (--c >= 0 && midiInUnprepareHeader (device, &hdr, sizeof (hdr)) == MIDIERR_STILLPLAYING) - Thread::sleep (20); + // This static array is used to prevent occasional callbacks to objects that are + // in the process of being deleted + static Array activeMidiCollectors; - jassert (c >= 0); - } - } + int countRunningClients() const + { + int num = 0; - void write (HMIDIIN device) - { - hdr.dwBytesRecorded = 0; - midiInAddBuffer (device, &hdr, sizeof (hdr)); - } + for (auto* c : clients) + if (c->started) + ++num; - void writeIfFinished (HMIDIIN device) - { - if ((hdr.dwFlags & WHDR_DONE) != 0) - write (device); - } + return num; + } - MIDIHDR hdr; - char data [256]; + struct MidiHeader + { + MidiHeader() {} - JUCE_DECLARE_NON_COPYABLE (MidiHeader) - }; + void prepare (HMIDIIN device) + { + zerostruct (hdr); + hdr.lpData = data; + hdr.dwBufferLength = (DWORD) numElementsInArray (data); - enum { numHeaders = 32 }; - MidiHeader headers [numHeaders]; + midiInPrepareHeader (device, &hdr, sizeof (hdr)); + } - void writeFinishedBlocks() + void unprepare (HMIDIIN device) { - for (int i = 0; i < (int) numHeaders; ++i) - headers[i].writeIfFinished (deviceHandle); + if ((hdr.dwFlags & WHDR_DONE) != 0) + { + int c = 10; + while (--c >= 0 && midiInUnprepareHeader (device, &hdr, sizeof (hdr)) == MIDIERR_STILLPLAYING) + Thread::sleep (20); + + jassert (c >= 0); + } } - void unprepareAllHeaders() + void write (HMIDIIN device) { - for (int i = 0; i < (int) numHeaders; ++i) - headers[i].unprepare (deviceHandle); + hdr.dwBytesRecorded = 0; + midiInAddBuffer (device, &hdr, sizeof (hdr)); } - double convertTimeStamp (uint32 timeStamp) + void writeIfFinished (HMIDIIN device) { - auto t = startTime + timeStamp; - auto now = Time::getMillisecondCounterHiRes(); + if ((hdr.dwFlags & WHDR_DONE) != 0) + write (device); + } - if (t > now) - { - if (t > now + 2.0) - startTime -= 1.0; + MIDIHDR hdr; + char data[256]; - t = now; - } + JUCE_DECLARE_NON_COPYABLE (MidiHeader) + }; - return t * 0.001; + enum { numHeaders = 32 }; + MidiHeader headers[numHeaders]; + + void writeFinishedBlocks() + { + for (int i = 0; i < (int) numHeaders; ++i) + headers[i].writeIfFinished (deviceHandle); + } + + void unprepareAllHeaders() + { + for (int i = 0; i < (int) numHeaders; ++i) + headers[i].unprepare (deviceHandle); + } + + double convertTimeStamp (uint32 timeStamp) + { + auto t = startTime + timeStamp; + auto now = Time::getMillisecondCounterHiRes(); + + if (t > now) + { + if (t > now + 2.0) + startTime -= 1.0; + + t = now; } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiInCollector) - }; + return t * 0.001; + } - //============================================================================== - WindowsInputWrapper (WindowsMidiService& parentService, - MidiInput* const input, - const int index, - MidiInputCallback* const callback) + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiInCollector) + }; + + //============================================================================== + struct Win32InputWrapper : public InputWrapper + { + Win32InputWrapper (Win32MidiService& parentService, + MidiInput& midiInput, int index, MidiInputCallback& c) + : input (midiInput), callback (c) + { + collector = getOrCreateCollector (parentService, index); + collector->addClient (this); + } + + ~Win32InputWrapper() + { + collector->removeClient (this); + } + + static MidiInCollector::Ptr getOrCreateCollector (Win32MidiService& parentService, int index) { auto names = getDevices(); - UINT deviceId = MIDI_MAPPER; + UINT deviceID = MIDI_MAPPER; + String deviceName; if (isPositiveAndBelow (index, names.size())) { deviceName = names[index]; - deviceId = index; + deviceID = index; } - collector = new MidiInCollector (parentService, input, *callback); + const ScopedLock sl (parentService.activeCollectorLock); + + for (auto& c : parentService.activeCollectors) + if (c->deviceName == deviceName) + return c; + + MidiInCollector::Ptr c (new MidiInCollector (parentService, deviceName)); HMIDIIN h; - MMRESULT err = midiInOpen (&h, deviceId, - (DWORD_PTR) &MidiInCollector::midiInCallback, - (DWORD_PTR) (MidiInCollector*) collector.get(), - CALLBACK_FUNCTION); + auto err = midiInOpen (&h, deviceID, + (DWORD_PTR) &MidiInCollector::midiInCallback, + (DWORD_PTR) (MidiInCollector*) c.get(), + CALLBACK_FUNCTION); if (err != MMSYSERR_NOERROR) throw std::runtime_error ("Failed to create Windows input device wrapper"); - collector->deviceHandle = h; + c->deviceHandle = h; + parentService.activeCollectors.add (c); + return c; } - ~WindowsInputWrapper() {} - static StringArray getDevices() { StringArray s; - const UINT num = midiInGetNumDevs(); + auto num = midiInGetNumDevs(); for (UINT i = 0; i < num; ++i) { @@ -299,78 +385,81 @@ private: return s; } - static int getDefaultDeviceIndex() - { - return 0; - } + static int getDefaultDeviceIndex() { return 0; } + + void start() override { started = true; concatenator.reset(); collector->startOrStop(); } + void stop() override { started = false; collector->startOrStop(); concatenator.reset(); } - void start() override { collector->start(); } - void stop() override { collector->stop(); } + String getDeviceName() override { return collector->deviceName; } - String getDeviceName() override + void pushMidiData (const void* inputData, int numBytes, double time) { - return deviceName; + concatenator.pushMidiData (inputData, numBytes, time, &input, callback); } - String deviceName; - ScopedPointer collector; + MidiInput& input; + MidiInputCallback& callback; + MidiDataConcatenator concatenator { 4096 }; + MidiInCollector::Ptr collector; + bool started = false; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsInputWrapper) + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Win32InputWrapper) }; //============================================================================== - struct WindowsOutputWrapper : public OutputWrapper + struct MidiOutHandle : public ReferenceCountedObject { - struct MidiOutHandle : public ReferenceCountedObject - { - using Ptr = ReferenceCountedObjectPtr; + using Ptr = ReferenceCountedObjectPtr; - MidiOutHandle (WindowsMidiService& parent, UINT id, HMIDIOUT h) - : owner (parent), deviceId (id), handle (h) - { - owner.activeOutputHandles.add (this); - } + MidiOutHandle (Win32MidiService& parent, const String& name, HMIDIOUT h) + : owner (parent), deviceName (name), handle (h) + { + owner.activeOutputHandles.add (this); + } - ~MidiOutHandle() - { - if (handle != nullptr) - midiOutClose (handle); + ~MidiOutHandle() + { + if (handle != nullptr) + midiOutClose (handle); - owner.activeOutputHandles.removeFirstMatchingValue (this); - } + owner.activeOutputHandles.removeFirstMatchingValue (this); + } - WindowsMidiService& owner; - UINT deviceId; - HMIDIOUT handle; + Win32MidiService& owner; + String deviceName; + HMIDIOUT handle; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiOutHandle) - }; + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiOutHandle) + }; - WindowsOutputWrapper (WindowsMidiService& p, int index) : parent (p) + //============================================================================== + struct Win32OutputWrapper : public OutputWrapper + { + Win32OutputWrapper (Win32MidiService& p, int index) : parent (p) { auto names = getDevices(); - UINT deviceId = MIDI_MAPPER; + UINT deviceID = MIDI_MAPPER; if (isPositiveAndBelow (index, names.size())) { deviceName = names[index]; - deviceId = index; + deviceID = index; } - if (deviceId == MIDI_MAPPER) + if (deviceID == MIDI_MAPPER) { - // use the microsoft sw synth as a default - best not to allow deviceId + // use the microsoft sw synth as a default - best not to allow deviceID // to be MIDI_MAPPER, or else device sharing breaks for (int i = 0; i < names.size(); ++i) if (names[i].containsIgnoreCase ("microsoft")) - deviceId = (UINT) i; + deviceID = (UINT) i; } for (int i = parent.activeOutputHandles.size(); --i >= 0;) { auto* activeHandle = parent.activeOutputHandles.getUnchecked (i); - if (activeHandle->deviceId == deviceId) + if (activeHandle->deviceName == deviceName) { han = activeHandle; return; @@ -380,11 +469,11 @@ private: for (int i = 4; --i >= 0;) { HMIDIOUT h = 0; - MMRESULT res = midiOutOpen (&h, deviceId, 0, 0, CALLBACK_NULL); + auto res = midiOutOpen (&h, deviceID, 0, 0, CALLBACK_NULL); if (res == MMSYSERR_NOERROR) { - han = new MidiOutHandle (parent, deviceId, h); + han = new MidiOutHandle (parent, deviceName, h); return; } @@ -408,7 +497,7 @@ private: if (midiOutPrepareHeader (han->handle, &h, sizeof (MIDIHDR)) == MMSYSERR_NOERROR) { - MMRESULT res = midiOutLongMsg (han->handle, &h, sizeof (MIDIHDR)); + auto res = midiOutLongMsg (han->handle, &h, sizeof (MIDIHDR)); if (res == MMSYSERR_NOERROR) { @@ -444,7 +533,7 @@ private: static Array getDeviceCaps() { Array devices; - const UINT num = midiOutGetNumDevs(); + auto num = midiOutGetNumDevs(); for (UINT i = 0; i < num; ++i) { @@ -483,54 +572,42 @@ private: return 0; } - String getDeviceName() override - { - return deviceName; - } + String getDeviceName() override { return deviceName; } - WindowsMidiService& parent; + Win32MidiService& parent; String deviceName; - MidiOutHandle::Ptr han; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsOutputWrapper) + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Win32OutputWrapper) }; -public: - WindowsMidiService() {} - - StringArray getDevices (bool isInput) override + //============================================================================== + void asyncCheckForUnusedCollectors() { - return isInput ? WindowsInputWrapper::getDevices() - : WindowsOutputWrapper::getDevices(); + startTimer (10); } - int getDefaultDeviceIndex (bool isInput) override + void timerCallback() override { - return isInput ? WindowsInputWrapper::getDefaultDeviceIndex() - : WindowsOutputWrapper::getDefaultDeviceIndex(); - } + stopTimer(); - InputWrapper* createInputWrapper (MidiInput* input, int index, MidiInputCallback* callback) override - { - return new WindowsInputWrapper (*this, input, index, callback); - } + const ScopedLock sl (activeCollectorLock); - OutputWrapper* createOutputWrapper (int index) override - { - return new WindowsOutputWrapper (*this, index); + for (int i = activeCollectors.size(); --i >= 0;) + if (activeCollectors.getObjectPointer(i)->getReferenceCount() == 1) + activeCollectors.remove (i); } -private: - Array activeMidiCollectors; - Array activeOutputHandles; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsMidiService) + CriticalSection activeCollectorLock; + ReferenceCountedArray activeCollectors; + Array activeOutputHandles; }; +Array Win32MidiService::MidiInCollector::activeMidiCollectors; + +//============================================================================== //============================================================================== #if JUCE_USE_WINRT_MIDI - using namespace Microsoft::WRL; using namespace ABI::Windows::Foundation; @@ -538,21 +615,71 @@ using namespace ABI::Windows::Devices::Midi; using namespace ABI::Windows::Devices::Enumeration; using namespace ABI::Windows::Storage::Streams; +//============================================================================== class WinRTMidiService : public MidiServiceType { -private: +public: + //============================================================================== + WinRTMidiService() + { + if (! WinRTWrapper::getInstance()->isInitialised()) + throw std::runtime_error ("Failed to initialise the WinRT wrapper"); + + midiInFactory = WinRTWrapper::getInstance()->getWRLFactory (&RuntimeClass_Windows_Devices_Midi_MidiInPort[0]); + + if (midiInFactory == nullptr) + throw std::runtime_error ("Failed to create midi in factory"); + + midiOutFactory = WinRTWrapper::getInstance()->getWRLFactory (&RuntimeClass_Windows_Devices_Midi_MidiOutPort[0]); + + if (midiOutFactory == nullptr) + throw std::runtime_error ("Failed to create midi out factory"); + + inputDeviceWatcher.reset (new MidiIODeviceWatcher (midiInFactory)); + + if (! inputDeviceWatcher->start()) + throw std::runtime_error ("Failed to start midi input device watcher"); + + outputDeviceWatcher.reset (new MidiIODeviceWatcher (midiOutFactory)); + + if (! outputDeviceWatcher->start()) + throw std::runtime_error ("Failed to start midi output device watcher"); + } + + ~WinRTMidiService() {} + + StringArray getDevices (bool isInput) override + { + return isInput ? inputDeviceWatcher ->getDevices() + : outputDeviceWatcher->getDevices(); + } + + int getDefaultDeviceIndex (bool isInput) override + { + return isInput ? inputDeviceWatcher ->getDefaultDeviceIndex() + : outputDeviceWatcher->getDefaultDeviceIndex(); + } + + InputWrapper* createInputWrapper (MidiInput& input, int index, MidiInputCallback& callback) override + { + return new WinRTInputWrapper (*this, input, index, callback); + } + + OutputWrapper* createOutputWrapper (int index) override + { + return new WinRTOutputWrapper (*this, index); + } + template struct MidiIODeviceWatcher { struct DeviceInfo { - String name; - String id; + String name, id; bool isDefault = false; }; - MidiIODeviceWatcher (ComSmartPtr& comFactory) - : factory (comFactory) + MidiIODeviceWatcher (ComSmartPtr& comFactory) : factory (comFactory) { } @@ -564,21 +691,23 @@ private: bool start() { HSTRING deviceSelector; - HRESULT hr = factory->GetDeviceSelector (&deviceSelector); + auto hr = factory->GetDeviceSelector (&deviceSelector); + if (FAILED (hr)) return false; auto deviceInformationFactory = WinRTWrapper::getInstance()->getWRLFactory (&RuntimeClass_Windows_Devices_Enumeration_DeviceInformation[0]); + if (deviceInformationFactory == nullptr) return false; hr = deviceInformationFactory->CreateWatcherAqsFilter (deviceSelector, watcher.resetAndGetPointerAddress()); + if (FAILED (hr)) return false; - class DeviceEnumerationThread : public Thread + struct DeviceEnumerationThread : public Thread { - public: DeviceEnumerationThread (String threadName, MidiIODeviceWatcher& p) : Thread (threadName), parent (p) {} @@ -613,7 +742,6 @@ private: parent.watcher->remove_EnumerationCompleted (deviceEnumerationCompletedToken); } - private: MidiIODeviceWatcher& parent; WaitableEvent enumerationCompleted; }; @@ -632,7 +760,8 @@ private: if (deviceAddedToken.value != 0) { - HRESULT hr = watcher->remove_Added (deviceAddedToken); + auto hr = watcher->remove_Added (deviceAddedToken); + if (FAILED (hr)) return false; @@ -641,14 +770,16 @@ private: if (deviceRemovedToken.value != 0) { - HRESULT hr = watcher->remove_Removed (deviceRemovedToken); + auto hr = watcher->remove_Removed (deviceRemovedToken); + if (FAILED (hr)) return false; deviceRemovedToken.value = 0; } - HRESULT hr = watcher->Stop(); + auto hr = watcher->Stop(); + if (FAILED (hr)) return false; @@ -659,7 +790,8 @@ private: HRESULT addDevice (IDeviceInformation* addedDeviceInfo) { boolean isEnabled; - HRESULT hr = addedDeviceInfo->get_IsEnabled (&isEnabled); + auto hr = addedDeviceInfo->get_IsEnabled (&isEnabled); + if (FAILED (hr)) return S_OK; @@ -672,6 +804,7 @@ private: HSTRING name; hr = addedDeviceInfo->get_Name (&name); + if (FAILED (hr)) return S_OK; @@ -679,6 +812,7 @@ private: HSTRING id; hr = addedDeviceInfo->get_Id (&id); + if (FAILED (hr)) return S_OK; @@ -686,13 +820,12 @@ private: boolean isDefault; hr = addedDeviceInfo->get_IsDefault (&isDefault); + if (FAILED (hr)) return S_OK; info.isDefault = isDefault != 0; - connectedDevices.add (info); - return S_OK; } @@ -702,7 +835,7 @@ private: HSTRING removedDeviceIdHstr; removedDeviceInfo->get_Id (&removedDeviceIdHstr); - String removedDeviceId = WinRTWrapper::getInstance()->hStringToString (removedDeviceIdHstr); + auto removedDeviceId = WinRTWrapper::getInstance()->hStringToString (removedDeviceIdHstr); for (int i = 0; i < connectedDevices.size(); ++i) { @@ -724,6 +857,7 @@ private: } StringArray result; + for (auto info : lastQueriedConnectedDevices.get()) result.add (info.name); @@ -733,6 +867,7 @@ private: int getDefaultDeviceIndex() { auto& lastDevices = lastQueriedConnectedDevices.get(); + for (int i = 0; i < lastDevices.size(); ++i) if (lastDevices[i].isDefault) return i; @@ -740,7 +875,7 @@ private: return 0; } - String getDeviceNameFromIndex (const int index) + String getDeviceNameFromIndex (int index) { if (isPositiveAndBelow (index, lastQueriedConnectedDevices.get().size())) return lastQueriedConnectedDevices.get()[index].name; @@ -748,7 +883,7 @@ private: return {}; } - String getDeviceID (const String name) + String getDeviceID (const String& name) { const ScopedLock lock (deviceChanges); @@ -773,16 +908,15 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiIODeviceWatcher); }; + //============================================================================== template - class OpenMidiPortThread : public Thread + struct OpenMidiPortThread : public Thread { - public: - OpenMidiPortThread (String threadName, - String midiDeviceId, + OpenMidiPortThread (String threadName, String midiDeviceID, ComSmartPtr& comFactory, ComSmartPtr& comPort) : Thread (threadName), - deviceId (midiDeviceId), + deviceID (midiDeviceID), factory (comFactory), port (comPort) { @@ -790,13 +924,15 @@ private: ~OpenMidiPortThread() { + stopThread (2000); } void run() override { - WinRTWrapper::ScopedHString hDeviceId (deviceId); + WinRTWrapper::ScopedHString hDeviceId (deviceID); ComSmartPtr> asyncOp; - HRESULT hr = factory->FromIdAsync (hDeviceId.get(), asyncOp.resetAndGetPointerAddress()); + auto hr = factory->FromIdAsync (hDeviceId.get(), asyncOp.resetAndGetPointerAddress()); + if (FAILED (hr)) return; @@ -806,7 +942,8 @@ private: if (asyncOpPtr == nullptr) return E_ABORT; - HRESULT hr = asyncOpPtr->GetResults (port.resetAndGetPointerAddress()); + auto hr = asyncOpPtr->GetResults (port.resetAndGetPointerAddress()); + if (FAILED (hr)) return hr; @@ -821,30 +958,28 @@ private: portOpened.wait (2000); } - const String deviceId; + const String deviceID; ComSmartPtr& factory; ComSmartPtr& port; - WaitableEvent portOpened { true }; }; + //============================================================================== struct WinRTInputWrapper : public InputWrapper { - WinRTInputWrapper (WinRTMidiService& service, - MidiInput* const input, - const int index, - MidiInputCallback& cb) + WinRTInputWrapper (WinRTMidiService& service, MidiInput& input, int index, MidiInputCallback& cb) : inputDevice (input), - callback (cb), - concatenator (4096) + callback (cb) { const ScopedLock lock (service.inputDeviceWatcher->deviceChanges); deviceName = service.inputDeviceWatcher->getDeviceNameFromIndex (index); + if (deviceName.isEmpty()) throw std::runtime_error ("Invalid device index"); - const auto deviceID = service.inputDeviceWatcher->getDeviceID (deviceName); + auto deviceID = service.inputDeviceWatcher->getDeviceID (deviceName); + if (deviceID.isEmpty()) throw std::runtime_error ("Device unavailable"); @@ -854,16 +989,18 @@ private: midiInPort); portThread.startThread(); portThread.waitForThreadToExit (-1); + if (midiInPort == nullptr) throw std::runtime_error ("Timed out waiting for midi input port creation"); startTime = Time::getMillisecondCounterHiRes(); - HRESULT hr = midiInPort->add_MessageReceived ( + auto hr = midiInPort->add_MessageReceived ( Callback> ( [this] (IMidiInPort*, IMidiMessageReceivedEventArgs* args) { return midiInMessageReceived (args); } ).Get(), &midiInMessageToken); + if (FAILED (hr)) throw std::runtime_error ("Failed to set midi input callback"); } @@ -878,7 +1015,7 @@ private: void start() override { - if (!isStarted) + if (! isStarted) { concatenator.reset(); isStarted = true; @@ -894,10 +1031,7 @@ private: } } - String getDeviceName() override - { - return deviceName; - } + String getDeviceName() override { return deviceName; } HRESULT midiInMessageReceived (IMidiMessageReceivedEventArgs* args) { @@ -905,50 +1039,53 @@ private: return S_OK; ComSmartPtr message; - HRESULT hr = args->get_Message (message.resetAndGetPointerAddress()); + auto hr = args->get_Message (message.resetAndGetPointerAddress()); + if (FAILED (hr)) return hr; ComSmartPtr buffer; hr = message->get_RawData (buffer.resetAndGetPointerAddress()); + if (FAILED (hr)) return hr; ComSmartPtr bufferByteAccess; hr = buffer->QueryInterface (bufferByteAccess.resetAndGetPointerAddress()); + if (FAILED (hr)) return hr; uint8_t* bufferData = nullptr; hr = bufferByteAccess->Buffer (&bufferData); + if (FAILED (hr)) return hr; uint32_t numBytes = 0; hr = buffer->get_Length (&numBytes); + if (FAILED (hr)) return hr; ABI::Windows::Foundation::TimeSpan timespan; hr = message->get_Timestamp (×pan); + if (FAILED (hr)) return hr; - concatenator.pushMidiData (bufferData, - numBytes, + concatenator.pushMidiData (bufferData, numBytes, convertTimeStamp (timespan.Duration), - inputDevice, - callback); - + &inputDevice, callback); return S_OK; } double convertTimeStamp (int64 timestamp) { - const auto millisecondsSinceStart = static_cast (timestamp) / 10000.0; - double t = startTime + millisecondsSinceStart; + auto millisecondsSinceStart = static_cast (timestamp) / 10000.0; + auto t = startTime + millisecondsSinceStart; + auto now = Time::getMillisecondCounterHiRes(); - const double now = Time::getMillisecondCounterHiRes(); if (t > now) { if (t > now + 2.0) @@ -960,10 +1097,10 @@ private: return t * 0.001; } - MidiInput* inputDevice; + MidiInput& inputDevice; MidiInputCallback& callback; String deviceName; - MidiDataConcatenator concatenator; + MidiDataConcatenator concatenator { 4096 }; ComSmartPtr midiInPort; EventRegistrationToken midiInMessageToken { 0 }; @@ -973,17 +1110,20 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WinRTInputWrapper); }; + //============================================================================== struct WinRTOutputWrapper : public OutputWrapper { - WinRTOutputWrapper (WinRTMidiService& service, const int index) + WinRTOutputWrapper (WinRTMidiService& service, int index) { const ScopedLock lock (service.outputDeviceWatcher->deviceChanges); deviceName = service.outputDeviceWatcher->getDeviceNameFromIndex (index); + if (deviceName.isEmpty()) throw std::runtime_error ("Invalid device index"); - const auto deviceID = service.outputDeviceWatcher->getDeviceID (deviceName); + auto deviceID = service.outputDeviceWatcher->getDeviceID (deviceName); + if (deviceID.isEmpty()) throw std::runtime_error ("Device unavailable"); @@ -993,22 +1133,27 @@ private: midiOutPort); portThread.startThread(); portThread.waitForThreadToExit (-1); + if (midiOutPort == nullptr) throw std::runtime_error ("Timed out waiting for midi output port creation"); auto bufferFactory = WinRTWrapper::getInstance()->getWRLFactory (&RuntimeClass_Windows_Storage_Streams_Buffer[0]); + if (bufferFactory == nullptr) throw std::runtime_error ("Failed to create output buffer factory"); - HRESULT hr = bufferFactory->Create (static_cast (65536), buffer.resetAndGetPointerAddress()); + auto hr = bufferFactory->Create (static_cast (65536), buffer.resetAndGetPointerAddress()); + if (FAILED (hr)) throw std::runtime_error ("Failed to create output buffer"); hr = buffer->QueryInterface (bufferByteAccess.resetAndGetPointerAddress()); + if (FAILED (hr)) throw std::runtime_error ("Failed to get buffer byte access"); hr = bufferByteAccess->Buffer (&bufferData); + if (FAILED (hr)) throw std::runtime_error ("Failed to get buffer data pointer"); } @@ -1017,20 +1162,17 @@ private: void sendMessageNow (const MidiMessage& message) override { - const UINT32 numBytes = message.getRawDataSize(); - HRESULT hr = buffer->put_Length (numBytes); + auto numBytes = message.getRawDataSize(); + auto hr = buffer->put_Length (numBytes); + if (FAILED (hr)) jassertfalse; memcpy_s (bufferData, numBytes, message.getRawData(), numBytes); - midiOutPort->SendBuffer (buffer); } - String getDeviceName() override - { - return deviceName; - } + String getDeviceName() override { return deviceName; } String deviceName; ComSmartPtr midiOutPort; @@ -1041,137 +1183,79 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WinRTOutputWrapper); }; -public: - WinRTMidiService() - { - if (! WinRTWrapper::getInstance()->isInitialised()) - throw std::runtime_error ("Failed to initialise the WinRT wrapper"); - - midiInFactory = WinRTWrapper::getInstance()->getWRLFactory (&RuntimeClass_Windows_Devices_Midi_MidiInPort[0]); - if (midiInFactory == nullptr) - throw std::runtime_error ("Failed to create midi in factory"); - - midiOutFactory = WinRTWrapper::getInstance()->getWRLFactory (&RuntimeClass_Windows_Devices_Midi_MidiOutPort[0]); - if (midiOutFactory == nullptr) - throw std::runtime_error ("Failed to create midi out factory"); + ComSmartPtr midiInFactory; + ComSmartPtr midiOutFactory; - inputDeviceWatcher = new MidiIODeviceWatcher (midiInFactory); - if (! inputDeviceWatcher->start()) - throw std::runtime_error ("Failed to start midi input device watcher"); + std::unique_ptr> inputDeviceWatcher; + std::unique_ptr> outputDeviceWatcher; - outputDeviceWatcher = new MidiIODeviceWatcher (midiOutFactory); - if (! outputDeviceWatcher->start()) - throw std::runtime_error ("Failed to start midi output device watcher"); - } + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WinRTMidiService) +}; - ~WinRTMidiService() - { - } +#endif // JUCE_USE_WINRT_MIDI - StringArray getDevices (bool isInput) override +//============================================================================== +struct MidiService : public DeletedAtShutdown +{ + MidiService() { - return isInput ? inputDeviceWatcher ->getDevices() - : outputDeviceWatcher->getDevices(); - } + #if JUCE_USE_WINRT_MIDI + try + { + internal.reset (new WinRTMidiService()); + return; + } + catch (std::runtime_error&) {} + #endif - int getDefaultDeviceIndex (bool isInput) override - { - return isInput ? inputDeviceWatcher ->getDefaultDeviceIndex() - : outputDeviceWatcher->getDefaultDeviceIndex(); + internal.reset (new Win32MidiService()); } - InputWrapper* createInputWrapper (MidiInput* input, int index, MidiInputCallback* callback) override + ~MidiService() { - return new WinRTInputWrapper (*this, input, index, *callback); + clearSingletonInstance(); } - OutputWrapper* createOutputWrapper (int index) override + static MidiServiceType& getService() { - return new WinRTOutputWrapper (*this, index); + jassert (getInstance()->internal != nullptr); + return *getInstance()->internal.get(); } - ComSmartPtr midiInFactory; - ComSmartPtr midiOutFactory; - - ScopedPointer> inputDeviceWatcher; - ScopedPointer> outputDeviceWatcher; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WinRTMidiService) -}; - -#endif // JUCE_USE_WINRT_MIDI - -//============================================================================== -class MidiService : public DeletedAtShutdown -{ -public: - ~MidiService(); - - MidiServiceType* getService(); - JUCE_DECLARE_SINGLETON (MidiService, false) private: - MidiService(); - - ScopedPointer internal; + std::unique_ptr internal; }; JUCE_IMPLEMENT_SINGLETON (MidiService) -MidiService::~MidiService() -{ - clearSingletonInstance(); -} - -MidiServiceType* MidiService::getService() -{ - return internal.get(); -} - -MidiService::MidiService() -{ - #if JUCE_USE_WINRT_MIDI - try - { - internal = new WinRTMidiService(); - return; - } - catch (std::runtime_error&) - { - } - #endif - - internal = new WindowsMidiService(); -} - //============================================================================== StringArray MidiInput::getDevices() { - return MidiService::getInstance()->getService()->getDevices (true); + return MidiService::getService().getDevices (true); } int MidiInput::getDefaultDeviceIndex() { - return MidiService::getInstance()->getService()->getDefaultDeviceIndex (true); + return MidiService::getService().getDefaultDeviceIndex (true); } -MidiInput::MidiInput (const String& deviceName) - : name (deviceName) +MidiInput::MidiInput (const String& deviceName) : name (deviceName) { } -MidiInput* MidiInput::openDevice (const int index, MidiInputCallback* const callback) +MidiInput* MidiInput::openDevice (int index, MidiInputCallback* callback) { if (callback == nullptr) return nullptr; - ScopedPointer in (new MidiInput (String())); - ScopedPointer wrapper; + std::unique_ptr in (new MidiInput (String())); + std::unique_ptr wrapper; try { - wrapper = MidiService::getInstance()->getService()->createInputWrapper (in, index, callback); + wrapper.reset (MidiService::getService().createInputWrapper (*in, index, *callback)); } catch (std::runtime_error&) { @@ -1194,28 +1278,28 @@ void MidiInput::stop() { static_cast (interna //============================================================================== StringArray MidiOutput::getDevices() { - return MidiService::getInstance()->getService()->getDevices (false); + return MidiService::getService().getDevices (false); } int MidiOutput::getDefaultDeviceIndex() { - return MidiService::getInstance()->getService()->getDefaultDeviceIndex (false); + return MidiService::getService().getDefaultDeviceIndex (false); } -MidiOutput* MidiOutput::openDevice (const int index) +MidiOutput* MidiOutput::openDevice (int index) { - ScopedPointer wrapper; + std::unique_ptr wrapper; try { - wrapper = MidiService::getInstance()->getService()->createOutputWrapper (index); + wrapper.reset (MidiService::getService().createOutputWrapper (index)); } catch (std::runtime_error&) { return nullptr; } - ScopedPointer out (new MidiOutput (wrapper->getDeviceName())); + std::unique_ptr out (new MidiOutput (wrapper->getDeviceName())); out->internal = wrapper.release(); return out.release(); } diff --git a/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp b/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp index eb3df5bb..62908fed 100644 --- a/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp +++ b/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp @@ -192,7 +192,7 @@ JUCE_IUNKNOWNCLASS (IMMDeviceEnumerator, "A95664D2-9614-4F35-A746-DE8DB63617E6") JUCE_COMCLASS (MMDeviceEnumerator, "BCDE0395-E52F-467C-8E3D-C4579291692E"); -typedef LONGLONG REFERENCE_TIME; +using REFERENCE_TIME = LONGLONG; enum AVRT_PRIORITY { @@ -308,7 +308,7 @@ JUCE_IUNKNOWNCLASS (IAudioSessionControl, "F4B1A599-7266-4319-A8CA-E70ACB11E8CD" namespace WasapiClasses { -String getDeviceID (IMMDevice* const device) +String getDeviceID (IMMDevice* device) { String s; WCHAR* deviceId = nullptr; @@ -332,17 +332,17 @@ EDataFlow getDataFlow (const ComSmartPtr& device) return flow; } -int refTimeToSamples (const REFERENCE_TIME& t, const double sampleRate) noexcept +int refTimeToSamples (const REFERENCE_TIME& t, double sampleRate) noexcept { return roundToInt (sampleRate * ((double) t) * 0.0000001); } -REFERENCE_TIME samplesToRefTime (const int numSamples, const double sampleRate) noexcept +REFERENCE_TIME samplesToRefTime (int numSamples, double sampleRate) noexcept { return (REFERENCE_TIME) ((numSamples * 10000.0 * 1000.0 / sampleRate) + 0.5); } -void copyWavFormat (WAVEFORMATEXTENSIBLE& dest, const WAVEFORMATEX* const src) noexcept +void copyWavFormat (WAVEFORMATEXTENSIBLE& dest, const WAVEFORMATEX* src) noexcept { memcpy (&dest, src, src->wFormatTag == WAVE_FORMAT_EXTENSIBLE ? sizeof (WAVEFORMATEXTENSIBLE) : sizeof (WAVEFORMATEX)); @@ -352,21 +352,8 @@ void copyWavFormat (WAVEFORMATEXTENSIBLE& dest, const WAVEFORMATEX* const src) n class WASAPIDeviceBase { public: - WASAPIDeviceBase (const ComSmartPtr& d, const bool exclusiveMode) - : device (d), - sampleRate (0), - defaultSampleRate (0), - numChannels (0), - actualNumChannels (0), - minBufferSize (0), - defaultBufferSize (0), - latencySamples (0), - useExclusiveMode (exclusiveMode), - actualBufferSize (0), - bytesPerSample (0), - bytesPerFrame (0), - sampleRateHasChanged (false), - shouldClose (false) + WASAPIDeviceBase (const ComSmartPtr& d, bool exclusiveMode) + : device (d), useExclusiveMode (exclusiveMode) { clientEvent = CreateEvent (nullptr, false, false, nullptr); @@ -443,20 +430,19 @@ public: { sampleRateHasChanged = false; shouldClose = false; - channelMaps.clear(); + for (int i = 0; i <= channels.getHighestBit(); ++i) if (channels[i]) channelMaps.add (i); REFERENCE_TIME latency; + if (check (client->GetStreamLatency (&latency))) latencySamples = refTimeToSamples (latency, sampleRate); (void) check (client->GetBufferSize (&actualBufferSize)); - createSessionEventCallback(); - return check (client->SetEventHandle (clientEvent)); } @@ -486,26 +472,25 @@ public: //============================================================================== ComSmartPtr device; ComSmartPtr client; - double sampleRate, defaultSampleRate; - int numChannels, actualNumChannels; - int minBufferSize, defaultBufferSize, latencySamples; - DWORD mixFormatChannelMask; + double sampleRate = 0, defaultSampleRate = 0; + int numChannels = 0, actualNumChannels = 0; + int minBufferSize = 0, defaultBufferSize = 0, latencySamples = 0; + DWORD mixFormatChannelMask = 0; const bool useExclusiveMode; Array rates; - HANDLE clientEvent; + HANDLE clientEvent = {}; BigInteger channels; Array channelMaps; - UINT32 actualBufferSize; - int bytesPerSample, bytesPerFrame; - bool sampleRateHasChanged, shouldClose; + UINT32 actualBufferSize = 0; + int bytesPerSample = 0, bytesPerFrame = 0; + bool sampleRateHasChanged = false, shouldClose = false; virtual void updateFormat (bool isFloat) = 0; private: //============================================================================== - class SessionEventCallback : public ComBaseClassHelper + struct SessionEventCallback : public ComBaseClassHelper { - public: SessionEventCallback (WASAPIDeviceBase& d) : owner (d) {} JUCE_COMRESULT OnDisplayNameChanged (LPCWSTR, LPCGUID) { return S_OK; } @@ -513,6 +498,7 @@ private: JUCE_COMRESULT OnSimpleVolumeChanged (float, BOOL, LPCGUID) { return S_OK; } JUCE_COMRESULT OnChannelVolumeChanged (DWORD, float*, DWORD, LPCGUID) { return S_OK; } JUCE_COMRESULT OnGroupingParamChanged (LPCGUID, LPCGUID) { return S_OK; } + JUCE_COMRESULT OnStateChanged(AudioSessionState state) { if (state == AudioSessionStateInactive || state == AudioSessionStateExpired) @@ -530,9 +516,7 @@ private: return S_OK; } - private: WASAPIDeviceBase& owner; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SessionEventCallback) }; @@ -644,7 +628,7 @@ private: return false; } - bool tryInitialisingWithBufferSize (const int bufferSizeSamples) + bool tryInitialisingWithBufferSize (int bufferSizeSamples) { WAVEFORMATEXTENSIBLE format; @@ -701,9 +685,8 @@ private: class WASAPIInputDevice : public WASAPIDeviceBase { public: - WASAPIInputDevice (const ComSmartPtr& d, const bool exclusiveMode) - : WASAPIDeviceBase (d, exclusiveMode), - reservoir (1, 1) + WASAPIInputDevice (const ComSmartPtr& d, bool exclusiveMode) + : WASAPIDeviceBase (d, exclusiveMode) { } @@ -712,7 +695,7 @@ public: close(); } - bool open (const double newSampleRate, const BigInteger& newChannels, int bufferSizeSamples) + bool open (double newSampleRate, const BigInteger& newChannels, int bufferSizeSamples) { return openClient (newSampleRate, newChannels, bufferSizeSamples) && (numChannels == 0 || check (client->GetService (__uuidof (IAudioCaptureClient), @@ -724,14 +707,15 @@ public: closeClient(); captureClient = nullptr; reservoir.reset(); - reservoirReadPos = reservoirWritePos = 0; + reservoirReadPos = 0; + reservoirWritePos = 0; } template void updateFormatWithType (SourceType*) noexcept { - typedef AudioData::Pointer NativeType; - converter = new AudioData::ConverterInstance, NativeType> (actualNumChannels, 1); + using NativeType = AudioData::Pointer; + converter.reset (new AudioData::ConverterInstance, NativeType> (actualNumChannels, 1)); } void updateFormat (bool isFloat) override @@ -742,12 +726,13 @@ public: else updateFormatWithType ((AudioData::Int16*) nullptr); } - bool start (const int userBufferSize) + bool start (int userBufferSize) { reservoirSize = actualBufferSize + userBufferSize; reservoirMask = nextPowerOfTwo (reservoirSize) - 1; reservoir.setSize ((reservoirMask + 1) * bytesPerFrame, true); - reservoirReadPos = reservoirWritePos = 0; + reservoirReadPos = 0; + reservoirWritePos = 0; xruns = 0; if (! check (client->Start())) @@ -768,7 +753,7 @@ public: captureClient->ReleaseBuffer (numSamplesAvailable); } - int getNumSamplesInReservoir() const noexcept { return reservoirWritePos - reservoirReadPos; } + int getNumSamplesInReservoir() const noexcept { return reservoirWritePos.load() - reservoirReadPos.load(); } void handleDeviceBuffer() { @@ -788,9 +773,9 @@ public: while (samplesLeft > 0) { - const int localWrite = reservoirWritePos & reservoirMask; - const int samplesToDo = jmin (samplesLeft, reservoirMask + 1 - localWrite); - const int samplesToDoBytes = samplesToDo * bytesPerFrame; + auto localWrite = reservoirWritePos.load() & reservoirMask; + auto samplesToDo = jmin (samplesLeft, reservoirMask + 1 - localWrite); + auto samplesToDoBytes = samplesToDo * bytesPerFrame; void* reservoirPtr = addBytesToPointer (reservoir.getData(), localWrite * bytesPerFrame); @@ -805,7 +790,7 @@ public: } if (getNumSamplesInReservoir() > reservoirSize) - reservoirReadPos = reservoirWritePos - reservoirSize; + reservoirReadPos = reservoirWritePos.load() - reservoirSize; captureClient->ReleaseBuffer (numSamplesAvailable); } @@ -829,13 +814,13 @@ public: while (bufferSize > 0) { - const int localRead = reservoirReadPos & reservoirMask; + auto localRead = reservoirReadPos.load() & reservoirMask; + auto samplesToDo = jmin (bufferSize, getNumSamplesInReservoir(), reservoirMask + 1 - localRead); - const int samplesToDo = jmin (bufferSize, getNumSamplesInReservoir(), reservoirMask + 1 - localRead); if (samplesToDo <= 0) break; - const int reservoirOffset = localRead * bytesPerFrame; + auto reservoirOffset = localRead * bytesPerFrame; for (int i = 0; i < numDestBuffers; ++i) converter->convertSamples (destBuffers[i] + offset, 0, addBytesToPointer (reservoir.getData(), reservoirOffset), channelMaps.getUnchecked(i), samplesToDo); @@ -849,9 +834,9 @@ public: ComSmartPtr captureClient; MemoryBlock reservoir; int reservoirSize, reservoirMask, xruns; - volatile int reservoirReadPos, reservoirWritePos; + std::atomic reservoirReadPos, reservoirWritePos; - ScopedPointer converter; + std::unique_ptr converter; private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WASAPIInputDevice) @@ -861,7 +846,7 @@ private: class WASAPIOutputDevice : public WASAPIDeviceBase { public: - WASAPIOutputDevice (const ComSmartPtr& d, const bool exclusiveMode) + WASAPIOutputDevice (const ComSmartPtr& d, bool exclusiveMode) : WASAPIDeviceBase (d, exclusiveMode) { } @@ -871,7 +856,7 @@ public: close(); } - bool open (const double newSampleRate, const BigInteger& newChannels, int bufferSizeSamples) + bool open (double newSampleRate, const BigInteger& newChannels, int bufferSizeSamples) { return openClient (newSampleRate, newChannels, bufferSizeSamples) && (numChannels == 0 || check (client->GetService (__uuidof (IAudioRenderClient), @@ -887,8 +872,8 @@ public: template void updateFormatWithType (DestType*) { - typedef AudioData::Pointer NativeType; - converter = new AudioData::ConverterInstance> (1, actualNumChannels); + using NativeType = AudioData::Pointer; + converter.reset (new AudioData::ConverterInstance> (1, actualNumChannels)); } void updateFormat (bool isFloat) override @@ -901,7 +886,7 @@ public: bool start() { - int samplesToDo = getNumSamplesAvailableToCopy(); + auto samplesToDo = getNumSamplesAvailableToCopy(); uint8* outputData; if (check (renderClient->GetBuffer (samplesToDo, &outputData))) @@ -918,6 +903,7 @@ public: if (! useExclusiveMode) { UINT32 padding = 0; + if (check (client->GetCurrentPadding (&padding))) return actualBufferSize - (int) padding; } @@ -925,7 +911,7 @@ public: return actualBufferSize; } - void copyBuffers (const float** const srcBuffers, const int numSrcBuffers, int bufferSize, + void copyBuffers (const float** srcBuffers, int numSrcBuffers, int bufferSize, WASAPIInputDevice* inputDevice, Thread& thread) { if (numChannels <= 0) @@ -969,7 +955,7 @@ public: } ComSmartPtr renderClient; - ScopedPointer converter; + std::unique_ptr converter; private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WASAPIOutputDevice) @@ -985,18 +971,12 @@ public: const String& typeName, const String& outputDeviceID, const String& inputDeviceID, - const bool exclusiveMode) + bool exclusiveMode) : AudioIODevice (deviceName, typeName), Thread ("JUCE WASAPI"), outputDeviceId (outputDeviceID), inputDeviceId (inputDeviceID), - useExclusiveMode (exclusiveMode), - isOpen_ (false), - isStarted (false), - currentBufferSizeSamples (0), - currentSampleRate (0), - callback (nullptr), - deviceBecameInactive (false) + useExclusiveMode (exclusiveMode) { } @@ -1024,8 +1004,8 @@ public: } else { - WASAPIDeviceBase* d = inputDevice != nullptr ? static_cast (inputDevice) - : static_cast (outputDevice); + WASAPIDeviceBase* d = inputDevice != nullptr ? static_cast (inputDevice.get()) + : static_cast (outputDevice.get()); defaultSampleRate = d->defaultSampleRate; minBufferSize = d->minBufferSize; defaultBufferSize = d->defaultBufferSize; @@ -1085,7 +1065,7 @@ public: BigInteger getActiveOutputChannels() const override { return outputDevice != nullptr ? outputDevice->channels : BigInteger(); } BigInteger getActiveInputChannels() const override { return inputDevice != nullptr ? inputDevice->channels : BigInteger(); } String getLastError() override { return lastError; } - int getXRunCount () const noexcept override { return inputDevice != nullptr ? inputDevice->xruns : -1; } + int getXRunCount() const noexcept override { return inputDevice != nullptr ? inputDevice->xruns : -1; } String open (const BigInteger& inputChannels, const BigInteger& outputChannels, double sampleRate, int bufferSizeSamples) override @@ -1209,7 +1189,7 @@ public: { if (isStarted) { - AudioIODeviceCallback* const callbackLocal = callback; + auto* callbackLocal = callback; { const ScopedLock sl (startStopLock); @@ -1230,9 +1210,8 @@ public: if (avSetMmThreadCharacteristics != 0 && avSetMmThreadPriority != 0) { DWORD dummy = 0; - HANDLE h = avSetMmThreadCharacteristics (L"Pro Audio", &dummy); - if (h != 0) + if (auto h = avSetMmThreadCharacteristics (L"Pro Audio", &dummy)) avSetMmThreadPriority (h, AVRT_PRIORITY_NORMAL); } } @@ -1241,15 +1220,15 @@ public: { setMMThreadPriority(); - const int bufferSize = currentBufferSizeSamples; - const int numInputBuffers = getActiveInputChannels().countNumberOfSetBits(); - const int numOutputBuffers = getActiveOutputChannels().countNumberOfSetBits(); + auto bufferSize = currentBufferSizeSamples; + auto numInputBuffers = getActiveInputChannels().countNumberOfSetBits(); + auto numOutputBuffers = getActiveOutputChannels().countNumberOfSetBits(); bool sampleRateHasChanged = false; AudioBuffer ins (jmax (1, numInputBuffers), bufferSize + 32); AudioBuffer outs (jmax (1, numOutputBuffers), bufferSize + 32); - float** const inputBuffers = ins.getArrayOfWritePointers(); - float** const outputBuffers = outs.getArrayOfWritePointers(); + auto inputBuffers = ins.getArrayOfWritePointers(); + auto outputBuffers = outs.getArrayOfWritePointers(); ins.clear(); outs.clear(); @@ -1303,7 +1282,7 @@ public: { // Note that this function is handed the input device so it can check for the event and make sure // the input reservoir is filled up correctly even when bufferSize > device actualBufferSize - outputDevice->copyBuffers (const_cast (outputBuffers), numOutputBuffers, bufferSize, inputDevice, *this); + outputDevice->copyBuffers (const_cast (outputBuffers), numOutputBuffers, bufferSize, inputDevice.get(), *this); if (outputDevice->sampleRateHasChanged) { @@ -1326,24 +1305,24 @@ public: private: // Device stats... - ScopedPointer inputDevice; - ScopedPointer outputDevice; + std::unique_ptr inputDevice; + std::unique_ptr outputDevice; const bool useExclusiveMode; - double defaultSampleRate; - int minBufferSize, defaultBufferSize; - int latencyIn, latencyOut; + double defaultSampleRate = 0; + int minBufferSize = 0, defaultBufferSize = 0; + int latencyIn = 0, latencyOut = 0; Array sampleRates; Array bufferSizes; // Active state... - bool isOpen_, isStarted; - int currentBufferSizeSamples; - double currentSampleRate; + bool isOpen_ = false, isStarted = false; + int currentBufferSizeSamples = 0; + double currentSampleRate = 0; - AudioIODeviceCallback* callback; + AudioIODeviceCallback* callback = {}; CriticalSection startStopLock; - bool sampleRateChangedByOutput, deviceBecameInactive; + bool sampleRateChangedByOutput = false, deviceBecameInactive = false; BigInteger lastKnownInputChannels, lastKnownOutputChannels; @@ -1351,37 +1330,42 @@ private: bool createDevices() { ComSmartPtr enumerator; + if (! check (enumerator.CoCreateInstance (__uuidof (MMDeviceEnumerator)))) return false; ComSmartPtr deviceCollection; + if (! check (enumerator->EnumAudioEndpoints (eAll, DEVICE_STATE_ACTIVE, deviceCollection.resetAndGetPointerAddress()))) return false; UINT32 numDevices = 0; + if (! check (deviceCollection->GetCount (&numDevices))) return false; for (UINT32 i = 0; i < numDevices; ++i) { ComSmartPtr device; + if (! check (deviceCollection->Item (i, device.resetAndGetPointerAddress()))) continue; - const String deviceId (getDeviceID (device)); + auto deviceId = getDeviceID (device); + if (deviceId.isEmpty()) continue; - const EDataFlow flow = getDataFlow (device); + auto flow = getDataFlow (device); if (deviceId == inputDeviceId && flow == eCapture) - inputDevice = new WASAPIInputDevice (device, useExclusiveMode); + inputDevice.reset (new WASAPIInputDevice (device, useExclusiveMode)); else if (deviceId == outputDeviceId && flow == eRender) - outputDevice = new WASAPIOutputDevice (device, useExclusiveMode); + outputDevice.reset (new WASAPIOutputDevice (device, useExclusiveMode)); } return (outputDeviceId.isEmpty() || (outputDevice != nullptr && outputDevice->isOk())) - && (inputDeviceId.isEmpty() || (inputDevice != nullptr && inputDevice->isOk())); + && (inputDeviceId.isEmpty() || (inputDevice != nullptr && inputDevice->isOk())); } //============================================================================== @@ -1428,8 +1412,7 @@ public: WASAPIAudioIODeviceType (bool exclusive) : AudioIODeviceType (exclusive ? "Windows Audio (Exclusive Mode)" : "Windows Audio"), DeviceChangeDetector (L"Windows Audio"), - exclusiveMode (exclusive), - hasScanned (false) + exclusiveMode (exclusive) { } @@ -1471,7 +1454,7 @@ public: { jassert (hasScanned); // need to call scanForDevices() before doing this - if (WASAPIAudioIODevice* const d = dynamic_cast (device)) + if (auto d = dynamic_cast (device)) return asInput ? inputDeviceIds.indexOf (d->inputDeviceId) : outputDeviceIds.indexOf (d->outputDeviceId); @@ -1485,19 +1468,19 @@ public: { jassert (hasScanned); // need to call scanForDevices() before doing this - ScopedPointer device; + std::unique_ptr device; - const int outputIndex = outputDeviceNames.indexOf (outputDeviceName); - const int inputIndex = inputDeviceNames.indexOf (inputDeviceName); + auto outputIndex = outputDeviceNames.indexOf (outputDeviceName); + auto inputIndex = inputDeviceNames.indexOf (inputDeviceName); if (outputIndex >= 0 || inputIndex >= 0) { - device = new WASAPIAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName - : inputDeviceName, - getTypeName(), - outputDeviceIds [outputIndex], - inputDeviceIds [inputIndex], - exclusiveMode); + device.reset (new WASAPIAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName + : inputDeviceName, + getTypeName(), + outputDeviceIds [outputIndex], + inputDeviceIds [inputIndex], + exclusiveMode)); if (! device->initialise()) device = nullptr; @@ -1511,7 +1494,8 @@ public: StringArray inputDeviceNames, inputDeviceIds; private: - bool exclusiveMode, hasScanned; + const bool exclusiveMode; + bool hasScanned = false; ComSmartPtr enumerator; //============================================================================== @@ -1538,7 +1522,7 @@ private: ComSmartPtr notifyClient; //============================================================================== - static String getDefaultEndpoint (IMMDeviceEnumerator* const enumerator, const bool forCapture) + static String getDefaultEndpoint (IMMDeviceEnumerator* enumerator, bool forCapture) { String s; IMMDevice* dev = nullptr; @@ -1575,8 +1559,8 @@ private: enumerator->RegisterEndpointNotificationCallback (notifyClient); } - const String defaultRenderer (getDefaultEndpoint (enumerator, false)); - const String defaultCapture (getDefaultEndpoint (enumerator, true)); + auto defaultRenderer = getDefaultEndpoint (enumerator, false); + auto defaultCapture = getDefaultEndpoint (enumerator, true); ComSmartPtr deviceCollection; UINT32 numDevices = 0; @@ -1588,18 +1572,21 @@ private: for (UINT32 i = 0; i < numDevices; ++i) { ComSmartPtr device; + if (! check (deviceCollection->Item (i, device.resetAndGetPointerAddress()))) continue; DWORD state = 0; + if (! (check (device->GetState (&state)) && state == DEVICE_STATE_ACTIVE)) continue; - const String deviceId (getDeviceID (device)); + auto deviceId = getDeviceID (device); String name; { ComSmartPtr properties; + if (! check (device->OpenPropertyStore (STGM_READ, properties.resetAndGetPointerAddress()))) continue; @@ -1615,7 +1602,7 @@ private: PropVariantClear (&value); } - const EDataFlow flow = getDataFlow (device); + auto flow = getDataFlow (device); if (flow == eRender) { @@ -1666,9 +1653,11 @@ struct MMDeviceMasterVolume MMDeviceMasterVolume() { ComSmartPtr enumerator; + if (check (enumerator.CoCreateInstance (__uuidof (MMDeviceEnumerator)))) { ComSmartPtr device; + if (check (enumerator->GetDefaultAudioEndpoint (eRender, eConsole, device.resetAndGetPointerAddress()))) check (device->Activate (__uuidof (IAudioEndpointVolume), CLSCTX_INPROC_SERVER, nullptr, (void**) endpointVolume.resetAndGetPointerAddress())); @@ -1678,6 +1667,7 @@ struct MMDeviceMasterVolume float getGain() const { float vol = 0.0f; + if (endpointVolume != nullptr) check (endpointVolume->GetMasterVolumeLevelScalar (&vol)); diff --git a/modules/juce_audio_devices/sources/juce_AudioTransportSource.cpp b/modules/juce_audio_devices/sources/juce_AudioTransportSource.cpp index bbc3d8ae..34e05748 100644 --- a/modules/juce_audio_devices/sources/juce_AudioTransportSource.cpp +++ b/modules/juce_audio_devices/sources/juce_AudioTransportSource.cpp @@ -53,8 +53,8 @@ void AudioTransportSource::setSource (PositionableAudioSource* const newSource, PositionableAudioSource* newPositionableSource = nullptr; AudioSource* newMasterSource = nullptr; - ScopedPointer oldResamplerSource (resamplerSource); - ScopedPointer oldBufferingSource (bufferingSource); + std::unique_ptr oldResamplerSource (resamplerSource); + std::unique_ptr oldBufferingSource (bufferingSource); AudioSource* oldMasterSource = masterSource; if (newSource != nullptr) diff --git a/modules/juce_audio_devices/sources/juce_AudioTransportSource.h b/modules/juce_audio_devices/sources/juce_AudioTransportSource.h index 1dde6828..5ac8dfa4 100644 --- a/modules/juce_audio_devices/sources/juce_AudioTransportSource.h +++ b/modules/juce_audio_devices/sources/juce_AudioTransportSource.h @@ -166,11 +166,11 @@ private: AudioSource* masterSource = nullptr; CriticalSection callbackLock; - float volatile gain = 1.0f, lastGain = 1.0f; - bool volatile playing = false, stopped = true; + float gain = 1.0f, lastGain = 1.0f; + bool playing = false, stopped = true; double sampleRate = 44100.0, sourceSampleRate = 0; int blockSize = 128, readAheadBufferSize = 0; - bool volatile isPrepared = false, inputStreamEOF = false; + bool isPrepared = false, inputStreamEOF = false; void releaseMasterResources(); diff --git a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp index 38b472ef..6d43ce3b 100644 --- a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp @@ -960,7 +960,7 @@ bool AiffAudioFormat::canHandleFile (const File& f) AudioFormatReader* AiffAudioFormat::createReaderFor (InputStream* sourceStream, bool deleteStreamIfOpeningFails) { - ScopedPointer w (new AiffAudioFormatReader (sourceStream)); + std::unique_ptr w (new AiffAudioFormatReader (sourceStream)); if (w->sampleRate > 0 && w->numChannels > 0) return w.release(); diff --git a/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp index c86abe15..582362fd 100644 --- a/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp @@ -570,7 +570,7 @@ bool CoreAudioFormat::canDoMono() { return true; } AudioFormatReader* CoreAudioFormat::createReaderFor (InputStream* sourceStream, bool deleteStreamIfOpeningFails) { - ScopedPointer r (new CoreAudioReader (sourceStream)); + std::unique_ptr r (new CoreAudioReader (sourceStream)); if (r->ok) return r.release(); diff --git a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp index 6134ebff..b83935c8 100644 --- a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp @@ -560,7 +560,7 @@ bool FlacAudioFormat::isCompressed() { return true; } AudioFormatReader* FlacAudioFormat::createReaderFor (InputStream* in, const bool deleteStreamIfOpeningFails) { - ScopedPointer r (new FlacReader (in)); + std::unique_ptr r (new FlacReader (in)); if (r->sampleRate > 0) return r.release(); @@ -580,7 +580,7 @@ AudioFormatWriter* FlacAudioFormat::createWriterFor (OutputStream* out, { if (out != nullptr && getPossibleBitDepths().contains (bitsPerSample)) { - ScopedPointer w (new FlacWriter (out, sampleRate, numberOfChannels, + std::unique_ptr w (new FlacWriter (out, sampleRate, numberOfChannels, (uint32) bitsPerSample, qualityOptionIndex)); if (w->ok) return w.release(); diff --git a/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp index e8eeb3da..b39dbbfc 100644 --- a/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp @@ -44,8 +44,8 @@ public: if (auto* out = tempWav.getFile().createOutputStream()) { - writer = wavFormat.createWriterFor (out, sampleRate, numChannels, - bitsPerSample, metadata, 0); + writer.reset (wavFormat.createWriterFor (out, sampleRate, numChannels, + bitsPerSample, metadata, 0)); args.add (appFile.getFullPathName()); @@ -104,7 +104,7 @@ public: private: int vbrLevel, cbrBitrate; TemporaryFile tempWav { ".wav" }; - ScopedPointer writer; + std::unique_ptr writer; StringArray args; bool runLameChildProcess (const TemporaryFile& tempMP3, const StringArray& processArgs) const diff --git a/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp index a565f4c7..ffa9a2fd 100644 --- a/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp @@ -3132,7 +3132,7 @@ StringArray MP3AudioFormat::getQualityOptions() { return {}; } AudioFormatReader* MP3AudioFormat::createReaderFor (InputStream* sourceStream, const bool deleteStreamIfOpeningFails) { - ScopedPointer r (new MP3Decoder::MP3Reader (sourceStream)); + std::unique_ptr r (new MP3Decoder::MP3Reader (sourceStream)); if (r->lengthInSamples > 0) return r.release(); diff --git a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp index f106c165..ae46ec2a 100644 --- a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp @@ -448,7 +448,7 @@ bool OggVorbisAudioFormat::isCompressed() { return true; } AudioFormatReader* OggVorbisAudioFormat::createReaderFor (InputStream* in, bool deleteStreamIfOpeningFails) { - ScopedPointer r (new OggReader (in)); + std::unique_ptr r (new OggReader (in)); if (r->sampleRate > 0) return r.release(); @@ -469,9 +469,9 @@ AudioFormatWriter* OggVorbisAudioFormat::createWriterFor (OutputStream* out, if (out == nullptr) return nullptr; - ScopedPointer w (new OggWriter (out, sampleRate, numChannels, - (unsigned int) bitsPerSample, - qualityOptionIndex, metadataValues)); + std::unique_ptr w (new OggWriter (out, sampleRate, numChannels, + (unsigned int) bitsPerSample, + qualityOptionIndex, metadataValues)); return w->ok ? w.release() : nullptr; } @@ -486,7 +486,7 @@ int OggVorbisAudioFormat::estimateOggFileQuality (const File& source) { if (auto* in = source.createInputStream()) { - ScopedPointer r (createReaderFor (in, true)); + std::unique_ptr r (createReaderFor (in, true)); if (r != nullptr) { diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp index 1954b8b8..975e86da 100644 --- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp @@ -849,7 +849,7 @@ namespace WavFileHelpers { static void addToMetadata (StringPairArray& destValues, const String& source) { - ScopedPointer xml (XmlDocument::parse (source)); + std::unique_ptr xml (XmlDocument::parse (source)); if (xml != nullptr && xml->hasTagName ("ebucore:ebuCoreMain")) { @@ -1134,10 +1134,10 @@ public: auto identifier = (uint32) input->readInt(); auto sampleLength = (uint32) input->readInt(); auto purpose = (uint32) input->readInt(); - auto country = (uint16) input->readInt(); - auto language = (uint16) input->readInt(); - auto dialect = (uint16) input->readInt(); - auto codePage = (uint16) input->readInt(); + auto country = (uint16) input->readShort(); + auto language = (uint16) input->readShort(); + auto dialect = (uint16) input->readShort(); + auto codePage = (uint16) input->readShort(); auto stringLength = adtlLength - 20; MemoryBlock textBlock; @@ -1672,7 +1672,7 @@ bool WavAudioFormat::isChannelLayoutSupported (const AudioChannelSet& channelSet AudioFormatReader* WavAudioFormat::createReaderFor (InputStream* sourceStream, bool deleteStreamIfOpeningFails) { - ScopedPointer r (new WavAudioFormatReader (sourceStream)); + std::unique_ptr r (new WavAudioFormatReader (sourceStream)); #if JUCE_USE_OGGVORBIS if (r->isSubformatOggVorbis) @@ -1738,17 +1738,17 @@ namespace WavFileHelpers TemporaryFile tempFile (file); WavAudioFormat wav; - ScopedPointer reader (wav.createReaderFor (file.createInputStream(), true)); + std::unique_ptr reader (wav.createReaderFor (file.createInputStream(), true)); if (reader != nullptr) { - ScopedPointer outStream (tempFile.getFile().createOutputStream()); + std::unique_ptr outStream (tempFile.getFile().createOutputStream()); if (outStream != nullptr) { - ScopedPointer writer (wav.createWriterFor (outStream.get(), reader->sampleRate, - reader->numChannels, (int) reader->bitsPerSample, - metadata, 0)); + std::unique_ptr writer (wav.createWriterFor (outStream.get(), reader->sampleRate, + reader->numChannels, (int) reader->bitsPerSample, + metadata, 0)); if (writer != nullptr) { @@ -1771,7 +1771,7 @@ bool WavAudioFormat::replaceMetadataInFile (const File& wavFile, const StringPai { using namespace WavFileHelpers; - ScopedPointer reader (static_cast (createReaderFor (wavFile.createInputStream(), true))); + std::unique_ptr reader (static_cast (createReaderFor (wavFile.createInputStream(), true))); if (reader != nullptr) { @@ -1841,9 +1841,9 @@ struct WaveAudioFormatTests : public UnitTest { beginTest ("Creating a basic wave writer"); - ScopedPointer writer (format.createWriterFor (new MemoryOutputStream (memoryBlock, false), - 44100.0, numTestAudioBufferChannels, - 32, metadataValues, 0)); + std::unique_ptr writer (format.createWriterFor (new MemoryOutputStream (memoryBlock, false), + 44100.0, numTestAudioBufferChannels, + 32, metadataValues, 0)); expect (writer != nullptr); AudioBuffer buffer (numTestAudioBufferChannels, numTestAudioBufferSamples); @@ -1856,7 +1856,7 @@ struct WaveAudioFormatTests : public UnitTest { beginTest ("Creating a basic wave reader"); - ScopedPointer reader (format.createReaderFor (new MemoryInputStream (memoryBlock, false), false)); + std::unique_ptr reader (format.createReaderFor (new MemoryInputStream (memoryBlock, false), false)); expect (reader != nullptr); expect (reader->metadataValues == metadataValues, "Somehow, the metadata is different!"); } diff --git a/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp index e6857420..27803e0d 100644 --- a/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp @@ -339,7 +339,7 @@ bool WindowsMediaAudioFormat::isCompressed() { return true; } //============================================================================== AudioFormatReader* WindowsMediaAudioFormat::createReaderFor (InputStream* sourceStream, bool deleteStreamIfOpeningFails) { - ScopedPointer r (new WindowsMediaCodec::WMAudioReader (sourceStream)); + std::unique_ptr r (new WindowsMediaCodec::WMAudioReader (sourceStream)); if (r->sampleRate > 0) return r.release(); diff --git a/modules/juce_audio_formats/format/juce_AudioFormatManager.cpp b/modules/juce_audio_formats/format/juce_AudioFormatManager.cpp index 05cebf21..76827199 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatManager.cpp +++ b/modules/juce_audio_formats/format/juce_AudioFormatManager.cpp @@ -141,7 +141,7 @@ AudioFormatReader* AudioFormatManager::createReaderFor (InputStream* audioFileSt if (audioFileStream != nullptr) { - ScopedPointer in (audioFileStream); + std::unique_ptr in (audioFileStream); auto originalStreamPos = in->getPosition(); for (auto* af : knownFormats) diff --git a/modules/juce_audio_formats/format/juce_AudioFormatReader.h b/modules/juce_audio_formats/format/juce_AudioFormatReader.h index d9342dfb..34a981b5 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatReader.h +++ b/modules/juce_audio_formats/format/juce_AudioFormatReader.h @@ -256,8 +256,8 @@ protected: template struct ReadHelper { - typedef AudioData::Pointer DestType; - typedef AudioData::Pointer SourceType; + using DestType = AudioData::Pointer; + using SourceType = AudioData::Pointer; template static void read (TargetType* const* destData, int destOffset, int numDestChannels, diff --git a/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h b/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h index f0960663..b548f365 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h +++ b/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h @@ -93,8 +93,8 @@ private: //============================================================================== OptionalScopedPointer reader; - int64 volatile nextPlayPos; - bool volatile looping; + int64 nextPlayPos; + bool looping; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioFormatReaderSource) }; diff --git a/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp b/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp index 16ef5a4d..5a64e737 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp +++ b/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp @@ -170,7 +170,7 @@ bool AudioFormatWriter::writeFromFloatArrays (const float* const* channels, int while (numSamples > 0) { - const int numToDo = jmin (numSamples, maxSamples); + auto numToDo = jmin (numSamples, maxSamples); for (int i = 0; i < numSourceChannels; ++i) convertFloatsToInts (chans[i], channels[i] + startSample, numToDo); @@ -217,12 +217,7 @@ public: : fifo (numSamples), buffer (channels, numSamples), timeSliceThread (tst), - writer (w), - receiver (nullptr), - samplesWritten (0), - samplesPerFlush (0), - flushSampleCounter (0), - isRunning (true) + writer (w) { timeSliceThread.addTimeSliceClient (this); } @@ -267,7 +262,7 @@ public: int writePendingData() { - const int numToDo = fifo.getTotalSize() / 4; + auto numToDo = fifo.getTotalSize() / 4; int start1, size1, start2, size2; fifo.prepareToRead (numToDo, start1, size1, start2, size2); @@ -278,6 +273,7 @@ public: writer->writeFromAudioSampleBuffer (buffer, start1, size1); const ScopedLock sl (thumbnailLock); + if (receiver != nullptr) receiver->addBlock (samplesWritten, buffer, start1, size1); @@ -328,12 +324,12 @@ private: AbstractFifo fifo; AudioBuffer buffer; TimeSliceThread& timeSliceThread; - ScopedPointer writer; + std::unique_ptr writer; CriticalSection thumbnailLock; - IncomingDataReceiver* receiver; - int64 samplesWritten; - int samplesPerFlush, flushSampleCounter; - volatile bool isRunning; + IncomingDataReceiver* receiver = {}; + int64 samplesWritten = 0; + int samplesPerFlush = 0, flushSampleCounter = 0; + std::atomic isRunning { true }; JUCE_DECLARE_NON_COPYABLE (Buffer) }; diff --git a/modules/juce_audio_formats/format/juce_AudioFormatWriter.h b/modules/juce_audio_formats/format/juce_AudioFormatWriter.h index 6c97a14f..3231dc87 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatWriter.h +++ b/modules/juce_audio_formats/format/juce_AudioFormatWriter.h @@ -241,7 +241,7 @@ public: private: class Buffer; friend struct ContainerDeletePolicy; - ScopedPointer buffer; + std::unique_ptr buffer; }; protected: @@ -268,8 +268,8 @@ protected: template struct WriteHelper { - typedef AudioData::Pointer DestType; - typedef AudioData::Pointer SourceType; + using DestType = AudioData::Pointer ; + using SourceType = AudioData::Pointer ; static void write (void* destData, int numDestChannels, const int* const* source, int numSamples, const int sourceOffset = 0) noexcept diff --git a/modules/juce_audio_formats/format/juce_BufferingAudioFormatReader.h b/modules/juce_audio_formats/format/juce_BufferingAudioFormatReader.h index 25e72665..e45d05df 100644 --- a/modules/juce_audio_formats/format/juce_BufferingAudioFormatReader.h +++ b/modules/juce_audio_formats/format/juce_BufferingAudioFormatReader.h @@ -67,7 +67,7 @@ public: int64 startSampleInFile, int numSamples) override; private: - ScopedPointer source; + std::unique_ptr source; TimeSliceThread& thread; int64 nextReadPosition; const int numBlocks; diff --git a/modules/juce_audio_formats/format/juce_MemoryMappedAudioFormatReader.h b/modules/juce_audio_formats/format/juce_MemoryMappedAudioFormatReader.h index 62ad3daa..e3fef6e3 100644 --- a/modules/juce_audio_formats/format/juce_MemoryMappedAudioFormatReader.h +++ b/modules/juce_audio_formats/format/juce_MemoryMappedAudioFormatReader.h @@ -85,7 +85,7 @@ public: protected: File file; Range mappedSection; - ScopedPointer map; + std::unique_ptr map; int64 dataChunkStart, dataLength; int bytesPerFrame; @@ -102,7 +102,7 @@ protected: template Range scanMinAndMaxInterleaved (int channel, int64 startSampleInFile, int64 numSamples) const noexcept { - typedef AudioData::Pointer SourceType; + using SourceType = AudioData::Pointer ; return SourceType (addBytesToPointer (sampleToPointer (startSampleInFile), ((int) bitsPerSample / 8) * channel), (int) numChannels) .findMinAndMax ((size_t) numSamples); diff --git a/modules/juce_audio_formats/juce_audio_formats.h b/modules/juce_audio_formats/juce_audio_formats.h index c8d816d3..500777ae 100644 --- a/modules/juce_audio_formats/juce_audio_formats.h +++ b/modules/juce_audio_formats/juce_audio_formats.h @@ -35,7 +35,7 @@ ID: juce_audio_formats vendor: juce - version: 5.3.1 + version: 5.3.2 name: JUCE audio file format codecs description: Classes for reading and writing various audio file formats. website: http://www.juce.com/juce diff --git a/modules/juce_audio_formats/sampler/juce_Sampler.h b/modules/juce_audio_formats/sampler/juce_Sampler.h index f3f88c76..a8cd0717 100644 --- a/modules/juce_audio_formats/sampler/juce_Sampler.h +++ b/modules/juce_audio_formats/sampler/juce_Sampler.h @@ -94,7 +94,7 @@ private: friend class SamplerVoice; String name; - ScopedPointer> data; + std::unique_ptr> data; double sourceSampleRate; BigInteger midiNotes; int length = 0, attackSamples = 0, releaseSamples = 0; diff --git a/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp b/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp index d698d0e6..c205381d 100644 --- a/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp @@ -259,7 +259,7 @@ namespace AAXClasses return AAX_eStemFormat_INT32_MAX; } - static AudioChannelSet channelSetFromStemFormat (AAX_EStemFormat format, bool ignoreLayout) noexcept + static inline AudioChannelSet channelSetFromStemFormat (AAX_EStemFormat format, bool ignoreLayout) noexcept { if (! ignoreLayout) { @@ -533,7 +533,8 @@ namespace AAXClasses setOpaque (true); setBroughtToFrontOnMouseClick (true); - addAndMakeVisible (pluginEditor = plugin.createEditorIfNeeded()); + pluginEditor.reset (plugin.createEditorIfNeeded()); + addAndMakeVisible (pluginEditor.get()); if (pluginEditor != nullptr) { @@ -551,7 +552,7 @@ namespace AAXClasses { PopupMenu::dismissAllActiveMenus(); pluginEditor->removeMouseListener (this); - pluginEditor->processor.editorBeingDeleted (pluginEditor); + pluginEditor->processor.editorBeingDeleted (pluginEditor.get()); } } @@ -603,7 +604,7 @@ namespace AAXClasses } } - ScopedPointer pluginEditor; + std::unique_ptr pluginEditor; JuceAAX_GUI& owner; #if JUCE_WINDOWS @@ -615,7 +616,7 @@ namespace AAXClasses JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ContentWrapperComponent) }; - ScopedPointer component; + std::unique_ptr component; ScopedJuceInitialiser_GUI libraryInitialiser; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceAAX_GUI) @@ -1425,9 +1426,8 @@ namespace AAXClasses { aaxWrapperProvidedBypassParam = true; - ownedBypassParameter = new AudioParameterBool (cDefaultMasterBypassID, "Master Bypass", false, {}, {}, {}); - - bypassParameter = ownedBypassParameter; + ownedBypassParameter.reset (new AudioParameterBool (cDefaultMasterBypassID, "Master Bypass", false, {}, {}, {})); + bypassParameter = ownedBypassParameter.get(); } if (! bypassPartOfRegularParams) @@ -1760,7 +1760,7 @@ namespace AAXClasses //============================================================================== ScopedJuceInitialiser_GUI libraryInitialiser; - ScopedPointer pluginInstance; + std::unique_ptr pluginInstance; bool isPrepared = false; MidiBuffer midiBuffer; @@ -1778,7 +1778,7 @@ namespace AAXClasses Array aaxParamIDs; HashMap paramMap; LegacyAudioParametersWrapper juceParameters; - ScopedPointer ownedBypassParameter; + std::unique_ptr ownedBypassParameter; Array aaxMeters; @@ -1808,7 +1808,7 @@ namespace AAXClasses if (component == nullptr) { if (auto* params = dynamic_cast (GetEffectParameters())) - component = new ContentWrapperComponent (*this, params->getPluginInstance()); + component.reset (new ContentWrapperComponent (*this, params->getPluginInstance())); else jassertfalse; } @@ -2024,7 +2024,7 @@ namespace AAXClasses check (desc.AddProcessProc_Native (algorithmProcessCallback, properties)); } - static bool hostSupportsStemFormat (AAX_EStemFormat stemFormat, const AAX_IFeatureInfo* featureInfo) + static inline bool hostSupportsStemFormat (AAX_EStemFormat stemFormat, const AAX_IFeatureInfo* featureInfo) { if (featureInfo != nullptr) { @@ -2032,7 +2032,7 @@ namespace AAXClasses if (featureInfo->SupportLevel (supportLevel) == AAX_SUCCESS && supportLevel == AAX_eSupportLevel_ByProperty) { - ScopedPointer props (featureInfo->AcquireProperties()); + std::unique_ptr props (featureInfo->AcquireProperties()); // Due to a bug in ProTools 12.8, ProTools thinks that AAX_eStemFormat_Ambi_1_ACN is not supported // To workaround this bug, check if ProTools supports AAX_eStemFormat_Ambi_2_ACN, and, if yes, @@ -2051,7 +2051,7 @@ namespace AAXClasses static void getPlugInDescription (AAX_IEffectDescriptor& descriptor, const AAX_IFeatureInfo* featureInfo) { PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AAX; - ScopedPointer plugin = createPluginFilterOfType (AudioProcessor::wrapperType_AAX); + std::unique_ptr plugin (createPluginFilterOfType (AudioProcessor::wrapperType_AAX)); auto numInputBuses = plugin->getBusCount (true); auto numOutputBuses = plugin->getBusCount (false); @@ -2078,19 +2078,18 @@ namespace AAXClasses check (descriptor.AddProcPtr ((void*) JuceAAX_GUI::Create, kAAX_ProcPtrID_Create_EffectGUI)); check (descriptor.AddProcPtr ((void*) JuceAAX_Processor::Create, kAAX_ProcPtrID_Create_EffectParameters)); + Array pluginIds; #if JucePlugin_IsMidiEffect // MIDI effect plug-ins do not support any audio channels jassert (numInputBuses == 0 && numOutputBuses == 0); + ignoreUnused (featureInfo); if (auto* desc = descriptor.NewComponentDescriptor()) { - createDescriptor (*desc, 0, plugin->getBusesLayout(), *plugin, numMeters); + createDescriptor (*desc, plugin->getBusesLayout(), *plugin, pluginIds, numMeters); check (descriptor.AddComponent (desc)); } - #else - Array pluginIds; - const int numIns = numInputBuses > 0 ? numElementsInArray (aaxFormats) : 0; const int numOuts = numOutputBuses > 0 ? numElementsInArray (aaxFormats) : 0; @@ -2138,14 +2137,14 @@ AAX_Result JUCE_CDECL GetEffectDescriptions (AAX_ICollection* collection) { ScopedJuceInitialiser_GUI libraryInitialiser; - ScopedPointer stemFormatFeatureInfo; + std::unique_ptr stemFormatFeatureInfo; if (const auto* hostDescription = collection->DescriptionHost()) - stemFormatFeatureInfo = hostDescription->AcquireFeatureProperties (AAXATTR_ClientFeature_StemFormat); + stemFormatFeatureInfo.reset (hostDescription->AcquireFeatureProperties (AAXATTR_ClientFeature_StemFormat)); if (auto* descriptor = collection->NewDescriptor()) { - AAXClasses::getPlugInDescription (*descriptor, stemFormatFeatureInfo); + AAXClasses::getPlugInDescription (*descriptor, stemFormatFeatureInfo.get()); collection->AddEffect (JUCE_STRINGIFY (JucePlugin_AAXIdentifier), descriptor); collection->SetManufacturerName (JucePlugin_Manufacturer); diff --git a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp index 43465edc..c3297249 100644 --- a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp +++ b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp @@ -99,10 +99,10 @@ public: //============================================================================== void initialise (const String&) override { - mainWindow = createWindow(); + mainWindow.reset (createWindow()); #if JUCE_STANDALONE_FILTER_WINDOW_USE_KIOSK_MODE - Desktop::getInstance().setKioskModeComponent (mainWindow, false); + Desktop::getInstance().setKioskModeComponent (mainWindow.get(), false); #endif mainWindow->setVisible (true); @@ -133,7 +133,7 @@ public: protected: ApplicationProperties appProperties; - ScopedPointer mainWindow; + std::unique_ptr mainWindow; }; } // namespace juce diff --git a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h index 69bd2cde..ece0bc19 100644 --- a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h +++ b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h @@ -87,7 +87,7 @@ public: : processor->getMainBusNumInputChannels()); if (preferredSetupOptions != nullptr) - options = new AudioDeviceManager::AudioDeviceSetup (*preferredSetupOptions); + options.reset (new AudioDeviceManager::AudioDeviceSetup (*preferredSetupOptions)); if (inChannels > 0 && RuntimePermissions::isRequired (RuntimePermissions::recordAudio) && ! RuntimePermissions::isGranted (RuntimePermissions::recordAudio)) @@ -99,7 +99,7 @@ public: void init (bool enableAudioInput, const String& preferredDefaultDeviceName) { - setupAudioDevices (enableAudioInput, preferredDefaultDeviceName, options); + setupAudioDevices (enableAudioInput, preferredDefaultDeviceName, options.get()); reloadPluginState(); startPlaying(); @@ -120,10 +120,10 @@ public: { #if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client - processor = ::createPluginFilterOfType (AudioProcessor::wrapperType_Standalone); + processor.reset (::createPluginFilterOfType (AudioProcessor::wrapperType_Standalone)); #else AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Standalone); - processor = createPluginFilter(); + processor.reset (createPluginFilter()); AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Undefined); #endif jassert (processor != nullptr); // Your createPluginFilter() function must return a valid object! @@ -228,7 +228,7 @@ public: //============================================================================== void startPlaying() { - player.setProcessor (processor); + player.setProcessor (processor.get()); #if JucePlugin_Enable_IAA && JUCE_IOS if (auto device = dynamic_cast (deviceManager.getCurrentAudioDevice())) @@ -295,9 +295,9 @@ public: { if (settings != nullptr) { - ScopedPointer xml (deviceManager.createStateXml()); + std::unique_ptr xml (deviceManager.createStateXml()); - settings->setValue ("audioSetup", xml); + settings->setValue ("audioSetup", xml.get()); #if ! (JUCE_IOS || JUCE_ANDROID) settings->setValue ("shouldMuteInput", (bool) shouldMuteInput.getValue()); @@ -309,11 +309,11 @@ public: const String& preferredDefaultDeviceName, const AudioDeviceManager::AudioDeviceSetup* preferredSetupOptions) { - ScopedPointer savedState; + std::unique_ptr savedState; if (settings != nullptr) { - savedState = settings->getXmlValue ("audioSetup"); + savedState.reset (settings->getXmlValue ("audioSetup")); #if ! (JUCE_IOS || JUCE_ANDROID) shouldMuteInput.setValue (settings->getBoolValue ("shouldMuteInput", true)); @@ -332,7 +332,7 @@ public: deviceManager.initialise (enableAudioInput ? totalInChannels : 0, totalOutChannels, - savedState, + savedState.get(), true, preferredDefaultDeviceName, preferredSetupOptions); @@ -398,7 +398,7 @@ public: //============================================================================== OptionalScopedPointer settings; - ScopedPointer processor; + std::unique_ptr processor; AudioDeviceManager deviceManager; AudioProcessorPlayer player; Array channelConfiguration; @@ -409,7 +409,7 @@ public: AudioBuffer emptyBuffer; bool autoOpenMidiDevices; - ScopedPointer options; + std::unique_ptr options; StringArray lastMidiDevices; private: @@ -603,9 +603,9 @@ public: optionsButton.setTriggeredOnMouseDown (true); #endif - pluginHolder = new StandalonePluginHolder (settingsToUse, takeOwnershipOfSettings, - preferredDefaultDeviceName, preferredSetupOptions, - constrainToConfiguration, autoOpenMidiDevices); + pluginHolder.reset (new StandalonePluginHolder (settingsToUse, takeOwnershipOfSettings, + preferredDefaultDeviceName, preferredSetupOptions, + constrainToConfiguration, autoOpenMidiDevices)); #if JUCE_IOS || JUCE_ANDROID setFullScreen (true); @@ -646,7 +646,7 @@ public: } //============================================================================== - AudioProcessor* getAudioProcessor() const noexcept { return pluginHolder->processor; } + AudioProcessor* getAudioProcessor() const noexcept { return pluginHolder->processor.get(); } AudioDeviceManager& getDeviceManager() const noexcept { return pluginHolder->deviceManager; } /** Deletes and re-creates the plugin, resetting it to its default state. */ @@ -710,9 +710,9 @@ public: optionsButton.setBounds (8, 6, 60, getTitleBarHeight() - 8); } - virtual StandalonePluginHolder* getPluginHolder() { return pluginHolder; } + virtual StandalonePluginHolder* getPluginHolder() { return pluginHolder.get(); } - ScopedPointer pluginHolder; + std::unique_ptr pluginHolder; private: //============================================================================== @@ -733,7 +733,7 @@ private: editor->addComponentListener (this); componentMovedOrResized (*editor, false, true); - addAndMakeVisible (editor); + addAndMakeVisible (editor.get()); } addChildComponent (notification); @@ -752,7 +752,7 @@ private: if (editor != nullptr) { editor->removeComponentListener (this); - owner.pluginHolder->processor->editorBeingDeleted (editor); + owner.pluginHolder->processor->editorBeingDeleted (editor.get()); editor = nullptr; } } @@ -851,7 +851,7 @@ private: //============================================================================== StandaloneFilterWindow& owner; NotificationArea notification; - ScopedPointer editor; + std::unique_ptr editor; bool shouldShowNotification = false; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent) diff --git a/modules/juce_audio_plugin_client/VST/juce_VSTCallbackHandler.h b/modules/juce_audio_plugin_client/VST/juce_VSTCallbackHandler.h index 2e959c66..a39f8977 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VSTCallbackHandler.h +++ b/modules/juce_audio_plugin_client/VST/juce_VSTCallbackHandler.h @@ -36,6 +36,18 @@ struct VSTCallbackHandler { virtual ~VSTCallbackHandler() {} + /** This is called by the VST plug-in wrapper when it receives unhandled + plug-in "can do" calls from the host. + */ + virtual pointer_sized_int handleVstPluginCanDo (int32 index, + pointer_sized_int value, + void* ptr, + float opt) + { + ignoreUnused (index, value, ptr, opt); + return 0; + } + /** This is called by the VST plug-in wrapper when it receives unhandled vendor specific calls from the host. */ diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index 152566e4..216265ea 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -1072,7 +1072,7 @@ public: if (auto* ed = processor->createEditorIfNeeded()) { vstEffect.flags |= vstEffectFlagHasEditor; - editorComp = new EditorCompWrapper (*this, *ed); + editorComp.reset (new EditorCompWrapper (*this, *ed)); #if ! (JUCE_MAC || JUCE_IOS) ed->setScaleFactor (editorScaleFactor); @@ -1220,7 +1220,7 @@ public: ~EditorCompWrapper() { - deleteAllChildren(); // note that we can't use a ScopedPointer because the editor may + deleteAllChildren(); // note that we can't use a std::unique_ptr because the editor may // have been transferred to another parent which takes over ownership. } @@ -1481,7 +1481,7 @@ private: VstEffectInterface vstEffect; juce::MemoryBlock chunkMemory; juce::uint32 chunkMemoryTime = 0; - ScopedPointer editorComp; + std::unique_ptr editorComp; VstEditorBounds editorBounds; MidiBuffer midiEvents; VSTMidiEventList outgoingEvents; @@ -2037,6 +2037,9 @@ private: if (matches ("hasCockosExtensions")) return (int32) 0xbeef0000; + if (auto callbackHandler = dynamic_cast (processor)) + return callbackHandler->handleVstPluginCanDo (args.index, args.value, args.ptr, args.opt); + return 0; } diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 614d1f02..a58c7e0a 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -98,21 +98,20 @@ public: virtual ~JuceAudioProcessor() {} - AudioProcessor* get() const noexcept { return audioProcessor; } + AudioProcessor* get() const noexcept { return audioProcessor.get(); } JUCE_DECLARE_VST3_COM_QUERY_METHODS JUCE_DECLARE_VST3_COM_REF_METHODS //============================================================================== - #if JUCE_FORCE_USE_LEGACY_PARAM_IDS - inline Vst::ParamID getVSTParamIDForIndex (int paramIndex) const noexcept { return static_cast (paramIndex); } - #else inline Vst::ParamID getVSTParamIDForIndex (int paramIndex) const noexcept { - return isUsingManagedParameters() ? vstParamIDs.getReference (paramIndex) - : static_cast (paramIndex); + #if JUCE_FORCE_USE_LEGACY_PARAM_IDS + return static_cast (paramIndex); + #else + return vstParamIDs.getReference (paramIndex); + #endif } - #endif AudioProcessorParameter* getParamForVSTParamID (Vst::ParamID paramID) const noexcept { @@ -169,7 +168,8 @@ private: if (bypassParameter == nullptr) { vst3WrapperProvidedBypassParam = true; - bypassParameter = ownedBypassParameter = new AudioParameterBool ("byps", "Bypass", false, {}, {}, {}); + ownedBypassParameter.reset (new AudioParameterBool ("byps", "Bypass", false, {}, {}, {})); + bypassParameter = ownedBypassParameter.get(); } // if the bypass parameter is not part of the exported parameters that the plug-in supports @@ -204,6 +204,10 @@ private: Vst::ParamID generateVSTParamIDForParam (AudioProcessorParameter* param) { auto juceParamID = LegacyAudioParameter::getParamID (param, false); + + #if JUCE_FORCE_USE_LEGACY_PARAM_IDS + return static_cast (juceParamID.getIntValue()); + #else auto paramHash = static_cast (juceParamID.hashCode()); #if JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS @@ -211,19 +215,19 @@ private: paramHash &= ~(1 << (sizeof (Vst::ParamID) * 8 - 1)); #endif - return isUsingManagedParameters() ? paramHash - : static_cast (juceParamID.getIntValue()); + return paramHash; + #endif } //============================================================================== Atomic refCount; - ScopedPointer audioProcessor; + std::unique_ptr audioProcessor; ScopedJuceInitialiser_GUI libraryInitialiser; //============================================================================== LegacyAudioParametersWrapper juceParameters; HashMap paramMap; - ScopedPointer ownedBypassParameter; + std::unique_ptr ownedBypassParameter; JuceAudioProcessor() = delete; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceAudioProcessor) @@ -388,7 +392,11 @@ public: void toString (Vst::ParamValue value, Vst::String128 result) const override { - toString128 (result, param.getText ((float) value, 128)); + if (LegacyAudioParameter::isLegacy (¶m)) + // remain backward-compatible with old JUCE code + toString128 (result, param.getCurrentValueAsText()); + else + toString128 (result, param.getText ((float) value, 128)); } bool fromString (const Vst::TChar* text, Vst::ParamValue& outValueNormalized) const override @@ -717,7 +725,7 @@ private: if (parameters.getParameterCount() <= 0) { - #if JUCE_FORCE_USE_LEGACY_PARAM_IDS + #if JUCE_FORCE_USE_LEGACY_PARAM_IDS const bool forceLegacyParamIDs = true; #else const bool forceLegacyParamIDs = false; @@ -789,7 +797,7 @@ private: : Vst::EditorView (&ec, nullptr), owner (&ec), pluginInstance (p) { - component = new ContentWrapperComponent (*this, p); + component.reset (new ContentWrapperComponent (*this, p)); } tresult PLUGIN_API queryInterface (const TUID targetIID, void** obj) override @@ -822,7 +830,7 @@ private: return kResultFalse; if (component == nullptr) - component = new ContentWrapperComponent (*this, pluginInstance); + component.reset (new ContentWrapperComponent (*this, pluginInstance)); #if JUCE_WINDOWS component->addToDesktop (0, parent); @@ -830,7 +838,7 @@ private: component->setVisible (true); #else isNSView = (strcmp (type, kPlatformTypeNSView) == 0); - macHostWindow = juce::attachComponentToWindowRefVST (component, parent, isNSView); + macHostWindow = juce::attachComponentToWindowRefVST (component.get(), parent, isNSView); #endif component->resizeHostWindow(); @@ -853,7 +861,7 @@ private: #else if (macHostWindow != nullptr) { - juce::detachComponentFromWindowRefVST (component, macHostWindow, isNSView); + juce::detachComponentFromWindowRefVST (component.get(), macHostWindow, isNSView); macHostWindow = nullptr; } #endif @@ -912,8 +920,8 @@ private: if (auto* editor = component->pluginEditor.get()) { // checkSizeConstraint - auto juceRect = editor->getLocalArea (component, Rectangle::leftTopRightBottom (rectToCheck->left, rectToCheck->top, - rectToCheck->right, rectToCheck->bottom)); + auto juceRect = editor->getLocalArea (component.get(), Rectangle::leftTopRightBottom (rectToCheck->left, rectToCheck->top, + rectToCheck->right, rectToCheck->bottom)); if (auto* constrainer = editor->getConstrainer()) { Rectangle limits (0, 0, constrainer->getMaximumWidth(), constrainer->getMaximumHeight()); @@ -972,7 +980,7 @@ private: if (pluginEditor != nullptr) { - addAndMakeVisible (pluginEditor); + addAndMakeVisible (pluginEditor.get()); pluginEditor->setTopLeftPosition (0, 0); lastBounds = getSizeToContainChild(); @@ -991,7 +999,7 @@ private: if (pluginEditor != nullptr) { PopupMenu::dismissAllActiveMenus(); - pluginEditor->processor.editorBeingDeleted (pluginEditor); + pluginEditor->processor.editorBeingDeleted (pluginEditor.get()); } } @@ -1003,7 +1011,7 @@ private: juce::Rectangle getSizeToContainChild() { if (pluginEditor != nullptr) - return getLocalArea (pluginEditor, pluginEditor->getLocalBounds()); + return getLocalArea (pluginEditor.get(), pluginEditor->getLocalBounds()); return {}; } @@ -1088,7 +1096,7 @@ private: } } - ScopedPointer pluginEditor; + std::unique_ptr pluginEditor; private: JuceVST3Editor& owner; @@ -1104,7 +1112,7 @@ private: ComSmartPtr owner; AudioProcessor& pluginInstance; - ScopedPointer component; + std::unique_ptr component; friend struct ContentWrapperComponent; #if JUCE_MAC diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client.h b/modules/juce_audio_plugin_client/juce_audio_plugin_client.h index 640f5289..f2501da5 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client.h +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client.h @@ -35,7 +35,7 @@ ID: juce_audio_plugin_client vendor: juce - version: 5.3.1 + version: 5.3.2 name: JUCE audio plugin wrapper classes description: Classes for building VST, VST3, AudioUnit, AAX and RTAS plugins. website: http://www.juce.com/juce @@ -72,7 +72,7 @@ DAW projects with automation data written by an AudioUnit, VST3 or AAX plug-in built with JUCE version 5.1.1 or earlier may load incorrectly when opened by an AudioUnit, VST3 or AAX plug-in built - with JUCE version 5.3.0 and later. + with JUCE version 5.2.0 and later. */ #ifndef JUCE_FORCE_LEGACY_PARAMETER_AUTOMATION_TYPE #define JUCE_FORCE_LEGACY_PARAMETER_AUTOMATION_TYPE 0 diff --git a/modules/juce_audio_plugin_client/utility/juce_FakeMouseMoveGenerator.h b/modules/juce_audio_plugin_client/utility/juce_FakeMouseMoveGenerator.h index f2620756..9c2c9d22 100644 --- a/modules/juce_audio_plugin_client/utility/juce_FakeMouseMoveGenerator.h +++ b/modules/juce_audio_plugin_client/utility/juce_FakeMouseMoveGenerator.h @@ -41,6 +41,18 @@ public: startTimer (1000 / 30); } + static bool componentContainsAudioProcessorEditor (Component* comp) noexcept + { + if (dynamic_cast (comp) != nullptr) + return true; + + for (auto* child : comp->getChildren()) + if (componentContainsAudioProcessorEditor (child)) + return true; + + return false; + } + void timerCallback() override { // Workaround for windows not getting mouse-moves... @@ -49,36 +61,39 @@ public: if (screenPos != lastScreenPos) { lastScreenPos = screenPos; - auto mods = ModifierKeys::getCurrentModifiers(); + auto mods = ModifierKeys::currentModifiers; if (! mods.isAnyMouseButtonDown()) { if (auto* comp = Desktop::getInstance().findComponentAt (screenPos.roundToInt())) { - safeOldComponent = comp; - - if (auto* peer = comp->getPeer()) + if (componentContainsAudioProcessorEditor (comp->getTopLevelComponent())) { - if (! peer->isFocused()) + safeOldComponent = comp; + + if (auto* peer = comp->getPeer()) { - peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, peer->globalToLocal (screenPos), mods, - MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, Time::currentTimeMillis()); + if (! peer->isFocused()) + { + peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, peer->globalToLocal (screenPos), mods, + MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, Time::currentTimeMillis()); + } } + + return; } } - else + + if (safeOldComponent != nullptr) { - if (safeOldComponent != nullptr) + if (auto* peer = safeOldComponent->getPeer()) { - if (auto* peer = safeOldComponent->getPeer()) - { - peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, { -1.0f, -1.0f }, mods, - MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, Time::currentTimeMillis()); - } + peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, { -1.0f, -1.0f }, mods, + MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, Time::currentTimeMillis()); } - - safeOldComponent = nullptr; } + + safeOldComponent = nullptr; } } } diff --git a/modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp b/modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp index 1811cd3f..ea5c5d9a 100644 --- a/modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp +++ b/modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp @@ -44,8 +44,8 @@ namespace AudioPluginFormatHelpers //============================================================================== AudioPluginInstance* instance; String error; - ScopedPointer compCallback; - ScopedPointer owner; + std::unique_ptr compCallback; + std::unique_ptr owner; }; //============================================================================== @@ -119,7 +119,7 @@ AudioPluginInstance* AudioPluginFormat::createInstanceFromDescription (const Plu WaitableEvent waitForCreation; AudioPluginInstance* instance = nullptr; - ScopedPointer eventSignaler (new EventSignaler (waitForCreation, instance, errorMessage)); + std::unique_ptr eventSignaler (new EventSignaler (waitForCreation, instance, errorMessage)); if (! MessageManager::getInstance()->isThisTheMessageThread()) createPluginInstanceAsync (desc, initialSampleRate, initialBufferSize, eventSignaler.release()); diff --git a/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp b/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp index 69e737e1..b996c5c6 100644 --- a/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp +++ b/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp @@ -40,7 +40,7 @@ namespace PluginFormatManagerHelpers void messageCallback() override { callback->completionCallback (nullptr, error); } String error; - ScopedPointer callback; + std::unique_ptr callback; }; struct ErrorLambdaOnMessageThread : public CallbackMessage diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm index 61943535..6552a813 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm @@ -1452,7 +1452,7 @@ public: auSupportsBypass = (AudioUnitGetPropertyInfo (audioUnit, kAudioUnitProperty_BypassEffect, kAudioUnitScope_Global, 0, &propertySize, &writable) == noErr && propertySize >= sizeof (UInt32) && writable); - bypassParam = new AUBypassParameter (*this); + bypassParam.reset (new AUBypassParameter (*this)); } void updateLatency() @@ -1615,7 +1615,7 @@ private: MidiDataConcatenator midiConcatenator; CriticalSection midiInLock; MidiBuffer incomingMidi; - ScopedPointer bypassParam; + std::unique_ptr bypassParam; bool lastProcessBlockCallWasBypass = false, auSupportsBypass = false; void createPluginCallbacks() @@ -2418,7 +2418,8 @@ public: audioComponent (nullptr), viewComponent (nullptr) { - addAndMakeVisible (innerWrapper = new InnerWrapperComponent (*this)); + innerWrapper.reset (new InnerWrapperComponent (*this)); + addAndMakeVisible (innerWrapper.get()); setOpaque (true); setVisible (true); @@ -2535,7 +2536,7 @@ private: }; friend class InnerWrapperComponent; - ScopedPointer innerWrapper; + std::unique_ptr innerWrapper; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioUnitPluginWindowCarbon) }; @@ -2545,7 +2546,7 @@ private: //============================================================================== AudioProcessorEditor* AudioUnitPluginInstance::createEditor() { - ScopedPointer w (new AudioUnitPluginWindowCocoa (*this, false)); + std::unique_ptr w (new AudioUnitPluginWindowCocoa (*this, false)); if (! static_cast (w.get())->isValid()) w.reset(); @@ -2553,10 +2554,10 @@ AudioProcessorEditor* AudioUnitPluginInstance::createEditor() #if JUCE_SUPPORT_CARBON if (w == nullptr) { - w = new AudioUnitPluginWindowCarbon (*this); + w.reset (new AudioUnitPluginWindowCarbon (*this)); if (! static_cast (w.get())->isValid()) - w = nullptr; + w.reset(); } #endif @@ -2566,8 +2567,6 @@ AudioProcessorEditor* AudioUnitPluginInstance::createEditor() return w.release(); } - -//============================================================================== //============================================================================== AudioUnitPluginFormat::AudioUnitPluginFormat() { @@ -2593,7 +2592,7 @@ void AudioUnitPluginFormat::findAllTypesForFile (OwnedArray& try { - ScopedPointer createdInstance (createInstanceFromDescription (desc, 44100.0, 512)); + std::unique_ptr createdInstance (createInstanceFromDescription (desc, 44100.0, 512)); if (AudioUnitPluginInstance* auInstance = dynamic_cast (createdInstance.get())) results.add (new PluginDescription (auInstance->getPluginDescription())); @@ -2663,7 +2662,7 @@ void AudioUnitPluginFormat::createPluginInstance (const PluginDescription& desc, { if (err == noErr) { - ScopedPointer instance (new AudioUnitPluginInstance (audioUnit)); + std::unique_ptr instance (new AudioUnitPluginInstance (audioUnit)); if (instance->initialise (sampleRate, framesPerBuffer)) originalCallback (passUserData, instance.release(), StringRef()); diff --git a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp index bdb75548..439c06f8 100644 --- a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp @@ -47,7 +47,7 @@ class LADSPAModuleHandle : public ReferenceCountedObject { public: LADSPAModuleHandle (const File& f) - : file (f), moduleMain (nullptr) + : file (f) { getActiveModules().add (this); } @@ -58,7 +58,7 @@ public: close(); } - typedef ReferenceCountedObjectPtr Ptr; + using Ptr = ReferenceCountedObjectPtr; static Array& getActiveModules() { @@ -68,9 +68,9 @@ public: static LADSPAModuleHandle* findOrCreateModule (const File& file) { - for (int i = getActiveModules().size(); --i >= 0;) + for (auto i = getActiveModules().size(); --i >= 0;) { - LADSPAModuleHandle* const module = getActiveModules().getUnchecked(i); + auto* module = getActiveModules().getUnchecked(i); if (module->file == file) return module; @@ -81,7 +81,7 @@ public: JUCE_LADSPA_LOG ("Loading LADSPA module: " + file.getFullPathName()); - ScopedPointer m (new LADSPAModuleHandle (file)); + std::unique_ptr m (new LADSPAModuleHandle (file)); if (! m->open()) m = nullptr; @@ -92,7 +92,7 @@ public: } File file; - LADSPA_Descriptor_Function moduleMain; + LADSPA_Descriptor_Function moduleMain = nullptr; private: DynamicLibrary module; @@ -101,7 +101,8 @@ private: { module.open (file.getFullPathName()); moduleMain = (LADSPA_Descriptor_Function) module.getFunction ("ladspa_descriptor"); - return moduleMain != nullptr; + + return (moduleMain != nullptr); } void close() @@ -116,172 +117,8 @@ private: class LADSPAPluginInstance : public AudioPluginInstance { public: - struct LADSPAParameter final : public Parameter - { - struct ParameterValue - { - inline ParameterValue() noexcept : scaled (0), unscaled (0) {} - inline ParameterValue (float s, float u) noexcept : scaled (s), unscaled (u) {} - - float scaled, unscaled; - }; - - LADSPAParameter (LADSPAPluginInstance& parent, - int parameterID, - const String& parameterName, - bool parameterIsAutomatable) - : pluginInstance (parent), - paramID (parameterID), - name (parameterName), - automatable (parameterIsAutomatable) - { - reset(); - } - - virtual float getValue() const override - { - if (pluginInstance.plugin != nullptr) - { - const ScopedLock sl (pluginInstance.lock); - - return paramValue.unscaled; - } - - return 0.0f; - } - - String getCurrentValueAsText() const override - { - if (auto* interface = pluginInstance.plugin) - { - const LADSPA_PortRangeHint& hint = interface->PortRangeHints[paramID]; - - if (LADSPA_IS_HINT_INTEGER (hint.HintDescriptor)) - return String ((int) paramValue.scaled); - - return String (paramValue.scaled, 4); - } - - return {}; - } - - virtual void setValue (float newValue) override - { - if (auto* interface = pluginInstance.plugin) - { - const ScopedLock sl (pluginInstance.lock); - - if (paramValue.unscaled != newValue) - paramValue = ParameterValue (getNewParamScaled (interface->PortRangeHints [paramID], newValue), newValue); - } - } - - float getDefaultValue() const override - { - return defaultValue; - } - - ParameterValue getDefaultParamValue() const - { - if (auto* interface = pluginInstance.plugin) - { - const LADSPA_PortRangeHint& hint = interface->PortRangeHints[paramID]; - const LADSPA_PortRangeHintDescriptor& desc = hint.HintDescriptor; - - if (LADSPA_IS_HINT_HAS_DEFAULT (desc)) - { - if (LADSPA_IS_HINT_DEFAULT_0 (desc)) return ParameterValue(); - if (LADSPA_IS_HINT_DEFAULT_1 (desc)) return ParameterValue (1.0f, 1.0f); - if (LADSPA_IS_HINT_DEFAULT_100 (desc)) return ParameterValue (100.0f, 0.5f); - if (LADSPA_IS_HINT_DEFAULT_440 (desc)) return ParameterValue (440.0f, 0.5f); - - const float scale = LADSPA_IS_HINT_SAMPLE_RATE (desc) ? (float) pluginInstance.getSampleRate() : 1.0f; - const float lower = hint.LowerBound * scale; - const float upper = hint.UpperBound * scale; - - if (LADSPA_IS_HINT_BOUNDED_BELOW (desc) && LADSPA_IS_HINT_DEFAULT_MINIMUM (desc)) return ParameterValue (lower, 0.0f); - if (LADSPA_IS_HINT_BOUNDED_ABOVE (desc) && LADSPA_IS_HINT_DEFAULT_MAXIMUM (desc)) return ParameterValue (upper, 1.0f); - - if (LADSPA_IS_HINT_BOUNDED_BELOW (desc)) - { - const bool useLog = LADSPA_IS_HINT_LOGARITHMIC (desc); - - if (LADSPA_IS_HINT_DEFAULT_LOW (desc)) return ParameterValue (scaledValue (lower, upper, 0.25f, useLog), 0.25f); - if (LADSPA_IS_HINT_DEFAULT_MIDDLE (desc)) return ParameterValue (scaledValue (lower, upper, 0.50f, useLog), 0.50f); - if (LADSPA_IS_HINT_DEFAULT_HIGH (desc)) return ParameterValue (scaledValue (lower, upper, 0.75f, useLog), 0.75f); - } - } - } - - return ParameterValue(); - } - - void reset() - { - paramValue = getDefaultParamValue(); - defaultValue = paramValue.unscaled; - } - - String getName (int /*maximumStringLength*/) const override - { - return name; - } - - String getLabel() const override - { - return {}; - } - - bool isAutomatable() const override - { - return automatable; - } - - static float scaledValue (float low, float high, float alpha, bool useLog) noexcept - { - if (useLog && low > 0 && high > 0) - return expf (logf (low) * (1.0f - alpha) + logf (high) * alpha); - - return low + (high - low) * alpha; - } - - static float toIntIfNecessary (const LADSPA_PortRangeHintDescriptor& desc, float value) - { - return LADSPA_IS_HINT_INTEGER (desc) ? ((float) (int) value) : value; - } - - float getNewParamScaled (const LADSPA_PortRangeHint& hint, float newValue) const - { - const LADSPA_PortRangeHintDescriptor& desc = hint.HintDescriptor; - - if (LADSPA_IS_HINT_TOGGLED (desc)) - return (newValue < 0.5f) ? 0.0f : 1.0f; - - const float scale = LADSPA_IS_HINT_SAMPLE_RATE (desc) ? (float) pluginInstance.getSampleRate() : 1.0f; - const float lower = hint.LowerBound * scale; - const float upper = hint.UpperBound * scale; - - if (LADSPA_IS_HINT_BOUNDED_BELOW (desc) && LADSPA_IS_HINT_BOUNDED_ABOVE (desc)) - return toIntIfNecessary (desc, scaledValue (lower, upper, newValue, LADSPA_IS_HINT_LOGARITHMIC (desc))); - - if (LADSPA_IS_HINT_BOUNDED_BELOW (desc)) return toIntIfNecessary (desc, newValue); - if (LADSPA_IS_HINT_BOUNDED_ABOVE (desc)) return toIntIfNecessary (desc, newValue * upper); - - return 0.0f; - } - - LADSPAPluginInstance& pluginInstance; - const int paramID; - const String name; - const bool automatable; - - ParameterValue paramValue; - float defaultValue = 0; - }; - LADSPAPluginInstance (const LADSPAModuleHandle::Ptr& m) - : module (m), plugin (nullptr), handle (nullptr), - initialised (false), tempBuffer (1, 1) + : module (m) { ++insideLADSPACallback; @@ -291,7 +128,7 @@ public: if (module->moduleMain != nullptr) { - plugin = module->moduleMain (shellLADSPAUIDToCreate); + plugin = module->moduleMain ((size_t) shellLADSPAUIDToCreate); if (plugin == nullptr) { @@ -307,7 +144,8 @@ public: return; } - const double sampleRate = getSampleRate() > 0 ? getSampleRate() : 44100.0; + const auto sampleRate = getSampleRate() > 0 ? getSampleRate() + : 44100.0; handle = plugin->instantiate (plugin, (uint32) sampleRate); @@ -346,24 +184,21 @@ public: for (unsigned int i = 0; i < plugin->PortCount; ++i) { - const LADSPA_PortDescriptor portDesc = plugin->PortDescriptors[i]; + const auto portDesc = plugin->PortDescriptors[i]; if ((portDesc & LADSPA_PORT_CONTROL) != 0) - addParameter (new LADSPAParameter (*this, - i, - String (plugin->PortNames[i]).trim(), - (portDesc & LADSPA_PORT_INPUT) != 0)); + addParameter (new LADSPAParameter (*this, (int) i, String (plugin->PortNames[i]).trim(), (portDesc & LADSPA_PORT_INPUT) != 0)); if ((portDesc & LADSPA_PORT_AUDIO) != 0) { - if ((portDesc & LADSPA_PORT_INPUT) != 0) inputs.add (i); - if ((portDesc & LADSPA_PORT_OUTPUT) != 0) outputs.add (i); + if ((portDesc & LADSPA_PORT_INPUT) != 0) inputs.add ((int) i); + if ((portDesc & LADSPA_PORT_OUTPUT) != 0) outputs.add ((int) i); } } for (auto* param : getParameters()) if (auto* ladspaParam = dynamic_cast (param)) - plugin->connect_port (handle, ladspaParam->paramID, &(ladspaParam->paramValue.scaled)); + plugin->connect_port (handle, (size_t) ladspaParam->paramID, &(ladspaParam->paramValue.scaled)); setPlayConfigDetails (inputs.size(), outputs.size(), initialSampleRate, initialBlockSize); @@ -432,7 +267,7 @@ public: // dodgy hack to force some plugins to initialise the sample rate.. if (auto* firstParam = getParameters()[0]) { - const float old = firstParam->getValue(); + const auto old = firstParam->getValue(); firstParam->setValue ((old < 0.5f) ? 1.0f : 0.0f); firstParam->setValue (old); } @@ -450,23 +285,23 @@ public: tempBuffer.setSize (1, 1); } - void processBlock (AudioBuffer& buffer, MidiBuffer& midiMessages) + void processBlock (AudioBuffer& buffer, MidiBuffer&) { auto numSamples = buffer.getNumSamples(); if (initialised && plugin != nullptr && handle != nullptr) { for (int i = 0; i < inputs.size(); ++i) - plugin->connect_port (handle, inputs[i], + plugin->connect_port (handle, (size_t) inputs[i], i < buffer.getNumChannels() ? buffer.getWritePointer (i) : nullptr); if (plugin->run != nullptr) { for (int i = 0; i < outputs.size(); ++i) - plugin->connect_port (handle, outputs.getUnchecked(i), + plugin->connect_port (handle, (size_t) outputs.getUnchecked(i), i < buffer.getNumChannels() ? buffer.getWritePointer (i) : nullptr); - plugin->run (handle, numSamples); + plugin->run (handle, (size_t) numSamples); return; } @@ -476,9 +311,9 @@ public: tempBuffer.clear(); for (int i = 0; i < outputs.size(); ++i) - plugin->connect_port (handle, outputs.getUnchecked(i), tempBuffer.getWritePointer (i)); + plugin->connect_port (handle, (size_t) outputs.getUnchecked(i), tempBuffer.getWritePointer (i)); - plugin->run_adding (handle, numSamples); + plugin->run_adding (handle, (size_t) numSamples); for (int i = 0; i < outputs.size(); ++i) if (i < buffer.getNumChannels()) @@ -490,7 +325,7 @@ public: jassertfalse; // no callback to use? } - for (int i = getTotalNumInputChannels(), e = getTotalNumOutputChannels(); i < e; ++i) + for (auto i = getTotalNumInputChannels(), e = getTotalNumOutputChannels(); i < e; ++i) buffer.clear (i, 0, numSamples); } @@ -514,8 +349,8 @@ public: } //============================================================================== - int getNumPrograms() { return 0; } - int getCurrentProgram() { return 0; } + int getNumPrograms() { return 0; } + int getCurrentProgram() { return 0; } void setCurrentProgram (int) { @@ -524,87 +359,219 @@ public: ladspaParam->reset(); } - const String getProgramName (int index) - { - // XXX - return {}; - } - - void changeProgramName (int index, const String& newName) - { - // XXX - } + const String getProgramName (int) { return {}; } + void changeProgramName (int, const String&) {} //============================================================================== void getStateInformation (MemoryBlock& destData) { auto numParameters = getParameters().size(); - destData.setSize (sizeof (float) * numParameters); + destData.setSize (sizeof (float) * (size_t) numParameters); destData.fillWith (0); - float* const p = (float*) ((char*) destData.getData()); + auto* p = (float*) ((char*) destData.getData()); for (int i = 0; i < numParameters; ++i) if (auto* param = getParameters()[i]) p[i] = param->getValue(); } - void getCurrentProgramStateInformation (MemoryBlock& destData) - { - getStateInformation (destData); - } + void getCurrentProgramStateInformation (MemoryBlock& destData) { getStateInformation (destData); } + void setCurrentProgramStateInformation (const void* data, int sizeInBytes) { setStateInformation (data, sizeInBytes); } void setStateInformation (const void* data, int sizeInBytes) { - const float* p = static_cast (data); + ignoreUnused (sizeInBytes); + + auto* p = static_cast (data); for (int i = 0; i < getParameters().size(); ++i) if (auto* param = getParameters()[i]) param->setValue (p[i]); } - void setCurrentProgramStateInformation (const void* data, int sizeInBytes) - { - setStateInformation (data, sizeInBytes); - } + bool hasEditor() const { return false; } + AudioProcessorEditor* createEditor() { return nullptr; } - bool hasEditor() const - { - return false; - } + bool isValid() const { return handle != nullptr; } - AudioProcessorEditor* createEditor() - { - return nullptr; - } + //============================================================================== + LADSPAModuleHandle::Ptr module; + const LADSPA_Descriptor* plugin = nullptr; - bool isValid() const +private: + //============================================================================== + struct LADSPAParameter final : public Parameter { - return handle != nullptr; - } + struct ParameterValue + { + inline ParameterValue() noexcept {} + inline ParameterValue (float s, float u) noexcept : scaled (s), unscaled (u) {} - LADSPAModuleHandle::Ptr module; - const LADSPA_Descriptor* plugin; + float scaled = 0, unscaled = 0; + }; -private: - LADSPA_Handle handle; + LADSPAParameter (LADSPAPluginInstance& parent, int parameterID, + const String& parameterName, bool parameterIsAutomatable) + : pluginInstance (parent), + paramID (parameterID), + name (parameterName), + automatable (parameterIsAutomatable) + { + reset(); + } + + virtual float getValue() const override + { + if (pluginInstance.plugin != nullptr) + { + const ScopedLock sl (pluginInstance.lock); + + return paramValue.unscaled; + } + + return 0.0f; + } + + String getCurrentValueAsText() const override + { + if (auto* interface = pluginInstance.plugin) + { + const auto& hint = interface->PortRangeHints[paramID]; + + if (LADSPA_IS_HINT_INTEGER (hint.HintDescriptor)) + return String ((int) paramValue.scaled); + + return String (paramValue.scaled, 4); + } + + return {}; + } + + virtual void setValue (float newValue) override + { + if (auto* interface = pluginInstance.plugin) + { + const ScopedLock sl (pluginInstance.lock); + + if (paramValue.unscaled != newValue) + paramValue = ParameterValue (getNewParamScaled (interface->PortRangeHints [paramID], newValue), newValue); + } + } + + float getDefaultValue() const override + { + return defaultValue; + } + + ParameterValue getDefaultParamValue() const + { + if (auto* interface = pluginInstance.plugin) + { + const auto& hint = interface->PortRangeHints[paramID]; + const auto& desc = hint.HintDescriptor; + + if (LADSPA_IS_HINT_HAS_DEFAULT (desc)) + { + if (LADSPA_IS_HINT_DEFAULT_0 (desc)) return {}; + if (LADSPA_IS_HINT_DEFAULT_1 (desc)) return { 1.0f, 1.0f }; + if (LADSPA_IS_HINT_DEFAULT_100 (desc)) return { 100.0f, 0.5f }; + if (LADSPA_IS_HINT_DEFAULT_440 (desc)) return { 440.0f, 0.5f }; + + const auto scale = LADSPA_IS_HINT_SAMPLE_RATE (desc) ? (float) pluginInstance.getSampleRate() + : 1.0f; + const auto lower = hint.LowerBound * scale; + const auto upper = hint.UpperBound * scale; + + if (LADSPA_IS_HINT_BOUNDED_BELOW (desc) && LADSPA_IS_HINT_DEFAULT_MINIMUM (desc)) return { lower, 0.0f }; + if (LADSPA_IS_HINT_BOUNDED_ABOVE (desc) && LADSPA_IS_HINT_DEFAULT_MAXIMUM (desc)) return { upper, 1.0f }; + + if (LADSPA_IS_HINT_BOUNDED_BELOW (desc)) + { + auto useLog = LADSPA_IS_HINT_LOGARITHMIC (desc); + + if (LADSPA_IS_HINT_DEFAULT_LOW (desc)) return { scaledValue (lower, upper, 0.25f, useLog), 0.25f }; + if (LADSPA_IS_HINT_DEFAULT_MIDDLE (desc)) return { scaledValue (lower, upper, 0.50f, useLog), 0.50f }; + if (LADSPA_IS_HINT_DEFAULT_HIGH (desc)) return { scaledValue (lower, upper, 0.75f, useLog), 0.75f }; + } + } + } + + return {}; + } + + void reset() + { + paramValue = getDefaultParamValue(); + defaultValue = paramValue.unscaled; + } + + String getName (int /*maximumStringLength*/) const override { return name; } + String getLabel() const override { return {}; } + + bool isAutomatable() const override { return automatable; } + + static float scaledValue (float low, float high, float alpha, bool useLog) noexcept + { + if (useLog && low > 0 && high > 0) + return expf (logf (low) * (1.0f - alpha) + logf (high) * alpha); + + return low + (high - low) * alpha; + } + + static float toIntIfNecessary (const LADSPA_PortRangeHintDescriptor& desc, float value) + { + return LADSPA_IS_HINT_INTEGER (desc) ? ((float) (int) value) : value; + } + + float getNewParamScaled (const LADSPA_PortRangeHint& hint, float newValue) const + { + const auto& desc = hint.HintDescriptor; + + if (LADSPA_IS_HINT_TOGGLED (desc)) + return (newValue < 0.5f) ? 0.0f : 1.0f; + + const auto scale = LADSPA_IS_HINT_SAMPLE_RATE (desc) ? (float) pluginInstance.getSampleRate() + : 1.0f; + const auto lower = hint.LowerBound * scale; + const auto upper = hint.UpperBound * scale; + + if (LADSPA_IS_HINT_BOUNDED_BELOW (desc) && LADSPA_IS_HINT_BOUNDED_ABOVE (desc)) + return toIntIfNecessary (desc, scaledValue (lower, upper, newValue, LADSPA_IS_HINT_LOGARITHMIC (desc))); + + if (LADSPA_IS_HINT_BOUNDED_BELOW (desc)) return toIntIfNecessary (desc, newValue); + if (LADSPA_IS_HINT_BOUNDED_ABOVE (desc)) return toIntIfNecessary (desc, newValue * upper); + + return 0.0f; + } + + LADSPAPluginInstance& pluginInstance; + const int paramID; + const String name; + const bool automatable; + + ParameterValue paramValue; + float defaultValue = 0.0f; + }; + + //============================================================================== + LADSPA_Handle handle = nullptr; String name; CriticalSection lock; - bool initialised; - AudioBuffer tempBuffer; + bool initialised = false; + AudioBuffer tempBuffer { 1, 1 }; Array inputs, outputs; + //============================================================================== JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LADSPAPluginInstance) }; -//============================================================================== //============================================================================== LADSPAPluginFormat::LADSPAPluginFormat() {} LADSPAPluginFormat::~LADSPAPluginFormat() {} -void LADSPAPluginFormat::findAllTypesForFile (OwnedArray& results, - const String& fileOrIdentifier) +void LADSPAPluginFormat::findAllTypesForFile (OwnedArray& results, const String& fileOrIdentifier) { if (! fileMightContainThisPluginType (fileOrIdentifier)) return; @@ -613,20 +580,19 @@ void LADSPAPluginFormat::findAllTypesForFile (OwnedArray& res desc.fileOrIdentifier = fileOrIdentifier; desc.uid = 0; - ScopedPointer instance (dynamic_cast (createInstanceFromDescription (desc, 44100.0, 512))); + std::unique_ptr instance (dynamic_cast (createInstanceFromDescription (desc, 44100.0, 512))); if (instance == nullptr || ! instance->isValid()) return; instance->initialise (44100.0, 512); - instance->fillInPluginDescription (desc); if (instance->module->moduleMain != nullptr) { for (int uid = 0;; ++uid) { - if (const LADSPA_Descriptor* plugin = instance->module->moduleMain (uid)) + if (auto* plugin = instance->module->moduleMain ((size_t) uid)) { desc.uid = uid; desc.name = plugin->Name != nullptr ? plugin->Name : "Unknown"; @@ -642,19 +608,16 @@ void LADSPAPluginFormat::findAllTypesForFile (OwnedArray& res } } -void LADSPAPluginFormat::createPluginInstance (const PluginDescription& desc, - double sampleRate, int blockSize, - void* userData, - void (*callback) (void*, AudioPluginInstance*, const String&)) +void LADSPAPluginFormat::createPluginInstance (const PluginDescription& desc, double sampleRate, int blockSize, + void* userData, void (*callback) (void*, AudioPluginInstance*, const String&)) { - ScopedPointer result; - + std::unique_ptr result; if (fileMightContainThisPluginType (desc.fileOrIdentifier)) { - File file (desc.fileOrIdentifier); + auto file = File (desc.fileOrIdentifier); - const File previousWorkingDirectory (File::getCurrentWorkingDirectory()); + auto previousWorkingDirectory = File::getCurrentWorkingDirectory(); file.getParentDirectory().setAsCurrentWorkingDirectory(); const LADSPAModuleHandle::Ptr module (LADSPAModuleHandle::findOrCreateModule (file)); @@ -663,7 +626,7 @@ void LADSPAPluginFormat::createPluginInstance (const PluginDescription& desc, { shellLADSPAUIDToCreate = desc.uid; - result = new LADSPAPluginInstance (module); + result.reset (new LADSPAPluginInstance (module)); if (result->plugin != nullptr && result->isValid()) result->initialise (sampleRate, blockSize); @@ -689,7 +652,7 @@ bool LADSPAPluginFormat::requiresUnblockedMessageThreadDuringCreation (const Plu bool LADSPAPluginFormat::fileMightContainThisPluginType (const String& fileOrIdentifier) { - const File f (File::createFileWithoutCheckingPath (fileOrIdentifier)); + auto f = File::createFileWithoutCheckingPath (fileOrIdentifier); return f.existsAsFile() && f.hasFileExtension (".so"); } @@ -724,7 +687,7 @@ void LADSPAPluginFormat::recursiveFileSearch (StringArray& results, const File& while (iter.next()) { - const File f (iter.getFile()); + auto f = iter.getFile(); bool isPlugin = false; if (fileMightContainThisPluginType (f.getFullPathName())) @@ -740,9 +703,7 @@ void LADSPAPluginFormat::recursiveFileSearch (StringArray& results, const File& FileSearchPath LADSPAPluginFormat::getDefaultLocationsToSearch() { - return FileSearchPath (SystemStats::getEnvironmentVariable ("LADSPA_PATH", - "/usr/lib/ladspa;/usr/local/lib/ladspa;~/.ladspa") - .replace (":", ";")); + return { SystemStats::getEnvironmentVariable ("LADSPA_PATH", "/usr/lib/ladspa;/usr/local/lib/ladspa;~/.ladspa").replace (":", ";") }; } } // namespace juce diff --git a/modules/juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp b/modules/juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp index aa0c5d6c..b744f569 100644 --- a/modules/juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp +++ b/modules/juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp @@ -42,26 +42,28 @@ class LegacyAudioParameter : public AudioProcessorParameter { public: LegacyAudioParameter (AudioProcessor& audioProcessorToUse, int audioParameterIndex) - : audioProcessor (audioProcessorToUse), idx (audioParameterIndex) { - jassert (idx < audioProcessor.getNumParameters()); + processor = &audioProcessorToUse; + + parameterIndex = audioParameterIndex; + jassert (parameterIndex < processor->getNumParameters()); } //============================================================================== - float getValue() const override { return audioProcessor.getParameter (idx); } - void setValue (float newValue) override { audioProcessor.setParameter (idx, newValue); } - float getDefaultValue() const override { return audioProcessor.getParameterDefaultValue (idx); } - String getName (int maxLen) const override { return audioProcessor.getParameterName (idx, maxLen); } - String getLabel() const override { return audioProcessor.getParameterLabel (idx); } - int getNumSteps() const override { return audioProcessor.getParameterNumSteps (idx); } - bool isDiscrete() const override { return audioProcessor.isParameterDiscrete (idx); } + float getValue() const override { return processor->getParameter (parameterIndex); } + void setValue (float newValue) override { processor->setParameter (parameterIndex, newValue); } + float getDefaultValue() const override { return processor->getParameterDefaultValue (parameterIndex); } + String getName (int maxLen) const override { return processor->getParameterName (parameterIndex, maxLen); } + String getLabel() const override { return processor->getParameterLabel (parameterIndex); } + int getNumSteps() const override { return processor->getParameterNumSteps (parameterIndex); } + bool isDiscrete() const override { return processor->isParameterDiscrete (parameterIndex); } bool isBoolean() const override { return false; } - bool isOrientationInverted() const override { return audioProcessor.isParameterOrientationInverted (idx); } - bool isAutomatable() const override { return audioProcessor.isParameterAutomatable (idx); } - bool isMetaParameter() const override { return audioProcessor.isMetaParameter (idx); } - Category getCategory() const override { return audioProcessor.getParameterCategory (idx); } - String getCurrentValueAsText() const override { return audioProcessor.getParameterText (idx); } - String getParamID() const { return audioProcessor.getParameterID (idx); } + bool isOrientationInverted() const override { return processor->isParameterOrientationInverted (parameterIndex); } + bool isAutomatable() const override { return processor->isParameterAutomatable (parameterIndex); } + bool isMetaParameter() const override { return processor->isMetaParameter (parameterIndex); } + Category getCategory() const override { return processor->getParameterCategory (parameterIndex); } + String getCurrentValueAsText() const override { return processor->getParameterText (parameterIndex); } + String getParamID() const { return processor->getParameterID (parameterIndex); } //============================================================================== float getValueForText (const String&) const override @@ -88,7 +90,7 @@ public: { if (auto* legacy = dynamic_cast (param)) { - return legacy->idx; + return legacy->parameterIndex; } else { @@ -119,9 +121,6 @@ public: return String (param->getParameterIndex()); } -private: - AudioProcessor& audioProcessor; - int idx; }; //============================================================================== diff --git a/modules/juce_audio_processors/format_types/juce_VST3Common.h b/modules/juce_audio_processors/format_types/juce_VST3Common.h index 970f2b77..7cba0117 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3Common.h +++ b/modules/juce_audio_processors/format_types/juce_VST3Common.h @@ -577,8 +577,8 @@ private: template struct VST3BufferExchange { - typedef Array Bus; - typedef Array BusMap; + using Bus = Array; + using BusMap = Array; static inline void assignRawPointer (Steinberg::Vst::AudioBusBuffers& vstBuffers, float** raw) { vstBuffers.channelBuffers32 = raw; } static inline void assignRawPointer (Steinberg::Vst::AudioBusBuffers& vstBuffers, double** raw) { vstBuffers.channelBuffers64 = raw; } diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index 466478d6..b6aabd11 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -648,7 +648,7 @@ private: Atomic refCount; String appName; - typedef std::map ParamMapType; + using ParamMapType = std::map; ParamMapType paramToIndexMap; int getIndexOfParamID (Vst::ParamID paramID) @@ -897,8 +897,8 @@ struct DescriptionFactory if (foundNames.contains (name, true)) continue; - ScopedPointer info2; - ScopedPointer infoW; + std::unique_ptr info2; + std::unique_ptr infoW; { ComSmartPtr pf2; @@ -1219,7 +1219,7 @@ struct VST3ModuleHandle : public ReferenceCountedObject } //============================================================================== - typedef ReferenceCountedObjectPtr Ptr; + using Ptr = ReferenceCountedObjectPtr; static VST3ModuleHandle::Ptr findOrCreateModule (const File& file, const PluginDescription& description) { @@ -1243,7 +1243,7 @@ struct VST3ModuleHandle : public ReferenceCountedObject String name; private: - ScopedPointer dllHandle; + std::unique_ptr dllHandle; //============================================================================== static Array& getActiveModules() @@ -1450,14 +1450,14 @@ private: }; ChildComponent embeddedComponent; - ScopedPointer peer; - typedef HWND HandleFormat; + std::unique_ptr peer; + using HandleFormat = HWND; #elif JUCE_MAC AutoResizingNSViewComponentWithParent embeddedComponent; - typedef NSView* HandleFormat; + using HandleFormat = NSView*; #else Component embeddedComponent; - typedef void* HandleFormat; + using HandleFormat = void*; #endif HandleFormat pluginHandle = {}; @@ -1477,7 +1477,7 @@ private: { #if JUCE_WINDOWS if (auto* topComp = getTopLevelComponent()) - peer = embeddedComponent.createNewPeer (0, topComp->getWindowHandle()); + peer.reset (embeddedComponent.createNewPeer (0, topComp->getWindowHandle())); else peer = nullptr; @@ -1576,8 +1576,8 @@ struct VST3ComponentHolder ComSmartPtr pf2; ComSmartPtr pf3; - ScopedPointer info2; - ScopedPointer infoW; + std::unique_ptr info2; + std::unique_ptr infoW; if (pf2.loadFrom (factory)) { @@ -1662,7 +1662,9 @@ struct VST3ComponentHolder void terminate() { - if (isComponentInitialised) component->terminate(); + if (isComponentInitialised) + component->terminate(); + isComponentInitialised = false; } @@ -1698,20 +1700,10 @@ struct VST3PluginInstance : public AudioPluginInstance { VST3Parameter (VST3PluginInstance& parent, Steinberg::Vst::ParamID parameterID, - const String& parameterName, - const String& parameterLabel, - Steinberg::Vst::ParamValue defaultParameterValue, - bool parameterIsAutomatable, - bool parameterIsDiscrete, - int numParameterSteps) + bool parameterIsAutomatable) : pluginInstance (parent), paramID (parameterID), - name (parameterName), - label (parameterLabel), - defaultValue (defaultParameterValue), - automatable (parameterIsAutomatable), - discrete (parameterIsDiscrete), - numSteps (numParameterSteps) + automatable (parameterIsAutomatable) { } @@ -1765,17 +1757,17 @@ struct VST3PluginInstance : public AudioPluginInstance float getDefaultValue() const override { - return (float) defaultValue; + return (float) pluginInstance.getParameterInfoForIndex (getParameterIndex()).defaultNormalizedValue; } String getName (int /*maximumStringLength*/) const override { - return name; + return toString (pluginInstance.getParameterInfoForIndex (getParameterIndex()).title); } String getLabel() const override { - return label; + return toString (pluginInstance.getParameterInfoForIndex (getParameterIndex()).units); } bool isAutomatable() const override @@ -1785,12 +1777,14 @@ struct VST3PluginInstance : public AudioPluginInstance bool isDiscrete() const override { - return discrete; + return getNumSteps() != AudioProcessor::getDefaultNumParameterSteps(); } int getNumSteps() const override { - return numSteps; + auto stepCount = pluginInstance.getParameterInfoForIndex (getParameterIndex()).stepCount; + return stepCount == 0 ? AudioProcessor::getDefaultNumParameterSteps() + : stepCount + 1; } StringArray getAllValueStrings() const override @@ -1800,10 +1794,7 @@ struct VST3PluginInstance : public AudioPluginInstance VST3PluginInstance& pluginInstance; const Steinberg::Vst::ParamID paramID; - const String name, label; - const Steinberg::Vst::ParamValue defaultValue; - const bool automatable, discrete; - const int numSteps; + const bool automatable; }; VST3PluginInstance (VST3ComponentHolder* componentHolder) @@ -1876,21 +1867,10 @@ struct VST3PluginInstance : public AudioPluginInstance for (int i = 0; i < editController->getParameterCount(); ++i) { - Vst::ParameterInfo paramInfo = { 0 }; - editController->getParameterInfo (i, paramInfo); - - bool isDiscrete = paramInfo.stepCount != 0; - int numSteps = isDiscrete ? paramInfo.stepCount + 1 - : AudioProcessor::getDefaultNumParameterSteps(); - + auto paramInfo = getParameterInfoForIndex (i); VST3Parameter* p = new VST3Parameter (*this, paramInfo.id, - toString (paramInfo.title), - toString (paramInfo.units), - paramInfo.defaultNormalizedValue, - (paramInfo.flags & Vst::ParameterInfo::kCanAutomate) != 0, - isDiscrete, - numSteps); + (paramInfo.flags & Vst::ParameterInfo::kCanAutomate) != 0); addParameter (p); if ((paramInfo.flags & Vst::ParameterInfo::kIsBypass) != 0) @@ -2385,7 +2365,7 @@ struct VST3PluginInstance : public AudioPluginInstance void setStateInformation (const void* data, int sizeInBytes) override { - ScopedPointer head (AudioProcessor::getXmlFromBinary (data, sizeInBytes)); + std::unique_ptr head (AudioProcessor::getXmlFromBinary (data, sizeInBytes)); if (head != nullptr) { @@ -2558,15 +2538,15 @@ struct VST3PluginInstance : public AudioPluginInstance private: //============================================================================== - ScopedPointer holder; + std::unique_ptr holder; friend VST3HostContext; // Information objects: String company; - ScopedPointer info; - ScopedPointer info2; - ScopedPointer infoW; + std::unique_ptr info; + std::unique_ptr info2; + std::unique_ptr infoW; // Rudimentary interfaces: ComSmartPtr editController; @@ -2945,7 +2925,7 @@ void VST3PluginFormat::findAllTypesForFile (OwnedArray& resul void VST3PluginFormat::createPluginInstance (const PluginDescription& description, double, int, void* userData, void (*callback) (void*, AudioPluginInstance*, const String&)) { - ScopedPointer result; + std::unique_ptr result; if (fileMightContainThisPluginType (description.fileOrIdentifier)) { @@ -2956,7 +2936,7 @@ void VST3PluginFormat::createPluginInstance (const PluginDescription& descriptio if (const VST3Classes::VST3ModuleHandle::Ptr module = VST3Classes::VST3ModuleHandle::findOrCreateModule (file, description)) { - ScopedPointer holder (new VST3Classes::VST3ComponentHolder (module)); + std::unique_ptr holder (new VST3Classes::VST3ComponentHolder (module)); if (holder->initialise()) { diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index c3c5e315..a52f2f8a 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -578,9 +578,9 @@ struct ModuleHandle : public ReferenceCountedObject File file; MainCall moduleMain, customMain = {}; String pluginName; - ScopedPointer vstXml; + std::unique_ptr vstXml; - typedef ReferenceCountedObjectPtr Ptr; + using Ptr = ReferenceCountedObjectPtr; static Array& getActiveModules() { @@ -659,11 +659,11 @@ struct ModuleHandle : public ReferenceCountedObject if (moduleMain != nullptr) { - vstXml = XmlDocument::parse (file.withFileExtension ("vstxml")); + vstXml.reset (XmlDocument::parse (file.withFileExtension ("vstxml"))); #if JUCE_WINDOWS if (vstXml == nullptr) - vstXml = XmlDocument::parse (getDLLResource (file, "VSTXML", 1)); + vstXml.reset (XmlDocument::parse (getDLLResource (file, "VSTXML", 1))); #endif } @@ -916,6 +916,10 @@ struct VSTPluginInstance : public AudioPluginInstance, String getName (int maximumStringLength) const override { + if (name.isEmpty()) + return pluginInstance.getTextForOpcode (getParameterIndex(), + plugInOpcodeGetParameterName); + if (name.length() <= maximumStringLength) return name; @@ -933,7 +937,9 @@ struct VSTPluginInstance : public AudioPluginInstance, String getLabel() const override { - return label; + return label.isEmpty() ? pluginInstance.getTextForOpcode (getParameterIndex(), + plugInOpcodeGetParameterLabel) + : label; } bool isAutomatable() const override @@ -989,10 +995,10 @@ struct VSTPluginInstance : public AudioPluginInstance, for (int i = 0; i < vstEffect->numParameters; ++i) { - String paramName (getTextForOpcode (i, plugInOpcodeGetParameterName)); + String paramName; Array shortParamNames; float defaultValue = 0; - String label (getTextForOpcode (i, plugInOpcodeGetParameterLabel)); + String label; bool isAutomatable = dispatch (plugInOpcodeIsParameterAutomatable, i, 0, 0, 0) != 0; bool isDiscrete = false; int numSteps = AudioProcessor::getDefaultNumParameterSteps(); @@ -1064,7 +1070,7 @@ struct VSTPluginInstance : public AudioPluginInstance, valueType)); } - vstSupportsBypass = pluginCanDo ("bypass"); + vstSupportsBypass = (pluginCanDo ("bypass") > 0); setRateAndBufferSizeDetails (sampleRateToUse, blockSizeToUse); } @@ -1946,14 +1952,20 @@ struct VSTPluginInstance : public AudioPluginInstance, VstEffectInterface* vstEffect; ModuleHandle::Ptr vstModule; - ScopedPointer extraFunctions; + std::unique_ptr extraFunctions; bool usesCocoaNSView = false; private: //============================================================================== struct VST2BypassParameter : Parameter { - VST2BypassParameter (VSTPluginInstance& effectToUse) : parent (effectToUse) {} + VST2BypassParameter (VSTPluginInstance& effectToUse) + : parent (effectToUse), + onStrings (TRANS("on"), TRANS("yes"), TRANS("true")), + offStrings (TRANS("off"), TRANS("no"), TRANS("false")), + values (TRANS("Off"), TRANS("On")) + { + } void setValue (float newValue) override { @@ -1991,9 +2003,7 @@ private: VSTPluginInstance& parent; bool currentValue = false; - StringArray onStrings { TRANS("on"), TRANS("yes"), TRANS("true") }; - StringArray offStrings { TRANS("off"), TRANS("no"), TRANS("false") }; - StringArray values { TRANS("Off"), TRANS("On") }; + StringArray onStrings, offStrings, values; }; //============================================================================== @@ -2014,9 +2024,9 @@ private: AudioBuffer tmpBufferDouble; HeapBlock channelBufferDouble; - ScopedPointer bypassParam; + std::unique_ptr bypassParam; - ScopedPointer xmlInfo; + std::unique_ptr xmlInfo; static pointer_sized_int handleCanDo (const char* name) { @@ -3293,10 +3303,10 @@ private: }; friend struct CarbonWrapperComponent; - ScopedPointer carbonWrapper; + std::unique_ptr carbonWrapper; #endif - ScopedPointer cocoaWrapper; + std::unique_ptr cocoaWrapper; void resized() override { @@ -3374,7 +3384,7 @@ void VSTPluginFormat::findAllTypesForFile (OwnedArray& result desc.fileOrIdentifier = fileOrIdentifier; desc.uid = 0; - ScopedPointer instance (createAndUpdateDesc (*this, desc)); + std::unique_ptr instance (createAndUpdateDesc (*this, desc)); if (instance == nullptr) return; @@ -3402,7 +3412,7 @@ void VSTPluginFormat::findAllTypesForFile (OwnedArray& result aboutToScanVSTShellPlugin (desc); - ScopedPointer shellInstance (createAndUpdateDesc (*this, desc)); + std::unique_ptr shellInstance (createAndUpdateDesc (*this, desc)); if (shellInstance != nullptr) { @@ -3423,7 +3433,7 @@ void VSTPluginFormat::createPluginInstance (const PluginDescription& desc, void* userData, void (*callback) (void*, AudioPluginInstance*, const String&)) { - ScopedPointer result; + std::unique_ptr result; if (fileMightContainThisPluginType (desc.fileOrIdentifier)) { @@ -3600,7 +3610,7 @@ AudioPluginInstance* VSTPluginFormat::createCustomVSTFromMainCall (void* entryPo if (module->open()) { - ScopedPointer result (VSTPluginInstance::create (module, initialSampleRate, initialBufferSize)); + std::unique_ptr result (VSTPluginInstance::create (module, initialSampleRate, initialBufferSize)); if (result != nullptr) if (result->initialiseEffect (initialSampleRate, initialBufferSize)) @@ -3612,7 +3622,7 @@ AudioPluginInstance* VSTPluginFormat::createCustomVSTFromMainCall (void* entryPo void VSTPluginFormat::setExtraFunctions (AudioPluginInstance* plugin, ExtraFunctions* functions) { - ScopedPointer f (functions); + std::unique_ptr f (functions); if (auto* vst = dynamic_cast (plugin)) std::swap (vst->extraFunctions, f); diff --git a/modules/juce_audio_processors/juce_audio_processors.cpp b/modules/juce_audio_processors/juce_audio_processors.cpp index ed56fdb8..8c6f416a 100644 --- a/modules/juce_audio_processors/juce_audio_processors.cpp +++ b/modules/juce_audio_processors/juce_audio_processors.cpp @@ -82,10 +82,10 @@ static inline bool arrayContainsPlugin (const OwnedArray& lis #if JUCE_IOS #define JUCE_IOS_MAC_VIEW UIView - typedef UIViewComponent ViewComponentBaseClass; + using ViewComponentBaseClass = UIViewComponent; #else #define JUCE_IOS_MAC_VIEW NSView - typedef NSViewComponent ViewComponentBaseClass; + using ViewComponentBaseClass = NSViewComponent; #endif //============================================================================== diff --git a/modules/juce_audio_processors/juce_audio_processors.h b/modules/juce_audio_processors/juce_audio_processors.h index a5fcee52..59ada712 100644 --- a/modules/juce_audio_processors/juce_audio_processors.h +++ b/modules/juce_audio_processors/juce_audio_processors.h @@ -35,9 +35,9 @@ ID: juce_audio_processors vendor: juce - version: 5.3.1 + version: 5.3.2 name: JUCE audio processor classes - description: Classes for loading and playing VST, AU, or internally-generated audio processors. + description: Classes for loading and playing VST, AU, LADSPA, or internally-generated audio processors. website: http://www.juce.com/juce license: GPL/Commercial @@ -60,7 +60,7 @@ /** Config: JUCE_PLUGINHOST_VST Enables the VST audio plugin hosting classes. - @see VSTPluginFormat, VST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU, JUCE_PLUGINHOST_VST3 + @see VSTPluginFormat, VST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU, JUCE_PLUGINHOST_VST3, JUCE_PLUGINHOST_LADSPA */ #ifndef JUCE_PLUGINHOST_VST #define JUCE_PLUGINHOST_VST 0 @@ -70,7 +70,7 @@ Enables the VST3 audio plugin hosting classes. This requires the Steinberg VST3 SDK to be installed on your machine. - @see VSTPluginFormat, VST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_AU + @see VSTPluginFormat, VST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_AU, JUCE_PLUGINHOST_LADSPA */ #ifndef JUCE_PLUGINHOST_VST3 #define JUCE_PLUGINHOST_VST3 0 @@ -79,14 +79,23 @@ /** Config: JUCE_PLUGINHOST_AU Enables the AudioUnit plugin hosting classes. This is Mac-only, of course. - @see AudioUnitPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_VST3 + @see AudioUnitPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_VST3, JUCE_PLUGINHOST_LADSPA */ #ifndef JUCE_PLUGINHOST_AU #define JUCE_PLUGINHOST_AU 0 #endif -#if ! (JUCE_PLUGINHOST_AU || JUCE_PLUGINHOST_VST || JUCE_PLUGINHOST_VST3) -// #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!" +/** Config: JUCE_PLUGINHOST_LADSPA + Enables the LADSPA plugin hosting classes. This is Linux-only, of course. + + @see LADSPAPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_VST3, JUCE_PLUGINHOST_AU + */ +#ifndef JUCE_PLUGINHOST_LADSPA + #define JUCE_PLUGINHOST_LADSPA 0 +#endif + +#if ! (JUCE_PLUGINHOST_AU || JUCE_PLUGINHOST_VST || JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_LADSPA) +// #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!" #endif #if ! (defined (JUCE_SUPPORT_CARBON) || JUCE_64BIT || JUCE_IOS) diff --git a/modules/juce_audio_processors/processors/juce_AudioPluginInstance.cpp b/modules/juce_audio_processors/processors/juce_AudioPluginInstance.cpp index 31f2ad74..a228766b 100644 --- a/modules/juce_audio_processors/processors/juce_AudioPluginInstance.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioPluginInstance.cpp @@ -38,6 +38,15 @@ String AudioPluginInstance::getParameterID (int parameterIndex) { assertOnceOnDeprecatedMethodUse(); + // Currently there is no corresponding method available in the + // AudioProcessorParameter class, and the previous behaviour of JUCE's + // plug-in hosting code simply returns a string version of the index; to + // maintain backwards compatibilty you should perform the operation below + // this comment. However the caveat is that for plug-ins which change their + // number of parameters dynamically at runtime you cannot rely upon the + // returned parameter ID mapping to the correct parameter. A comprehensive + // solution to this problem requires some additional work in JUCE's hosting + // code. return String (parameterIndex); } @@ -56,7 +65,7 @@ void AudioPluginInstance::setParameter (int parameterIndex, float newValue) assertOnceOnDeprecatedMethodUse(); if (auto* param = getParameters()[parameterIndex]) - return param->setValue (newValue); + param->setValue (newValue); } const String AudioPluginInstance::getParameterName (int parameterIndex) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp index 43658a57..c0f2bd12 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp @@ -432,7 +432,7 @@ void AudioProcessor::setParameterNotifyingHost (int parameterIndex, float newVal { param->setValueNotifyingHost (newValue); } - else + else if (isPositiveAndBelow (parameterIndex, getNumParameters())) { setParameter (parameterIndex, newValue); sendParamChangeMessageToListeners (parameterIndex, newValue); @@ -522,7 +522,8 @@ String AudioProcessor::getParameterName (int index, int maximumStringLength) if (auto* p = managedParameters[index]) return p->getName (maximumStringLength); - return getParameterName (index).substring (0, maximumStringLength); + return isPositiveAndBelow (index, getNumParameters()) ? getParameterName (index).substring (0, maximumStringLength) + : String(); } const String AudioProcessor::getParameterText (int index) @@ -534,7 +535,8 @@ const String AudioProcessor::getParameterText (int index) ScopedValueSetter sv (textRecursionCheck, true, false); #endif - return getParameterText (index, 1024); + return isPositiveAndBelow (index, getNumParameters()) ? getParameterText (index, 1024) + : String(); } String AudioProcessor::getParameterText (int index, int maximumStringLength) @@ -542,7 +544,8 @@ String AudioProcessor::getParameterText (int index, int maximumStringLength) if (auto* p = managedParameters[index]) return p->getText (p->getValue(), maximumStringLength); - return getParameterText (index).substring (0, maximumStringLength); + return isPositiveAndBelow (index, getNumParameters()) ? getParameterText (index).substring (0, maximumStringLength) + : String(); } #if JUCE_GCC diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index 11122fc0..201f3b36 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -66,18 +66,10 @@ protected: /** Constructor for AudioProcessors which use layout maps If your AudioProcessor uses layout maps then use this constructor. */ - #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS AudioProcessor (const std::initializer_list& channelLayoutList) : AudioProcessor (busesPropertiesFromLayoutArray (layoutListToArray (channelLayoutList))) { } - #else - template - AudioProcessor (const short (&channelLayoutList) [numLayouts][2]) - : AudioProcessor (busesPropertiesFromLayoutArray (layoutListToArray (channelLayoutList))) - { - } - #endif public: //============================================================================== @@ -766,12 +758,10 @@ public: } @endcode */ - #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS static bool containsLayout (const BusesLayout& layouts, const std::initializer_list& channelLayoutList) { return containsLayout (layouts, layoutListToArray (channelLayoutList)); } - #endif template static bool containsLayout (const BusesLayout& layouts, const short (&channelLayoutList) [numLayouts][2]) @@ -1590,7 +1580,6 @@ private: return layouts; } - #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS static Array layoutListToArray (const std::initializer_list& configuration) { Array layouts; @@ -1600,7 +1589,6 @@ private: return layouts; } - #endif //============================================================================== static BusesProperties busesPropertiesFromLayoutArray (const Array&); diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h index 1d126a8a..76dffc48 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h @@ -177,7 +177,7 @@ public: */ void setBoundsConstrained (Rectangle newBounds); - ScopedPointer resizableCorner; + std::unique_ptr resizableCorner; private: //============================================================================== @@ -200,7 +200,7 @@ private: void attachConstrainer (ComponentBoundsConstrainer*); //============================================================================== - ScopedPointer resizeListener; + std::unique_ptr resizeListener; bool resizable; ComponentBoundsConstrainer defaultConstrainer; ComponentBoundsConstrainer* constrainer = {}; diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp index 8eedcb8e..8c6b3276 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp @@ -348,7 +348,7 @@ struct RenderSequenceBuilder } //============================================================================== - typedef AudioProcessorGraph::NodeID NodeID; + using NodeID = AudioProcessorGraph::NodeID; AudioProcessorGraph& graph; RenderSequence& sequence; @@ -1045,7 +1045,6 @@ bool AudioProcessorGraph::isAnInputTo (Node& src, Node& dst, int recursionCheck) return false; } - bool AudioProcessorGraph::canConnect (Node* source, int sourceChannel, Node* dest, int destChannel) const noexcept { bool sourceIsMIDI = sourceChannel == midiChannelIndex; @@ -1181,8 +1180,8 @@ bool AudioProcessorGraph::removeIllegalConnections() //============================================================================== void AudioProcessorGraph::clearRenderingSequence() { - ScopedPointer oldSequenceF; - ScopedPointer oldSequenceD; + std::unique_ptr oldSequenceF; + std::unique_ptr oldSequenceD; { const ScopedLock sl (getCallbackLock()); @@ -1202,8 +1201,8 @@ bool AudioProcessorGraph::anyNodesNeedPreparing() const noexcept void AudioProcessorGraph::buildRenderingSequence() { - ScopedPointer newSequenceF (new RenderSequenceFloat()); - ScopedPointer newSequenceD (new RenderSequenceDouble()); + std::unique_ptr newSequenceF (new RenderSequenceFloat()); + std::unique_ptr newSequenceD (new RenderSequenceDouble()); { MessageManagerLock mml; @@ -1212,8 +1211,11 @@ void AudioProcessorGraph::buildRenderingSequence() RenderSequenceBuilder builderD (*this, *newSequenceD); } - newSequenceF->prepareBuffers (getBlockSize()); - newSequenceD->prepareBuffers (getBlockSize()); + { + const ScopedLock sl (getCallbackLock()); + newSequenceF->prepareBuffers (getBlockSize()); + newSequenceD->prepareBuffers (getBlockSize()); + } if (anyNodesNeedPreparing()) { @@ -1295,10 +1297,10 @@ bool AudioProcessorGraph::producesMidi() const { return tru void AudioProcessorGraph::getStateInformation (juce::MemoryBlock&) {} void AudioProcessorGraph::setStateInformation (const void*, int) {} -template -static void processBlockForBuffer (AudioBuffer& buffer, MidiBuffer& midiMessages, +template +static void processBlockForBuffer (AudioBuffer& buffer, MidiBuffer& midiMessages, AudioProcessorGraph& graph, - GraphRenderSequence* renderSequence, + std::unique_ptr& renderSequence, Atomic& isPrepared) { if (graph.isNonRealtime()) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h index 15983d30..a752149d 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h @@ -58,7 +58,7 @@ public: ~AudioProcessorGraph(); /** Each node in the graph has a UID of this type. */ - typedef uint32 NodeID; + using NodeID = uint32; //============================================================================== /** A special index that represents the midi channel of a node. @@ -117,7 +117,7 @@ public: //============================================================================== /** A convenient typedef for referring to a pointer to a node object. */ - typedef ReferenceCountedObjectPtr Ptr; + using Ptr = ReferenceCountedObjectPtr; private: //============================================================================== @@ -131,7 +131,7 @@ public: bool operator== (const Connection&) const noexcept; }; - const ScopedPointer processor; + const std::unique_ptr processor; Array inputs, outputs; bool isPrepared = false, bypassed = false; @@ -380,8 +380,8 @@ private: struct RenderSequenceFloat; struct RenderSequenceDouble; - ScopedPointer renderSequenceFloat; - ScopedPointer renderSequenceDouble; + std::unique_ptr renderSequenceFloat; + std::unique_ptr renderSequenceDouble; friend class AudioGraphIOProcessor; diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h b/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h index 98fd08ad..276ba3dc 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h @@ -287,6 +287,7 @@ public: private: //============================================================================== friend class AudioProcessor; + friend class LegacyAudioParameter; AudioProcessor* processor = nullptr; int parameterIndex = -1; CriticalSection listenerLock; diff --git a/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.cpp b/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.cpp index 3a302b2e..58855f0b 100644 --- a/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.cpp +++ b/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.cpp @@ -28,20 +28,27 @@ namespace juce { class ParameterListener : private AudioProcessorParameter::Listener, + private AudioProcessorListener, private Timer { public: - ParameterListener (AudioProcessorParameter& param) - : parameter (param) + ParameterListener (AudioProcessor& p, AudioProcessorParameter& param) + : processor (p), parameter (param) { - parameter.addListener (this); + if (LegacyAudioParameter::isLegacy (¶meter)) + processor.addListener (this); + else + parameter.addListener (this); startTimer (100); } virtual ~ParameterListener() { - parameter.removeListener (this); + if (LegacyAudioParameter::isLegacy (¶meter)) + processor.removeListener (this); + else + parameter.removeListener (this); } AudioProcessorParameter& getParameter() noexcept @@ -52,6 +59,7 @@ public: virtual void handleNewParameterValue() = 0; private: + //============================================================================== void parameterValueChanged (int, float) override { parameterValueHasChanged = 1; @@ -59,6 +67,16 @@ private: void parameterGestureChanged (int, bool) override {} + //============================================================================== + void audioProcessorParameterChanged (AudioProcessor*, int index, float) override + { + if (index == parameter.getParameterIndex()) + parameterValueHasChanged = 1; + } + + void audioProcessorChanged (AudioProcessor*) override {} + + //============================================================================== void timerCallback() override { if (parameterValueHasChanged.compareAndSetBool (0, 1)) @@ -72,6 +90,7 @@ private: } } + AudioProcessor& processor; AudioProcessorParameter& parameter; Atomic parameterValueHasChanged { 0 }; @@ -82,8 +101,8 @@ class BooleanParameterComponent final : public Component, private ParameterListener { public: - BooleanParameterComponent (AudioProcessorParameter& param) - : ParameterListener (param) + BooleanParameterComponent (AudioProcessor& processor, AudioProcessorParameter& param) + : ParameterListener (processor, param) { // Set the initial value. handleNewParameterValue(); @@ -135,8 +154,8 @@ class SwitchParameterComponent final : public Component, private ParameterListener { public: - SwitchParameterComponent (AudioProcessorParameter& param) - : ParameterListener (param) + SwitchParameterComponent (AudioProcessor& processor, AudioProcessorParameter& param) + : ParameterListener (processor, param) { auto* leftButton = buttons.add (new TextButton()); auto* rightButton = buttons.add (new TextButton()); @@ -240,8 +259,8 @@ class ChoiceParameterComponent final : public Component, private ParameterListener { public: - ChoiceParameterComponent (AudioProcessorParameter& param) - : ParameterListener (param), + ChoiceParameterComponent (AudioProcessor& processor, AudioProcessorParameter& param) + : ParameterListener (processor, param), parameterValues (getParameter().getAllValueStrings()) { box.addItemList (parameterValues, 1); @@ -302,8 +321,8 @@ class SliderParameterComponent final : public Component, private ParameterListener { public: - SliderParameterComponent (AudioProcessorParameter& param) - : ParameterListener (param) + SliderParameterComponent (AudioProcessor& processor, AudioProcessorParameter& param) + : ParameterListener (processor, param) { if (getParameter().getNumSteps() != AudioProcessor::getDefaultNumParameterSteps()) slider.setRange (0.0, 1.0, 1.0 / (getParameter().getNumSteps() - 1.0)); @@ -392,7 +411,7 @@ private: class ParameterDisplayComponent : public Component { public: - ParameterDisplayComponent (AudioProcessorParameter& param) + ParameterDisplayComponent (AudioProcessor& processor, AudioProcessorParameter& param) : parameter (param) { parameterName.setText (parameter.getName (128), dontSendNotification); @@ -408,27 +427,27 @@ public: // marking a parameter as boolean. If you want consistency across // all formats then it might be best to use a // SwitchParameterComponent instead. - parameterComp.reset (new BooleanParameterComponent (param)); + parameterComp.reset (new BooleanParameterComponent (processor, param)); } else if (param.getNumSteps() == 2) { // Most hosts display any parameter with just two steps as a switch. - parameterComp.reset (new SwitchParameterComponent (param)); + parameterComp.reset (new SwitchParameterComponent (processor, param)); } else if (! param.getAllValueStrings().isEmpty()) { // If we have a list of strings to represent the different states a // parameter can be in then we should present a dropdown allowing a // user to pick one of them. - parameterComp.reset (new ChoiceParameterComponent (param)); + parameterComp.reset (new ChoiceParameterComponent (processor, param)); } else { // Everything else can be represented as a slider. - parameterComp.reset (new SliderParameterComponent (param)); + parameterComp.reset (new SliderParameterComponent (processor, param)); } - addAndMakeVisible (parameterComp); + addAndMakeVisible (parameterComp.get()); setSize (400, 40); } @@ -447,7 +466,7 @@ public: private: AudioProcessorParameter& parameter; Label parameterName, parameterLabel; - ScopedPointer parameterComp; + std::unique_ptr parameterComp; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ParameterDisplayComponent) }; @@ -455,11 +474,11 @@ private: class ParametersPanel : public Component { public: - ParametersPanel (const Array& parameters) + ParametersPanel (AudioProcessor& processor, const Array& parameters) { for (auto* param : parameters) if (param->isAutomatable()) - addAndMakeVisible (paramComponents.add (new ParameterDisplayComponent (*param))); + addAndMakeVisible (paramComponents.add (new ParameterDisplayComponent (processor, *param))); if (auto* comp = paramComponents[0]) setSize (comp->getWidth(), comp->getHeight() * paramComponents.size()); @@ -499,7 +518,7 @@ struct GenericAudioProcessorEditor::Pimpl owner.setOpaque (true); - view.setViewedComponent (new ParametersPanel (juceParameters.params)); + view.setViewedComponent (new ParametersPanel (*p, juceParameters.params)); owner.addAndMakeVisible (view); view.setScrollBarsShown (true, false); diff --git a/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.h b/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.h index c79be1b5..78f48202 100644 --- a/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.h +++ b/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.h @@ -53,7 +53,7 @@ public: private: //============================================================================== struct Pimpl; - ScopedPointer pimpl; + std::unique_ptr pimpl; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GenericAudioProcessorEditor) }; diff --git a/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp b/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp index 2a9d6edb..ffa40b3f 100644 --- a/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp +++ b/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp @@ -404,7 +404,7 @@ struct PluginTreeUtils const KnownPluginList::SortMethod sortMethod) { String lastType; - ScopedPointer current (new KnownPluginList::PluginTree()); + std::unique_ptr current (new KnownPluginList::PluginTree()); for (auto* pd : sorted) { @@ -548,7 +548,7 @@ KnownPluginList::PluginTree* KnownPluginList::createTree (const SortMethod sortM void KnownPluginList::addToMenu (PopupMenu& menu, const SortMethod sortMethod, const String& currentlyTickedPluginID) const { - ScopedPointer tree (createTree (sortMethod)); + std::unique_ptr tree (createTree (sortMethod)); PluginTreeUtils::addToMenu (*tree, menu, types, currentlyTickedPluginID); } diff --git a/modules/juce_audio_processors/scanning/juce_KnownPluginList.h b/modules/juce_audio_processors/scanning/juce_KnownPluginList.h index cb5cb632..b34ade57 100644 --- a/modules/juce_audio_processors/scanning/juce_KnownPluginList.h +++ b/modules/juce_audio_processors/scanning/juce_KnownPluginList.h @@ -220,7 +220,7 @@ private: //============================================================================== OwnedArray types; StringArray blacklist; - ScopedPointer scanner; + std::unique_ptr scanner; CriticalSection scanLock, typesArrayLock; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (KnownPluginList) diff --git a/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp b/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp index ca9f5979..3c0d447e 100644 --- a/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp +++ b/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp @@ -393,14 +393,14 @@ private: AudioPluginFormat& formatToScan; StringArray filesOrIdentifiersToScan; PropertiesFile* propertiesToUse; - ScopedPointer scanner; + std::unique_ptr scanner; AlertWindow pathChooserWindow, progressWindow; FileSearchPathListComponent pathList; String pluginBeingScanned; double progress; int numThreads; bool allowAsync, finished; - ScopedPointer pool; + std::unique_ptr pool; static void startScanCallback (int result, AlertWindow* alert, Scanner* scanner) { diff --git a/modules/juce_audio_processors/scanning/juce_PluginListComponent.h b/modules/juce_audio_processors/scanning/juce_PluginListComponent.h index a34b4ad5..d7d71ffb 100644 --- a/modules/juce_audio_processors/scanning/juce_PluginListComponent.h +++ b/modules/juce_audio_processors/scanning/juce_PluginListComponent.h @@ -110,12 +110,12 @@ private: int numThreads; class TableModel; - ScopedPointer tableModel; + std::unique_ptr tableModel; class Scanner; friend class Scanner; friend struct ContainerDeletePolicy; - ScopedPointer currentScanner; + std::unique_ptr currentScanner; void scanFinished (const StringArray&); static void optionsMenuStaticCallback (int, PluginListComponent*); diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp index 955a44ec..af867144 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp @@ -49,8 +49,8 @@ struct AudioProcessorValueTreeState::Parameter : public AudioProcessorParamete isDiscreteParam (discrete), isBooleanParam (boolean) { + value = defaultValue; state.addListener (this); - needsUpdate.set (1); } ~Parameter() @@ -93,7 +93,7 @@ struct AudioProcessorValueTreeState::Parameter : public AudioProcessorParamete listeners.call ([=] (AudioProcessorValueTreeState::Listener& l) { l.parameterChanged (paramID, value); }); listenersNeedCalling = false; - needsUpdate.set (1); + needsUpdate = true; } } @@ -119,12 +119,25 @@ struct AudioProcessorValueTreeState::Parameter : public AudioProcessorParamete void copyValueToValueTree() { - if (state.isValid()) - state.setPropertyExcludingListener (this, owner.valuePropertyID, value, owner.undoManager); + if (auto* valueProperty = state.getPropertyPointer (owner.valuePropertyID)) + { + if ((float) *valueProperty != value) + { + ScopedValueSetter svs (ignoreParameterChangedCallbacks, true); + state.setProperty (owner.valuePropertyID, value, owner.undoManager); + } + } + else + { + state.setProperty (owner.valuePropertyID, value, nullptr); + } } void valueTreePropertyChanged (ValueTree&, const Identifier& property) override { + if (ignoreParameterChangedCallbacks) + return; + if (property == owner.valuePropertyID) updateFromValueTree(); } @@ -163,9 +176,10 @@ struct AudioProcessorValueTreeState::Parameter : public AudioProcessorParamete std::function textToValueFunction; NormalisableRange range; float value, defaultValue; - Atomic needsUpdate; + std::atomic needsUpdate { true }; bool listenersNeedCalling; const bool isMetaParam, isAutomatableParam, isDiscreteParam, isBooleanParam; + bool ignoreParameterChangedCallbacks = false; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Parameter) }; @@ -218,7 +232,7 @@ Value AudioProcessorValueTreeState::getParameterAsValue (StringRef paramID) cons if (Parameter* p = Parameter::getParameterForID (processor, paramID)) return p->state.getPropertyAsValue (valuePropertyID, undoManager); - return Value(); + return {}; } NormalisableRange AudioProcessorValueTreeState::getParameterRange (StringRef paramID) const noexcept @@ -246,6 +260,8 @@ ValueTree AudioProcessorValueTreeState::copyState() { ScopedLock lock (valueTreeChanging); + flushParameterValuesToValueTree(); + return state.createCopy(); } @@ -254,6 +270,9 @@ void AudioProcessorValueTreeState::replaceState (const ValueTree& newState) ScopedLock lock (valueTreeChanging); state = newState; + + if (undoManager != nullptr) + undoManager->clearUndoHistory(); } ValueTree AudioProcessorValueTreeState::getOrCreateChildValueTree (const String& paramID) @@ -263,8 +282,8 @@ ValueTree AudioProcessorValueTreeState::getOrCreateChildValueTree (const String& if (! v.isValid()) { v = ValueTree (valueType); - v.setProperty (idPropertyID, paramID, undoManager); - state.appendChild (v, undoManager); + v.setProperty (idPropertyID, paramID, nullptr); + state.appendChild (v, nullptr); } return v; @@ -316,14 +335,16 @@ bool AudioProcessorValueTreeState::flushParameterValuesToValueTree() { ScopedLock lock (valueTreeChanging); - auto anythingUpdated = false; + bool anythingUpdated = false; for (auto* ap : processor.getParameters()) { jassert (dynamic_cast (ap) != nullptr); auto* p = static_cast (ap); - if (p->needsUpdate.compareAndSetBool (0, 1)) + bool needsUpdateTestValue = true; + + if (p->needsUpdate.compare_exchange_strong (needsUpdateTestValue, false)) { p->copyValueToValueTree(); anythingUpdated = true; @@ -395,7 +416,12 @@ struct AttachedControlBase : public AudioProcessorValueTreeState::Listener, void beginParameterChange() { if (AudioProcessorParameter* p = state.getParameter (paramID)) + { + if (state.undoManager != nullptr) + state.undoManager->beginNewTransaction(); + p->beginChangeGesture(); + } } void endParameterChange() @@ -502,7 +528,7 @@ struct AudioProcessorValueTreeState::SliderAttachment::Pimpl : private Attached { const ScopedLock selfCallbackLock (selfCallbackMutex); - if ((! ignoreCallbacks) && (! ModifierKeys::getCurrentModifiers().isRightButtonDown())) + if ((! ignoreCallbacks) && (! ModifierKeys::currentModifiers.isRightButtonDown())) setNewUnnormalisedValue ((float) s->getValue()); } diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h index 70fc72f5..509410ac 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h @@ -198,7 +198,7 @@ public: private: struct Pimpl; friend struct ContainerDeletePolicy; - ScopedPointer pimpl; + std::unique_ptr pimpl; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SliderAttachment) }; @@ -222,7 +222,7 @@ public: private: struct Pimpl; friend struct ContainerDeletePolicy; - ScopedPointer pimpl; + std::unique_ptr pimpl; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComboBoxAttachment) }; @@ -246,7 +246,7 @@ public: private: struct Pimpl; friend struct ContainerDeletePolicy; - ScopedPointer pimpl; + std::unique_ptr pimpl; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ButtonAttachment) }; diff --git a/modules/juce_audio_utils/audio_cd/juce_AudioCDBurner.h b/modules/juce_audio_utils/audio_cd/juce_AudioCDBurner.h index f75df9a1..cca13675 100644 --- a/modules/juce_audio_utils/audio_cd/juce_AudioCDBurner.h +++ b/modules/juce_audio_utils/audio_cd/juce_AudioCDBurner.h @@ -163,7 +163,7 @@ private: class Pimpl; friend struct ContainerDeletePolicy; - ScopedPointer pimpl; + std::unique_ptr pimpl; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioCDBurner) }; diff --git a/modules/juce_audio_utils/audio_cd/juce_AudioCDReader.h b/modules/juce_audio_utils/audio_cd/juce_AudioCDReader.h index 175cf06b..66a822f4 100644 --- a/modules/juce_audio_utils/audio_cd/juce_AudioCDReader.h +++ b/modules/juce_audio_utils/audio_cd/juce_AudioCDReader.h @@ -155,7 +155,7 @@ private: File volumeDir; Array tracks; int currentReaderTrack; - ScopedPointer reader; + std::unique_ptr reader; AudioCDReader (const File& volume); #elif JUCE_WINDOWS diff --git a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp index 3a174dcd..1b1b292c 100644 --- a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp @@ -116,7 +116,7 @@ public: g.setFont (height * 0.6f); g.setColour (findColour (ListBox::textColourId, true).withMultipliedAlpha (enabled ? 1.0f : 0.6f)); - g.drawText (item, x, 0, width - x - 2, height, Justification::centredLeft, true); + g.drawText (item, x + 5, 0, width - x - 5, height, Justification::centredLeft, true); } } @@ -178,7 +178,7 @@ private: int getTickX() const { - return getRowHeight() + 5; + return getRowHeight(); } JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiInputSelectorComponentListBox) @@ -515,11 +515,11 @@ private: AudioIODeviceType& type; const AudioDeviceSetupDetails setup; - ScopedPointer outputDeviceDropDown, inputDeviceDropDown, sampleRateDropDown, bufferSizeDropDown; - ScopedPointer