From 25b622e8ca8bf1f404d5ae962d385d71dbdc5a29 Mon Sep 17 00:00:00 2001 From: =?utf8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Wed, 21 Sep 2016 08:42:15 +0200 Subject: [PATCH] New upstream version 4.2.4~repack --- .github/ISSUE_TEMPLATE.txt | 15 + ChangeList.txt | 24 + examples/AUv3Synth/AUv3Synth.jucer | 2 +- .../AUv3Synth.xcodeproj/project.pbxproj | 90 +- .../iOS/AUv3Synth.xcodeproj/project.pbxproj | 220 +-- .../AUv3Synth/JuceLibraryCode/AppConfig.h | 8 + .../AnimationAppExample.jucer | 2 +- .../project.pbxproj | 10 + .../AnimationAppExample.vcxproj | 6 + .../AnimationAppExample.vcxproj.filters | 12 + .../project.pbxproj | 10 + .../JuceLibraryCode/AppConfig.h | 8 + .../AudioAppExample/AudioAppExample.jucer | 2 +- .../AudioAppExample.xcodeproj/project.pbxproj | 10 + .../VisualStudio2010/AudioAppExample.vcxproj | 6 + .../AudioAppExample.vcxproj.filters | 12 + .../AudioAppExample.xcodeproj/project.pbxproj | 10 + .../JuceLibraryCode/AppConfig.h | 8 + .../BouncingBallWavetableDemo.jucer | 2 +- .../Builds/Linux/Makefile | 182 +- .../project.pbxproj | 10 + .../BouncingBallWavetableDemo.vcxproj | 6 + .../BouncingBallWavetableDemo.vcxproj.filters | 12 + .../JuceLibraryCode/AppConfig.h | 8 + .../project.pbxproj | 8 + .../ComponentTutorialExample.vcxproj | 5 + .../ComponentTutorialExample.vcxproj.filters | 9 + .../ComponentTutorialExample.vcxproj | 5 + .../ComponentTutorialExample.vcxproj.filters | 9 + .../ComponentTutorialExample.jucer | 2 +- .../JuceLibraryCode/AppConfig.h | 8 + examples/Demo/Builds/Android/jni/Android.mk | 1 + examples/Demo/Builds/Linux/Makefile | 516 ++--- .../MacOSX/JuceDemo.xcodeproj/project.pbxproj | 12 + .../Builds/VisualStudio2010/JuceDemo.vcxproj | 7 + .../VisualStudio2010/JuceDemo.vcxproj.filters | 15 + .../Builds/VisualStudio2012/JuceDemo.vcxproj | 7 + .../VisualStudio2012/JuceDemo.vcxproj.filters | 15 + .../Builds/VisualStudio2013/JuceDemo.vcxproj | 7 + .../VisualStudio2013/JuceDemo.vcxproj.filters | 15 + .../Builds/VisualStudio2015/JuceDemo.vcxproj | 7 + .../VisualStudio2015/JuceDemo.vcxproj.filters | 15 + .../iOS/JuceDemo.xcodeproj/project.pbxproj | 14 + examples/Demo/JuceDemo.jucer | 3 +- examples/Demo/JuceLibraryCode/AppConfig.h | 8 + .../Source/Demos/AudioSynthesiserDemo.cpp | 4 +- examples/Demo/Source/Demos/CodeEditorDemo.cpp | 2 +- examples/Demo/Source/Demos/FlexBoxDemo.cpp | 354 ++++ examples/Demo/Source/Demos/FontsDemo.cpp | 6 +- examples/Demo/Source/Demos/GraphicsDemo.cpp | 2 +- examples/Demo/Source/Demos/MDIDemo.cpp | 2 +- examples/Demo/Source/Demos/OpenGLDemo.cpp | 4 +- examples/Demo/Source/Demos/OpenGLDemo2D.cpp | 2 +- examples/Demo/Source/Demos/SystemInfoDemo.cpp | 16 +- examples/Demo/Source/Demos/VideoDemo.cpp | 4 +- .../Demo/Source/Demos/WavefrontObjParser.h | 2 +- examples/Demo/Source/Demos/WidgetsDemo.cpp | 26 +- examples/Demo/Source/Demos/XMLandJSONDemo.cpp | 6 +- examples/Demo/Source/MainWindow.cpp | 12 +- examples/HelloWorld/Builds/Linux/Makefile | 126 +- .../HelloWorld.xcodeproj/project.pbxproj | 8 + .../VisualStudio2010/HelloWorld.vcxproj | 5 + .../HelloWorld.vcxproj.filters | 9 + .../VisualStudio2015/HelloWorld.vcxproj | 5 + .../HelloWorld.vcxproj.filters | 9 + .../iOS/HelloWorld.xcodeproj/project.pbxproj | 8 + examples/HelloWorld/HelloWorld.jucer | 2 +- .../HelloWorld/JuceLibraryCode/AppConfig.h | 8 + .../MPETest/Builds/LinuxMakefile/Makefile | 182 +- .../MacOSX/MPETest.xcodeproj/project.pbxproj | 8 + .../Builds/VisualStudio2015/MPETest.vcxproj | 6 + .../VisualStudio2015/MPETest.vcxproj.filters | 12 + examples/MPETest/JuceLibraryCode/AppConfig.h | 8 + examples/MPETest/MPETest.jucer | 2 +- examples/MPETest/Source/MPESetupComponent.h | 16 +- examples/MPETest/Source/MainComponent.h | 6 +- .../MidiTest/Builds/LinuxMakefile/Makefile | 166 +- .../MacOSX/MidiTest.xcodeproj/project.pbxproj | 8 + .../Builds/VisualStudio2015/MidiTest.vcxproj | 6 + .../VisualStudio2015/MidiTest.vcxproj.filters | 12 + .../iOS/MidiTest.xcodeproj/project.pbxproj | 8 + examples/MidiTest/JuceLibraryCode/AppConfig.h | 8 + examples/MidiTest/MidiTest.jucer | 2 +- examples/MidiTest/Source/MainComponent.cpp | 2 +- .../Builds/LinuxMakefile/Makefile | 190 +- .../project.pbxproj | 8 + .../JUCE Network Graphics Demo.vcxproj | 6 + ...JUCE Network Graphics Demo.vcxproj.filters | 12 + .../project.pbxproj | 10 + .../JuceLibraryCode/AppConfig.h | 8 + .../NetworkGraphicsDemo.jucer | 2 +- .../OSCMonitor/Builds/LinuxMakefile/Makefile | 182 +- .../OSCMonitor.xcodeproj/project.pbxproj | 10 + .../VisualStudio2015/OSCMonitor.vcxproj | 6 + .../OSCMonitor.vcxproj.filters | 12 + .../OSCMonitor/JuceLibraryCode/AppConfig.h | 8 + examples/OSCMonitor/OSCMonitor.jucer | 2 +- .../OSCReceiver/Builds/LinuxMakefile/Makefile | 134 +- .../OSCReceiver.xcodeproj/project.pbxproj | 8 + .../VisualStudio2015/OSCReceiver.vcxproj | 5 + .../OSCReceiver.vcxproj.filters | 9 + .../iOS/OSCReceiver.xcodeproj/project.pbxproj | 8 + .../OSCReceiver/JuceLibraryCode/AppConfig.h | 8 + examples/OSCReceiver/OSCReceiver.jucer | 2 +- .../OSCSender/Builds/LinuxMakefile/Makefile | 118 +- .../OSCSender.xcodeproj/project.pbxproj | 8 + .../Builds/VisualStudio2015/OSCSender.vcxproj | 5 + .../OSCSender.vcxproj.filters | 9 + .../iOS/OSCSender.xcodeproj/project.pbxproj | 8 + .../OSCSender/JuceLibraryCode/AppConfig.h | 8 + examples/OSCSender/OSCSender.jucer | 2 +- .../project.pbxproj | 10 + .../VisualStudio2010/OpenGLAppExample.vcxproj | 6 + .../OpenGLAppExample.vcxproj.filters | 12 + .../project.pbxproj | 10 + .../JuceLibraryCode/AppConfig.h | 8 + .../OpenGLAppExample/OpenGLAppExample.jucer | 2 +- .../Source/Resources/WavefrontObjParser.h | 2 +- .../project.pbxproj | 10 + .../PluckedStringsDemo.vcxproj | 6 + .../PluckedStringsDemo.vcxproj.filters | 12 + .../JuceLibraryCode/AppConfig.h | 8 + .../PluckedStringsDemo.jucer | 2 +- .../Arpeggiator/Arpeggiator.jucer | 2 +- .../Arpeggiator.xcodeproj/project.pbxproj | 22 +- .../VisualStudio2015/Arpeggiator.vcxproj | 20 +- .../Arpeggiator.vcxproj.filters | 12 + .../Arpeggiator/JuceLibraryCode/AppConfig.h | 8 + .../GainPlugIn.xcodeproj/project.pbxproj | 8 + .../VisualStudio2015/GainPlugIn.vcxproj | 20 +- .../GainPlugIn.vcxproj.filters | 12 + .../PlugInSamples/GainPlugIn/GainPlugIn.jucer | 2 +- .../GainPlugIn/JuceLibraryCode/AppConfig.h | 8 + examples/PlugInSamples/GenericEditor.h | 7 +- .../MultiOutSynth.xcodeproj/project.pbxproj | 22 +- .../VisualStudio2015/MultiOutSynth.vcxproj | 20 +- .../MultiOutSynth.vcxproj.filters | 12 + .../MultiOutSynth/JuceLibraryCode/AppConfig.h | 8 + .../MultiOutSynth/MultiOutSynth.jucer | 2 +- .../NoiseGate.xcodeproj/project.pbxproj | 8 + .../Builds/VisualStudio2015/NoiseGate.vcxproj | 20 +- .../NoiseGate.vcxproj.filters | 12 + .../NoiseGate/JuceLibraryCode/AppConfig.h | 8 + .../PlugInSamples/NoiseGate/NoiseGate.jucer | 2 +- .../Surround/Builds/LinuxMakefile/Makefile | 190 +- .../MacOSX/Surround.xcodeproj/project.pbxproj | 24 +- .../Builds/VisualStudio2015/Surround.vcxproj | 20 +- .../VisualStudio2015/Surround.vcxproj.filters | 12 + .../Surround/JuceLibraryCode/AppConfig.h | 8 + .../Surround/Source/SurroundEditor.h | 4 +- .../Surround/Source/SurroundProcessor.cpp | 1 - .../PlugInSamples/Surround/Surround.jucer | 2 +- .../project.pbxproj | 10 + .../VisualStudio2013/SimpleFFTExample.vcxproj | 6 + .../SimpleFFTExample.vcxproj.filters | 12 + .../JuceLibraryCode/AppConfig.h | 8 + .../SimpleFFTExample/SimpleFFTExample.jucer | 2 +- .../audio plugin demo/Builds/Linux/Makefile | 182 +- .../JuceDemoPlugin.xcodeproj/project.pbxproj | 16 + .../VisualStudio2015/JuceDemoPlugin.vcxproj | 6 + .../JuceDemoPlugin.vcxproj.filters | 12 + .../audio plugin demo/JuceDemoPlugin.jucer | 2 +- .../JuceLibraryCode/AppConfig.h | 8 + .../audio plugin demo/Source/PluginEditor.cpp | 11 +- .../Source/PluginProcessor.h | 4 +- .../audio plugin host/Builds/Linux/Makefile | 214 ++- .../Plugin Host.xcodeproj/project.pbxproj | 9 + .../VisualStudio2010/Plugin Host.vcxproj | 6 + .../Plugin Host.vcxproj.filters | 12 + .../VisualStudio2013/Plugin Host.vcxproj | 6 + .../Plugin Host.vcxproj.filters | 12 + .../VisualStudio2015/Plugin Host.vcxproj | 6 + .../Plugin Host.vcxproj.filters | 12 + .../JuceLibraryCode/AppConfig.h | 8 + examples/audio plugin host/Plugin Host.jucer | 2 +- .../audio plugin host/Source/FilterGraph.cpp | 2 +- .../Source/GraphEditorPanel.cpp | 38 +- .../Source/GraphEditorPanel.h | 8 +- .../audio plugin host/Source/HostStartup.cpp | 3 +- .../Source/MainHostWindow.cpp | 77 +- .../audio plugin host/Source/MainHostWindow.h | 2 + .../AudioPerformanceTest.jucer | 2 +- .../Builds/LinuxMakefile/Makefile | 158 +- .../project.pbxproj | 10 + .../AudioPerformanceTest.vcxproj | 6 + .../AudioPerformanceTest.vcxproj.filters | 12 + .../project.pbxproj | 10 + .../JuceLibraryCode/AppConfig.h | 8 + extras/Projucer/Builds/LinuxMakefile/Makefile | 502 ++--- extras/Projucer/Builds/MacOSX/Info-App.plist | 4 +- .../MacOSX/Projucer.xcodeproj/project.pbxproj | 14 +- .../Builds/VisualStudio2013/Projucer.vcxproj | 9 +- .../VisualStudio2013/Projucer.vcxproj.filters | 9 + .../Builds/VisualStudio2013/resources.rc | 6 +- .../Builds/VisualStudio2015/Projucer.vcxproj | 9 +- .../VisualStudio2015/Projucer.vcxproj.filters | 9 + .../Builds/VisualStudio2015/resources.rc | 6 +- extras/Projucer/JuceLibraryCode/AppConfig.h | 8 + extras/Projucer/JuceLibraryCode/JuceHeader.h | 4 +- extras/Projucer/Projucer.jucer | 11 +- .../Application/jucer_AppearanceSettings.cpp | 2 +- .../Source/Application/jucer_AutoUpdater.cpp | 23 +- .../Source/Application/jucer_AutoUpdater.h | 4 +- .../Application/jucer_GlobalPreferences.cpp | 6 +- .../Application/jucer_GlobalPreferences.h | 1 - .../Source/Application/jucer_MainWindow.cpp | 23 + .../Application/jucer_OpenDocumentManager.cpp | 6 +- .../Application/jucer_OpenDocumentManager.h | 2 +- .../Code Editor/jucer_SourceCodeEditor.cpp | 2 +- .../Code Editor/jucer_SourceCodeEditor.h | 2 +- .../components/jucer_ComboBoxHandler.h | 4 +- .../components/jucer_ComponentTypeHandler.cpp | 6 +- .../jucer_GenericComponentHandler.h | 2 +- .../components/jucer_GroupComponentHandler.h | 4 +- .../components/jucer_ImageButtonHandler.h | 6 +- .../components/jucer_LabelHandler.h | 2 +- .../components/jucer_TabbedComponentHandler.h | 8 +- .../components/jucer_ViewportHandler.h | 6 +- .../documents/jucer_ButtonDocument.cpp | 2 +- .../ComponentEditor/jucer_BinaryResources.cpp | 2 +- .../ComponentEditor/jucer_ComponentLayout.cpp | 6 +- .../ComponentEditor/jucer_JucerDocument.cpp | 20 +- .../paintelements/jucer_ColouredElement.cpp | 8 +- .../paintelements/jucer_FillType.h | 2 +- .../jucer_ImageResourceProperty.h | 8 +- .../paintelements/jucer_PaintElementImage.h | 4 +- .../paintelements/jucer_PaintElementPath.cpp | 2 +- .../properties/jucer_FilePropertyComponent.h | 4 +- .../properties/jucer_FontPropertyComponent.h | 4 +- .../properties/jucer_PositionPropertyBase.h | 2 +- .../ui/jucer_JucerDocumentEditor.cpp | 14 +- .../ui/jucer_ResourceEditorPanel.cpp | 6 +- .../LiveBuildEngine/projucer_ClassDatabase.h | 2 +- .../projucer_CompileEngineClient.cpp | 9 +- .../projucer_CompileEngineServer.cpp | 2 +- .../projucer_ComponentListComp.h | 2 +- .../LiveBuildEngine/projucer_CppHelpers.h | 2 +- .../projucer_ErrorListComponent.h | 2 +- .../projucer_SourceCodeRange.h | 2 +- .../jucer_ProjectExport_AndroidStudio.h | 2 +- .../jucer_ProjectExport_CodeBlocks.h | 3 +- .../Project Saving/jucer_ProjectExport_MSVC.h | 96 +- .../Project Saving/jucer_ProjectExport_Make.h | 132 +- .../jucer_ProjectExport_XCode.h | 22 +- .../Project Saving/jucer_ProjectExporter.cpp | 32 +- .../Project Saving/jucer_ProjectExporter.h | 10 +- .../Project Saving/jucer_ProjectSaver.h | 13 +- .../jucer_TextWithDefaultPropertyComponent.h | 4 +- .../jucer_DependencyPathPropertyComponent.cpp | 4 +- .../jucer_DependencyPathPropertyComponent.h | 2 +- .../Projucer/Source/Project/jucer_Module.cpp | 3 +- extras/Projucer/Source/Project/jucer_Module.h | 1 + .../Projucer/Source/Project/jucer_Project.cpp | 28 +- .../Projucer/Source/Project/jucer_Project.h | 9 +- .../Project/jucer_ProjectContentComponent.cpp | 152 +- .../Project/jucer_ProjectContentComponent.h | 2 + .../Source/Project/jucer_ProjectTree_Base.h | 6 +- .../Source/Utility/jucer_DialogLookAndFeel.h | 13 +- .../Utility/jucer_FilePathPropertyComponent.h | 6 +- .../Projucer/Source/Utility/jucer_PresetIDs.h | 4 +- .../Utility/jucer_SVGPathDataComponent.h | 2 +- .../Source/Utility/jucer_StoredSettings.cpp | 8 +- .../Source/Utility/jucer_TranslationTool.h | 9 +- .../Source/Utility/jucer_UTF8Component.h | 2 +- .../Source/Wizards/jucer_NewFileWizard.cpp | 2 +- .../Source/Wizards/jucer_NewProjectWizard.h | 2 +- .../Wizards/jucer_NewProjectWizardComponent.h | 12 +- .../jucer_TemplateThumbnailsComponent.h | 2 +- .../Builds/LinuxMakefile/Makefile | 182 +- .../UnitTestRunner.xcodeproj/project.pbxproj | 8 + .../VisualStudio2015/UnitTestRunner.vcxproj | 6 + .../UnitTestRunner.vcxproj.filters | 12 + .../JuceLibraryCode/AppConfig.h | 8 + extras/UnitTestRunner/UnitTestRunner.jucer | 2 +- extras/binarybuilder/BinaryBuilder.jucer | 2 +- extras/binarybuilder/Builds/Linux/Makefile | 78 +- .../BinaryBuilder.xcodeproj/project.pbxproj | 2 + .../binarybuilder/JuceLibraryCode/AppConfig.h | 8 + .../Builds/VisualStudio2010/juce_dll.vcxproj | 6 + .../VisualStudio2010/juce_dll.vcxproj.filters | 12 + .../windows dll/JuceLibraryCode/AppConfig.h | 8 + extras/windows dll/jucedll.jucer | 2 +- modules/JUCE Module Format.txt | 4 +- .../buffers/juce_AudioSampleBuffer.h | 4 +- modules/juce_audio_basics/juce_audio_basics.h | 2 +- .../juce_audio_basics/midi/juce_MidiFile.cpp | 2 +- .../mpe/juce_MPESynthesiserBase.cpp | 8 +- .../mpe/juce_MPESynthesiserBase.h | 9 +- .../synthesisers/juce_Synthesiser.cpp | 6 +- .../synthesisers/juce_Synthesiser.h | 9 +- .../audio_io/juce_AudioDeviceManager.cpp | 77 +- .../audio_io/juce_AudioDeviceManager.h | 44 +- .../juce_audio_devices/juce_audio_devices.cpp | 6 +- .../juce_audio_devices/juce_audio_devices.h | 4 +- .../native/juce_ios_Audio.cpp | 28 +- .../native/juce_linux_Midi.cpp | 137 +- .../native/juce_mac_AudioCDBurner.mm | 2 +- .../native/juce_mac_CoreAudio.cpp | 59 +- .../native/juce_mac_CoreMidi.cpp | 8 + .../native/juce_win32_WASAPI.cpp | 7 + .../sources/juce_AudioTransportSource.h | 2 +- .../codecs/juce_FlacAudioFormat.cpp | 4 +- .../juce_audio_formats/juce_audio_formats.h | 2 +- .../AAX/juce_AAX_Modifier_Injector.h | 2 +- .../Standalone/juce_StandaloneFilterWindow.h | 62 +- .../VST/juce_VST_Wrapper.cpp | 1695 +++++++++-------- .../VST3/juce_VST3_Wrapper.cpp | 10 + .../juce_audio_plugin_client.h | 2 +- .../juce_audio_plugin_client_Standalone.cpp | 2 +- .../utility/juce_FakeMouseMoveGenerator.h | 6 +- .../format_types/juce_AudioUnitPluginFormat.h | 4 +- .../juce_AudioUnitPluginFormat.mm | 62 +- .../format_types/juce_VST3PluginFormat.cpp | 2 +- .../format_types/juce_VSTInterface.h | 458 +++++ .../format_types/juce_VSTMidiEventList.h | 77 +- .../format_types/juce_VSTPluginFormat.cpp | 562 +++--- .../format_types/juce_VSTPluginFormat.h | 8 +- .../juce_audio_processors.h | 7 +- .../processors/juce_AudioProcessor.cpp | 4 +- .../processors/juce_AudioProcessorEditor.h | 18 +- .../processors/juce_AudioProcessorGraph.cpp | 32 +- .../processors/juce_AudioProcessorGraph.h | 2 + .../scanning/juce_PluginDirectoryScanner.h | 11 +- .../scanning/juce_PluginListComponent.cpp | 4 +- .../juce_AudioProcessorParameterWithID.h | 5 +- .../juce_AudioProcessorValueTreeState.cpp | 38 +- .../juce_AudioProcessorValueTreeState.h | 4 +- .../gui/juce_AudioAppComponent.h | 4 +- .../gui/juce_AudioDeviceSelectorComponent.cpp | 38 +- .../gui/juce_AudioVisualiserComponent.h | 4 +- .../juce_BluetoothMidiDevicePairingDialogue.h | 2 +- .../gui/juce_MidiKeyboardComponent.cpp | 2 +- modules/juce_audio_utils/juce_audio_utils.h | 2 +- modules/juce_box2d/juce_box2d.h | 2 +- modules/juce_core/containers/juce_Array.h | 74 +- .../juce_core/containers/juce_ListenerList.h | 5 +- .../containers/juce_NamedValueSet.cpp | 48 +- .../juce_core/containers/juce_NamedValueSet.h | 40 +- .../juce_core/containers/juce_PropertySet.h | 4 +- modules/juce_core/containers/juce_Variant.cpp | 4 +- modules/juce_core/containers/juce_Variant.h | 2 + modules/juce_core/files/juce_File.cpp | 31 +- modules/juce_core/files/juce_File.h | 23 +- .../juce_core/files/juce_MemoryMappedFile.h | 12 +- .../juce_core/files/juce_TemporaryFile.cpp | 2 +- modules/juce_core/javascript/juce_JSON.cpp | 2 +- .../juce_core/javascript/juce_Javascript.cpp | 32 +- modules/juce_core/juce_core.h | 17 +- modules/juce_core/maths/juce_BigInteger.cpp | 506 +++-- modules/juce_core/maths/juce_BigInteger.h | 11 +- modules/juce_core/maths/juce_MathsFunctions.h | 19 + .../juce_core/maths/juce_NormalisableRange.h | 56 +- modules/juce_core/maths/juce_Range.h | 9 + modules/juce_core/memory/juce_ScopedPointer.h | 1 + .../memory/juce_SharedResourcePointer.h | 2 +- .../native/juce_BasicNativeHeaders.h | 4 + .../juce_core/native/juce_curl_Network.cpp | 18 +- modules/juce_core/native/juce_mac_Files.mm | 8 +- modules/juce_core/native/juce_mac_Network.mm | 92 +- .../juce_core/native/juce_posix_SharedCode.h | 9 +- .../juce_core/native/juce_win32_ComSmartPtr.h | 18 +- modules/juce_core/native/juce_win32_Files.cpp | 14 +- .../native/juce_win32_SystemStats.cpp | 18 + modules/juce_core/network/juce_URL.cpp | 7 + modules/juce_core/network/juce_URL.h | 13 +- .../juce_core/system/juce_StandardHeader.h | 2 +- modules/juce_core/system/juce_SystemStats.cpp | 8 +- modules/juce_core/text/juce_String.cpp | 38 +- modules/juce_core/text/juce_String.h | 4 +- modules/juce_core/text/juce_StringArray.cpp | 5 + modules/juce_core/text/juce_TextDiff.cpp | 6 +- modules/juce_core/threads/juce_ThreadPool.h | 4 +- .../juce_core/time/juce_PerformanceCounter.h | 2 +- modules/juce_core/xml/juce_XmlElement.cpp | 16 +- modules/juce_core/xml/juce_XmlElement.h | 4 +- modules/juce_core/zip/juce_ZipFile.h | 6 +- modules/juce_cryptography/juce_cryptography.h | 2 +- .../juce_data_structures.h | 2 +- .../undomanager/juce_UndoManager.cpp | 44 +- .../undomanager/juce_UndoManager.h | 6 +- .../undomanager/juce_UndoableAction.h | 2 +- .../values/juce_CachedValue.cpp | 2 +- .../values/juce_ValueTree.cpp | 41 +- .../values/juce_ValueTree.h | 24 +- modules/juce_events/juce_events.h | 4 +- .../messages/juce_ApplicationBase.cpp | 12 +- .../contexts/juce_GraphicsContext.h | 2 +- .../geometry/juce_AffineTransform.cpp | 2 + .../geometry/juce_AffineTransform.h | 12 +- modules/juce_graphics/geometry/juce_Line.h | 53 +- .../juce_graphics/geometry/juce_Rectangle.h | 65 +- modules/juce_graphics/images/juce_Image.cpp | 2 + modules/juce_graphics/images/juce_Image.h | 5 +- modules/juce_graphics/juce_graphics.h | 4 +- .../juce_gui_basics/buttons/juce_Button.cpp | 25 +- modules/juce_gui_basics/buttons/juce_Button.h | 2 + .../buttons/juce_HyperlinkButton.cpp | 2 +- .../buttons/juce_ImageButton.h | 2 +- .../buttons/juce_ToggleButton.cpp | 2 +- .../components/juce_Component.cpp | 6 +- .../components/juce_Component.h | 2 +- .../components/juce_Desktop.cpp | 1 + .../drawables/juce_DrawableRectangle.cpp | 1 + .../filebrowser/juce_DirectoryContentsList.h | 2 +- .../filebrowser/juce_FileBrowserComponent.cpp | 14 +- .../filebrowser/juce_FileBrowserComponent.h | 2 +- .../filebrowser/juce_FileChooser.h | 8 +- .../filebrowser/juce_FileChooserDialogBox.cpp | 2 +- .../filebrowser/juce_FileChooserDialogBox.h | 4 +- .../filebrowser/juce_FileListComponent.cpp | 4 +- .../filebrowser/juce_FilePreviewComponent.h | 2 +- .../juce_FileSearchPathListComponent.cpp | 8 +- .../filebrowser/juce_FileTreeComponent.cpp | 4 +- .../filebrowser/juce_FileTreeComponent.h | 10 +- .../filebrowser/juce_FilenameComponent.cpp | 4 +- modules/juce_gui_basics/juce_gui_basics.cpp | 5 + modules/juce_gui_basics/juce_gui_basics.h | 11 +- .../juce_gui_basics/layout/juce_FlexBox.cpp | 831 ++++++++ modules/juce_gui_basics/layout/juce_FlexBox.h | 102 + .../juce_gui_basics/layout/juce_FlexItem.h | 142 ++ .../layout/juce_GroupComponent.h | 4 +- .../layout/juce_MultiDocumentPanel.cpp | 2 +- .../layout/juce_ResizableBorderComponent.h | 6 +- .../layout/juce_ResizableEdgeComponent.h | 6 +- .../layout/juce_TabbedButtonBar.cpp | 2 +- .../juce_gui_basics/layout/juce_Viewport.cpp | 9 +- .../juce_gui_basics/layout/juce_Viewport.h | 2 +- .../lookandfeel/juce_LookAndFeel_V2.cpp | 11 +- .../lookandfeel/juce_LookAndFeel_V2.h | 1 + .../menus/juce_MenuBarComponent.cpp | 5 + .../menus/juce_MenuBarModel.cpp | 9 + .../juce_gui_basics/menus/juce_MenuBarModel.h | 15 +- .../juce_gui_basics/menus/juce_PopupMenu.cpp | 30 +- .../juce_gui_basics/menus/juce_PopupMenu.h | 40 +- .../mouse/juce_MouseInputSource.cpp | 2 +- .../mouse/juce_SelectedItemSet.h | 6 +- .../native/juce_ios_UIViewComponentPeer.mm | 2 + .../native/juce_linux_Windowing.cpp | 8 +- .../native/juce_mac_FileChooser.mm | 2 +- .../native/juce_mac_MainMenu.mm | 47 +- .../native/juce_mac_MouseCursor.mm | 23 +- .../native/juce_mac_NSViewComponentPeer.mm | 75 +- .../native/juce_win32_FileChooser.cpp | 2 +- .../native/juce_win32_Windowing.cpp | 42 +- .../properties/juce_PropertyPanel.cpp | 2 +- .../properties/juce_PropertyPanel.h | 4 + .../juce_SliderPropertyComponent.cpp | 10 +- .../properties/juce_SliderPropertyComponent.h | 6 +- .../properties/juce_TextPropertyComponent.cpp | 2 +- .../properties/juce_TextPropertyComponent.h | 13 +- .../juce_gui_basics/widgets/juce_ComboBox.cpp | 24 +- .../juce_gui_basics/widgets/juce_ComboBox.h | 10 +- .../widgets/juce_ImageComponent.h | 2 +- modules/juce_gui_basics/widgets/juce_Label.h | 4 +- .../juce_gui_basics/widgets/juce_ListBox.cpp | 8 +- .../juce_gui_basics/widgets/juce_ListBox.h | 12 +- .../juce_gui_basics/widgets/juce_Slider.cpp | 60 +- modules/juce_gui_basics/widgets/juce_Slider.h | 17 +- .../widgets/juce_TableHeaderComponent.cpp | 2 +- .../widgets/juce_TextEditor.cpp | 6 +- .../juce_gui_basics/widgets/juce_TextEditor.h | 1 + .../juce_gui_basics/widgets/juce_Toolbar.cpp | 10 +- .../juce_gui_basics/widgets/juce_TreeView.cpp | 13 +- .../juce_gui_basics/widgets/juce_TreeView.h | 2 +- .../windows/juce_AlertWindow.cpp | 2 + .../windows/juce_CallOutBox.cpp | 19 +- .../juce_gui_basics/windows/juce_CallOutBox.h | 14 +- .../windows/juce_DialogWindow.h | 4 +- .../windows/juce_DocumentWindow.h | 6 +- .../documents/juce_FileBasedDocument.cpp | 2 +- .../documents/juce_FileBasedDocument.h | 6 +- modules/juce_gui_extra/juce_gui_extra.h | 2 +- .../misc/juce_ColourSelector.cpp | 26 +- .../juce_gui_extra/misc/juce_ColourSelector.h | 4 +- .../misc/juce_KeyMappingEditorComponent.cpp | 6 +- .../misc/juce_LiveConstantEditor.cpp | 38 +- .../misc/juce_LiveConstantEditor.h | 4 + .../misc/juce_RecentlyOpenedFilesList.h | 8 +- .../juce_gui_extra/misc/juce_SplashScreen.cpp | 28 +- .../juce_gui_extra/misc/juce_SplashScreen.h | 2 +- .../native/juce_mac_SystemTrayIcon.cpp | 2 +- .../native/juce_win32_ActiveXComponent.cpp | 24 +- .../native/juce_win32_SystemTrayIcon.cpp | 2 +- .../native/juce_win32_WebBrowserComponent.cpp | 25 +- modules/juce_opengl/juce_opengl.h | 2 +- modules/juce_opengl/native/juce_OpenGL_osx.h | 20 + modules/juce_osc/juce_osc.h | 2 +- .../juce_tracktion_marketplace.cpp | 3 + .../juce_tracktion_marketplace.h | 11 +- .../marketplace/juce_KeyFileGeneration.h | 16 + .../marketplace/juce_OnlineUnlockForm.cpp | 4 +- .../marketplace/juce_OnlineUnlockStatus.cpp | 118 +- .../marketplace/juce_OnlineUnlockStatus.h | 11 +- .../juce_video/capture/juce_CameraDevice.cpp | 11 +- .../juce_video/capture/juce_CameraDevice.h | 9 +- modules/juce_video/juce_video.h | 2 +- .../native/juce_mac_CameraDevice.mm | 8 +- .../juce_mac_QuickTimeMovieComponent.mm | 2 +- .../native/juce_win32_CameraDevice.cpp | 2 +- .../native/juce_win32_DirectShowComponent.cpp | 4 +- .../juce_win32_QuickTimeMovieComponent.cpp | 6 +- .../playback/juce_QuickTimeMovieComponent.h | 3 +- 502 files changed, 9384 insertions(+), 4301 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE.txt create mode 100644 examples/Demo/Source/Demos/FlexBoxDemo.cpp create mode 100644 modules/juce_audio_processors/format_types/juce_VSTInterface.h create mode 100644 modules/juce_gui_basics/layout/juce_FlexBox.cpp create mode 100644 modules/juce_gui_basics/layout/juce_FlexBox.h create mode 100644 modules/juce_gui_basics/layout/juce_FlexItem.h diff --git a/.github/ISSUE_TEMPLATE.txt b/.github/ISSUE_TEMPLATE.txt new file mode 100644 index 00000000..5b012c76 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.txt @@ -0,0 +1,15 @@ +Please include: + + 1) detailed steps on how to reproduce the bug, preferably with already + existing JUCE code such as the demo plugin or the demo code + 2) the expected behaviour + 3) the operating system + 4) the architecture (32-bit or 64-bit) + 5) a stack trace - if the bug causes a crash + 6) the plugin format (VST2, VST3, AU, AAX, RTAS) - if applicable + 7) which DAW you observed the bug in - if applicable + +Make sure you have pulled the latest commits from the JUCE repo and re-compiled +the Projucer before you submit your bug. If it's a major bug, which must be +hot-fixed immediately, then we will also accept bug reports for tagged release +versions. diff --git a/ChangeList.txt b/ChangeList.txt index 71efd0e4..06e08888 100644 --- a/ChangeList.txt +++ b/ChangeList.txt @@ -4,6 +4,30 @@ This file just lists the more notable headline features. For more detailed info about minor changes and bugfixes, please see the git log! +Version 4.2.4 + - Pre-release of live build engine on Windows + - Added FlexBox layout engine + - Removed dependency on external Steinberg SDK when building and/or hosting VST2 plug-ins + - Added support for MIDI network sessions in the iOS simulator + - Added support for symmetric skew to Slider, NormalisableRange and SliderPropertyComponent + - Projucer now asks the user what to do when it detects that the .jucer file was modified outside of the Projucer + - Improved support for Windows 10 touch devices + - Added begin/end iterator methods for ValueTree, for handy range-based-for loops over its children + - Added support for recent mingw-w64 compilers + - Added useful proportional Rectangle utility methods + - Significantly improved the performance of BigInteger + - Added support for expiring licenses to juce_tracktion_marketplace + - Added support for retina mouse cursors on OS X + - Added a new low-quality mode for the CameraDevice + - Added pkg-config support for Linux + - Projucer will now wrap your AAX plug-in in the bundle format expected Pro Tools on Windows + - Multiple bug-fixes for AudioUnit parameter ids + - Fixed a bug where AlertWindows weren’t always on top + - Multiple fixes for web InputStreams + - Various improvements to the live build engine + - Various minor improvements and bug fixes + - Various documentation improvements + Version 4.2.3 - Various VST3 improvements: resizing VST3 windows, plug-in compatibility issues - Use NSURLSession on newer OS X versions diff --git a/examples/AUv3Synth/AUv3Synth.jucer b/examples/AUv3Synth/AUv3Synth.jucer index c1aa7d0c..453d9466 100644 --- a/examples/AUv3Synth/AUv3Synth.jucer +++ b/examples/AUv3Synth/AUv3Synth.jucer @@ -9,7 +9,7 @@ pluginWantsMidiIn="1" pluginProducesMidiOut="0" pluginIsMidiEffectPlugin="0" pluginEditorRequiresKeys="0" pluginAUExportPrefix="AUv3SynthAU" pluginRTASCategory="" aaxIdentifier="com.roli.development.AUv3Synth" - pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="4.2.3" + pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="4.2.4" buildStandalone="1"> diff --git a/examples/AUv3Synth/Builds/MacOSX/AUv3Synth.xcodeproj/project.pbxproj b/examples/AUv3Synth/Builds/MacOSX/AUv3Synth.xcodeproj/project.pbxproj index 8dec284a..f0b16f1e 100644 --- a/examples/AUv3Synth/Builds/MacOSX/AUv3Synth.xcodeproj/project.pbxproj +++ b/examples/AUv3Synth/Builds/MacOSX/AUv3Synth.xcodeproj/project.pbxproj @@ -841,6 +841,7 @@ A452E5BB6D20DB6842646EE0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ResizableEdgeComponent.h"; path = "../../../../modules/juce_gui_basics/layout/juce_ResizableEdgeComponent.h"; sourceTree = "SOURCE_ROOT"; }; A4BE4A85CD5ACC6A78C3B8A6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_audio_plugin_client_AU_1.mm"; path = "../../../../modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm"; sourceTree = "SOURCE_ROOT"; }; A4E1FFE9E94A28D434C2E4BD = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ConnectedChildProcess.cpp"; path = "../../../../modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp"; sourceTree = "SOURCE_ROOT"; }; + A512EE08FFC0B8B22E6408FC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexBox.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.h"; sourceTree = "SOURCE_ROOT"; }; A53855C517AD1588DBF87CA0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_XmlElement.cpp"; path = "../../../../modules/juce_core/xml/juce_XmlElement.cpp"; sourceTree = "SOURCE_ROOT"; }; A56060E773F77B3CA7DC3743 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jcapistd.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jcapistd.c"; sourceTree = "SOURCE_ROOT"; }; A58103D78876730190F3BC4A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ComponentBoundsConstrainer.h"; path = "../../../../modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.h"; sourceTree = "SOURCE_ROOT"; }; @@ -884,8 +885,6 @@ AC36AEF9A7D94B5F50725E38 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = lpc.h; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/lpc.h"; sourceTree = "SOURCE_ROOT"; }; AC3D1C939D60CBB9F06E5195 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioProcessorPlayer.h"; path = "../../../../modules/juce_audio_utils/players/juce_AudioProcessorPlayer.h"; sourceTree = "SOURCE_ROOT"; }; ACDA8668B39A102D419BD481 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TextButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_TextButton.h"; sourceTree = "SOURCE_ROOT"; }; - ACDCFB7C5CE966089DF7665E = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FileFilter.cpp"; path = "../../../../modules/juce_core/files/juce_FileFilter.cpp"; sourceTree = "SOURCE_ROOT"; }; - AD49758CCCDB81F781160518 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioParameterInt.h"; path = "../../../../modules/juce_audio_processors/utilities/juce_AudioParameterInt.h"; sourceTree = "SOURCE_ROOT"; }; AD748818ED49AF2A6BF7AF0D = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CAMath.h; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CAMath.h"; sourceTree = "SOURCE_ROOT"; }; ADA10B57D3CACBF7CA3E7058 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_TextEditor.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_TextEditor.cpp"; sourceTree = "SOURCE_ROOT"; }; ADEFBF282F9FF39E37862A73 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = pnginfo.h; path = "../../../../modules/juce_graphics/image_formats/pnglib/pnginfo.h"; sourceTree = "SOURCE_ROOT"; }; @@ -895,43 +894,22 @@ AF02093447674A2DBEFB7B2B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TextInputTarget.h"; path = "../../../../modules/juce_gui_basics/keyboard/juce_TextInputTarget.h"; sourceTree = "SOURCE_ROOT"; }; AF575F9303D3AA5E410C274A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ImageCache.cpp"; path = "../../../../modules/juce_graphics/images/juce_ImageCache.cpp"; sourceTree = "SOURCE_ROOT"; }; B0015C46815CEB6E15236944 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioPlayHead.h"; path = "../../../../modules/juce_audio_processors/processors/juce_AudioPlayHead.h"; sourceTree = "SOURCE_ROOT"; }; - B032D869039A2B845AAD274E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = inftrees.h; path = "../../../../modules/juce_core/zip/zlib/inftrees.h"; sourceTree = "SOURCE_ROOT"; }; - B054CDFF33B17777FD1855BF = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jcphuff.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jcphuff.c"; sourceTree = "SOURCE_ROOT"; }; - B05EC8A81DA162236663A8AF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_IPAddress.cpp"; path = "../../../../modules/juce_core/network/juce_IPAddress.cpp"; sourceTree = "SOURCE_ROOT"; }; - B0B4FAE3EA49CE2AE0074204 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_InputStream.cpp"; path = "../../../../modules/juce_core/streams/juce_InputStream.cpp"; sourceTree = "SOURCE_ROOT"; }; - B0E5392688FD05700AFA0569 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ApplicationBase.cpp"; path = "../../../../modules/juce_events/messages/juce_ApplicationBase.cpp"; sourceTree = "SOURCE_ROOT"; }; - B19103A5C4E54D5ABB50F27F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MemoryInputStream.h"; path = "../../../../modules/juce_core/streams/juce_MemoryInputStream.h"; sourceTree = "SOURCE_ROOT"; }; B1972B63AC71C03527E02534 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_PathStrokeType.cpp"; path = "../../../../modules/juce_graphics/geometry/juce_PathStrokeType.cpp"; sourceTree = "SOURCE_ROOT"; }; - B2A30D3171F293ECE50DC06B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Variant.cpp"; path = "../../../../modules/juce_core/containers/juce_Variant.cpp"; sourceTree = "SOURCE_ROOT"; }; - B2C885D79DF233E10656633A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ReferenceCountedArray.h"; path = "../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h"; sourceTree = "SOURCE_ROOT"; }; - B33097C6BA7E4793E7536BBC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_mac_CoreGraphicsContext.h"; path = "../../../../modules/juce_graphics/native/juce_mac_CoreGraphicsContext.h"; sourceTree = "SOURCE_ROOT"; }; - B33E3A1B455B48F251A4EFEB = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_Files.cpp"; path = "../../../../modules/juce_core/native/juce_linux_Files.cpp"; sourceTree = "SOURCE_ROOT"; }; - B3AED660CB964056A7063CE6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ColourGradient.h"; path = "../../../../modules/juce_graphics/colour/juce_ColourGradient.h"; sourceTree = "SOURCE_ROOT"; }; + B2CF7DCAD1C8871201A6CE26 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DragAndDropTarget.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_DragAndDropTarget.h"; sourceTree = "SOURCE_ROOT"; }; + B2F8C1DFA6A765EDB034399D = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TextEditor.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_TextEditor.h"; sourceTree = "SOURCE_ROOT"; }; B3CA6447C345EE05F8B98195 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ImageButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_ImageButton.h"; sourceTree = "SOURCE_ROOT"; }; B442A76A84E1800D10EE5954 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Viewport.h"; path = "../../../../modules/juce_gui_basics/layout/juce_Viewport.h"; sourceTree = "SOURCE_ROOT"; }; + B46C496B84C02A7F7D49B44F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FlexBox.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.cpp"; sourceTree = "SOURCE_ROOT"; }; B48471A74A3A2BDA248931F2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = vorbisfile.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisfile.c"; sourceTree = "SOURCE_ROOT"; }; - B4C32A6592E159751BD10360 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = pngconf.h; path = "../../../../modules/juce_graphics/image_formats/pnglib/pngconf.h"; sourceTree = "SOURCE_ROOT"; }; - B585667FC1E99FE5C1E3F799 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jquant2.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jquant2.c"; sourceTree = "SOURCE_ROOT"; }; + B5029BFA56B6E1BB5FB43BFD = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_TableHeaderComponent.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_TableHeaderComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; B58CC7A93DBB3706A60E9E76 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TabbedComponent.h"; path = "../../../../modules/juce_gui_basics/layout/juce_TabbedComponent.h"; sourceTree = "SOURCE_ROOT"; }; - B5C3356C447E60F512C5E8CD = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MultiTimer.cpp"; path = "../../../../modules/juce_events/timers/juce_MultiTimer.cpp"; sourceTree = "SOURCE_ROOT"; }; - B5CA4FEE0ADFDACCAF2FB017 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = pngget.c; path = "../../../../modules/juce_graphics/image_formats/pnglib/pngget.c"; sourceTree = "SOURCE_ROOT"; }; + B5CD08BC33A8414D48F4CD67 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MouseCursor.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_MouseCursor.h"; sourceTree = "SOURCE_ROOT"; }; B6ABAD2ACC048C4DAB31CA27 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ModalComponentManager.h"; path = "../../../../modules/juce_gui_basics/components/juce_ModalComponentManager.h"; sourceTree = "SOURCE_ROOT"; }; - B6B3AF7688EF55A4FC61D5D6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AsyncUpdater.cpp"; path = "../../../../modules/juce_events/broadcasters/juce_AsyncUpdater.cpp"; sourceTree = "SOURCE_ROOT"; }; B774AC9A00BFF63E24EA0646 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_VST3PluginFormat.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_VST3PluginFormat.h"; sourceTree = "SOURCE_ROOT"; }; - B77C48286D446F5C7BD4B76F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_MessageManager.mm"; path = "../../../../modules/juce_events/native/juce_mac_MessageManager.mm"; sourceTree = "SOURCE_ROOT"; }; B77F4A6EA1005BE4683A0DAC = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MPESynthesiserVoice.cpp"; path = "../../../../modules/juce_audio_basics/mpe/juce_MPESynthesiserVoice.cpp"; sourceTree = "SOURCE_ROOT"; }; - B812C4A2809BB37D45F54A59 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jdatasrc.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jdatasrc.c"; sourceTree = "SOURCE_ROOT"; }; - B8133580F67C0B95E1F36D4E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_WaitableEvent.h"; path = "../../../../modules/juce_core/threads/juce_WaitableEvent.h"; sourceTree = "SOURCE_ROOT"; }; - B85C9F9BF94FA8926EB9ACB8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DrawableShape.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableShape.cpp"; sourceTree = "SOURCE_ROOT"; }; B8622807DB0688A98F8C75E4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "lookup_data.h"; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/lookup_data.h"; sourceTree = "SOURCE_ROOT"; }; - B98F443DC0CE94BC13CC3D44 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Timer.cpp"; path = "../../../../modules/juce_events/timers/juce_Timer.cpp"; sourceTree = "SOURCE_ROOT"; }; BAA373F740C171EB1219D9B0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MidiMessage.h"; path = "../../../../modules/juce_audio_basics/midi/juce_MidiMessage.h"; sourceTree = "SOURCE_ROOT"; }; - BB1D6E0B0982D0590E8EC99F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_SystemStats.cpp"; path = "../../../../modules/juce_core/native/juce_linux_SystemStats.cpp"; sourceTree = "SOURCE_ROOT"; }; - BB8432AE150D5AEB38808FA9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Application.cpp"; path = "../../../../modules/juce_gui_basics/application/juce_Application.cpp"; sourceTree = "SOURCE_ROOT"; }; - BBB323B5DE53878F445064D9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_Files.cpp"; path = "../../../../modules/juce_core/native/juce_android_Files.cpp"; sourceTree = "SOURCE_ROOT"; }; - BCC48160464BC0DFCAD33792 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Process.h"; path = "../../../../modules/juce_core/threads/juce_Process.h"; sourceTree = "SOURCE_ROOT"; }; - BD283419247CBA6C6DD2ADD6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DrawableComposite.h"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableComposite.h"; sourceTree = "SOURCE_ROOT"; }; - BDEE5F6548D2980373C45F5B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ComponentBuilder.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_ComponentBuilder.cpp"; sourceTree = "SOURCE_ROOT"; }; + BBD06432CC4155521050CD2A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V3.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.h"; sourceTree = "SOURCE_ROOT"; }; C12C3BDF0D24260675D88C04 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MidiBuffer.cpp"; path = "../../../../modules/juce_audio_basics/midi/juce_MidiBuffer.cpp"; sourceTree = "SOURCE_ROOT"; }; E04216439C3A2AD69B69B520 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioSampleBuffer.h"; path = "../../../../modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h"; sourceTree = "SOURCE_ROOT"; }; F5E81FD99EFCB226D2486603 = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AUv3Synth.vst; sourceTree = "BUILT_PRODUCTS_DIR"; }; @@ -942,26 +920,50 @@ 8C9C38D32DB4D8BD543CA892 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; A6610B06B712DDE6F2A27290 = {isa = PBXFileReference; lastKnownFileType = text.txt; name = "Flac Licence.txt"; path = "../../../../modules/juce_audio_formats/codecs/flac/Flac Licence.txt"; sourceTree = "SOURCE_ROOT"; }; AC3356631ED2AC043BC67B79 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + ACDCFB7C5CE966089DF7665E = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FileFilter.cpp"; path = "../../../../modules/juce_core/files/juce_FileFilter.cpp"; sourceTree = "SOURCE_ROOT"; }; AD228AE61929A94FFBE55CF4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CAAtomicStack.h; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CAAtomicStack.h"; sourceTree = "SOURCE_ROOT"; }; + AD49758CCCDB81F781160518 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioParameterInt.h"; path = "../../../../modules/juce_audio_processors/utilities/juce_AudioParameterInt.h"; sourceTree = "SOURCE_ROOT"; }; AE9CA003C4D379CB43E9CDE6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CAException.h; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CAException.h"; sourceTree = "SOURCE_ROOT"; }; + B032D869039A2B845AAD274E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = inftrees.h; path = "../../../../modules/juce_core/zip/zlib/inftrees.h"; sourceTree = "SOURCE_ROOT"; }; + B054CDFF33B17777FD1855BF = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jcphuff.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jcphuff.c"; sourceTree = "SOURCE_ROOT"; }; + B05EC8A81DA162236663A8AF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_IPAddress.cpp"; path = "../../../../modules/juce_core/network/juce_IPAddress.cpp"; sourceTree = "SOURCE_ROOT"; }; B0A987158C4CF4E8D0D75243 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = format.h; path = "../../../../modules/juce_audio_formats/codecs/flac/format.h"; sourceTree = "SOURCE_ROOT"; }; - B2CF7DCAD1C8871201A6CE26 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DragAndDropTarget.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_DragAndDropTarget.h"; sourceTree = "SOURCE_ROOT"; }; - B2F8C1DFA6A765EDB034399D = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TextEditor.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_TextEditor.h"; sourceTree = "SOURCE_ROOT"; }; + B0B4FAE3EA49CE2AE0074204 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_InputStream.cpp"; path = "../../../../modules/juce_core/streams/juce_InputStream.cpp"; sourceTree = "SOURCE_ROOT"; }; + B0E5392688FD05700AFA0569 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ApplicationBase.cpp"; path = "../../../../modules/juce_events/messages/juce_ApplicationBase.cpp"; sourceTree = "SOURCE_ROOT"; }; + B19103A5C4E54D5ABB50F27F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MemoryInputStream.h"; path = "../../../../modules/juce_core/streams/juce_MemoryInputStream.h"; sourceTree = "SOURCE_ROOT"; }; + B2A30D3171F293ECE50DC06B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Variant.cpp"; path = "../../../../modules/juce_core/containers/juce_Variant.cpp"; sourceTree = "SOURCE_ROOT"; }; + B2C885D79DF233E10656633A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ReferenceCountedArray.h"; path = "../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h"; sourceTree = "SOURCE_ROOT"; }; + B33097C6BA7E4793E7536BBC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_mac_CoreGraphicsContext.h"; path = "../../../../modules/juce_graphics/native/juce_mac_CoreGraphicsContext.h"; sourceTree = "SOURCE_ROOT"; }; + B33E3A1B455B48F251A4EFEB = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_Files.cpp"; path = "../../../../modules/juce_core/native/juce_linux_Files.cpp"; sourceTree = "SOURCE_ROOT"; }; B3425236EBB43087A2C4AA71 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ListenerList.h"; path = "../../../../modules/juce_core/containers/juce_ListenerList.h"; sourceTree = "SOURCE_ROOT"; }; B389D5350378076E0DF5DA6D = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = export.h; path = "../../../../modules/juce_audio_formats/codecs/flac/export.h"; sourceTree = "SOURCE_ROOT"; }; - B5029BFA56B6E1BB5FB43BFD = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_TableHeaderComponent.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_TableHeaderComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; - B5CD08BC33A8414D48F4CD67 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MouseCursor.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_MouseCursor.h"; sourceTree = "SOURCE_ROOT"; }; + B3AED660CB964056A7063CE6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ColourGradient.h"; path = "../../../../modules/juce_graphics/colour/juce_ColourGradient.h"; sourceTree = "SOURCE_ROOT"; }; + B4C32A6592E159751BD10360 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = pngconf.h; path = "../../../../modules/juce_graphics/image_formats/pnglib/pngconf.h"; sourceTree = "SOURCE_ROOT"; }; + B585667FC1E99FE5C1E3F799 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jquant2.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jquant2.c"; sourceTree = "SOURCE_ROOT"; }; + B5C3356C447E60F512C5E8CD = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MultiTimer.cpp"; path = "../../../../modules/juce_events/timers/juce_MultiTimer.cpp"; sourceTree = "SOURCE_ROOT"; }; + B5CA4FEE0ADFDACCAF2FB017 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = pngget.c; path = "../../../../modules/juce_graphics/image_formats/pnglib/pngget.c"; sourceTree = "SOURCE_ROOT"; }; + B6B3AF7688EF55A4FC61D5D6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AsyncUpdater.cpp"; path = "../../../../modules/juce_events/broadcasters/juce_AsyncUpdater.cpp"; sourceTree = "SOURCE_ROOT"; }; B6EA3B412C6E73478C4D36AD = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win_BluetoothMidiDevicePairingDialogue.cpp"; path = "../../../../modules/juce_audio_utils/native/juce_win_BluetoothMidiDevicePairingDialogue.cpp"; sourceTree = "SOURCE_ROOT"; }; + B77C48286D446F5C7BD4B76F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_MessageManager.mm"; path = "../../../../modules/juce_events/native/juce_mac_MessageManager.mm"; sourceTree = "SOURCE_ROOT"; }; B79F6D7A104EF67978CFFC4B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CAVectorUnitTypes.h; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CAVectorUnitTypes.h"; sourceTree = "SOURCE_ROOT"; }; B801E3F5A1C2992F592A0FBE = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioThumbnail.h"; path = "../../../../modules/juce_audio_utils/gui/juce_AudioThumbnail.h"; sourceTree = "SOURCE_ROOT"; }; + B812C4A2809BB37D45F54A59 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jdatasrc.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jdatasrc.c"; sourceTree = "SOURCE_ROOT"; }; + B8133580F67C0B95E1F36D4E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_WaitableEvent.h"; path = "../../../../modules/juce_core/threads/juce_WaitableEvent.h"; sourceTree = "SOURCE_ROOT"; }; + B85C9F9BF94FA8926EB9ACB8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DrawableShape.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableShape.cpp"; sourceTree = "SOURCE_ROOT"; }; B986157ED5B0414CDF696C62 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CAHostTimeBase.h; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CAHostTimeBase.h"; sourceTree = "SOURCE_ROOT"; }; + B98F443DC0CE94BC13CC3D44 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Timer.cpp"; path = "../../../../modules/juce_events/timers/juce_Timer.cpp"; sourceTree = "SOURCE_ROOT"; }; BABAE6EE994D5EBDC4013AAB = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_BubbleMessageComponent.h"; path = "../../../../modules/juce_gui_extra/misc/juce_BubbleMessageComponent.h"; sourceTree = "SOURCE_ROOT"; }; + BB1D6E0B0982D0590E8EC99F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_SystemStats.cpp"; path = "../../../../modules/juce_core/native/juce_linux_SystemStats.cpp"; sourceTree = "SOURCE_ROOT"; }; BB525259297D31B45CC624C8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DeletedAtShutdown.cpp"; path = "../../../../modules/juce_events/messages/juce_DeletedAtShutdown.cpp"; sourceTree = "SOURCE_ROOT"; }; - BBD06432CC4155521050CD2A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V3.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.h"; sourceTree = "SOURCE_ROOT"; }; + BB8432AE150D5AEB38808FA9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Application.cpp"; path = "../../../../modules/juce_gui_basics/application/juce_Application.cpp"; sourceTree = "SOURCE_ROOT"; }; + BBB323B5DE53878F445064D9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_Files.cpp"; path = "../../../../modules/juce_core/native/juce_android_Files.cpp"; sourceTree = "SOURCE_ROOT"; }; BC2068C5203B2AA39EAE0C6A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_audio_processors.mm"; path = "../../../../modules/juce_audio_processors/juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; }; + BCC48160464BC0DFCAD33792 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Process.h"; path = "../../../../modules/juce_core/threads/juce_Process.h"; sourceTree = "SOURCE_ROOT"; }; + BD283419247CBA6C6DD2ADD6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DrawableComposite.h"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableComposite.h"; sourceTree = "SOURCE_ROOT"; }; BD58CC09BA9FED0E9CACC97B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_WindowsMediaAudioFormat.cpp"; path = "../../../../modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp"; sourceTree = "SOURCE_ROOT"; }; BD95E66B6A4CDADCF0631707 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CAStreamBasicDescription.cpp; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CAStreamBasicDescription.cpp"; sourceTree = "SOURCE_ROOT"; }; BDDC593699182D1603163238 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_audio_devices.cpp"; path = "../../../../modules/juce_audio_devices/juce_audio_devices.cpp"; sourceTree = "SOURCE_ROOT"; }; + BDEE5F6548D2980373C45F5B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ComponentBuilder.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_ComponentBuilder.cpp"; sourceTree = "SOURCE_ROOT"; }; BED2521A9CE66A6F1A5AE7F7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = pngpread.c; path = "../../../../modules/juce_graphics/image_formats/pnglib/pngpread.c"; sourceTree = "SOURCE_ROOT"; }; BED2D02D5F333084E058D678 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FileListComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; BF6BA28F41BA2A03D9325E0F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = md5.h; path = "../../../../modules/juce_audio_formats/codecs/flac/libFLAC/include/private/md5.h"; sourceTree = "SOURCE_ROOT"; }; @@ -988,6 +990,7 @@ C478ECA66D2FDB2303FDC140 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_NotificationType.h"; path = "../../../../modules/juce_events/messages/juce_NotificationType.h"; sourceTree = "SOURCE_ROOT"; }; C4BBB0A36D8C8E7D180247DA = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ArrowButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_ArrowButton.h"; sourceTree = "SOURCE_ROOT"; }; C4FED4C2640C8615AB415884 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; + C5075702583930AA69562983 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexItem.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexItem.h"; sourceTree = "SOURCE_ROOT"; }; C50B7EF31D44D3B5E03CB4A8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioCDBurner.h"; path = "../../../../modules/juce_audio_devices/audio_cd/juce_AudioCDBurner.h"; sourceTree = "SOURCE_ROOT"; }; C5A11A2A1F932F48A0D23E91 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioParameterBool.h"; path = "../../../../modules/juce_audio_processors/utilities/juce_AudioParameterBool.h"; sourceTree = "SOURCE_ROOT"; }; C5A2FC7A4569F1C242016136 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = png.c; path = "../../../../modules/juce_graphics/image_formats/pnglib/png.c"; sourceTree = "SOURCE_ROOT"; }; @@ -1004,14 +1007,15 @@ C9494DFECDCD27C0815A6F17 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DirectoryContentsList.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.h"; sourceTree = "SOURCE_ROOT"; }; C9B7C5BD09A1486B2A10DA8C = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = cpu.h; path = "../../../../modules/juce_audio_formats/codecs/flac/libFLAC/include/private/cpu.h"; sourceTree = "SOURCE_ROOT"; }; CA633B8B756E9E7826C8D173 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ResamplingAudioSource.h"; path = "../../../../modules/juce_audio_basics/sources/juce_ResamplingAudioSource.h"; sourceTree = "SOURCE_ROOT"; }; + CB23F9E24266013856B53BBE = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CPlusPlusCodeTokeniser.h"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniser.h"; sourceTree = "SOURCE_ROOT"; }; CC32EDCC4709790EBBA55941 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "psych_44.h"; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/modes/psych_44.h"; sourceTree = "SOURCE_ROOT"; }; + CFAFC86F4D25AB5A31DF3BE5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Desktop.h"; path = "../../../../modules/juce_gui_basics/components/juce_Desktop.h"; sourceTree = "SOURCE_ROOT"; }; D06C2B85E02F13F9B57DB1A9 = {isa = PBXFileReference; lastKnownFileType = image.png; name = power.png; path = ../../Source/BinaryData/power.png; sourceTree = "SOURCE_ROOT"; }; EC3DE1F504C76EEDDA7F2216 = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AUv3Synth.app; sourceTree = "BUILT_PRODUCTS_DIR"; }; 9536B5A780A03F6BACB24144 = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAUv3Synth.a; sourceTree = "BUILT_PRODUCTS_DIR"; }; C1E4A7F5418639D70CB51F0A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioFormatReader.h"; path = "../../../../modules/juce_audio_formats/format/juce_AudioFormatReader.h"; sourceTree = "SOURCE_ROOT"; }; C61D176AAECFBC9A277EF2E5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FFT.cpp"; path = "../../../../modules/juce_audio_basics/effects/juce_FFT.cpp"; sourceTree = "SOURCE_ROOT"; }; C63541C14D518046922DF60B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_IIRFilter.cpp"; path = "../../../../modules/juce_audio_basics/effects/juce_IIRFilter.cpp"; sourceTree = "SOURCE_ROOT"; }; - CB23F9E24266013856B53BBE = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CPlusPlusCodeTokeniser.h"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniser.h"; sourceTree = "SOURCE_ROOT"; }; CBA22CAB6770979BCCD18EEA = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = framing.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/framing.c"; sourceTree = "SOURCE_ROOT"; }; CC14A34F66FDF9E12523CABF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_audio_plugin_client_AUv3.mm"; path = "../../JuceLibraryCode/juce_audio_plugin_client_AUv3.mm"; sourceTree = "SOURCE_ROOT"; }; CC155101953B89262C8B633C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_Network.cpp"; path = "../../../../modules/juce_core/native/juce_android_Network.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -1029,7 +1033,7 @@ CF7ECFB4AA9A00E103525840 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MemoryMappedFile.h"; path = "../../../../modules/juce_core/files/juce_MemoryMappedFile.h"; sourceTree = "SOURCE_ROOT"; }; CF9EEC4A087AA9010D5D21A5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioPluginFormat.h"; path = "../../../../modules/juce_audio_processors/format/juce_AudioPluginFormat.h"; sourceTree = "SOURCE_ROOT"; }; CFADD611F5F0D9EC5127C6C4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = trees.c; path = "../../../../modules/juce_core/zip/zlib/trees.c"; sourceTree = "SOURCE_ROOT"; }; - CFAFC86F4D25AB5A31DF3BE5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Desktop.h"; path = "../../../../modules/juce_gui_basics/components/juce_Desktop.h"; sourceTree = "SOURCE_ROOT"; }; + CFAF04B0DF40F2C81026ACD2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_VSTInterface.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_VSTInterface.h"; sourceTree = "SOURCE_ROOT"; }; CFFC609186B1EE226ACEBD2D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Network.cpp"; path = "../../../../modules/juce_core/native/juce_win32_Network.cpp"; sourceTree = "SOURCE_ROOT"; }; D03583C1CA01284B5781955E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MidiKeyboardComponent.h"; path = "../../../../modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.h"; sourceTree = "SOURCE_ROOT"; }; D0584D8F725E0D7E61F830F5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = deflate.c; path = "../../../../modules/juce_core/zip/zlib/deflate.c"; sourceTree = "SOURCE_ROOT"; }; @@ -1758,6 +1762,7 @@ 5F6BB197FA13DEB1F2260CC0, 387D55482BBDCBC351F2BECE, B774AC9A00BFF63E24EA0646, + CFAF04B0DF40F2C81026ACD2, 87FC5378F4B65DBD11E62015, E0FD3183237BAB53F14A4B92, 58461A95ADF95E35EE92161D, ); name = "format_types"; sourceTree = ""; }; @@ -2471,6 +2476,9 @@ F77C93B319FB7E23D69C8371, F7B8C6AA3AEF025B6BFE5678, 3CCBF30007C57491CF649D39, + B46C496B84C02A7F7D49B44F, + A512EE08FFC0B8B22E6408FC, + C5075702583930AA69562983, 0B842061D62F68F42428E33A, E7E45873BE802DD8D676E9CD, F511F1E8F0B3F64C850321F2, @@ -2819,6 +2827,7 @@ INFOPLIST_FILE = Info-VST.plist; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-bundle -lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; @@ -2854,6 +2863,7 @@ INFOPLIST_FILE = Info-VST.plist; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-bundle -lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; @@ -2888,6 +2898,7 @@ INFOPLIST_FILE = Info-VST3.plist; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST3/"; LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-bundle -lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; @@ -2923,6 +2934,7 @@ INFOPLIST_FILE = Info-VST3.plist; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST3/"; LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-bundle -lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; @@ -2954,6 +2966,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_AppExtension.plist; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth.AUv3SynthAUv3; @@ -2985,6 +2998,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_AppExtension.plist; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth.AUv3SynthAUv3; @@ -3013,6 +3027,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_Standalone.plist; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; @@ -3042,6 +3057,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_Standalone.plist; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; @@ -3071,6 +3087,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INSTALL_PATH = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; SDKROOT_ppc = macosx10.5; }; name = Debug; }; @@ -3100,6 +3117,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INSTALL_PATH = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; SDKROOT_ppc = macosx10.5; }; name = Release; }; diff --git a/examples/AUv3Synth/Builds/iOS/AUv3Synth.xcodeproj/project.pbxproj b/examples/AUv3Synth/Builds/iOS/AUv3Synth.xcodeproj/project.pbxproj index 0e9b73e8..3b250019 100644 --- a/examples/AUv3Synth/Builds/iOS/AUv3Synth.xcodeproj/project.pbxproj +++ b/examples/AUv3Synth/Builds/iOS/AUv3Synth.xcodeproj/project.pbxproj @@ -6,7 +6,6 @@ objectVersion = 46; objects = { - 55B4C2F046533A9C139516FF = {isa = PBXBuildFile; fileRef = F5E81FD99EFCB226D2486603; }; EE8DCBA5DC0EE7CAD6FF2F39 = {isa = PBXBuildFile; fileRef = 746B19364297E7D489749B70; }; 3F1630B6EF37313AADD6EAB8 = {isa = PBXBuildFile; fileRef = EC3DE1F504C76EEDDA7F2216; }; 77FA445D27C21FBA66A46BF2 = {isa = PBXBuildFile; fileRef = 9536B5A780A03F6BACB24144; }; @@ -32,7 +31,6 @@ 0E0B50F4A042E48B9631A42A = {isa = PBXBuildFile; fileRef = CF02DA80A8A515CE41B0C8F6; }; 72733104CA9C62BE856879C9 = {isa = PBXBuildFile; fileRef = 63AFF514CAE6FB89A3503CEF; }; A00624D77FD68669DD6234D0 = {isa = PBXBuildFile; fileRef = A8315F08B794D9C87328F17F; }; - E94BB952CDD544FA3A0A4DBB = {isa = PBXBuildFile; fileRef = 853D9A89FE96C6DD6730CEC7; }; 8EBD1E279B7E4B420F310D12 = {isa = PBXBuildFile; fileRef = D9ED0926381D40DA1A66C26D; }; 045E9D3412FD38BFE3071254 = {isa = PBXBuildFile; fileRef = 9965CB9ED8D2B26CACA9C44A; }; 4066B5EF83133035C3579D0D = {isa = PBXBuildFile; fileRef = 58E254BD072595F6E3F6D5F5; }; @@ -570,7 +568,6 @@ 6C5C4F38A006227C77FCBAD3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CharPointer_UTF32.h"; path = "../../../../modules/juce_core/text/juce_CharPointer_UTF32.h"; sourceTree = "SOURCE_ROOT"; }; 6CE2AFEAEE4AE23D2E17E2D0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_graphics.mm"; path = "../../../../modules/juce_graphics/juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; }; 6D61505DE8021C51E8C5AE52 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lsp.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/lsp.c"; sourceTree = "SOURCE_ROOT"; }; - 6DA4597568FFE5B6D1F5B68A = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-VST.plist"; path = "Info-VST.plist"; sourceTree = "SOURCE_ROOT"; }; 6DED13EB49FCE393E16D59FB = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AbstractFifo.h"; path = "../../../../modules/juce_core/containers/juce_AbstractFifo.h"; sourceTree = "SOURCE_ROOT"; }; 6DF4FA55C69B25537DCD88C8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ApplicationCommandInfo.cpp"; path = "../../../../modules/juce_gui_basics/commands/juce_ApplicationCommandInfo.cpp"; sourceTree = "SOURCE_ROOT"; }; 6DFDBE298AD93DD1B3F067B6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Uuid.cpp"; path = "../../../../modules/juce_core/misc/juce_Uuid.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -601,6 +598,7 @@ 738FC67C7D9A53148C0A21AC = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ApplicationCommandManager.cpp"; path = "../../../../modules/juce_gui_basics/commands/juce_ApplicationCommandManager.cpp"; sourceTree = "SOURCE_ROOT"; }; 73BB8E247A275838FD16AFE0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = mapping0.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/mapping0.c"; sourceTree = "SOURCE_ROOT"; }; 745B58030382C3D0DB6E7815 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RelativeCoordinate.cpp"; path = "../../../../modules/juce_gui_basics/positioning/juce_RelativeCoordinate.cpp"; sourceTree = "SOURCE_ROOT"; }; + 746B19364297E7D489749B70 = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = AUv3Synth.appex; sourceTree = "BUILT_PRODUCTS_DIR"; }; 75034A13541D4052025A4B39 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jutils.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jutils.c"; sourceTree = "SOURCE_ROOT"; }; 750DF21E43BED98CE4F53DE7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ReferenceCountedObject.h"; path = "../../../../modules/juce_core/memory/juce_ReferenceCountedObject.h"; sourceTree = "SOURCE_ROOT"; }; 76272B6E0F4FB6D7225653CF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_CoreAudioFormat.cpp"; path = "../../../../modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -637,6 +635,7 @@ 7BAB8DD68B7A25B281233969 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MarkerList.h"; path = "../../../../modules/juce_gui_basics/positioning/juce_MarkerList.h"; sourceTree = "SOURCE_ROOT"; }; 7C3E7364953EF9D78C71B866 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Files.cpp"; path = "../../../../modules/juce_core/native/juce_win32_Files.cpp"; sourceTree = "SOURCE_ROOT"; }; 7CA84F62BB5AC492B1EB49A0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_osx_MessageQueue.h"; path = "../../../../modules/juce_events/native/juce_osx_MessageQueue.h"; sourceTree = "SOURCE_ROOT"; }; + 7CBEB55B80E78C9DE16A713A = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; 7CE0FEFCEC64DF0ADA0B2DF8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MessageListener.h"; path = "../../../../modules/juce_events/messages/juce_MessageListener.h"; sourceTree = "SOURCE_ROOT"; }; 7D0417B22EF55BE16E7C5061 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileListComponent.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileListComponent.h"; sourceTree = "SOURCE_ROOT"; }; 7D1E28BE09A85EEBA041558C = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Slider.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_Slider.h"; sourceTree = "SOURCE_ROOT"; }; @@ -678,7 +677,6 @@ 84ABD4F5D068289F4D43E7CC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Decibels.h"; path = "../../../../modules/juce_audio_basics/effects/juce_Decibels.h"; sourceTree = "SOURCE_ROOT"; }; 84D3302B18B67B725905AF7C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LAMEEncoderAudioFormat.cpp"; path = "../../../../modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp"; sourceTree = "SOURCE_ROOT"; }; 8524CF106D2B7B1E08D312C8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioAppComponent.h"; path = "../../../../modules/juce_audio_utils/gui/juce_AudioAppComponent.h"; sourceTree = "SOURCE_ROOT"; }; - 853D9A89FE96C6DD6730CEC7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_audio_plugin_client_VST2.cpp"; path = "../../JuceLibraryCode/juce_audio_plugin_client_VST2.cpp"; sourceTree = "SOURCE_ROOT"; }; 854757FAD81F978667CAA43C = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RelativeRectangle.h"; path = "../../../../modules/juce_gui_basics/positioning/juce_RelativeRectangle.h"; sourceTree = "SOURCE_ROOT"; }; 8553867F8B04D10919C2BD4C = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = smallft.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/smallft.c"; sourceTree = "SOURCE_ROOT"; }; 856618203AAE94C7B806F9EF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DrawableRectangle.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableRectangle.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -690,6 +688,7 @@ 86AC66980898843AE721BD08 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RectanglePlacement.h"; path = "../../../../modules/juce_graphics/placement/juce_RectanglePlacement.h"; sourceTree = "SOURCE_ROOT"; }; 86E1396EB5DB7C3F8D42AF19 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ScopedLock.h"; path = "../../../../modules/juce_core/threads/juce_ScopedLock.h"; sourceTree = "SOURCE_ROOT"; }; 87181526B9C99144CBE4F8A8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MidiInput.h"; path = "../../../../modules/juce_audio_devices/midi_io/juce_MidiInput.h"; sourceTree = "SOURCE_ROOT"; }; + 872D05BD56490FD7B375C11B = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; }; 87415D844832686C8423F226 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jccolor.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jccolor.c"; sourceTree = "SOURCE_ROOT"; }; 874FADD694BB58E2E736FC20 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MixerAudioSource.cpp"; path = "../../../../modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp"; sourceTree = "SOURCE_ROOT"; }; 876D30F6E9647DB0F9BE4463 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = format.h; path = "../../../../modules/juce_audio_formats/codecs/flac/libFLAC/include/private/format.h"; sourceTree = "SOURCE_ROOT"; }; @@ -710,6 +709,7 @@ 89CC639E5B1CDE71BDBC02D9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Toolbar.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_Toolbar.cpp"; sourceTree = "SOURCE_ROOT"; }; 89E00773FE73394C30642A4E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InputSource.h"; path = "../../../../modules/juce_core/streams/juce_InputSource.h"; sourceTree = "SOURCE_ROOT"; }; 8A3F809F240408D5195FB0F5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = memory.c; path = "../../../../modules/juce_audio_formats/codecs/flac/libFLAC/memory.c"; sourceTree = "SOURCE_ROOT"; }; + 8AA012F95CDEE0ECAC1D698E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MPEZoneLayout.h"; path = "../../../../modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h"; sourceTree = "SOURCE_ROOT"; }; 8ACD82D09483797E1A7A65B2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DrawablePath.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawablePath.cpp"; sourceTree = "SOURCE_ROOT"; }; 8AEA9D5BBBC4CB214F18FCE3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CodeDocument.h"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CodeDocument.h"; sourceTree = "SOURCE_ROOT"; }; 8AED766CFA1A37B45BC2DE98 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CustomTypeface.h"; path = "../../../../modules/juce_graphics/fonts/juce_CustomTypeface.h"; sourceTree = "SOURCE_ROOT"; }; @@ -726,6 +726,8 @@ 8D030B4C002B429D9A9CF05A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = metadata.h; path = "../../../../modules/juce_audio_formats/codecs/flac/metadata.h"; sourceTree = "SOURCE_ROOT"; }; 8D4AF11BC6D0F698838984C6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = AUOutputElement.cpp; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUOutputElement.cpp"; sourceTree = "SOURCE_ROOT"; }; 8D6D7548957FA154DA777E17 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_BufferingAudioSource.h"; path = "../../../../modules/juce_audio_basics/sources/juce_BufferingAudioSource.h"; sourceTree = "SOURCE_ROOT"; }; + 8D753ADD4B2F1CB0C974A522 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MidiBuffer.h"; path = "../../../../modules/juce_audio_basics/midi/juce_MidiBuffer.h"; sourceTree = "SOURCE_ROOT"; }; + 8DCEAA37D9F7AAD98A244B49 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LowLevelGraphicsSoftwareRenderer.cpp"; path = "../../../../modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp"; sourceTree = "SOURCE_ROOT"; }; 8E1318FA20D468AD45C7A20F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CallOutBox.h"; path = "../../../../modules/juce_gui_basics/windows/juce_CallOutBox.h"; sourceTree = "SOURCE_ROOT"; }; 8E29909B5886662F2EC3F5CF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_BooleanPropertyComponent.cpp"; path = "../../../../modules/juce_gui_basics/properties/juce_BooleanPropertyComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; 8E61D5E0D6068F247E70219C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Button.cpp"; path = "../../../../modules/juce_gui_basics/buttons/juce_Button.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -733,52 +735,40 @@ 8F3941CB0EBB70B37B7DB6DD = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_osx_ObjCHelpers.h"; path = "../../../../modules/juce_core/native/juce_osx_ObjCHelpers.h"; sourceTree = "SOURCE_ROOT"; }; 8F3C3474E9EB852A40B3A25B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AUPlugInDispatch.h; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUPlugInDispatch.h"; sourceTree = "SOURCE_ROOT"; }; 8F3FC2A8E965AA4E83259DB3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RelativeCoordinatePositioner.cpp"; path = "../../../../modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp"; sourceTree = "SOURCE_ROOT"; }; + 8FAE0E215D1E95E6CA7C58E8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_data_structures.h"; path = "../../../../modules/juce_data_structures/juce_data_structures.h"; sourceTree = "SOURCE_ROOT"; }; 8FC88FE9250C7A25AC724BEF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DynamicObject.cpp"; path = "../../../../modules/juce_core/containers/juce_DynamicObject.cpp"; sourceTree = "SOURCE_ROOT"; }; + 8FE4D93D82016AE0E952662F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jcomapi.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jcomapi.c"; sourceTree = "SOURCE_ROOT"; }; + 90064DDC086AD775FA7D5FFB = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OptionalScopedPointer.h"; path = "../../../../modules/juce_core/memory/juce_OptionalScopedPointer.h"; sourceTree = "SOURCE_ROOT"; }; + 9015FC74644F82DB0A49FBFB = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = vorbisenc.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisenc.c"; sourceTree = "SOURCE_ROOT"; }; 903B9CD04DF181894AC76EF9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Identifier.cpp"; path = "../../../../modules/juce_core/text/juce_Identifier.cpp"; sourceTree = "SOURCE_ROOT"; }; 90C18AF3CAC0E59C88732904 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RelativeParallelogram.h"; path = "../../../../modules/juce_gui_basics/positioning/juce_RelativeParallelogram.h"; sourceTree = "SOURCE_ROOT"; }; 90D3112151AC631747E60670 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Base64.h"; path = "../../../../modules/juce_core/text/juce_Base64.h"; sourceTree = "SOURCE_ROOT"; }; 9136CCE147582160FA805637 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "residue_16.h"; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/modes/residue_16.h"; sourceTree = "SOURCE_ROOT"; }; 9146F18918C954121E932A8B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_PropertiesFile.cpp"; path = "../../../../modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp"; sourceTree = "SOURCE_ROOT"; }; - 92529B06E070A28F0C3C4914 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ToolbarItemFactory.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_ToolbarItemFactory.h"; sourceTree = "SOURCE_ROOT"; }; - 933DE5C4D4002BA9203F65A6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MemoryOutputStream.cpp"; path = "../../../../modules/juce_core/streams/juce_MemoryOutputStream.cpp"; sourceTree = "SOURCE_ROOT"; }; - 9376596E6EC0707DFEE00ADB = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ReadWriteLock.cpp"; path = "../../../../modules/juce_core/threads/juce_ReadWriteLock.cpp"; sourceTree = "SOURCE_ROOT"; }; - 94304B55601DBF7FBCFC6767 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = md5.c; path = "../../../../modules/juce_audio_formats/codecs/flac/libFLAC/md5.c"; sourceTree = "SOURCE_ROOT"; }; - 94BFEB9B92F3D546332FD8E1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = alloc.h; path = "../../../../modules/juce_audio_formats/codecs/flac/alloc.h"; sourceTree = "SOURCE_ROOT"; }; - 95D4FB306A367AE3A6D28173 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ZipFile.cpp"; path = "../../../../modules/juce_core/zip/juce_ZipFile.cpp"; sourceTree = "SOURCE_ROOT"; }; - 96DCCD578FF29CD7D381E8BC = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FillType.cpp"; path = "../../../../modules/juce_graphics/colour/juce_FillType.cpp"; sourceTree = "SOURCE_ROOT"; }; - 96F6E7AE69A06FEE69CCA3C9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CompilerSupport.h"; path = "../../../../modules/juce_core/system/juce_CompilerSupport.h"; sourceTree = "SOURCE_ROOT"; }; - 9A392FBECB732FAC0AA04262 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_InterprocessConnectionServer.cpp"; path = "../../../../modules/juce_events/interprocess/juce_InterprocessConnectionServer.cpp"; sourceTree = "SOURCE_ROOT"; }; - 9FB1AAC5EC1146B5FC0EFCD2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Synthesiser.cpp"; path = "../../../../modules/juce_audio_basics/synthesisers/juce_Synthesiser.cpp"; sourceTree = "SOURCE_ROOT"; }; - A148CC41BDB41EDC8E88DC7D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_BufferingAudioSource.cpp"; path = "../../../../modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp"; sourceTree = "SOURCE_ROOT"; }; - A15E68C337279B15ED933BE3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FloatVectorOperations.cpp"; path = "../../../../modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp"; sourceTree = "SOURCE_ROOT"; }; - E04216439C3A2AD69B69B520 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioSampleBuffer.h"; path = "../../../../modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h"; sourceTree = "SOURCE_ROOT"; }; - F5E81FD99EFCB226D2486603 = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AUv3Synth.vst; sourceTree = "BUILT_PRODUCTS_DIR"; }; - 746B19364297E7D489749B70 = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = AUv3Synth.appex; sourceTree = "BUILT_PRODUCTS_DIR"; }; - 7CBEB55B80E78C9DE16A713A = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 872D05BD56490FD7B375C11B = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; }; - 8AA012F95CDEE0ECAC1D698E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MPEZoneLayout.h"; path = "../../../../modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h"; sourceTree = "SOURCE_ROOT"; }; - 8D753ADD4B2F1CB0C974A522 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MidiBuffer.h"; path = "../../../../modules/juce_audio_basics/midi/juce_MidiBuffer.h"; sourceTree = "SOURCE_ROOT"; }; - 8DCEAA37D9F7AAD98A244B49 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LowLevelGraphicsSoftwareRenderer.cpp"; path = "../../../../modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp"; sourceTree = "SOURCE_ROOT"; }; - 8FAE0E215D1E95E6CA7C58E8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_data_structures.h"; path = "../../../../modules/juce_data_structures/juce_data_structures.h"; sourceTree = "SOURCE_ROOT"; }; - 8FE4D93D82016AE0E952662F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jcomapi.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jcomapi.c"; sourceTree = "SOURCE_ROOT"; }; - 90064DDC086AD775FA7D5FFB = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OptionalScopedPointer.h"; path = "../../../../modules/juce_core/memory/juce_OptionalScopedPointer.h"; sourceTree = "SOURCE_ROOT"; }; - 9015FC74644F82DB0A49FBFB = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = vorbisenc.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisenc.c"; sourceTree = "SOURCE_ROOT"; }; 9198593E2E34D16752B90CD1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AttributedString.cpp"; path = "../../../../modules/juce_graphics/fonts/juce_AttributedString.cpp"; sourceTree = "SOURCE_ROOT"; }; 91D10BF1909D2B9C169E4493 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "residue_8.h"; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/modes/residue_8.h"; sourceTree = "SOURCE_ROOT"; }; 91F32F326BD577CD67AE20D3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "setup_44u.h"; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/modes/setup_44u.h"; sourceTree = "SOURCE_ROOT"; }; + 92529B06E070A28F0C3C4914 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ToolbarItemFactory.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_ToolbarItemFactory.h"; sourceTree = "SOURCE_ROOT"; }; 92723EFA7826236908D48AC3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CAAUParameter.cpp; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CAAUParameter.cpp"; sourceTree = "SOURCE_ROOT"; }; 92BFAF31B51618764234C779 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MemoryBlock.cpp"; path = "../../../../modules/juce_core/memory/juce_MemoryBlock.cpp"; sourceTree = "SOURCE_ROOT"; }; 9312B68ACDD2A4EAA31CAA73 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChoicePropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_ChoicePropertyComponent.h"; sourceTree = "SOURCE_ROOT"; }; 9329788543F0C6DA2B50BD72 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_audio_formats.mm"; path = "../../../../modules/juce_audio_formats/juce_audio_formats.mm"; sourceTree = "SOURCE_ROOT"; }; + 933DE5C4D4002BA9203F65A6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MemoryOutputStream.cpp"; path = "../../../../modules/juce_core/streams/juce_MemoryOutputStream.cpp"; sourceTree = "SOURCE_ROOT"; }; + 9376596E6EC0707DFEE00ADB = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ReadWriteLock.cpp"; path = "../../../../modules/juce_core/threads/juce_ReadWriteLock.cpp"; sourceTree = "SOURCE_ROOT"; }; 938B5112D072B60A18918CF1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jdcoefct.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jdcoefct.c"; sourceTree = "SOURCE_ROOT"; }; + 94304B55601DBF7FBCFC6767 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = md5.c; path = "../../../../modules/juce_audio_formats/codecs/flac/libFLAC/md5.c"; sourceTree = "SOURCE_ROOT"; }; 94308E0D87CFF0D58DAAA0D9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "os_types.h"; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/os_types.h"; sourceTree = "SOURCE_ROOT"; }; 947776740572A5A07C2500EE = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_EdgeTable.cpp"; path = "../../../../modules/juce_graphics/geometry/juce_EdgeTable.cpp"; sourceTree = "SOURCE_ROOT"; }; + 94BFEB9B92F3D546332FD8E1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = alloc.h; path = "../../../../modules/juce_audio_formats/codecs/flac/alloc.h"; sourceTree = "SOURCE_ROOT"; }; 94EA45AA948C996F231D6946 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ComboBox.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_ComboBox.cpp"; sourceTree = "SOURCE_ROOT"; }; 955635CD2D6A1C5BACA519CF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ListBox.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_ListBox.cpp"; sourceTree = "SOURCE_ROOT"; }; 95931BF9B518FB17845AF4A9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = smallft.h; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/smallft.h"; sourceTree = "SOURCE_ROOT"; }; + 95D4FB306A367AE3A6D28173 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ZipFile.cpp"; path = "../../../../modules/juce_core/zip/juce_ZipFile.cpp"; sourceTree = "SOURCE_ROOT"; }; 96102E98CC639030FAD7EA68 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_GraphicsContext.cpp"; path = "../../../../modules/juce_graphics/native/juce_android_GraphicsContext.cpp"; sourceTree = "SOURCE_ROOT"; }; 968EC4E33A1D1949AA4A9F87 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AppleRemote.h"; path = "../../../../modules/juce_gui_extra/misc/juce_AppleRemote.h"; sourceTree = "SOURCE_ROOT"; }; 96DA31F4C1619188159F7FC3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = pngrutil.c; path = "../../../../modules/juce_graphics/image_formats/pnglib/pngrutil.c"; sourceTree = "SOURCE_ROOT"; }; + 96DCCD578FF29CD7D381E8BC = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FillType.cpp"; path = "../../../../modules/juce_graphics/colour/juce_FillType.cpp"; sourceTree = "SOURCE_ROOT"; }; + 96F6E7AE69A06FEE69CCA3C9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CompilerSupport.h"; path = "../../../../modules/juce_core/system/juce_CompilerSupport.h"; sourceTree = "SOURCE_ROOT"; }; 9767C9015F48F6F42AEC0C9D = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CAAutoDisposer.h; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CAAutoDisposer.h"; sourceTree = "SOURCE_ROOT"; }; 97C74E9A0E8A5576FC301241 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MPESynthesiserVoice.h"; path = "../../../../modules/juce_audio_basics/mpe/juce_MPESynthesiserVoice.h"; sourceTree = "SOURCE_ROOT"; }; 97DDC460BD01030B91158218 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ColourSelector.h"; path = "../../../../modules/juce_gui_extra/misc/juce_ColourSelector.h"; sourceTree = "SOURCE_ROOT"; }; @@ -791,6 +781,7 @@ 997766E6B5491A51A5242F68 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_NamedValueSet.h"; path = "../../../../modules/juce_core/containers/juce_NamedValueSet.h"; sourceTree = "SOURCE_ROOT"; }; 99AC2D0C2304F21B912FEC5B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_PluginHostType.h"; path = "../../../../modules/juce_audio_plugin_client/utility/juce_PluginHostType.h"; sourceTree = "SOURCE_ROOT"; }; 9A3351689C885961A9BD3F2F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Atomic.h"; path = "../../../../modules/juce_core/memory/juce_Atomic.h"; sourceTree = "SOURCE_ROOT"; }; + 9A392FBECB732FAC0AA04262 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_InterprocessConnectionServer.cpp"; path = "../../../../modules/juce_events/interprocess/juce_InterprocessConnectionServer.cpp"; sourceTree = "SOURCE_ROOT"; }; 9A419F28D68BDEB200F29603 = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = AUv3Synth/Images.xcassets; sourceTree = "SOURCE_ROOT"; }; 9A69DDED5C8357717BAD57DD = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Array.h"; path = "../../../../modules/juce_core/containers/juce_Array.h"; sourceTree = "SOURCE_ROOT"; }; 9AA36A7E6CCDA68D308E0721 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_audio_plugin_client_VST2.cpp"; path = "../../../../modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -821,12 +812,15 @@ 9F1DFEFDC78EC139C4089DEC = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RuntimePermissions.cpp"; path = "../../../../modules/juce_core/misc/juce_RuntimePermissions.cpp"; sourceTree = "SOURCE_ROOT"; }; 9F91E161DF777F050B61B6BE = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioTransportSource.cpp"; path = "../../../../modules/juce_audio_devices/sources/juce_AudioTransportSource.cpp"; sourceTree = "SOURCE_ROOT"; }; 9FA43271ACEB06BF3AB00095 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = envelope.h; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/envelope.h"; sourceTree = "SOURCE_ROOT"; }; + 9FB1AAC5EC1146B5FC0EFCD2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Synthesiser.cpp"; path = "../../../../modules/juce_audio_basics/synthesisers/juce_Synthesiser.cpp"; sourceTree = "SOURCE_ROOT"; }; A0173759895A8C13BB754998 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = all.h; path = "../../../../modules/juce_audio_formats/codecs/flac/all.h"; sourceTree = "SOURCE_ROOT"; }; A032CFC5A613848D8594B40B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = all.h; path = "../../../../modules/juce_audio_formats/codecs/flac/libFLAC/include/private/all.h"; sourceTree = "SOURCE_ROOT"; }; A1159B10837BBDD1BD12A882 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_CachedValue.cpp"; path = "../../../../modules/juce_data_structures/values/juce_CachedValue.cpp"; sourceTree = "SOURCE_ROOT"; }; A11CF361C0253B499324D31E = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ImageButton.cpp"; path = "../../../../modules/juce_gui_basics/buttons/juce_ImageButton.cpp"; sourceTree = "SOURCE_ROOT"; }; A12A4C86AE4FA12C99334932 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DirectoryContentsDisplayComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; + A148CC41BDB41EDC8E88DC7D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_BufferingAudioSource.cpp"; path = "../../../../modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp"; sourceTree = "SOURCE_ROOT"; }; A1595E748092878FDAEA5A30 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Application.h"; path = "../../../../modules/juce_gui_basics/application/juce_Application.h"; sourceTree = "SOURCE_ROOT"; }; + A15E68C337279B15ED933BE3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FloatVectorOperations.cpp"; path = "../../../../modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp"; sourceTree = "SOURCE_ROOT"; }; A1CFD76549B8E9EB1C360ED5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_CodeDocument.cpp"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp"; sourceTree = "SOURCE_ROOT"; }; A1FA95A0AA37CD773ACBCE8A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AsyncUpdater.h"; path = "../../../../modules/juce_events/broadcasters/juce_AsyncUpdater.h"; sourceTree = "SOURCE_ROOT"; }; A2129507609CE7130FBA1340 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Colours.h"; path = "../../../../modules/juce_graphics/colour/juce_Colours.h"; sourceTree = "SOURCE_ROOT"; }; @@ -841,6 +835,7 @@ A452E5BB6D20DB6842646EE0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ResizableEdgeComponent.h"; path = "../../../../modules/juce_gui_basics/layout/juce_ResizableEdgeComponent.h"; sourceTree = "SOURCE_ROOT"; }; A4BE4A85CD5ACC6A78C3B8A6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_audio_plugin_client_AU_1.mm"; path = "../../../../modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm"; sourceTree = "SOURCE_ROOT"; }; A4E1FFE9E94A28D434C2E4BD = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ConnectedChildProcess.cpp"; path = "../../../../modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp"; sourceTree = "SOURCE_ROOT"; }; + A512EE08FFC0B8B22E6408FC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexBox.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.h"; sourceTree = "SOURCE_ROOT"; }; A53855C517AD1588DBF87CA0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_XmlElement.cpp"; path = "../../../../modules/juce_core/xml/juce_XmlElement.cpp"; sourceTree = "SOURCE_ROOT"; }; A56060E773F77B3CA7DC3743 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jcapistd.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jcapistd.c"; sourceTree = "SOURCE_ROOT"; }; A58103D78876730190F3BC4A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ComponentBoundsConstrainer.h"; path = "../../../../modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.h"; sourceTree = "SOURCE_ROOT"; }; @@ -917,6 +912,7 @@ B3AED660CB964056A7063CE6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ColourGradient.h"; path = "../../../../modules/juce_graphics/colour/juce_ColourGradient.h"; sourceTree = "SOURCE_ROOT"; }; B3CA6447C345EE05F8B98195 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ImageButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_ImageButton.h"; sourceTree = "SOURCE_ROOT"; }; B442A76A84E1800D10EE5954 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Viewport.h"; path = "../../../../modules/juce_gui_basics/layout/juce_Viewport.h"; sourceTree = "SOURCE_ROOT"; }; + B46C496B84C02A7F7D49B44F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FlexBox.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.cpp"; sourceTree = "SOURCE_ROOT"; }; B48471A74A3A2BDA248931F2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = vorbisfile.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisfile.c"; sourceTree = "SOURCE_ROOT"; }; B4C32A6592E159751BD10360 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = pngconf.h; path = "../../../../modules/juce_graphics/image_formats/pnglib/pngconf.h"; sourceTree = "SOURCE_ROOT"; }; B5029BFA56B6E1BB5FB43BFD = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_TableHeaderComponent.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_TableHeaderComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -968,7 +964,6 @@ C14EFFF60594E0BC2421DC0F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FileSearchPathListComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileSearchPathListComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; C1983ED4284CBEF3B5A427E5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_SubregionStream.cpp"; path = "../../../../modules/juce_core/streams/juce_SubregionStream.cpp"; sourceTree = "SOURCE_ROOT"; }; C1D83773976CEDB413DB5E5D = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = envelope.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/envelope.c"; sourceTree = "SOURCE_ROOT"; }; - C1E4A7F5418639D70CB51F0A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioFormatReader.h"; path = "../../../../modules/juce_audio_formats/format/juce_AudioFormatReader.h"; sourceTree = "SOURCE_ROOT"; }; C1EFF2064480889DAC74D2D3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ImageEffectFilter.h"; path = "../../../../modules/juce_graphics/effects/juce_ImageEffectFilter.h"; sourceTree = "SOURCE_ROOT"; }; C25203A01A84B7032A7774CF = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RelativeCoordinatePositioner.h"; path = "../../../../modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h"; sourceTree = "SOURCE_ROOT"; }; C2DF4936EF95E5A32E71B755 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_CustomTypeface.cpp"; path = "../../../../modules/juce_graphics/fonts/juce_CustomTypeface.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -980,13 +975,12 @@ C3FF9B9008D2A03F2BB23F1B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Javascript.h"; path = "../../../../modules/juce_core/javascript/juce_Javascript.h"; sourceTree = "SOURCE_ROOT"; }; C478ECA66D2FDB2303FDC140 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_NotificationType.h"; path = "../../../../modules/juce_events/messages/juce_NotificationType.h"; sourceTree = "SOURCE_ROOT"; }; C4BBB0A36D8C8E7D180247DA = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ArrowButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_ArrowButton.h"; sourceTree = "SOURCE_ROOT"; }; + C5075702583930AA69562983 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexItem.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexItem.h"; sourceTree = "SOURCE_ROOT"; }; C50B7EF31D44D3B5E03CB4A8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioCDBurner.h"; path = "../../../../modules/juce_audio_devices/audio_cd/juce_AudioCDBurner.h"; sourceTree = "SOURCE_ROOT"; }; C5A11A2A1F932F48A0D23E91 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioParameterBool.h"; path = "../../../../modules/juce_audio_processors/utilities/juce_AudioParameterBool.h"; sourceTree = "SOURCE_ROOT"; }; C5A2FC7A4569F1C242016136 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = png.c; path = "../../../../modules/juce_graphics/image_formats/pnglib/png.c"; sourceTree = "SOURCE_ROOT"; }; C5B2DDCFB6FEA46E4F97BBA1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_events.cpp"; path = "../../../../modules/juce_events/juce_events.cpp"; sourceTree = "SOURCE_ROOT"; }; C61D176AAECFBC9A277EF2E5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FFT.cpp"; path = "../../../../modules/juce_audio_basics/effects/juce_FFT.cpp"; sourceTree = "SOURCE_ROOT"; }; - C61EEED69EE6C34E5C64B729 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "config_types.h"; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/config_types.h"; sourceTree = "SOURCE_ROOT"; }; - C63541C14D518046922DF60B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_IIRFilter.cpp"; path = "../../../../modules/juce_audio_basics/effects/juce_IIRFilter.cpp"; sourceTree = "SOURCE_ROOT"; }; C639338DD5AF077DF5BF8361 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MemoryOutputStream.h"; path = "../../../../modules/juce_core/streams/juce_MemoryOutputStream.h"; sourceTree = "SOURCE_ROOT"; }; C68283C8A9FA7CEC6AA6975C = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = scales.h; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/scales.h"; sourceTree = "SOURCE_ROOT"; }; C6846316837E7D4578428945 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Message.h"; path = "../../../../modules/juce_events/messages/juce_Message.h"; sourceTree = "SOURCE_ROOT"; }; @@ -997,33 +991,41 @@ C9494DFECDCD27C0815A6F17 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DirectoryContentsList.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.h"; sourceTree = "SOURCE_ROOT"; }; C9B7C5BD09A1486B2A10DA8C = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = cpu.h; path = "../../../../modules/juce_audio_formats/codecs/flac/libFLAC/include/private/cpu.h"; sourceTree = "SOURCE_ROOT"; }; CA633B8B756E9E7826C8D173 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ResamplingAudioSource.h"; path = "../../../../modules/juce_audio_basics/sources/juce_ResamplingAudioSource.h"; sourceTree = "SOURCE_ROOT"; }; - CB23F9E24266013856B53BBE = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CPlusPlusCodeTokeniser.h"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniser.h"; sourceTree = "SOURCE_ROOT"; }; - CBA22CAB6770979BCCD18EEA = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = framing.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/framing.c"; sourceTree = "SOURCE_ROOT"; }; CC14A34F66FDF9E12523CABF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_audio_plugin_client_AUv3.mm"; path = "../../JuceLibraryCode/juce_audio_plugin_client_AUv3.mm"; sourceTree = "SOURCE_ROOT"; }; CC155101953B89262C8B633C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_Network.cpp"; path = "../../../../modules/juce_core/native/juce_android_Network.cpp"; sourceTree = "SOURCE_ROOT"; }; - CC32EDCC4709790EBBA55941 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "psych_44.h"; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/modes/psych_44.h"; sourceTree = "SOURCE_ROOT"; }; CD3ABE20AE524B92B9B6A6FA = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_FileChooser.mm"; path = "../../../../modules/juce_gui_basics/native/juce_mac_FileChooser.mm"; sourceTree = "SOURCE_ROOT"; }; CD41042388657A558C93AD86 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = pngtrans.c; path = "../../../../modules/juce_graphics/image_formats/pnglib/pngtrans.c"; sourceTree = "SOURCE_ROOT"; }; CD44BCDC60998F9B56D816C9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = adler32.c; path = "../../../../modules/juce_core/zip/zlib/adler32.c"; sourceTree = "SOURCE_ROOT"; }; - CDE81ADB14F09742FBBA28E6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FileTreeComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; - CE491063B3EF486A263519F5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "setup_X.h"; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/modes/setup_X.h"; sourceTree = "SOURCE_ROOT"; }; - CE517EF86B0776BA9B27F3F6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AUTimestampGenerator.h; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUTimestampGenerator.h"; sourceTree = "SOURCE_ROOT"; }; CF02DA80A8A515CE41B0C8F6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_audio_plugin_client_Standalone.cpp"; path = "../../JuceLibraryCode/juce_audio_plugin_client_Standalone.cpp"; sourceTree = "SOURCE_ROOT"; }; CF2F576CE0F6A185597C8D40 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Label.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_Label.h"; sourceTree = "SOURCE_ROOT"; }; CF344C62ABCBA9BAAB6ACFA2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioSource.h"; path = "../../../../modules/juce_audio_basics/sources/juce_AudioSource.h"; sourceTree = "SOURCE_ROOT"; }; CF51659EBB00003E6CB20B66 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RTAS_Wrapper.cpp"; path = "../../../../modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp"; sourceTree = "SOURCE_ROOT"; }; + D03583C1CA01284B5781955E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MidiKeyboardComponent.h"; path = "../../../../modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.h"; sourceTree = "SOURCE_ROOT"; }; + D06C2B85E02F13F9B57DB1A9 = {isa = PBXFileReference; lastKnownFileType = image.png; name = power.png; path = ../../Source/BinaryData/power.png; sourceTree = "SOURCE_ROOT"; }; + D0A4E2C5F2B21172DE13DE0C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_ios_Windowing.mm"; path = "../../../../modules/juce_gui_basics/native/juce_ios_Windowing.mm"; sourceTree = "SOURCE_ROOT"; }; + D1683E32F1EB634904CD7DE1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MidiDataConcatenator.h"; path = "../../../../modules/juce_audio_devices/native/juce_MidiDataConcatenator.h"; sourceTree = "SOURCE_ROOT"; }; + D515546E71BD92C742D67905 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioTransportSource.h"; path = "../../../../modules/juce_audio_devices/sources/juce_AudioTransportSource.h"; sourceTree = "SOURCE_ROOT"; }; + DAF78E342ACF24B5A83E0605 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + EC3DE1F504C76EEDDA7F2216 = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AUv3Synth.app; sourceTree = "BUILT_PRODUCTS_DIR"; }; + 9536B5A780A03F6BACB24144 = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAUv3Synth.a; sourceTree = "BUILT_PRODUCTS_DIR"; }; + C1E4A7F5418639D70CB51F0A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioFormatReader.h"; path = "../../../../modules/juce_audio_formats/format/juce_AudioFormatReader.h"; sourceTree = "SOURCE_ROOT"; }; + C61EEED69EE6C34E5C64B729 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "config_types.h"; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/config_types.h"; sourceTree = "SOURCE_ROOT"; }; + C63541C14D518046922DF60B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_IIRFilter.cpp"; path = "../../../../modules/juce_audio_basics/effects/juce_IIRFilter.cpp"; sourceTree = "SOURCE_ROOT"; }; + CB23F9E24266013856B53BBE = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CPlusPlusCodeTokeniser.h"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniser.h"; sourceTree = "SOURCE_ROOT"; }; + CBA22CAB6770979BCCD18EEA = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = framing.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/framing.c"; sourceTree = "SOURCE_ROOT"; }; + CC32EDCC4709790EBBA55941 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "psych_44.h"; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/modes/psych_44.h"; sourceTree = "SOURCE_ROOT"; }; + CDE81ADB14F09742FBBA28E6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FileTreeComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; + CE491063B3EF486A263519F5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "setup_X.h"; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/modes/setup_X.h"; sourceTree = "SOURCE_ROOT"; }; + CE517EF86B0776BA9B27F3F6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AUTimestampGenerator.h; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUTimestampGenerator.h"; sourceTree = "SOURCE_ROOT"; }; CF6FA9D2F39F03FE2858F11B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Direct2DGraphicsContext.cpp"; path = "../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp"; sourceTree = "SOURCE_ROOT"; }; CF7ECFB4AA9A00E103525840 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MemoryMappedFile.h"; path = "../../../../modules/juce_core/files/juce_MemoryMappedFile.h"; sourceTree = "SOURCE_ROOT"; }; CF9EEC4A087AA9010D5D21A5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioPluginFormat.h"; path = "../../../../modules/juce_audio_processors/format/juce_AudioPluginFormat.h"; sourceTree = "SOURCE_ROOT"; }; CFADD611F5F0D9EC5127C6C4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = trees.c; path = "../../../../modules/juce_core/zip/zlib/trees.c"; sourceTree = "SOURCE_ROOT"; }; + CFAF04B0DF40F2C81026ACD2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_VSTInterface.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_VSTInterface.h"; sourceTree = "SOURCE_ROOT"; }; CFAFC86F4D25AB5A31DF3BE5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Desktop.h"; path = "../../../../modules/juce_gui_basics/components/juce_Desktop.h"; sourceTree = "SOURCE_ROOT"; }; CFFC609186B1EE226ACEBD2D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Network.cpp"; path = "../../../../modules/juce_core/native/juce_win32_Network.cpp"; sourceTree = "SOURCE_ROOT"; }; - D03583C1CA01284B5781955E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MidiKeyboardComponent.h"; path = "../../../../modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.h"; sourceTree = "SOURCE_ROOT"; }; D0584D8F725E0D7E61F830F5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = deflate.c; path = "../../../../modules/juce_core/zip/zlib/deflate.c"; sourceTree = "SOURCE_ROOT"; }; - D06C2B85E02F13F9B57DB1A9 = {isa = PBXFileReference; lastKnownFileType = image.png; name = power.png; path = ../../Source/BinaryData/power.png; sourceTree = "SOURCE_ROOT"; }; - D0A4E2C5F2B21172DE13DE0C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_ios_Windowing.mm"; path = "../../../../modules/juce_gui_basics/native/juce_ios_Windowing.mm"; sourceTree = "SOURCE_ROOT"; }; D0ECDC7390CA390D69946652 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jcsample.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jcsample.c"; sourceTree = "SOURCE_ROOT"; }; - D1683E32F1EB634904CD7DE1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MidiDataConcatenator.h"; path = "../../../../modules/juce_audio_devices/native/juce_MidiDataConcatenator.h"; sourceTree = "SOURCE_ROOT"; }; D19E20CCCD4790B2347D5B80 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioSubsectionReader.cpp"; path = "../../../../modules/juce_audio_formats/format/juce_AudioSubsectionReader.cpp"; sourceTree = "SOURCE_ROOT"; }; D2436FFFE291F08409B1EEE2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Colours.cpp"; path = "../../../../modules/juce_graphics/colour/juce_Colours.cpp"; sourceTree = "SOURCE_ROOT"; }; D264387115074C98CF251072 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioFormatWriter.cpp"; path = "../../../../modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -1036,7 +1038,6 @@ D48932C6554B443ECB71DC87 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ResizableBorderComponent.h"; path = "../../../../modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h"; sourceTree = "SOURCE_ROOT"; }; D4A4555171F923D744B1FDF7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = pngstruct.h; path = "../../../../modules/juce_graphics/image_formats/pnglib/pngstruct.h"; sourceTree = "SOURCE_ROOT"; }; D4C0852C1C54EDA5D4F82EB1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ShapeButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_ShapeButton.h"; sourceTree = "SOURCE_ROOT"; }; - D515546E71BD92C742D67905 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioTransportSource.h"; path = "../../../../modules/juce_audio_devices/sources/juce_AudioTransportSource.h"; sourceTree = "SOURCE_ROOT"; }; D557AAD12557BF1706441B19 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_SliderPropertyComponent.cpp"; path = "../../../../modules/juce_gui_basics/properties/juce_SliderPropertyComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; D5797410CEE0E8D2E03D98F2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_mac_CoreGraphicsHelpers.h"; path = "../../../../modules/juce_graphics/native/juce_mac_CoreGraphicsHelpers.h"; sourceTree = "SOURCE_ROOT"; }; D57DF4F024A84881420586E8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = trees.h; path = "../../../../modules/juce_core/zip/zlib/trees.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1069,7 +1070,6 @@ DA4E0EA3EB80BE34F9047E72 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ComponentBuilder.h"; path = "../../../../modules/juce_gui_basics/layout/juce_ComponentBuilder.h"; sourceTree = "SOURCE_ROOT"; }; DACA6E5A3CE684EC649F31B7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Typeface.cpp"; path = "../../../../modules/juce_graphics/fonts/juce_Typeface.cpp"; sourceTree = "SOURCE_ROOT"; }; DAEE812EF95F96E7D65D875F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DrawableButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_DrawableButton.h"; sourceTree = "SOURCE_ROOT"; }; - DAF78E342ACF24B5A83E0605 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; DB216D8107F0BBBBD3F2B0E6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Thread.cpp"; path = "../../../../modules/juce_core/threads/juce_Thread.cpp"; sourceTree = "SOURCE_ROOT"; }; DB3A7C49C8444BD2F57B6689 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DrawableRectangle.h"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableRectangle.h"; sourceTree = "SOURCE_ROOT"; }; DB43ED26DBABD0BC17385E6E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Reverb.h"; path = "../../../../modules/juce_audio_basics/effects/juce_Reverb.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1103,6 +1103,7 @@ DFF6A93D460B71379FE3EAA2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MidiMessageCollector.cpp"; path = "../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp"; sourceTree = "SOURCE_ROOT"; }; E0260479B3C2CAF8477026FC = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioProcessorParameters.cpp"; path = "../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorParameters.cpp"; sourceTree = "SOURCE_ROOT"; }; E03AA585A375A39A9BFF3DD4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Component.cpp"; path = "../../../../modules/juce_gui_basics/components/juce_Component.cpp"; sourceTree = "SOURCE_ROOT"; }; + E04216439C3A2AD69B69B520 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioSampleBuffer.h"; path = "../../../../modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h"; sourceTree = "SOURCE_ROOT"; }; E0484E5F0994D64013F4EEA9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TextDragAndDropTarget.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h"; sourceTree = "SOURCE_ROOT"; }; E09404F45899AA1E82CFC21C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_TableListBox.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_TableListBox.cpp"; sourceTree = "SOURCE_ROOT"; }; E0B49BAB1C8D7341A6E142B7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jdct.h; path = "../../../../modules/juce_graphics/image_formats/jpglib/jdct.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1124,6 +1125,7 @@ E31219AD074DCBB8C6A9F816 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RelativeTime.cpp"; path = "../../../../modules/juce_core/time/juce_RelativeTime.cpp"; sourceTree = "SOURCE_ROOT"; }; E320A8161071D0D1B9261E2B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AlertWindow.h"; path = "../../../../modules/juce_gui_basics/windows/juce_AlertWindow.h"; sourceTree = "SOURCE_ROOT"; }; E32E43F0CC33ED95FD0A9DE2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_WindowsMediaAudioFormat.h"; path = "../../../../modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.h"; sourceTree = "SOURCE_ROOT"; }; + E40580FB3605FA6D5DA3FD73 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AUBaseHelper.h; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUBaseHelper.h"; sourceTree = "SOURCE_ROOT"; }; E433734FC5466D7E26FC11D8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DropShadower.cpp"; path = "../../../../modules/juce_gui_basics/misc/juce_DropShadower.cpp"; sourceTree = "SOURCE_ROOT"; }; E4CB12FDCA729EC8BD9E0845 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jdapimin.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jdapimin.c"; sourceTree = "SOURCE_ROOT"; }; E4D985BB229FC31731681790 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_PropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_PropertyComponent.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1140,19 +1142,16 @@ E755606E63BE2C5558FFB353 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_BluetoothMidiDevicePairingDialogue.cpp"; path = "../../../../modules/juce_audio_utils/native/juce_linux_BluetoothMidiDevicePairingDialogue.cpp"; sourceTree = "SOURCE_ROOT"; }; E795FC063102CA8BAB722C58 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SliderPropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_SliderPropertyComponent.h"; sourceTree = "SOURCE_ROOT"; }; E79A4F024D4890B61628C42C = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InputStream.h"; path = "../../../../modules/juce_core/streams/juce_InputStream.h"; sourceTree = "SOURCE_ROOT"; }; - E93BF1F2B52BF52EA12326A3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jdpostct.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jdpostct.c"; sourceTree = "SOURCE_ROOT"; }; - EA6D44AA3D1C9B0A5873DC4D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_data_structures.cpp"; path = "../../../../modules/juce_data_structures/juce_data_structures.cpp"; sourceTree = "SOURCE_ROOT"; }; - EC3DE1F504C76EEDDA7F2216 = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AUv3Synth.app; sourceTree = "BUILT_PRODUCTS_DIR"; }; - 9536B5A780A03F6BACB24144 = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAUv3Synth.a; sourceTree = "BUILT_PRODUCTS_DIR"; }; - E40580FB3605FA6D5DA3FD73 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AUBaseHelper.h; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUBaseHelper.h"; sourceTree = "SOURCE_ROOT"; }; E7E45873BE802DD8D676E9CD = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_GroupComponent.h"; path = "../../../../modules/juce_gui_basics/layout/juce_GroupComponent.h"; sourceTree = "SOURCE_ROOT"; }; E88DF76B88F3E67D0FB58CEB = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = floor0.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/floor0.c"; sourceTree = "SOURCE_ROOT"; }; E8EB40396974468FBD0EE15B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Path.cpp"; path = "../../../../modules/juce_graphics/geometry/juce_Path.cpp"; sourceTree = "SOURCE_ROOT"; }; + E93BF1F2B52BF52EA12326A3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jdpostct.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jdpostct.c"; sourceTree = "SOURCE_ROOT"; }; E9617DEC7E639354C2AF66A8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Value.cpp"; path = "../../../../modules/juce_data_structures/values/juce_Value.cpp"; sourceTree = "SOURCE_ROOT"; }; E9745B8F0DE747F94EAF65A4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_GlyphArrangement.cpp"; path = "../../../../modules/juce_graphics/fonts/juce_GlyphArrangement.cpp"; sourceTree = "SOURCE_ROOT"; }; E975A1A60F48EB781C00B9CE = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = infback.c; path = "../../../../modules/juce_core/zip/zlib/infback.c"; sourceTree = "SOURCE_ROOT"; }; E9C1C03509E00C37AAA45727 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_QuickTimeAudioFormat.cpp"; path = "../../../../modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.cpp"; sourceTree = "SOURCE_ROOT"; }; EA4345362FE80828317BB860 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Base64.cpp"; path = "../../../../modules/juce_core/text/juce_Base64.cpp"; sourceTree = "SOURCE_ROOT"; }; + EA6D44AA3D1C9B0A5873DC4D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_data_structures.cpp"; path = "../../../../modules/juce_data_structures/juce_data_structures.cpp"; sourceTree = "SOURCE_ROOT"; }; EA89A423564A332B875F040F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = misc.h; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/misc.h"; sourceTree = "SOURCE_ROOT"; }; EA8B1437F945AFED7BDF11DB = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_WindowsHooks.h"; path = "../../../../modules/juce_audio_plugin_client/utility/juce_WindowsHooks.h"; sourceTree = "SOURCE_ROOT"; }; EA92EA0E7F4D3859821CEB4A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CAAUParameter.h; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CAAUParameter.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1748,6 +1747,7 @@ 5F6BB197FA13DEB1F2260CC0, 387D55482BBDCBC351F2BECE, B774AC9A00BFF63E24EA0646, + CFAF04B0DF40F2C81026ACD2, 87FC5378F4B65DBD11E62015, E0FD3183237BAB53F14A4B92, 58461A95ADF95E35EE92161D, ); name = "format_types"; sourceTree = ""; }; @@ -2461,6 +2461,9 @@ F77C93B319FB7E23D69C8371, F7B8C6AA3AEF025B6BFE5678, 3CCBF30007C57491CF649D39, + B46C496B84C02A7F7D49B44F, + A512EE08FFC0B8B22E6408FC, + C5075702583930AA69562983, 0B842061D62F68F42428E33A, E7E45873BE802DD8D676E9CD, F511F1E8F0B3F64C850321F2, @@ -2732,7 +2735,6 @@ CF02DA80A8A515CE41B0C8F6, 63AFF514CAE6FB89A3503CEF, A8315F08B794D9C87328F17F, - 853D9A89FE96C6DD6730CEC7, D9ED0926381D40DA1A66C26D, 9965CB9ED8D2B26CACA9C44A, 58E254BD072595F6E3F6D5F5, @@ -2743,7 +2745,6 @@ E553E188A17BDF4E832F0A01, F138CA63A1127DA0DB69B127, ); name = "Juce Library Code"; sourceTree = ""; }; A727F6B063FCDB816462D213 = {isa = PBXGroup; children = ( - 6DA4597568FFE5B6D1F5B68A, F3498E82A2D4ACBED68A7F43, 6AFB9EB642850186B551DB33, 9A419F28D68BDEB200F29603, @@ -2761,7 +2762,6 @@ 29982493607128FD6DB6A284, 5EF6762AB1C5CE4C2DCD59ED, ); name = Frameworks; sourceTree = ""; }; E793574695108F202603BAA5 = {isa = PBXGroup; children = ( - F5E81FD99EFCB226D2486603, 746B19364297E7D489749B70, EC3DE1F504C76EEDDA7F2216, 9536B5A780A03F6BACB24144, ); name = Products; sourceTree = ""; }; @@ -2774,77 +2774,6 @@ E793574695108F202603BAA5, ); name = Source; sourceTree = ""; }; 7007C784A0219490DFD18C27 = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; 0ADE306E346FE4F925722F86 = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; - 653C6C73C56BA201AB6F094C = {isa = XCBuildConfiguration; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; - CLANG_LINK_OBJC_RUNTIME = NO; - CODE_SIGN_IDENTITY = ""; - COMBINE_HIDPI_IMAGES = YES; - CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; - COPY_PHASE_STRIP = NO; - DEPLOYMENT_LOCATION = YES; - DSTROOT = /; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "_DEBUG=1", - "DEBUG=1", - "JucePlugin_Build_VST=1", - "JucePlugin_Build_VST3=0", - "JucePlugin_Build_AU=0", - "JucePlugin_Build_AUv3=0", - "JucePlugin_Build_RTAS=0", - "JucePlugin_Build_AAX=0", - "JucePlugin_Build_Standalone=0", - "JUCER_XCODE_IPHONE_5BC26AE3=1", - "JUCE_APP_VERSION=1.0.0", - "JUCE_APP_VERSION_HEX=0x10000", ); - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GENERATE_PKGINFO_FILE = YES; - HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); - INFOPLIST_FILE = Info-VST.plist; - INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; - LIBRARY_STYLE = Bundle; - OTHER_LDFLAGS = "-bundle -lAUv3Synth"; - PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; - WRAPPER_EXTENSION = vst; }; name = Debug; }; - 19D80348287645B624E0C6B8 = {isa = XCBuildConfiguration; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; - CLANG_LINK_OBJC_RUNTIME = NO; - CODE_SIGN_IDENTITY = ""; - COMBINE_HIDPI_IMAGES = YES; - CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; - DEAD_CODE_STRIPPING = YES; - DEPLOYMENT_LOCATION = YES; - DSTROOT = /; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PREPROCESSOR_DEFINITIONS = ( - "_NDEBUG=1", - "NDEBUG=1", - "JucePlugin_Build_VST=1", - "JucePlugin_Build_VST3=0", - "JucePlugin_Build_AU=0", - "JucePlugin_Build_AUv3=0", - "JucePlugin_Build_RTAS=0", - "JucePlugin_Build_AAX=0", - "JucePlugin_Build_Standalone=0", - "JUCER_XCODE_IPHONE_5BC26AE3=1", - "JUCE_APP_VERSION=1.0.0", - "JUCE_APP_VERSION_HEX=0x10000", ); - GCC_SYMBOLS_PRIVATE_EXTERN = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GENERATE_PKGINFO_FILE = YES; - HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); - INFOPLIST_FILE = Info-VST.plist; - INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; - LIBRARY_STYLE = Bundle; - OTHER_LDFLAGS = "-bundle -lAUv3Synth"; - PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; - WRAPPER_EXTENSION = vst; }; name = Release; }; DC95EAEBECC74A55CADCD887 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; @@ -2870,7 +2799,7 @@ "JUCE_APP_VERSION=1.0.0", "JUCE_APP_VERSION_HEX=0x10000", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_AppExtension.plist; OTHER_LDFLAGS = "-lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth.AUv3SynthAUv3; }; name = Debug; }; @@ -2900,7 +2829,7 @@ "JUCE_APP_VERSION_HEX=0x10000", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_AppExtension.plist; OTHER_LDFLAGS = "-lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth.AUv3SynthAUv3; }; name = Release; }; @@ -2929,7 +2858,7 @@ "JUCE_APP_VERSION=1.0.0", "JUCE_APP_VERSION_HEX=0x10000", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_Standalone.plist; OTHER_LDFLAGS = "-lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; }; name = Debug; }; @@ -2959,7 +2888,7 @@ "JUCE_APP_VERSION_HEX=0x10000", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_Standalone.plist; OTHER_LDFLAGS = "-lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; }; name = Release; }; @@ -2978,7 +2907,7 @@ "_DEBUG=1", "DEBUG=1", "JUCE_SHARED_CODE=1", - "JucePlugin_Build_VST=1", + "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", "JucePlugin_Build_AUv3=1", @@ -2989,7 +2918,7 @@ "JUCE_APP_VERSION=1.0.0", "JUCE_APP_VERSION_HEX=0x10000", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INSTALL_PATH = "@executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; }; name = Debug; }; 5DA389BE0C844A1A9E20FD7C = {isa = XCBuildConfiguration; buildSettings = { @@ -3007,7 +2936,7 @@ "_NDEBUG=1", "NDEBUG=1", "JUCE_SHARED_CODE=1", - "JucePlugin_Build_VST=1", + "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", "JucePlugin_Build_AUv3=1", @@ -3019,7 +2948,7 @@ "JUCE_APP_VERSION_HEX=0x10000", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INSTALL_PATH = "@executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; }; name = Release; }; D32671708EF2662A51A6335A = {isa = XCBuildConfiguration; buildSettings = { @@ -3036,6 +2965,7 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "AUv3Synth"; SDKROOT = iphoneos; @@ -3055,12 +2985,12 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "AUv3Synth"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; WARNING_CFLAGS = -Wreorder; ZERO_LINK = NO; }; name = Release; }; - 811D9E9CC2221100847306C9 = {isa = PBXTargetDependency; target = 73F4C13CDCAC7EE5914F2E61; }; 8F5816EA1D519B78C3345C1B = {isa = PBXTargetDependency; target = 7A046597FDDDB82B78C64AAC; }; E06C8C12CD5FDD7FB372E602 = {isa = PBXTargetDependency; target = E600EF631F7AFA8F3A723E29; }; 017B214D817BF0DF53051BB2 = {isa = PBXTargetDependency; target = CD6892FED0DB19C0DDD9AD37; }; @@ -3071,35 +3001,9 @@ 7007C784A0219490DFD18C27, 0ADE306E346FE4F925722F86, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; EF49DCC88B5FC3C6E67ED2A4 = {isa = PBXAggregateTarget; buildConfigurationList = F550A01E8A9468C64A914B97; buildPhases = ( ); buildRules = ( ); dependencies = ( - 811D9E9CC2221100847306C9, 8F5816EA1D519B78C3345C1B, E06C8C12CD5FDD7FB372E602, 017B214D817BF0DF53051BB2, ); name = "AUv3Synth (All)"; productName = AUv3Synth; }; - 32113A068DE980F098C3A7FA = {isa = XCConfigurationList; buildConfigurations = ( - 653C6C73C56BA201AB6F094C, - 19D80348287645B624E0C6B8, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; - 2094EE2ED994CDD1B1C905BB = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6F585AC4628EC14C9F757022, - 78704983DFEA5408FC5767D8, ); runOnlyForDeploymentPostprocessing = 0; }; - 074C299F37078964C5476AC0 = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E94BB952CDD544FA3A0A4DBB, ); runOnlyForDeploymentPostprocessing = 0; }; - 88CA07DBC6CAFF5FF3E65E3E = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - FAD4DF17110D52B8ED8D9F93, - 737E06660F37BFFCABD89643, - D53302896621B8A3E8BDD606, - 669F51FA55E939D010EA279D, - EDC8ABA2EC0A2D7A2147E896, - 7DEC97493F97160DE6622DBC, - 1DF18B2507A574FBA9C49DE1, - 71F62F07CBC67FB4FB010583, - 6B818B8342839FB008124DEA, - F452B8399A32BE4F1074F596, - E4236DCEE707C3855C2E3B22, ); runOnlyForDeploymentPostprocessing = 0; }; - 73F4C13CDCAC7EE5914F2E61 = {isa = PBXNativeTarget; buildConfigurationList = 32113A068DE980F098C3A7FA; buildPhases = ( - 2094EE2ED994CDD1B1C905BB, - 074C299F37078964C5476AC0, - 88CA07DBC6CAFF5FF3E65E3E, ); buildRules = ( ); dependencies = ( - 017B214D817BF0DF53051BB2, ); name = "AUv3Synth (VST)"; productName = AUv3Synth; productReference = F5E81FD99EFCB226D2486603; productType = "com.apple.product-type.bundle"; }; 3A7896DB2C11717D9046CE5B = {isa = XCConfigurationList; buildConfigurations = ( DC95EAEBECC74A55CADCD887, 5FAC649347835B831BAE3C41, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; @@ -3175,7 +3079,7 @@ 4D9D92DD454BB03746241196, ); runOnlyForDeploymentPostprocessing = 0; }; CD6892FED0DB19C0DDD9AD37 = {isa = PBXNativeTarget; buildConfigurationList = AF907C78A0D17B741F5F8944; buildPhases = ( 1F4A8812AAE49E02F3215F48, ); buildRules = ( ); dependencies = ( ); name = "AUv3Synth (Shared Code)"; productName = AUv3Synth; productReference = 9536B5A780A03F6BACB24144; productType = "com.apple.product-type.library.static"; }; - D0E003364F0BE3205BD9243E = {isa = PBXProject; buildConfigurationList = 444EA74CE26BF416566E542C; attributes = { LastUpgradeCheck = 0440; TargetAttributes = { EF49DCC88B5FC3C6E67ED2A4 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };73F4C13CDCAC7EE5914F2E61 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };7A046597FDDDB82B78C64AAC = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.Sandbox = { enabled = 1; }; }; };E600EF631F7AFA8F3A723E29 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };CD6892FED0DB19C0DDD9AD37 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 4BFA153CE4E8A774C67EC642; projectDirPath = ""; projectRoot = ""; targets = (EF49DCC88B5FC3C6E67ED2A4, 73F4C13CDCAC7EE5914F2E61, 7A046597FDDDB82B78C64AAC, E600EF631F7AFA8F3A723E29, CD6892FED0DB19C0DDD9AD37); }; + D0E003364F0BE3205BD9243E = {isa = PBXProject; buildConfigurationList = 444EA74CE26BF416566E542C; attributes = { LastUpgradeCheck = 0440; TargetAttributes = { EF49DCC88B5FC3C6E67ED2A4 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };7A046597FDDDB82B78C64AAC = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.Sandbox = { enabled = 1; }; }; };E600EF631F7AFA8F3A723E29 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };CD6892FED0DB19C0DDD9AD37 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 4BFA153CE4E8A774C67EC642; projectDirPath = ""; projectRoot = ""; targets = (EF49DCC88B5FC3C6E67ED2A4, 7A046597FDDDB82B78C64AAC, E600EF631F7AFA8F3A723E29, CD6892FED0DB19C0DDD9AD37); }; }; rootObject = D0E003364F0BE3205BD9243E; } diff --git a/examples/AUv3Synth/JuceLibraryCode/AppConfig.h b/examples/AUv3Synth/JuceLibraryCode/AppConfig.h index 303210b6..554b0416 100644 --- a/examples/AUv3Synth/JuceLibraryCode/AppConfig.h +++ b/examples/AUv3Synth/JuceLibraryCode/AppConfig.h @@ -157,6 +157,14 @@ //#define JUCE_USE_CURL #endif +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES +#endif + //============================================================================== // juce_graphics flags: diff --git a/examples/AnimationAppExample/AnimationAppExample.jucer b/examples/AnimationAppExample/AnimationAppExample.jucer index c28861d3..b5377d73 100644 --- a/examples/AnimationAppExample/AnimationAppExample.jucer +++ b/examples/AnimationAppExample/AnimationAppExample.jucer @@ -2,7 +2,7 @@ + jucerVersion="4.2.4"> true + + true + true @@ -1819,6 +1822,7 @@ + @@ -2125,6 +2129,8 @@ + + diff --git a/examples/AnimationAppExample/Builds/VisualStudio2010/AnimationAppExample.vcxproj.filters b/examples/AnimationAppExample/Builds/VisualStudio2010/AnimationAppExample.vcxproj.filters index 353e89ca..de3feda3 100644 --- a/examples/AnimationAppExample/Builds/VisualStudio2010/AnimationAppExample.vcxproj.filters +++ b/examples/AnimationAppExample/Builds/VisualStudio2010/AnimationAppExample.vcxproj.filters @@ -1609,6 +1609,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2511,6 +2514,9 @@ Juce Modules\juce_audio_processors\format_types + + Juce Modules\juce_audio_processors\format_types + Juce Modules\juce_audio_processors\format_types @@ -3429,6 +3435,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/examples/AnimationAppExample/Builds/iOS/AnimationAppExample.xcodeproj/project.pbxproj b/examples/AnimationAppExample/Builds/iOS/AnimationAppExample.xcodeproj/project.pbxproj index 5b7f42ef..17a6fcaf 100644 --- a/examples/AnimationAppExample/Builds/iOS/AnimationAppExample.xcodeproj/project.pbxproj +++ b/examples/AnimationAppExample/Builds/iOS/AnimationAppExample.xcodeproj/project.pbxproj @@ -170,6 +170,7 @@ 2254F8D031DD15BDB278DE3E = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RecentlyOpenedFilesList.cpp"; path = "../../../../modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp"; sourceTree = "SOURCE_ROOT"; }; 22C4F82B505995F81CD682B5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Identifier.h"; path = "../../../../modules/juce_core/text/juce_Identifier.h"; sourceTree = "SOURCE_ROOT"; }; 22F62D0B5A88067C39036648 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = crc32.c; path = "../../../../modules/juce_core/zip/zlib/crc32.c"; sourceTree = "SOURCE_ROOT"; }; + 231ACACE9E864E20DA50E3BB = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FlexBox.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.cpp"; sourceTree = "SOURCE_ROOT"; }; 2328C66A446079EDDCC8B14E = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LiveConstantEditor.cpp"; path = "../../../../modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp"; sourceTree = "SOURCE_ROOT"; }; 234D4927B398ED6E9B7B0E6B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileLogger.h"; path = "../../../../modules/juce_core/logging/juce_FileLogger.h"; sourceTree = "SOURCE_ROOT"; }; 236A887259131B8CF3BFAA4D = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jdhuff.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jdhuff.c"; sourceTree = "SOURCE_ROOT"; }; @@ -470,6 +471,7 @@ 63EE49826BF4CFBD9D546DAC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ImageEffectFilter.h"; path = "../../../../modules/juce_graphics/effects/juce_ImageEffectFilter.h"; sourceTree = "SOURCE_ROOT"; }; 6421EA349C5D558114D36717 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InputSource.h"; path = "../../../../modules/juce_core/streams/juce_InputSource.h"; sourceTree = "SOURCE_ROOT"; }; 64807B3EFFBDC3348512901E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LowLevelGraphicsPostScriptRenderer.h"; path = "../../../../modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.h"; sourceTree = "SOURCE_ROOT"; }; + 659AE4B65FC0E64C2AB91AB1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexBox.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.h"; sourceTree = "SOURCE_ROOT"; }; 65DF385E92A4A65760DC3BD0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Slider.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_Slider.h"; sourceTree = "SOURCE_ROOT"; }; 66897EA1FD2CDFB4CED47F8B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RSAKey.h"; path = "../../../../modules/juce_cryptography/encryption/juce_RSAKey.h"; sourceTree = "SOURCE_ROOT"; }; 66B37CB373F19F65553466C3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_mac_CarbonViewWrapperComponent.h"; path = "../../../../modules/juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h"; sourceTree = "SOURCE_ROOT"; }; @@ -753,6 +755,7 @@ A3F10D6226F279E9195F2CB2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jdatasrc.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jdatasrc.c"; sourceTree = "SOURCE_ROOT"; }; A415044DB2E87AAB1BB9BEF2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = all.h; path = "../../../../modules/juce_audio_formats/codecs/flac/all.h"; sourceTree = "SOURCE_ROOT"; }; A42A97232CE0593D8D989FC1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CharacterFunctions.h"; path = "../../../../modules/juce_core/text/juce_CharacterFunctions.h"; sourceTree = "SOURCE_ROOT"; }; + A4DF895426B87D58C9446FAB = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexItem.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexItem.h"; sourceTree = "SOURCE_ROOT"; }; A4F394FB62E70E3A3A02E4C7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_NamedPipe.cpp"; path = "../../../../modules/juce_core/network/juce_NamedPipe.cpp"; sourceTree = "SOURCE_ROOT"; }; A50AF1519D78428A8DCD91BF = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioUnitPluginFormat.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h"; sourceTree = "SOURCE_ROOT"; }; A52B29340D8E551C2F6FBC43 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = pngtrans.c; path = "../../../../modules/juce_graphics/image_formats/pnglib/pngtrans.c"; sourceTree = "SOURCE_ROOT"; }; @@ -987,6 +990,7 @@ D64B71F992FF01CB0EE89641 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Decibels.h"; path = "../../../../modules/juce_audio_basics/effects/juce_Decibels.h"; sourceTree = "SOURCE_ROOT"; }; D6D37626671B0FB1CE8505C9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_URL.cpp"; path = "../../../../modules/juce_core/network/juce_URL.cpp"; sourceTree = "SOURCE_ROOT"; }; D6ECAF8B2A4E8B6C97B89FFE = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CharPointer_UTF32.h"; path = "../../../../modules/juce_core/text/juce_CharPointer_UTF32.h"; sourceTree = "SOURCE_ROOT"; }; + D71A9A6C9DF92980ADD5DF79 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_VSTInterface.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_VSTInterface.h"; sourceTree = "SOURCE_ROOT"; }; D74DEEE99CFE7B2FFD474A5F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = bitreader.h; path = "../../../../modules/juce_audio_formats/codecs/flac/libFLAC/include/private/bitreader.h"; sourceTree = "SOURCE_ROOT"; }; D763221FDA235D75039D4C46 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_AudioCDReader.cpp"; path = "../../../../modules/juce_audio_devices/native/juce_win32_AudioCDReader.cpp"; sourceTree = "SOURCE_ROOT"; }; D77B700B6C68C6055C26376E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jmemsys.h; path = "../../../../modules/juce_graphics/image_formats/jpglib/jmemsys.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1539,6 +1543,7 @@ 2B02634F8DA8660ED42B0AEF, F79ADEBA7B305354085FFB8D, 66E854431C2BBDEE56EA43C8, + D71A9A6C9DF92980ADD5DF79, 0F67C59CB48583941B8656EF, BB144FF841A99B08D5479777, E652F16998FA1CBF2068C6FC, ); name = "format_types"; sourceTree = ""; }; @@ -2241,6 +2246,9 @@ 7F171BE6BFAA1E3E2A9BED61, C8F82FBA1E0EF7EEA5BD02B9, BCFE159BD9F2DA5515E028A4, + 231ACACE9E864E20DA50E3BB, + 659AE4B65FC0E64C2AB91AB1, + A4DF895426B87D58C9446FAB, 4C40BFAE1E25F166EBB5EC48, 25E6B62A5BF19A0D1E085E10, 684E11B1CE018B2C46938D80, @@ -2663,6 +2671,7 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "AnimationAppExample"; SDKROOT = iphoneos; @@ -2682,6 +2691,7 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "AnimationAppExample"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/examples/AnimationAppExample/JuceLibraryCode/AppConfig.h b/examples/AnimationAppExample/JuceLibraryCode/AppConfig.h index 7702cb64..e5b209a0 100644 --- a/examples/AnimationAppExample/JuceLibraryCode/AppConfig.h +++ b/examples/AnimationAppExample/JuceLibraryCode/AppConfig.h @@ -151,6 +151,14 @@ //#define JUCE_USE_CURL #endif +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES +#endif + //============================================================================== // juce_graphics flags: diff --git a/examples/AudioAppExample/AudioAppExample.jucer b/examples/AudioAppExample/AudioAppExample.jucer index 56b5de6b..7e723373 100644 --- a/examples/AudioAppExample/AudioAppExample.jucer +++ b/examples/AudioAppExample/AudioAppExample.jucer @@ -2,7 +2,7 @@ + jucerVersion="4.2.4"> true + + true + true @@ -1853,6 +1856,7 @@ + @@ -2170,6 +2174,8 @@ + + diff --git a/examples/AudioAppExample/Builds/VisualStudio2010/AudioAppExample.vcxproj.filters b/examples/AudioAppExample/Builds/VisualStudio2010/AudioAppExample.vcxproj.filters index 798d7b22..b49d8782 100644 --- a/examples/AudioAppExample/Builds/VisualStudio2010/AudioAppExample.vcxproj.filters +++ b/examples/AudioAppExample/Builds/VisualStudio2010/AudioAppExample.vcxproj.filters @@ -1663,6 +1663,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2568,6 +2571,9 @@ Juce Modules\juce_audio_processors\format_types + + Juce Modules\juce_audio_processors\format_types + Juce Modules\juce_audio_processors\format_types @@ -3519,6 +3525,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/examples/AudioAppExample/Builds/iOS/AudioAppExample.xcodeproj/project.pbxproj b/examples/AudioAppExample/Builds/iOS/AudioAppExample.xcodeproj/project.pbxproj index aa568e4b..ff638145 100644 --- a/examples/AudioAppExample/Builds/iOS/AudioAppExample.xcodeproj/project.pbxproj +++ b/examples/AudioAppExample/Builds/iOS/AudioAppExample.xcodeproj/project.pbxproj @@ -107,6 +107,7 @@ 0F7E54460D000A212BA37807 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MidiInput.h"; path = "../../../../modules/juce_audio_devices/midi_io/juce_MidiInput.h"; sourceTree = "SOURCE_ROOT"; }; 0FB03F29666B9E3588BCA21A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MidiFile.h"; path = "../../../../modules/juce_audio_basics/midi/juce_MidiFile.h"; sourceTree = "SOURCE_ROOT"; }; 0FEA2018033238F713A9933D = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_NamedPipe.h"; path = "../../../../modules/juce_core/network/juce_NamedPipe.h"; sourceTree = "SOURCE_ROOT"; }; + 0FF93A75818FDCB138CEB446 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FlexBox.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.cpp"; sourceTree = "SOURCE_ROOT"; }; 1062CD8BD738A5F58CC3F64D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_gui_extra.mm"; path = "../../JuceLibraryCode/juce_gui_extra.mm"; sourceTree = "SOURCE_ROOT"; }; 10CCA4154B34E2601DF7E36C = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_XmlDocument.h"; path = "../../../../modules/juce_core/xml/juce_XmlDocument.h"; sourceTree = "SOURCE_ROOT"; }; 10D6995E32D2195B83AB6625 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ordinals.h; path = "../../../../modules/juce_audio_formats/codecs/flac/ordinals.h"; sourceTree = "SOURCE_ROOT"; }; @@ -657,6 +658,7 @@ 88AA420D1FEF4EB95D8166FB = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_NSViewComponent.h"; path = "../../../../modules/juce_gui_extra/embedding/juce_NSViewComponent.h"; sourceTree = "SOURCE_ROOT"; }; 88F756FE30BD5DEA47C1725D = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AttributedString.h"; path = "../../../../modules/juce_graphics/fonts/juce_AttributedString.h"; sourceTree = "SOURCE_ROOT"; }; 89163E9DB0626DF42D686130 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MessageListener.h"; path = "../../../../modules/juce_events/messages/juce_MessageListener.h"; sourceTree = "SOURCE_ROOT"; }; + 8929A0522417804FA7FBDA07 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexBox.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.h"; sourceTree = "SOURCE_ROOT"; }; 8930689A13E07781BE58FA24 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Slider.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_Slider.cpp"; sourceTree = "SOURCE_ROOT"; }; 898B5EF2CF5B2303DE59B07A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_CPlusPlusCodeTokeniser.cpp"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniser.cpp"; sourceTree = "SOURCE_ROOT"; }; 89C90F8B0901C465E356C6C8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileTreeComponent.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1003,6 +1005,7 @@ CF6E0A89DA49E7D810CF49A7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jdapistd.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jdapistd.c"; sourceTree = "SOURCE_ROOT"; }; CF6F99867E4ECCD2A2ED0B0C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Base64.cpp"; path = "../../../../modules/juce_core/text/juce_Base64.cpp"; sourceTree = "SOURCE_ROOT"; }; CF746C34F8DB1B073F1A4FA0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TableHeaderComponent.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h"; sourceTree = "SOURCE_ROOT"; }; + CFAF960433F3BAD659D67305 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexItem.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexItem.h"; sourceTree = "SOURCE_ROOT"; }; D000979AF77A84718877BD31 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MPEValue.cpp"; path = "../../../../modules/juce_audio_basics/mpe/juce_MPEValue.cpp"; sourceTree = "SOURCE_ROOT"; }; D045327CC8A3E0C370070496 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChannelRemappingAudioSource.h"; path = "../../../../modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h"; sourceTree = "SOURCE_ROOT"; }; D058B5E13E7E22FC4ED27B5C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ValueTreeSynchroniser.cpp"; path = "../../../../modules/juce_data_structures/values/juce_ValueTreeSynchroniser.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -1087,6 +1090,7 @@ DE350A7B7F148EDE3EB542DC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = mdct.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/mdct.c"; sourceTree = "SOURCE_ROOT"; }; DE6FBEE731028F230A86F223 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_gui_basics.mm"; path = "../../../../modules/juce_gui_basics/juce_gui_basics.mm"; sourceTree = "SOURCE_ROOT"; }; DE90A7AD96CDF9332CA4B1CB = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_WebBrowserComponent.cpp"; path = "../../../../modules/juce_gui_extra/native/juce_linux_WebBrowserComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; + DEB4C3647DCB3A2D1DDDEEF1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_VSTInterface.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_VSTInterface.h"; sourceTree = "SOURCE_ROOT"; }; DF0EBC428D40282CD24D2015 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RelativePointPath.cpp"; path = "../../../../modules/juce_gui_basics/positioning/juce_RelativePointPath.cpp"; sourceTree = "SOURCE_ROOT"; }; DF4992745F5A01164C573D1B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioProcessorParameterWithID.h"; path = "../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h"; sourceTree = "SOURCE_ROOT"; }; DF8AC8795BBD9CC5918F5969 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_WebBrowserComponent.mm"; path = "../../../../modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm"; sourceTree = "SOURCE_ROOT"; }; @@ -1567,6 +1571,7 @@ 6C32FCD6B87189C1F43BD462, DB6C3F30A7B477AA3A695B2D, 6D869E6ED7DF080A9FAF162C, + DEB4C3647DCB3A2D1DDDEEF1, 6C4F8F17F78FE9C8B45941D3, DD7C6F9CAF5CBA11B6024A83, 5374AB638100ED67F198E888, ); name = "format_types"; sourceTree = ""; }; @@ -2301,6 +2306,9 @@ A6E737E1560A81E5A45DD9BC, 948076D06B104682079290E5, 705D210EADDE876947060561, + 0FF93A75818FDCB138CEB446, + 8929A0522417804FA7FBDA07, + CFAF960433F3BAD659D67305, 4DC09FE2D606F3346B269F47, E03B0CE2DF954597EDE01376, 64E7DC1B23F237CD9F141439, @@ -2726,6 +2734,7 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "AudioAppExample"; SDKROOT = iphoneos; @@ -2745,6 +2754,7 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "AudioAppExample"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/examples/AudioAppExample/JuceLibraryCode/AppConfig.h b/examples/AudioAppExample/JuceLibraryCode/AppConfig.h index c32dfe4b..58382029 100644 --- a/examples/AudioAppExample/JuceLibraryCode/AppConfig.h +++ b/examples/AudioAppExample/JuceLibraryCode/AppConfig.h @@ -152,6 +152,14 @@ //#define JUCE_USE_CURL #endif +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES +#endif + //============================================================================== // juce_graphics flags: diff --git a/examples/BouncingBallWavetableDemo/BouncingBallWavetableDemo.jucer b/examples/BouncingBallWavetableDemo/BouncingBallWavetableDemo.jucer index 920c8435..54c1fbfa 100644 --- a/examples/BouncingBallWavetableDemo/BouncingBallWavetableDemo.jucer +++ b/examples/BouncingBallWavetableDemo/BouncingBallWavetableDemo.jucer @@ -2,7 +2,7 @@ + includeBinaryInAppConfig="1" jucerVersion="4.2.4"> /dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } + @pkg-config --print-errors alsa freetype2 libcurl x11 xext xinerama + clean: @echo Cleaning BouncingBallWavetableDemo @$(CLEANCMD) strip: @echo Stripping BouncingBallWavetableDemo - -@strip --strip-unneeded $(OUTDIR)/$(TARGET) + -@$(STRIP) --strip-unneeded $(JUCE_OUTDIR)/$(TARGET) -$(OBJDIR)/MainComponent_a6ffb4a5.o: ../../Source/MainComponent.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/MainComponent_a6ffb4a5.o: ../../Source/MainComponent.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling MainComponent.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling Main.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_basics_6b797ca1.o: ../../JuceLibraryCode/juce_audio_basics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_basics_6b797ca1.o: ../../JuceLibraryCode/juce_audio_basics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_basics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_devices_a742c38b.o: ../../JuceLibraryCode/juce_audio_devices.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_devices_a742c38b.o: ../../JuceLibraryCode/juce_audio_devices.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_devices.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_formats_5a29c68a.o: ../../JuceLibraryCode/juce_audio_formats.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_formats_5a29c68a.o: ../../JuceLibraryCode/juce_audio_formats.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_formats.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_processors_dea3173d.o: ../../JuceLibraryCode/juce_audio_processors.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_processors_dea3173d.o: ../../JuceLibraryCode/juce_audio_processors.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_processors.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_utils_c7eb679f.o: ../../JuceLibraryCode/juce_audio_utils.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_utils_c7eb679f.o: ../../JuceLibraryCode/juce_audio_utils.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_utils.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_core.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_cryptography_6de2ebff.o: ../../JuceLibraryCode/juce_cryptography.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_cryptography_6de2ebff.o: ../../JuceLibraryCode/juce_cryptography.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_cryptography.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_data_structures_72d3da2c.o: ../../JuceLibraryCode/juce_data_structures.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_data_structures_72d3da2c.o: ../../JuceLibraryCode/juce_data_structures.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_data_structures.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_events_d2be882c.o: ../../JuceLibraryCode/juce_events.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_events_d2be882c.o: ../../JuceLibraryCode/juce_events.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_events.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_graphics_9c18891e.o: ../../JuceLibraryCode/juce_graphics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_graphics_9c18891e.o: ../../JuceLibraryCode/juce_graphics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_graphics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_gui_basics_8a6da59c.o: ../../JuceLibraryCode/juce_gui_basics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_gui_basics_8a6da59c.o: ../../JuceLibraryCode/juce_gui_basics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_gui_basics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_gui_extra_4a026f23.o: ../../JuceLibraryCode/juce_gui_extra.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_gui_extra_4a026f23.o: ../../JuceLibraryCode/juce_gui_extra.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_gui_extra.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_video_f128c512.o: ../../JuceLibraryCode/juce_video.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_video_f128c512.o: ../../JuceLibraryCode/juce_video.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_video.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -include $(OBJECTS:%.o=%.d) diff --git a/examples/BouncingBallWavetableDemo/Builds/MacOSX/BouncingBallWavetableDemo.xcodeproj/project.pbxproj b/examples/BouncingBallWavetableDemo/Builds/MacOSX/BouncingBallWavetableDemo.xcodeproj/project.pbxproj index 05fbf0af..766a83b9 100644 --- a/examples/BouncingBallWavetableDemo/Builds/MacOSX/BouncingBallWavetableDemo.xcodeproj/project.pbxproj +++ b/examples/BouncingBallWavetableDemo/Builds/MacOSX/BouncingBallWavetableDemo.xcodeproj/project.pbxproj @@ -160,6 +160,7 @@ 18BAB9D332D2D82B5D1B92D9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_audio_processors.cpp"; path = "../../../../modules/juce_audio_processors/juce_audio_processors.cpp"; sourceTree = "SOURCE_ROOT"; }; 18C3F29BDA22ABA91C0A3941 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MPESynthesiserBase.h"; path = "../../../../modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h"; sourceTree = "SOURCE_ROOT"; }; 190658AD9646E057B7580A2E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ScopedReadLock.h"; path = "../../../../modules/juce_core/threads/juce_ScopedReadLock.h"; sourceTree = "SOURCE_ROOT"; }; + 194648E04CC4B30A9E4FFFAA = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexItem.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexItem.h"; sourceTree = "SOURCE_ROOT"; }; 19703DEDD564FBE9B631A5E1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_AudioUnitPluginFormat.mm"; path = "../../../../modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm"; sourceTree = "SOURCE_ROOT"; }; 198B99DB8626E20F46FFDEA8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioParameterChoice.h"; path = "../../../../modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h"; sourceTree = "SOURCE_ROOT"; }; 198CF6CF4F89D4581214D2C5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_audio_utils.h"; path = "../../../../modules/juce_audio_utils/juce_audio_utils.h"; sourceTree = "SOURCE_ROOT"; }; @@ -362,6 +363,7 @@ 4994A4DDCA255CE5CC96BE85 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "psych_11.h"; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/modes/psych_11.h"; sourceTree = "SOURCE_ROOT"; }; 49D0126A6EDA00279B784EB4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ComponentMovementWatcher.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.cpp"; sourceTree = "SOURCE_ROOT"; }; 4A310AACD6A634DF5E9EB991 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ColourSelector.h"; path = "../../../../modules/juce_gui_extra/misc/juce_ColourSelector.h"; sourceTree = "SOURCE_ROOT"; }; + 4A4295D6898765B22FED690E = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FlexBox.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.cpp"; sourceTree = "SOURCE_ROOT"; }; 4A710F2F7A5F24CCEEFD202F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_ASIO.cpp"; path = "../../../../modules/juce_audio_devices/native/juce_win32_ASIO.cpp"; sourceTree = "SOURCE_ROOT"; }; 4AAB1224C8A731A6994D74CE = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WavetableBouncingEditor.app; sourceTree = "BUILT_PRODUCTS_DIR"; }; 4B09A2E2E9F9550B7FCC5FAC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioVisualiserComponent.h"; path = "../../../../modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.h"; sourceTree = "SOURCE_ROOT"; }; @@ -413,6 +415,7 @@ 56461DE91A3E0D528F854707 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ConcertinaPanel.h"; path = "../../../../modules/juce_gui_basics/layout/juce_ConcertinaPanel.h"; sourceTree = "SOURCE_ROOT"; }; 56B03FD7B52504D3B1929907 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_data_structures.h"; path = "../../../../modules/juce_data_structures/juce_data_structures.h"; sourceTree = "SOURCE_ROOT"; }; 56B0CFDCC3922B395292E892 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TextPropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_TextPropertyComponent.h"; sourceTree = "SOURCE_ROOT"; }; + 576DA902DC355B135944F652 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_VSTInterface.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_VSTInterface.h"; sourceTree = "SOURCE_ROOT"; }; 579BC84225D2FB307131F0DD = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioPluginFormatManager.h"; path = "../../../../modules/juce_audio_processors/format/juce_AudioPluginFormatManager.h"; sourceTree = "SOURCE_ROOT"; }; 57B39EABC6E4CF0B9942D379 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DragAndDropTarget.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_DragAndDropTarget.h"; sourceTree = "SOURCE_ROOT"; }; 57E0AAF3F3AD2D086CCC1083 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_BluetoothMidiDevicePairingDialogue.mm"; path = "../../../../modules/juce_audio_utils/native/juce_mac_BluetoothMidiDevicePairingDialogue.mm"; sourceTree = "SOURCE_ROOT"; }; @@ -726,6 +729,7 @@ 9DA02B1D7924511E16841B4B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = uncompr.c; path = "../../../../modules/juce_core/zip/zlib/uncompr.c"; sourceTree = "SOURCE_ROOT"; }; 9DCBCC54540E38F4383E2FB7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_XmlDocument.cpp"; path = "../../../../modules/juce_core/xml/juce_XmlDocument.cpp"; sourceTree = "SOURCE_ROOT"; }; 9DEE6DEB6F0333175EACF2B5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TextButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_TextButton.h"; sourceTree = "SOURCE_ROOT"; }; + 9DFD34E9526B4AF313FAD3B7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexBox.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.h"; sourceTree = "SOURCE_ROOT"; }; 9E2630C8E13FF54922CE148D = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioIODevice.h"; path = "../../../../modules/juce_audio_devices/audio_io/juce_AudioIODevice.h"; sourceTree = "SOURCE_ROOT"; }; 9EEBF7D23F2D1821FD8B1FF3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ResizableEdgeComponent.h"; path = "../../../../modules/juce_gui_basics/layout/juce_ResizableEdgeComponent.h"; sourceTree = "SOURCE_ROOT"; }; 9F41B18DB0A2FF5EF084AED6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = inflate.c; path = "../../../../modules/juce_core/zip/zlib/inflate.c"; sourceTree = "SOURCE_ROOT"; }; @@ -1532,6 +1536,7 @@ 1A7D831E49C2BA0CC0CA5128, DBC0E281A2E05DE8E668CBB4, 5E312C939C9B9E5E37639A79, + 576DA902DC355B135944F652, 23AC41EA2ECCA1BED10D7E07, 8427B4F238DA7953130272B2, ED576238B8B1D81ED56B99A5, ); name = "format_types"; sourceTree = ""; }; @@ -2266,6 +2271,9 @@ 227EFECB84E4E33FD7ABE586, BF9675E73814F809F94D4865, 56461DE91A3E0D528F854707, + 4A4295D6898765B22FED690E, + 9DFD34E9526B4AF313FAD3B7, + 194648E04CC4B30A9E4FFFAA, 4F136C53A5974E59BD7E8D87, 8AE8FB07A821DAF2B447B211, 09887E936A885C1240AE5218, @@ -2607,6 +2615,7 @@ HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; PRODUCT_BUNDLE_IDENTIFIER = com.juce.BouncingBallWavetableDemo; SDKROOT_ppc = macosx10.5; }; name = Debug; }; @@ -2629,6 +2638,7 @@ HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; PRODUCT_BUNDLE_IDENTIFIER = com.juce.BouncingBallWavetableDemo; SDKROOT_ppc = macosx10.5; }; name = Release; }; diff --git a/examples/BouncingBallWavetableDemo/Builds/VisualStudio2013/BouncingBallWavetableDemo.vcxproj b/examples/BouncingBallWavetableDemo/Builds/VisualStudio2013/BouncingBallWavetableDemo.vcxproj index 000ce2ab..921d5215 100644 --- a/examples/BouncingBallWavetableDemo/Builds/VisualStudio2013/BouncingBallWavetableDemo.vcxproj +++ b/examples/BouncingBallWavetableDemo/Builds/VisualStudio2013/BouncingBallWavetableDemo.vcxproj @@ -1349,6 +1349,9 @@ true + + true + true @@ -1828,6 +1831,7 @@ + @@ -2145,6 +2149,8 @@ + + diff --git a/examples/BouncingBallWavetableDemo/Builds/VisualStudio2013/BouncingBallWavetableDemo.vcxproj.filters b/examples/BouncingBallWavetableDemo/Builds/VisualStudio2013/BouncingBallWavetableDemo.vcxproj.filters index 7ab11ab1..eb7bb381 100644 --- a/examples/BouncingBallWavetableDemo/Builds/VisualStudio2013/BouncingBallWavetableDemo.vcxproj.filters +++ b/examples/BouncingBallWavetableDemo/Builds/VisualStudio2013/BouncingBallWavetableDemo.vcxproj.filters @@ -1648,6 +1648,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2517,6 +2520,9 @@ Juce Modules\juce_audio_processors\format_types + + Juce Modules\juce_audio_processors\format_types + Juce Modules\juce_audio_processors\format_types @@ -3468,6 +3474,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/examples/BouncingBallWavetableDemo/JuceLibraryCode/AppConfig.h b/examples/BouncingBallWavetableDemo/JuceLibraryCode/AppConfig.h index 4c9d7608..052b7d1c 100644 --- a/examples/BouncingBallWavetableDemo/JuceLibraryCode/AppConfig.h +++ b/examples/BouncingBallWavetableDemo/JuceLibraryCode/AppConfig.h @@ -151,6 +151,14 @@ //#define JUCE_USE_CURL #endif +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES +#endif + //============================================================================== // juce_graphics flags: diff --git a/examples/ComponentTutorialExample/Builds/MacOSX/ComponentTutorialExample.xcodeproj/project.pbxproj b/examples/ComponentTutorialExample/Builds/MacOSX/ComponentTutorialExample.xcodeproj/project.pbxproj index c90bb9a8..8b335694 100644 --- a/examples/ComponentTutorialExample/Builds/MacOSX/ComponentTutorialExample.xcodeproj/project.pbxproj +++ b/examples/ComponentTutorialExample/Builds/MacOSX/ComponentTutorialExample.xcodeproj/project.pbxproj @@ -287,6 +287,7 @@ 55DFA734C7AEB7AD1FA75ACB = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ActiveXControlComponent.h"; path = "../../../../modules/juce_gui_extra/embedding/juce_ActiveXControlComponent.h"; sourceTree = "SOURCE_ROOT"; }; 560EF8EDA00C258C5EEE0FE3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_Windowing.cpp"; path = "../../../../modules/juce_gui_basics/native/juce_android_Windowing.cpp"; sourceTree = "SOURCE_ROOT"; }; 561B5014ECB87D691306A4CC = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_TimeSliceThread.cpp"; path = "../../../../modules/juce_core/threads/juce_TimeSliceThread.cpp"; sourceTree = "SOURCE_ROOT"; }; + 5637BF8D4486B0BD2D41A541 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FlexBox.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.cpp"; sourceTree = "SOURCE_ROOT"; }; 56766C06F131481224707D00 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CharacterFunctions.h"; path = "../../../../modules/juce_core/text/juce_CharacterFunctions.h"; sourceTree = "SOURCE_ROOT"; }; 578192335A99BEBF7C29D9D3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_DragAndDrop.cpp"; path = "../../../../modules/juce_gui_basics/native/juce_win32_DragAndDrop.cpp"; sourceTree = "SOURCE_ROOT"; }; 57A83B990FD49529356D225B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ThreadLocalValue.h"; path = "../../../../modules/juce_core/threads/juce_ThreadLocalValue.h"; sourceTree = "SOURCE_ROOT"; }; @@ -468,6 +469,7 @@ 89F1E29F501319BF488ECF28 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_StringArray.h"; path = "../../../../modules/juce_core/text/juce_StringArray.h"; sourceTree = "SOURCE_ROOT"; }; 8A84AC4483BBADF6A7A004B8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_CaretComponent.cpp"; path = "../../../../modules/juce_gui_basics/keyboard/juce_CaretComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; 8A8C19C2ED45616FAC78EB78 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ReadWriteLock.cpp"; path = "../../../../modules/juce_core/threads/juce_ReadWriteLock.cpp"; sourceTree = "SOURCE_ROOT"; }; + 8ACF65923A3E4AB8AB818CAA = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexBox.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.h"; sourceTree = "SOURCE_ROOT"; }; 8AEF70673FF810778EFC6D08 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jccolor.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jccolor.c"; sourceTree = "SOURCE_ROOT"; }; 8B11018691CF485F1067F278 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AnimatedAppComponent.h"; path = "../../../../modules/juce_gui_extra/misc/juce_AnimatedAppComponent.h"; sourceTree = "SOURCE_ROOT"; }; 8BB34D1B1519891162B0DBFE = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DrawableShape.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableShape.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -619,6 +621,7 @@ B6E1814BE1E753B8791962F4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Toolbar.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_Toolbar.h"; sourceTree = "SOURCE_ROOT"; }; B731F59C6868BE055F007329 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ColourGradient.cpp"; path = "../../../../modules/juce_graphics/colour/juce_ColourGradient.cpp"; sourceTree = "SOURCE_ROOT"; }; B7FB20F3D5020CD8988242FB = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_ios_UIViewComponentPeer.mm"; path = "../../../../modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm"; sourceTree = "SOURCE_ROOT"; }; + B9566042D1A56EC2FE64D184 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexItem.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexItem.h"; sourceTree = "SOURCE_ROOT"; }; B95F8C80E0D44391899531B6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jconfig.h; path = "../../../../modules/juce_graphics/image_formats/jpglib/jconfig.h"; sourceTree = "SOURCE_ROOT"; }; BA06E3D4038305A8D8ECD3E5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InputStream.h"; path = "../../../../modules/juce_core/streams/juce_InputStream.h"; sourceTree = "SOURCE_ROOT"; }; BA51067FE0DB7FA0DB2F755E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_WildcardFileFilter.h"; path = "../../../../modules/juce_core/files/juce_WildcardFileFilter.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1437,6 +1440,9 @@ 2C5516C7385DDAA74A06E64A, CE98C1D1F69BFC0E26DF6292, 042A6506F7508AC4A48527E7, + 5637BF8D4486B0BD2D41A541, + 8ACF65923A3E4AB8AB818CAA, + B9566042D1A56EC2FE64D184, D258A8E415E9907EE72BC7D2, B05DCAAE274EB275BC75F489, F186324F05630AC2A90C7686, @@ -1736,6 +1742,7 @@ HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.ComponentTutorialExample; SDKROOT_ppc = macosx10.5; }; name = Debug; }; @@ -1758,6 +1765,7 @@ HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.ComponentTutorialExample; SDKROOT_ppc = macosx10.5; }; name = Release; }; diff --git a/examples/ComponentTutorialExample/Builds/VisualStudio2010/ComponentTutorialExample.vcxproj b/examples/ComponentTutorialExample/Builds/VisualStudio2010/ComponentTutorialExample.vcxproj index bcdd9f6f..f5d22300 100644 --- a/examples/ComponentTutorialExample/Builds/VisualStudio2010/ComponentTutorialExample.vcxproj +++ b/examples/ComponentTutorialExample/Builds/VisualStudio2010/ComponentTutorialExample.vcxproj @@ -902,6 +902,9 @@ true + + true + true @@ -1476,6 +1479,8 @@ + + diff --git a/examples/ComponentTutorialExample/Builds/VisualStudio2010/ComponentTutorialExample.vcxproj.filters b/examples/ComponentTutorialExample/Builds/VisualStudio2010/ComponentTutorialExample.vcxproj.filters index 5fb45b54..dc19cbc3 100644 --- a/examples/ComponentTutorialExample/Builds/VisualStudio2010/ComponentTutorialExample.vcxproj.filters +++ b/examples/ComponentTutorialExample/Builds/VisualStudio2010/ComponentTutorialExample.vcxproj.filters @@ -1033,6 +1033,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2214,6 +2217,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/examples/ComponentTutorialExample/Builds/VisualStudio2012/ComponentTutorialExample.vcxproj b/examples/ComponentTutorialExample/Builds/VisualStudio2012/ComponentTutorialExample.vcxproj index 19399fc4..6659ca5b 100644 --- a/examples/ComponentTutorialExample/Builds/VisualStudio2012/ComponentTutorialExample.vcxproj +++ b/examples/ComponentTutorialExample/Builds/VisualStudio2012/ComponentTutorialExample.vcxproj @@ -908,6 +908,9 @@ true + + true + true @@ -1482,6 +1485,8 @@ + + diff --git a/examples/ComponentTutorialExample/Builds/VisualStudio2012/ComponentTutorialExample.vcxproj.filters b/examples/ComponentTutorialExample/Builds/VisualStudio2012/ComponentTutorialExample.vcxproj.filters index 5fb45b54..dc19cbc3 100644 --- a/examples/ComponentTutorialExample/Builds/VisualStudio2012/ComponentTutorialExample.vcxproj.filters +++ b/examples/ComponentTutorialExample/Builds/VisualStudio2012/ComponentTutorialExample.vcxproj.filters @@ -1033,6 +1033,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2214,6 +2217,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/examples/ComponentTutorialExample/ComponentTutorialExample.jucer b/examples/ComponentTutorialExample/ComponentTutorialExample.jucer index 4b9b576a..829038f0 100644 --- a/examples/ComponentTutorialExample/ComponentTutorialExample.jucer +++ b/examples/ComponentTutorialExample/ComponentTutorialExample.jucer @@ -2,7 +2,7 @@ + includeBinaryInAppConfig="1" jucerVersion="4.2.4"> /dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } + @pkg-config --print-errors alsa freetype2 libcurl x11 xext xinerama + clean: @echo Cleaning JuceDemo @$(CLEANCMD) strip: @echo Stripping JuceDemo - -@strip --strip-unneeded $(OUTDIR)/$(TARGET) + -@$(STRIP) --strip-unneeded $(JUCE_OUTDIR)/$(TARGET) -$(OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling Main.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/MainWindow_499ac812.o: ../../Source/MainWindow.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/MainWindow_499ac812.o: ../../Source/MainWindow.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling MainWindow.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/IntroScreen_73347059.o: ../../Source/IntroScreen.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/IntroScreen_73347059.o: ../../Source/IntroScreen.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling IntroScreen.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/AnimationDemo_9fc7e4e9.o: ../../Source/Demos/AnimationDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/AnimationDemo_9fc7e4e9.o: ../../Source/Demos/AnimationDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling AnimationDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/AudioLatencyDemo_78d49233.o: ../../Source/Demos/AudioLatencyDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/AudioLatencyDemo_78d49233.o: ../../Source/Demos/AudioLatencyDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling AudioLatencyDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/AudioPlaybackDemo_ea12adf6.o: ../../Source/Demos/AudioPlaybackDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/AudioPlaybackDemo_ea12adf6.o: ../../Source/Demos/AudioPlaybackDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling AudioPlaybackDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/AudioRecordingDemo_435914e6.o: ../../Source/Demos/AudioRecordingDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/AudioRecordingDemo_435914e6.o: ../../Source/Demos/AudioRecordingDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling AudioRecordingDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/AudioSettingsDemo_6d710bfe.o: ../../Source/Demos/AudioSettingsDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/AudioSettingsDemo_6d710bfe.o: ../../Source/Demos/AudioSettingsDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling AudioSettingsDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/AudioSynthesiserDemo_1b3666f6.o: ../../Source/Demos/AudioSynthesiserDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/AudioSynthesiserDemo_1b3666f6.o: ../../Source/Demos/AudioSynthesiserDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling AudioSynthesiserDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/Box2DDemo_51053c42.o: ../../Source/Demos/Box2DDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/Box2DDemo_51053c42.o: ../../Source/Demos/Box2DDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling Box2DDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/CameraDemo_a10f7e50.o: ../../Source/Demos/CameraDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/CameraDemo_a10f7e50.o: ../../Source/Demos/CameraDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling CameraDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/ChildProcessDemo_2c2b949e.o: ../../Source/Demos/ChildProcessDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/ChildProcessDemo_2c2b949e.o: ../../Source/Demos/ChildProcessDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling ChildProcessDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/CodeEditorDemo_d5c17a65.o: ../../Source/Demos/CodeEditorDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/CodeEditorDemo_d5c17a65.o: ../../Source/Demos/CodeEditorDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling CodeEditorDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/ComponentTransformsDemo_377f7889.o: ../../Source/Demos/ComponentTransformsDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/ComponentTransformsDemo_377f7889.o: ../../Source/Demos/ComponentTransformsDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling ComponentTransformsDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/CryptographyDemo_232d46d7.o: ../../Source/Demos/CryptographyDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/CryptographyDemo_232d46d7.o: ../../Source/Demos/CryptographyDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling CryptographyDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/DialogsDemo_19d585d0.o: ../../Source/Demos/DialogsDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/DialogsDemo_19d585d0.o: ../../Source/Demos/DialogsDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling DialogsDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/FlexBoxDemo_e4f3d9b7.o: ../../Source/Demos/FlexBoxDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) + @echo "Compiling FlexBoxDemo.cpp" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/FontsDemo_6da1e5e9.o: ../../Source/Demos/FontsDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/FontsDemo_6da1e5e9.o: ../../Source/Demos/FontsDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling FontsDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/GraphicsDemo_85142ef6.o: ../../Source/Demos/GraphicsDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/GraphicsDemo_85142ef6.o: ../../Source/Demos/GraphicsDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling GraphicsDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/ImagesDemo_ecf13aa3.o: ../../Source/Demos/ImagesDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/ImagesDemo_ecf13aa3.o: ../../Source/Demos/ImagesDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling ImagesDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/JavaScript_d6e42eb5.o: ../../Source/Demos/JavaScript.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/JavaScript_d6e42eb5.o: ../../Source/Demos/JavaScript.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling JavaScript.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/KeyMappingsDemo_cf05c709.o: ../../Source/Demos/KeyMappingsDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/KeyMappingsDemo_cf05c709.o: ../../Source/Demos/KeyMappingsDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling KeyMappingsDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/LiveConstantDemo_e3b18a9b.o: ../../Source/Demos/LiveConstantDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/LiveConstantDemo_e3b18a9b.o: ../../Source/Demos/LiveConstantDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling LiveConstantDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/LookAndFeelDemo_25c558a3.o: ../../Source/Demos/LookAndFeelDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/LookAndFeelDemo_25c558a3.o: ../../Source/Demos/LookAndFeelDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling LookAndFeelDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/MDIDemo_c476c2d7.o: ../../Source/Demos/MDIDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/MDIDemo_c476c2d7.o: ../../Source/Demos/MDIDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling MDIDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/MidiDemo_75ebc30c.o: ../../Source/Demos/MidiDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/MidiDemo_75ebc30c.o: ../../Source/Demos/MidiDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling MidiDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/MultithreadingDemo_ff566eaa.o: ../../Source/Demos/MultithreadingDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/MultithreadingDemo_ff566eaa.o: ../../Source/Demos/MultithreadingDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling MultithreadingDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/MultiTouch_595f3a2e.o: ../../Source/Demos/MultiTouch.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/MultiTouch_595f3a2e.o: ../../Source/Demos/MultiTouch.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling MultiTouch.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/NetworkingDemo_fbd1b19f.o: ../../Source/Demos/NetworkingDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/NetworkingDemo_fbd1b19f.o: ../../Source/Demos/NetworkingDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling NetworkingDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/OpenGLDemo_fdac55da.o: ../../Source/Demos/OpenGLDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/OpenGLDemo_fdac55da.o: ../../Source/Demos/OpenGLDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling OpenGLDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/OpenGLDemo2D_48eeadec.o: ../../Source/Demos/OpenGLDemo2D.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/OpenGLDemo2D_48eeadec.o: ../../Source/Demos/OpenGLDemo2D.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling OpenGLDemo2D.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/PropertiesDemo_8ff1a8de.o: ../../Source/Demos/PropertiesDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/PropertiesDemo_8ff1a8de.o: ../../Source/Demos/PropertiesDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling PropertiesDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/SystemInfoDemo_984acd28.o: ../../Source/Demos/SystemInfoDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/SystemInfoDemo_984acd28.o: ../../Source/Demos/SystemInfoDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling SystemInfoDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/TimersAndEventsDemo_f2656547.o: ../../Source/Demos/TimersAndEventsDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/TimersAndEventsDemo_f2656547.o: ../../Source/Demos/TimersAndEventsDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling TimersAndEventsDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/UnitTestsDemo_5c21762.o: ../../Source/Demos/UnitTestsDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/UnitTestsDemo_5c21762.o: ../../Source/Demos/UnitTestsDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling UnitTestsDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/ValueTreesDemo_9657d84f.o: ../../Source/Demos/ValueTreesDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/ValueTreesDemo_9657d84f.o: ../../Source/Demos/ValueTreesDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling ValueTreesDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/VideoDemo_b55a1560.o: ../../Source/Demos/VideoDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/VideoDemo_b55a1560.o: ../../Source/Demos/VideoDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling VideoDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/WebBrowserDemo_3df2dbdf.o: ../../Source/Demos/WebBrowserDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/WebBrowserDemo_3df2dbdf.o: ../../Source/Demos/WebBrowserDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling WebBrowserDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/WidgetsDemo_fb0454.o: ../../Source/Demos/WidgetsDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/WidgetsDemo_fb0454.o: ../../Source/Demos/WidgetsDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling WidgetsDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/WindowsDemo_e8cfa428.o: ../../Source/Demos/WindowsDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/WindowsDemo_e8cfa428.o: ../../Source/Demos/WindowsDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling WindowsDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/XMLandJSONDemo_5bc88df3.o: ../../Source/Demos/XMLandJSONDemo.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/XMLandJSONDemo_5bc88df3.o: ../../Source/Demos/XMLandJSONDemo.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling XMLandJSONDemo.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/BinaryData_ce4232d4.o: ../../JuceLibraryCode/BinaryData.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/BinaryData_ce4232d4.o: ../../JuceLibraryCode/BinaryData.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling BinaryData.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_basics_6b797ca1.o: ../../JuceLibraryCode/juce_audio_basics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_basics_6b797ca1.o: ../../JuceLibraryCode/juce_audio_basics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_basics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_devices_a742c38b.o: ../../JuceLibraryCode/juce_audio_devices.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_devices_a742c38b.o: ../../JuceLibraryCode/juce_audio_devices.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_devices.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_formats_5a29c68a.o: ../../JuceLibraryCode/juce_audio_formats.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_formats_5a29c68a.o: ../../JuceLibraryCode/juce_audio_formats.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_formats.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_processors_dea3173d.o: ../../JuceLibraryCode/juce_audio_processors.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_processors_dea3173d.o: ../../JuceLibraryCode/juce_audio_processors.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_processors.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_utils_c7eb679f.o: ../../JuceLibraryCode/juce_audio_utils.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_utils_c7eb679f.o: ../../JuceLibraryCode/juce_audio_utils.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_utils.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_box2d_95719d14.o: ../../JuceLibraryCode/juce_box2d.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_box2d_95719d14.o: ../../JuceLibraryCode/juce_box2d.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_box2d.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_core.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_cryptography_6de2ebff.o: ../../JuceLibraryCode/juce_cryptography.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_cryptography_6de2ebff.o: ../../JuceLibraryCode/juce_cryptography.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_cryptography.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_data_structures_72d3da2c.o: ../../JuceLibraryCode/juce_data_structures.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_data_structures_72d3da2c.o: ../../JuceLibraryCode/juce_data_structures.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_data_structures.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_events_d2be882c.o: ../../JuceLibraryCode/juce_events.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_events_d2be882c.o: ../../JuceLibraryCode/juce_events.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_events.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_graphics_9c18891e.o: ../../JuceLibraryCode/juce_graphics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_graphics_9c18891e.o: ../../JuceLibraryCode/juce_graphics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_graphics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_gui_basics_8a6da59c.o: ../../JuceLibraryCode/juce_gui_basics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_gui_basics_8a6da59c.o: ../../JuceLibraryCode/juce_gui_basics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_gui_basics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_gui_extra_4a026f23.o: ../../JuceLibraryCode/juce_gui_extra.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_gui_extra_4a026f23.o: ../../JuceLibraryCode/juce_gui_extra.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_gui_extra.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_opengl_cd70b4c2.o: ../../JuceLibraryCode/juce_opengl.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_opengl_cd70b4c2.o: ../../JuceLibraryCode/juce_opengl.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_opengl.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_video_f128c512.o: ../../JuceLibraryCode/juce_video.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_video_f128c512.o: ../../JuceLibraryCode/juce_video.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_video.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -include $(OBJECTS:%.o=%.d) diff --git a/examples/Demo/Builds/MacOSX/JuceDemo.xcodeproj/project.pbxproj b/examples/Demo/Builds/MacOSX/JuceDemo.xcodeproj/project.pbxproj index ba9e0482..926af1dd 100644 --- a/examples/Demo/Builds/MacOSX/JuceDemo.xcodeproj/project.pbxproj +++ b/examples/Demo/Builds/MacOSX/JuceDemo.xcodeproj/project.pbxproj @@ -38,6 +38,7 @@ 587D594CCB99791F4D724DB4 = {isa = PBXBuildFile; fileRef = 64E7D43C4F4037CFC2C5E2AC; }; 40D223F10936E34918B48639 = {isa = PBXBuildFile; fileRef = 49412C044B88516D9AF59FDD; }; F739D6D21483E3498985C7AF = {isa = PBXBuildFile; fileRef = 55D08920D4992CD0721AA3E3; }; + 2BFF2E7E13527E2E764617AA = {isa = PBXBuildFile; fileRef = 7AEEF2EE40D3B8AE687C6618; }; E4A67DD76D4D063F547F0844 = {isa = PBXBuildFile; fileRef = 4DB00B418C4F068BC5FC7314; }; 257CBA785DEDAF53F4E9BF60 = {isa = PBXBuildFile; fileRef = 4D569839066D92C393F58EB4; }; 9C30D9613D76EEFDB1653F34 = {isa = PBXBuildFile; fileRef = 7DBF83B26277D13CB3FC1479; }; @@ -340,6 +341,7 @@ 2F1324CBA29604BD3E2003B5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CachedComponentImage.h"; path = "../../../../modules/juce_gui_basics/components/juce_CachedComponentImage.h"; sourceTree = "SOURCE_ROOT"; }; 2F19C814598FC304CA841242 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Windowing.cpp"; path = "../../../../modules/juce_gui_basics/native/juce_win32_Windowing.cpp"; sourceTree = "SOURCE_ROOT"; }; 2F66B42AF6C0B5ED381937C3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ZipFile.h"; path = "../../../../modules/juce_core/zip/juce_ZipFile.h"; sourceTree = "SOURCE_ROOT"; }; + 2F78DE5144EBEAC697309BDC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexItem.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexItem.h"; sourceTree = "SOURCE_ROOT"; }; 2F7F13C84464F8409BBDBEB0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MessageListener.cpp"; path = "../../../../modules/juce_events/messages/juce_MessageListener.cpp"; sourceTree = "SOURCE_ROOT"; }; 2F8041ECBF70D78604686D6B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RelativePointPath.h"; path = "../../../../modules/juce_gui_basics/positioning/juce_RelativePointPath.h"; sourceTree = "SOURCE_ROOT"; }; 2F8D57F15D63118E33CB0639 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_WebBrowserComponent.cpp"; path = "../../../../modules/juce_gui_extra/native/juce_linux_WebBrowserComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -450,6 +452,7 @@ 417FED446C0B953AB2DDB633 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2ContactSolver.cpp; path = "../../../../modules/juce_box2d/box2d/Dynamics/Contacts/b2ContactSolver.cpp"; sourceTree = "SOURCE_ROOT"; }; 4198EE3311A171C884A5FA9F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_WildcardFileFilter.cpp"; path = "../../../../modules/juce_core/files/juce_WildcardFileFilter.cpp"; sourceTree = "SOURCE_ROOT"; }; 41F65957FAEED268DBFFE925 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = adler32.c; path = "../../../../modules/juce_core/zip/zlib/adler32.c"; sourceTree = "SOURCE_ROOT"; }; + 41F76FF32798054E741CB90B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_VSTInterface.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_VSTInterface.h"; sourceTree = "SOURCE_ROOT"; }; 420516E3BCE114E11526E916 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = smallft.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/smallft.c"; sourceTree = "SOURCE_ROOT"; }; 4212EA9CE0B9AA4986108D9D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OpenGLShaderProgram.cpp"; path = "../../../../modules/juce_opengl/opengl/juce_OpenGLShaderProgram.cpp"; sourceTree = "SOURCE_ROOT"; }; 42386AD366F1AD43B6B29364 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Synthesiser.cpp"; path = "../../../../modules/juce_audio_basics/synthesisers/juce_Synthesiser.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -748,6 +751,7 @@ 7A2009F14F7AFEEF7F233EBC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = bitmath.c; path = "../../../../modules/juce_audio_formats/codecs/flac/libFLAC/bitmath.c"; sourceTree = "SOURCE_ROOT"; }; 7AD412430D3AEB0468089AF5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MouseCursor.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_MouseCursor.h"; sourceTree = "SOURCE_ROOT"; }; 7AE34C0CF7EABE461F4FE5FF = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2Body.h; path = "../../../../modules/juce_box2d/box2d/Dynamics/b2Body.h"; sourceTree = "SOURCE_ROOT"; }; + 7AEEF2EE40D3B8AE687C6618 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = FlexBoxDemo.cpp; path = ../../Source/Demos/FlexBoxDemo.cpp; sourceTree = "SOURCE_ROOT"; }; 7AF9EF500482C84F02849647 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MPENote.h"; path = "../../../../modules/juce_audio_basics/mpe/juce_MPENote.h"; sourceTree = "SOURCE_ROOT"; }; 7B5560AEA0CB3E507C16140C = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ButtonPropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_ButtonPropertyComponent.h"; sourceTree = "SOURCE_ROOT"; }; 7B81083FC4CCD2D096D93162 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OpenGL_android.h"; path = "../../../../modules/juce_opengl/native/juce_OpenGL_android.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1332,6 +1336,7 @@ EE7001BD5206A8D8EA2D125B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RectangleList.h"; path = "../../../../modules/juce_graphics/geometry/juce_RectangleList.h"; sourceTree = "SOURCE_ROOT"; }; EEA020419EF58E90C10AAE26 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ResizableWindow.h"; path = "../../../../modules/juce_gui_basics/windows/juce_ResizableWindow.h"; sourceTree = "SOURCE_ROOT"; }; EEAA1BB6254EDE07A7ABAD65 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_IIRFilterAudioSource.h"; path = "../../../../modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h"; sourceTree = "SOURCE_ROOT"; }; + EF18C494669488BEDFC25A5D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FlexBox.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.cpp"; sourceTree = "SOURCE_ROOT"; }; EF8055850F3DEA173761E3B5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MessageManager.cpp"; path = "../../../../modules/juce_events/messages/juce_MessageManager.cpp"; sourceTree = "SOURCE_ROOT"; }; EFD1BD42000EE640A17EE1ED = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioFormatReaderSource.cpp"; path = "../../../../modules/juce_audio_formats/format/juce_AudioFormatReaderSource.cpp"; sourceTree = "SOURCE_ROOT"; }; EFDA611057B66032D2F06E53 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2Joint.cpp; path = "../../../../modules/juce_box2d/box2d/Dynamics/Joints/b2Joint.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -1403,6 +1408,7 @@ FC63A33CA2E025F5C4C22CD3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OpenGL_win32.h"; path = "../../../../modules/juce_opengl/native/juce_OpenGL_win32.h"; sourceTree = "SOURCE_ROOT"; }; FCA788F92D5BB1640CD2AC35 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = AudioSettingsDemo.cpp; path = ../../Source/Demos/AudioSettingsDemo.cpp; sourceTree = "SOURCE_ROOT"; }; FCAC296E92A219D70EB96AD5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Slider.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_Slider.cpp"; sourceTree = "SOURCE_ROOT"; }; + FCE177D4FA4ABB9635AC9737 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexBox.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.h"; sourceTree = "SOURCE_ROOT"; }; FD22F7A808D3B534354FD7E1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2Distance.h; path = "../../../../modules/juce_box2d/box2d/Collision/b2Distance.h"; sourceTree = "SOURCE_ROOT"; }; FD2A08CE74C6EBC90CD44A49 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V3.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp"; sourceTree = "SOURCE_ROOT"; }; FD46383E356A5DDC1AD53380 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkingDemo.cpp; path = ../../Source/Demos/NetworkingDemo.cpp; sourceTree = "SOURCE_ROOT"; }; @@ -1431,6 +1437,7 @@ 64E7D43C4F4037CFC2C5E2AC, 49412C044B88516D9AF59FDD, 55D08920D4992CD0721AA3E3, + 7AEEF2EE40D3B8AE687C6618, 4DB00B418C4F068BC5FC7314, 4D569839066D92C393F58EB4, 7DBF83B26277D13CB3FC1479, @@ -1818,6 +1825,7 @@ 9750423DB3DB6570382DA3C1, 9B9E034C5761096ACB8A76C3, 73267FE8DDE50FD1E6E31ED4, + 41F76FF32798054E741CB90B, 8AE56D2F4E33B015C3D73EB8, 52A95B5754438C999343869A, C8A42EE493A1DF2E283C245E, ); name = "format_types"; sourceTree = ""; }; @@ -2668,6 +2676,9 @@ 2DDE8684F3C5CB4A781D72A5, F58760A8EE18630F97C7B646, 1D62103CFAB9245F2CF523EC, + EF18C494669488BEDFC25A5D, + FCE177D4FA4ABB9635AC9737, + 2F78DE5144EBEAC697309BDC, 1065FE461C00EABD9485BB93, 2E093A5506319EC68DA184F4, 53AA2F507FD9DE263E43B277, @@ -3150,6 +3161,7 @@ 587D594CCB99791F4D724DB4, 40D223F10936E34918B48639, F739D6D21483E3498985C7AF, + 2BFF2E7E13527E2E764617AA, E4A67DD76D4D063F547F0844, 257CBA785DEDAF53F4E9BF60, 9C30D9613D76EEFDB1653F34, diff --git a/examples/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj b/examples/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj index ecb6a582..1751f272 100644 --- a/examples/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj +++ b/examples/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj @@ -139,6 +139,7 @@ + @@ -1522,6 +1523,9 @@ true + + true + true @@ -2039,6 +2043,7 @@ + @@ -2405,6 +2410,8 @@ + + diff --git a/examples/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj.filters b/examples/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj.filters index 2cfd39ba..fea3d46b 100644 --- a/examples/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj.filters +++ b/examples/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj.filters @@ -451,6 +451,9 @@ JuceDemo\Source\Demos + + JuceDemo\Source\Demos + JuceDemo\Source\Demos @@ -1954,6 +1957,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2880,6 +2886,9 @@ Juce Modules\juce_audio_processors\format_types + + Juce Modules\juce_audio_processors\format_types + Juce Modules\juce_audio_processors\format_types @@ -3978,6 +3987,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/examples/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj b/examples/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj index dd4c315c..6a6cf296 100644 --- a/examples/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj +++ b/examples/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj @@ -145,6 +145,7 @@ + @@ -1528,6 +1529,9 @@ true + + true + true @@ -2045,6 +2049,7 @@ + @@ -2411,6 +2416,8 @@ + + diff --git a/examples/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj.filters b/examples/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj.filters index 2cfd39ba..fea3d46b 100644 --- a/examples/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj.filters +++ b/examples/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj.filters @@ -451,6 +451,9 @@ JuceDemo\Source\Demos + + JuceDemo\Source\Demos + JuceDemo\Source\Demos @@ -1954,6 +1957,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2880,6 +2886,9 @@ Juce Modules\juce_audio_processors\format_types + + Juce Modules\juce_audio_processors\format_types + Juce Modules\juce_audio_processors\format_types @@ -3978,6 +3987,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/examples/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj b/examples/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj index 35823845..60c5c6ee 100644 --- a/examples/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj +++ b/examples/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj @@ -145,6 +145,7 @@ + @@ -1528,6 +1529,9 @@ true + + true + true @@ -2045,6 +2049,7 @@ + @@ -2411,6 +2416,8 @@ + + diff --git a/examples/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj.filters b/examples/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj.filters index 71b50c0a..836b4b6b 100644 --- a/examples/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj.filters +++ b/examples/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj.filters @@ -451,6 +451,9 @@ JuceDemo\Source\Demos + + JuceDemo\Source\Demos + JuceDemo\Source\Demos @@ -1954,6 +1957,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2880,6 +2886,9 @@ Juce Modules\juce_audio_processors\format_types + + Juce Modules\juce_audio_processors\format_types + Juce Modules\juce_audio_processors\format_types @@ -3978,6 +3987,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/examples/Demo/Builds/VisualStudio2015/JuceDemo.vcxproj b/examples/Demo/Builds/VisualStudio2015/JuceDemo.vcxproj index e5bce566..0ded1fac 100644 --- a/examples/Demo/Builds/VisualStudio2015/JuceDemo.vcxproj +++ b/examples/Demo/Builds/VisualStudio2015/JuceDemo.vcxproj @@ -145,6 +145,7 @@ + @@ -1528,6 +1529,9 @@ true + + true + true @@ -2045,6 +2049,7 @@ + @@ -2411,6 +2416,8 @@ + + diff --git a/examples/Demo/Builds/VisualStudio2015/JuceDemo.vcxproj.filters b/examples/Demo/Builds/VisualStudio2015/JuceDemo.vcxproj.filters index c08383b9..36d89751 100644 --- a/examples/Demo/Builds/VisualStudio2015/JuceDemo.vcxproj.filters +++ b/examples/Demo/Builds/VisualStudio2015/JuceDemo.vcxproj.filters @@ -451,6 +451,9 @@ JuceDemo\Source\Demos + + JuceDemo\Source\Demos + JuceDemo\Source\Demos @@ -1954,6 +1957,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2880,6 +2886,9 @@ Juce Modules\juce_audio_processors\format_types + + Juce Modules\juce_audio_processors\format_types + Juce Modules\juce_audio_processors\format_types @@ -3978,6 +3987,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/examples/Demo/Builds/iOS/JuceDemo.xcodeproj/project.pbxproj b/examples/Demo/Builds/iOS/JuceDemo.xcodeproj/project.pbxproj index 62a25694..919b7169 100644 --- a/examples/Demo/Builds/iOS/JuceDemo.xcodeproj/project.pbxproj +++ b/examples/Demo/Builds/iOS/JuceDemo.xcodeproj/project.pbxproj @@ -37,6 +37,7 @@ 587D594CCB99791F4D724DB4 = {isa = PBXBuildFile; fileRef = 64E7D43C4F4037CFC2C5E2AC; }; 40D223F10936E34918B48639 = {isa = PBXBuildFile; fileRef = 49412C044B88516D9AF59FDD; }; F739D6D21483E3498985C7AF = {isa = PBXBuildFile; fileRef = 55D08920D4992CD0721AA3E3; }; + 2BFF2E7E13527E2E764617AA = {isa = PBXBuildFile; fileRef = 7AEEF2EE40D3B8AE687C6618; }; E4A67DD76D4D063F547F0844 = {isa = PBXBuildFile; fileRef = 4DB00B418C4F068BC5FC7314; }; 257CBA785DEDAF53F4E9BF60 = {isa = PBXBuildFile; fileRef = 4D569839066D92C393F58EB4; }; 9C30D9613D76EEFDB1653F34 = {isa = PBXBuildFile; fileRef = 7DBF83B26277D13CB3FC1479; }; @@ -337,6 +338,7 @@ 2F1324CBA29604BD3E2003B5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CachedComponentImage.h"; path = "../../../../modules/juce_gui_basics/components/juce_CachedComponentImage.h"; sourceTree = "SOURCE_ROOT"; }; 2F19C814598FC304CA841242 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Windowing.cpp"; path = "../../../../modules/juce_gui_basics/native/juce_win32_Windowing.cpp"; sourceTree = "SOURCE_ROOT"; }; 2F66B42AF6C0B5ED381937C3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ZipFile.h"; path = "../../../../modules/juce_core/zip/juce_ZipFile.h"; sourceTree = "SOURCE_ROOT"; }; + 2F78DE5144EBEAC697309BDC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexItem.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexItem.h"; sourceTree = "SOURCE_ROOT"; }; 2F7F13C84464F8409BBDBEB0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MessageListener.cpp"; path = "../../../../modules/juce_events/messages/juce_MessageListener.cpp"; sourceTree = "SOURCE_ROOT"; }; 2F8041ECBF70D78604686D6B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RelativePointPath.h"; path = "../../../../modules/juce_gui_basics/positioning/juce_RelativePointPath.h"; sourceTree = "SOURCE_ROOT"; }; 2F8D57F15D63118E33CB0639 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_WebBrowserComponent.cpp"; path = "../../../../modules/juce_gui_extra/native/juce_linux_WebBrowserComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -448,6 +450,7 @@ 417FED446C0B953AB2DDB633 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2ContactSolver.cpp; path = "../../../../modules/juce_box2d/box2d/Dynamics/Contacts/b2ContactSolver.cpp"; sourceTree = "SOURCE_ROOT"; }; 4198EE3311A171C884A5FA9F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_WildcardFileFilter.cpp"; path = "../../../../modules/juce_core/files/juce_WildcardFileFilter.cpp"; sourceTree = "SOURCE_ROOT"; }; 41F65957FAEED268DBFFE925 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = adler32.c; path = "../../../../modules/juce_core/zip/zlib/adler32.c"; sourceTree = "SOURCE_ROOT"; }; + 41F76FF32798054E741CB90B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_VSTInterface.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_VSTInterface.h"; sourceTree = "SOURCE_ROOT"; }; 420516E3BCE114E11526E916 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = smallft.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/smallft.c"; sourceTree = "SOURCE_ROOT"; }; 4212EA9CE0B9AA4986108D9D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OpenGLShaderProgram.cpp"; path = "../../../../modules/juce_opengl/opengl/juce_OpenGLShaderProgram.cpp"; sourceTree = "SOURCE_ROOT"; }; 42386AD366F1AD43B6B29364 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Synthesiser.cpp"; path = "../../../../modules/juce_audio_basics/synthesisers/juce_Synthesiser.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -746,6 +749,7 @@ 7A2009F14F7AFEEF7F233EBC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = bitmath.c; path = "../../../../modules/juce_audio_formats/codecs/flac/libFLAC/bitmath.c"; sourceTree = "SOURCE_ROOT"; }; 7AD412430D3AEB0468089AF5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MouseCursor.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_MouseCursor.h"; sourceTree = "SOURCE_ROOT"; }; 7AE34C0CF7EABE461F4FE5FF = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2Body.h; path = "../../../../modules/juce_box2d/box2d/Dynamics/b2Body.h"; sourceTree = "SOURCE_ROOT"; }; + 7AEEF2EE40D3B8AE687C6618 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = FlexBoxDemo.cpp; path = ../../Source/Demos/FlexBoxDemo.cpp; sourceTree = "SOURCE_ROOT"; }; 7AF9EF500482C84F02849647 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MPENote.h"; path = "../../../../modules/juce_audio_basics/mpe/juce_MPENote.h"; sourceTree = "SOURCE_ROOT"; }; 7B5560AEA0CB3E507C16140C = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ButtonPropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_ButtonPropertyComponent.h"; sourceTree = "SOURCE_ROOT"; }; 7B81083FC4CCD2D096D93162 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OpenGL_android.h"; path = "../../../../modules/juce_opengl/native/juce_OpenGL_android.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1328,6 +1332,7 @@ EE7001BD5206A8D8EA2D125B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RectangleList.h"; path = "../../../../modules/juce_graphics/geometry/juce_RectangleList.h"; sourceTree = "SOURCE_ROOT"; }; EEA020419EF58E90C10AAE26 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ResizableWindow.h"; path = "../../../../modules/juce_gui_basics/windows/juce_ResizableWindow.h"; sourceTree = "SOURCE_ROOT"; }; EEAA1BB6254EDE07A7ABAD65 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_IIRFilterAudioSource.h"; path = "../../../../modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h"; sourceTree = "SOURCE_ROOT"; }; + EF18C494669488BEDFC25A5D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FlexBox.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.cpp"; sourceTree = "SOURCE_ROOT"; }; EF8055850F3DEA173761E3B5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MessageManager.cpp"; path = "../../../../modules/juce_events/messages/juce_MessageManager.cpp"; sourceTree = "SOURCE_ROOT"; }; EFD1BD42000EE640A17EE1ED = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioFormatReaderSource.cpp"; path = "../../../../modules/juce_audio_formats/format/juce_AudioFormatReaderSource.cpp"; sourceTree = "SOURCE_ROOT"; }; EFDA611057B66032D2F06E53 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2Joint.cpp; path = "../../../../modules/juce_box2d/box2d/Dynamics/Joints/b2Joint.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -1401,6 +1406,7 @@ FC63A33CA2E025F5C4C22CD3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OpenGL_win32.h"; path = "../../../../modules/juce_opengl/native/juce_OpenGL_win32.h"; sourceTree = "SOURCE_ROOT"; }; FCA788F92D5BB1640CD2AC35 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = AudioSettingsDemo.cpp; path = ../../Source/Demos/AudioSettingsDemo.cpp; sourceTree = "SOURCE_ROOT"; }; FCAC296E92A219D70EB96AD5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Slider.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_Slider.cpp"; sourceTree = "SOURCE_ROOT"; }; + FCE177D4FA4ABB9635AC9737 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexBox.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.h"; sourceTree = "SOURCE_ROOT"; }; FD22F7A808D3B534354FD7E1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2Distance.h; path = "../../../../modules/juce_box2d/box2d/Collision/b2Distance.h"; sourceTree = "SOURCE_ROOT"; }; FD2A08CE74C6EBC90CD44A49 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V3.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp"; sourceTree = "SOURCE_ROOT"; }; FD46383E356A5DDC1AD53380 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkingDemo.cpp; path = ../../Source/Demos/NetworkingDemo.cpp; sourceTree = "SOURCE_ROOT"; }; @@ -1429,6 +1435,7 @@ 64E7D43C4F4037CFC2C5E2AC, 49412C044B88516D9AF59FDD, 55D08920D4992CD0721AA3E3, + 7AEEF2EE40D3B8AE687C6618, 4DB00B418C4F068BC5FC7314, 4D569839066D92C393F58EB4, 7DBF83B26277D13CB3FC1479, @@ -1816,6 +1823,7 @@ 9750423DB3DB6570382DA3C1, 9B9E034C5761096ACB8A76C3, 73267FE8DDE50FD1E6E31ED4, + 41F76FF32798054E741CB90B, 8AE56D2F4E33B015C3D73EB8, 52A95B5754438C999343869A, C8A42EE493A1DF2E283C245E, ); name = "format_types"; sourceTree = ""; }; @@ -2666,6 +2674,9 @@ 2DDE8684F3C5CB4A781D72A5, F58760A8EE18630F97C7B646, 1D62103CFAB9245F2CF523EC, + EF18C494669488BEDFC25A5D, + FCE177D4FA4ABB9635AC9737, + 2F78DE5144EBEAC697309BDC, 1065FE461C00EABD9485BB93, 2E093A5506319EC68DA184F4, 53AA2F507FD9DE263E43B277, @@ -3098,6 +3109,7 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "JuceDemo"; SDKROOT = iphoneos; @@ -3117,6 +3129,7 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "JuceDemo"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -3149,6 +3162,7 @@ 587D594CCB99791F4D724DB4, 40D223F10936E34918B48639, F739D6D21483E3498985C7AF, + 2BFF2E7E13527E2E764617AA, E4A67DD76D4D063F547F0844, 257CBA785DEDAF53F4E9BF60, 9C30D9613D76EEFDB1653F34, diff --git a/examples/Demo/JuceDemo.jucer b/examples/Demo/JuceDemo.jucer index f19a1623..cc2e6c83 100644 --- a/examples/Demo/JuceDemo.jucer +++ b/examples/Demo/JuceDemo.jucer @@ -1,7 +1,7 @@ + diff --git a/examples/Demo/JuceLibraryCode/AppConfig.h b/examples/Demo/JuceLibraryCode/AppConfig.h index 37e2bd9d..f4510cd8 100644 --- a/examples/Demo/JuceLibraryCode/AppConfig.h +++ b/examples/Demo/JuceLibraryCode/AppConfig.h @@ -153,6 +153,14 @@ //#define JUCE_USE_CURL #endif +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES +#endif + //============================================================================== // juce_graphics flags: diff --git a/examples/Demo/Source/Demos/AudioSynthesiserDemo.cpp b/examples/Demo/Source/Demos/AudioSynthesiserDemo.cpp index 80a8a279..1a41b03a 100644 --- a/examples/Demo/Source/Demos/AudioSynthesiserDemo.cpp +++ b/examples/Demo/Source/Demos/AudioSynthesiserDemo.cpp @@ -260,7 +260,7 @@ public: audioSourcePlayer.setSource (&synthAudioSource); deviceManager.addAudioCallback (&audioSourcePlayer); - deviceManager.addMidiInputCallback (String::empty, &(synthAudioSource.midiCollector)); + deviceManager.addMidiInputCallback (String(), &(synthAudioSource.midiCollector)); setOpaque (true); setSize (640, 480); @@ -269,7 +269,7 @@ public: ~AudioSynthesiserDemo() { audioSourcePlayer.setSource (nullptr); - deviceManager.removeMidiInputCallback (String::empty, &(synthAudioSource.midiCollector)); + deviceManager.removeMidiInputCallback (String(), &(synthAudioSource.midiCollector)); deviceManager.removeAudioCallback (&audioSourcePlayer); deviceManager.removeAudioCallback (&liveAudioDisplayComp); } diff --git a/examples/Demo/Source/Demos/CodeEditorDemo.cpp b/examples/Demo/Source/Demos/CodeEditorDemo.cpp index 836f27fe..d37bce4e 100644 --- a/examples/Demo/Source/Demos/CodeEditorDemo.cpp +++ b/examples/Demo/Source/Demos/CodeEditorDemo.cpp @@ -31,7 +31,7 @@ class CodeEditorDemo : public Component, { public: CodeEditorDemo() - : fileChooser ("File", File::nonexistent, true, false, false, + : fileChooser ("File", File(), true, false, false, "*.cpp;*.h;*.hpp;*.c;*.mm;*.m", String(), "Choose a C++ file to open it in the editor") { diff --git a/examples/Demo/Source/Demos/FlexBoxDemo.cpp b/examples/Demo/Source/Demos/FlexBoxDemo.cpp new file mode 100644 index 00000000..6d15e361 --- /dev/null +++ b/examples/Demo/Source/Demos/FlexBoxDemo.cpp @@ -0,0 +1,354 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2015 - ROLI Ltd. + + Permission is granted to use this software under the terms of either: + a) the GPL v2 (or any later version) + b) the Affero GPL v3 + + Details of these licenses can be found at: www.gnu.org/licenses + + JUCE is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + ------------------------------------------------------------------------------ + + To release a closed-source product which uses JUCE, commercial licenses are + available: visit www.juce.com for more information. + + ============================================================================== +*/ + +#include "../JuceDemoHeader.h" + +// these classes are C++11-only +#if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS && JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS && JUCE_COMPILER_SUPPORTS_LAMBDAS + +struct DemoFlexPanel : public juce::Component, + private juce::TextEditor::Listener, + private juce::ComboBox::Listener +{ + DemoFlexPanel (juce::Colour col, FlexItem& item) : flexItem (item), colour (col) + { + int x = 70; + int y = 3; + + setupTextEditor (flexOrderEditor, { x, y, 20, 18 }, "0"); + addLabel ("order", flexOrderEditor); + y += 20; + + setupTextEditor (flexGrowEditor, { x, y, 20, 18 }, "0"); + addLabel ("flex-grow", flexGrowEditor); + y += 20; + + setupTextEditor (flexShrinkEditor, { x, y, 20, 18 }, "1"); + addLabel ("flex-shrink", flexShrinkEditor); + y += 20; + + setupTextEditor (flexBasisEditor, { x, y, 33, 18 }, "100"); + addLabel ("flex-basis", flexBasisEditor); + y += 20; + + alignSelfCombo.addItem ("auto", 1); + alignSelfCombo.addItem ("flex-start", 2); + alignSelfCombo.addItem ("flex-end", 3); + alignSelfCombo.addItem ("center", 4); + alignSelfCombo.addItem ("stretch", 5); + + alignSelfCombo.setBounds (x, y, 90, 18); + alignSelfCombo.addListener (this); + alignSelfCombo.setSelectedId (5); + alignSelfCombo.setColour (ComboBox::outlineColourId, Colours::transparentBlack); + addAndMakeVisible (alignSelfCombo); + addLabel ("align-self", alignSelfCombo); + } + + void setupTextEditor (TextEditor& te, Rectangle b, StringRef initialText) + { + te.setBounds (b); + te.setText (initialText); + te.addListener (this); + + addAndMakeVisible (te); + } + + void addLabel (const String& name, Component& target) + { + auto label = new Label (name, name); + label->attachToComponent (&target, true); + labels.add (label); + addAndMakeVisible (label); + } + + void comboBoxChanged (ComboBox* cb) override + { + auto selectedID = cb->getSelectedId(); + + if (selectedID == 1) flexItem.alignSelf = FlexItem::AlignSelf::autoAlign; + if (selectedID == 2) flexItem.alignSelf = FlexItem::AlignSelf::flexStart; + if (selectedID == 3) flexItem.alignSelf = FlexItem::AlignSelf::flexEnd; + if (selectedID == 4) flexItem.alignSelf = FlexItem::AlignSelf::center; + if (selectedID == 5) flexItem.alignSelf = FlexItem::AlignSelf::stretch; + + if (auto parent = getParentComponent()) + parent->resized(); + } + + void textEditorTextChanged (TextEditor& textEditor) override + { + auto textIntValue = textEditor.getText().getFloatValue(); + + if (&textEditor == &flexOrderEditor) flexItem.order = (int) textIntValue; + if (&textEditor == &flexGrowEditor) flexItem.flexGrow = textIntValue; + if (&textEditor == &flexBasisEditor) flexItem.flexBasis = textIntValue; + if (&textEditor == &flexShrinkEditor) flexItem.flexShrink = textIntValue; + + if (auto parent = getParentComponent()) + parent->resized(); + } + + void paint (Graphics& g) override + { + auto r = getLocalBounds(); + + g.setColour (colour); + g.fillRect (r); + + g.setColour (Colours::black); + g.drawFittedText ("w: " + String (r.getWidth()) + newLine + "h: " + String (r.getHeight()), + r.reduced (4), Justification::bottomRight, 2); + } + + FlexItem& flexItem; + + TextEditor flexOrderEditor, flexGrowEditor, flexShrinkEditor, flexBasisEditor; + ComboBox alignSelfCombo; + + juce::Colour colour; + OwnedArray + + true + true @@ -1787,6 +1790,7 @@ + @@ -2096,6 +2100,8 @@ + + diff --git a/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample.vcxproj.filters b/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample.vcxproj.filters index d727467f..26eead20 100644 --- a/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample.vcxproj.filters +++ b/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample.vcxproj.filters @@ -1600,6 +1600,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2439,6 +2442,9 @@ Juce Modules\juce_audio_processors\format_types + + Juce Modules\juce_audio_processors\format_types + Juce Modules\juce_audio_processors\format_types @@ -3366,6 +3372,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/examples/SimpleFFTExample/JuceLibraryCode/AppConfig.h b/examples/SimpleFFTExample/JuceLibraryCode/AppConfig.h index 8becdc58..e8e45017 100644 --- a/examples/SimpleFFTExample/JuceLibraryCode/AppConfig.h +++ b/examples/SimpleFFTExample/JuceLibraryCode/AppConfig.h @@ -149,6 +149,14 @@ //#define JUCE_USE_CURL #endif +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES +#endif + //============================================================================== // juce_graphics flags: diff --git a/examples/SimpleFFTExample/SimpleFFTExample.jucer b/examples/SimpleFFTExample/SimpleFFTExample.jucer index 18d927fd..e7b40bb4 100644 --- a/examples/SimpleFFTExample/SimpleFFTExample.jucer +++ b/examples/SimpleFFTExample/SimpleFFTExample.jucer @@ -2,7 +2,7 @@ + jucerVersion="4.2.4"> /dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } + @pkg-config --print-errors alsa freetype2 libcurl x11 xext xinerama + clean: @echo Cleaning JuceDemoPlugin @$(CLEANCMD) strip: @echo Stripping JuceDemoPlugin - -@strip --strip-unneeded $(OUTDIR)/$(TARGET) + -@$(STRIP) --strip-unneeded $(JUCE_OUTDIR)/$(TARGET) -$(OBJDIR)/PluginEditor_94d4fb09.o: ../../Source/PluginEditor.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/PluginEditor_94d4fb09.o: ../../Source/PluginEditor.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling PluginEditor.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/PluginProcessor_a059e380.o: ../../Source/PluginProcessor.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/PluginProcessor_a059e380.o: ../../Source/PluginProcessor.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling PluginProcessor.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_basics_6b797ca1.o: ../../JuceLibraryCode/juce_audio_basics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_basics_6b797ca1.o: ../../JuceLibraryCode/juce_audio_basics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_basics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_devices_a742c38b.o: ../../JuceLibraryCode/juce_audio_devices.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_devices_a742c38b.o: ../../JuceLibraryCode/juce_audio_devices.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_devices.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_formats_5a29c68a.o: ../../JuceLibraryCode/juce_audio_formats.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_formats_5a29c68a.o: ../../JuceLibraryCode/juce_audio_formats.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_formats.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_plugin_client_utils_35fbf7.o: ../../JuceLibraryCode/juce_audio_plugin_client_utils.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_plugin_client_utils_35fbf7.o: ../../JuceLibraryCode/juce_audio_plugin_client_utils.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_plugin_client_utils.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_plugin_client_VST2_fd137df.o: ../../JuceLibraryCode/juce_audio_plugin_client_VST2.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_plugin_client_VST2_fd137df.o: ../../JuceLibraryCode/juce_audio_plugin_client_VST2.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_plugin_client_VST2.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_processors_dea3173d.o: ../../JuceLibraryCode/juce_audio_processors.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_processors_dea3173d.o: ../../JuceLibraryCode/juce_audio_processors.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_processors.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_utils_c7eb679f.o: ../../JuceLibraryCode/juce_audio_utils.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_utils_c7eb679f.o: ../../JuceLibraryCode/juce_audio_utils.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_utils.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_core.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_data_structures_72d3da2c.o: ../../JuceLibraryCode/juce_data_structures.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_data_structures_72d3da2c.o: ../../JuceLibraryCode/juce_data_structures.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_data_structures.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_events_d2be882c.o: ../../JuceLibraryCode/juce_events.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_events_d2be882c.o: ../../JuceLibraryCode/juce_events.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_events.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_graphics_9c18891e.o: ../../JuceLibraryCode/juce_graphics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_graphics_9c18891e.o: ../../JuceLibraryCode/juce_graphics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_graphics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_gui_basics_8a6da59c.o: ../../JuceLibraryCode/juce_gui_basics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_gui_basics_8a6da59c.o: ../../JuceLibraryCode/juce_gui_basics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_gui_basics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_gui_extra_4a026f23.o: ../../JuceLibraryCode/juce_gui_extra.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_gui_extra_4a026f23.o: ../../JuceLibraryCode/juce_gui_extra.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_gui_extra.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -include $(OBJECTS:%.o=%.d) diff --git a/examples/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj b/examples/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj index 09ea0dec..04d2b56b 100644 --- a/examples/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj +++ b/examples/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj @@ -301,6 +301,7 @@ 35AFE1E124E99572CBA1F46D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_PerformanceCounter.cpp"; path = "../../../../modules/juce_core/time/juce_PerformanceCounter.cpp"; sourceTree = "SOURCE_ROOT"; }; 35F57A1FB7A15A5374251F97 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_GlowEffect.h"; path = "../../../../modules/juce_graphics/effects/juce_GlowEffect.h"; sourceTree = "SOURCE_ROOT"; }; 366D4ADE01A2B4B6E0047A34 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "lpc_flac.c"; path = "../../../../modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c"; sourceTree = "SOURCE_ROOT"; }; + 36793CB90360BAF15C6C94D3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexItem.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexItem.h"; sourceTree = "SOURCE_ROOT"; }; 36CB6C4D85EFD5015D667E96 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MPEInstrument.cpp"; path = "../../../../modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp"; sourceTree = "SOURCE_ROOT"; }; 36EDB9DCF2D5260319028905 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_String.cpp"; path = "../../../../modules/juce_core/text/juce_String.cpp"; sourceTree = "SOURCE_ROOT"; }; 371CABFCE28A273E9150F537 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DrawablePath.h"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawablePath.h"; sourceTree = "SOURCE_ROOT"; }; @@ -579,6 +580,7 @@ 704A1428992F4CA4A606E2B2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Desktop.h"; path = "../../../../modules/juce_gui_basics/components/juce_Desktop.h"; sourceTree = "SOURCE_ROOT"; }; 705AC662E310AC822FDEA734 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ZipFile.cpp"; path = "../../../../modules/juce_core/zip/juce_ZipFile.cpp"; sourceTree = "SOURCE_ROOT"; }; 70833A7D4499DDCFA183E14B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jidctred.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jidctred.c"; sourceTree = "SOURCE_ROOT"; }; + 70964D7E4EC5D988A2B2E460 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FlexBox.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.cpp"; sourceTree = "SOURCE_ROOT"; }; 709C82A5435B2B3933ED5343 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LowLevelGraphicsPostScriptRenderer.h"; path = "../../../../modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.h"; sourceTree = "SOURCE_ROOT"; }; 70BA280499987A1D14FCB1A3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MemoryBlock.cpp"; path = "../../../../modules/juce_core/memory/juce_MemoryBlock.cpp"; sourceTree = "SOURCE_ROOT"; }; 70D113696646BD43B4D0C3A6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_StringArray.cpp"; path = "../../../../modules/juce_core/text/juce_StringArray.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -835,6 +837,7 @@ A31CE7177BF947DB60F72D94 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_BubbleMessageComponent.cpp"; path = "../../../../modules/juce_gui_extra/misc/juce_BubbleMessageComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; A3F95510DCE3352156FE67E4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_audio_utils.cpp"; path = "../../../../modules/juce_audio_utils/juce_audio_utils.cpp"; sourceTree = "SOURCE_ROOT"; }; A3FF50EFE17D8634A9A0A6EC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = framing.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/framing.c"; sourceTree = "SOURCE_ROOT"; }; + A4DAEB5C0621C1C04EA93AEC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_VSTInterface.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_VSTInterface.h"; sourceTree = "SOURCE_ROOT"; }; A52038A2E61AB03CF55A3B0F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_BufferingAudioFormatReader.cpp"; path = "../../../../modules/juce_audio_formats/format/juce_BufferingAudioFormatReader.cpp"; sourceTree = "SOURCE_ROOT"; }; A5479787577EB56F20ECF48F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CAReferenceCounted.h; path = "../../../../modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CAReferenceCounted.h"; sourceTree = "SOURCE_ROOT"; }; A59A08DCC76EE0FC7EBE1203 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; @@ -1198,6 +1201,7 @@ EECBEDF7C26CF9597CC601D2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FlacAudioFormat.cpp"; path = "../../../../modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp"; sourceTree = "SOURCE_ROOT"; }; EED2AEDB27E7562C4DCFA637 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TimeSliceThread.h"; path = "../../../../modules/juce_core/threads/juce_TimeSliceThread.h"; sourceTree = "SOURCE_ROOT"; }; EFD8E22899758751230A8590 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MemoryOutputStream.h"; path = "../../../../modules/juce_core/streams/juce_MemoryOutputStream.h"; sourceTree = "SOURCE_ROOT"; }; + F00B6472C8811E341D954036 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexBox.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.h"; sourceTree = "SOURCE_ROOT"; }; F04CF5D4410243EF3DEDBEB8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Font.cpp"; path = "../../../../modules/juce_graphics/fonts/juce_Font.cpp"; sourceTree = "SOURCE_ROOT"; }; F0DC1A84185952857B3DCAE8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LagrangeInterpolator.cpp"; path = "../../../../modules/juce_audio_basics/effects/juce_LagrangeInterpolator.cpp"; sourceTree = "SOURCE_ROOT"; }; F0E927F230180C28CFB91C99 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = misc.h; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/misc.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1746,6 +1750,7 @@ 6A72E46DBDCFAD6F7039E739, F6AE333028FC864D4653A7B5, 070E3EFE91BE8407EE1EBD8C, + A4DAEB5C0621C1C04EA93AEC, A9C466FBA4FCF6484BCF86A2, 6501BB1AAFD5B3DC4A783F85, CC04A3CE3003C0A0AB35A7AF, ); name = "format_types"; sourceTree = ""; }; @@ -2459,6 +2464,9 @@ D18B1676A7BB2890B81717FD, D7FE483198CE40495DE72435, 5647736926AE116B8C392630, + 70964D7E4EC5D988A2B2E460, + F00B6472C8811E341D954036, + 36793CB90360BAF15C6C94D3, 4AB9AA07703E3BAE99B586C3, 6A3C840E1B6CD34CA8C8DB4B, C859B01B55EAB67BC10ED803, @@ -2802,6 +2810,7 @@ INFOPLIST_FILE = Info-VST.plist; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-bundle -lJuceDemoPlugin"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.JuceDemoPlugin; @@ -2838,6 +2847,7 @@ INFOPLIST_FILE = Info-VST.plist; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-bundle -lJuceDemoPlugin"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.JuceDemoPlugin; @@ -2873,6 +2883,7 @@ INFOPLIST_FILE = Info-VST3.plist; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST3/"; LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-bundle -lJuceDemoPlugin"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.JuceDemoPlugin; @@ -2909,6 +2920,7 @@ INFOPLIST_FILE = Info-VST3.plist; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST3/"; LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-bundle -lJuceDemoPlugin"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.JuceDemoPlugin; @@ -2944,6 +2956,7 @@ INFOPLIST_FILE = Info-AU.plist; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-bundle -lJuceDemoPlugin"; OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\""; @@ -2981,6 +2994,7 @@ INFOPLIST_FILE = Info-AU.plist; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-bundle -lJuceDemoPlugin"; OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\""; @@ -3013,6 +3027,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INSTALL_PATH = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; PRODUCT_BUNDLE_IDENTIFIER = com.juce.JuceDemoPlugin; SDKROOT_ppc = macosx10.5; }; name = Debug; }; @@ -3043,6 +3058,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INSTALL_PATH = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; PRODUCT_BUNDLE_IDENTIFIER = com.juce.JuceDemoPlugin; SDKROOT_ppc = macosx10.5; }; name = Release; }; diff --git a/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin.vcxproj b/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin.vcxproj index 734d9f99..5de4fcd3 100644 --- a/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin.vcxproj +++ b/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin.vcxproj @@ -1459,6 +1459,9 @@ true + + true + true @@ -1974,6 +1977,7 @@ + @@ -2283,6 +2287,8 @@ + + diff --git a/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin.vcxproj.filters b/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin.vcxproj.filters index 0c2e50c0..743e1474 100644 --- a/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin.vcxproj.filters +++ b/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin.vcxproj.filters @@ -1777,6 +1777,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2781,6 +2784,9 @@ Juce Modules\juce_audio_processors\format_types + + Juce Modules\juce_audio_processors\format_types + Juce Modules\juce_audio_processors\format_types @@ -3708,6 +3714,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/examples/audio plugin demo/JuceDemoPlugin.jucer b/examples/audio plugin demo/JuceDemoPlugin.jucer index a2dce7b7..a2237d6e 100644 --- a/examples/audio plugin demo/JuceDemoPlugin.jucer +++ b/examples/audio plugin demo/JuceDemoPlugin.jucer @@ -8,7 +8,7 @@ pluginWantsMidiIn="1" pluginProducesMidiOut="1" pluginSilenceInIsSilenceOut="0" pluginTailLength="0" pluginEditorRequiresKeys="1" pluginAUExportPrefix="JuceDemoProjectAU" pluginAUViewClass="JuceDemoProjectAU_V1" pluginRTASCategory="" - bundleIdentifier="com.juce.JuceDemoPlugin" jucerVersion="4.2.3" + bundleIdentifier="com.juce.JuceDemoPlugin" jucerVersion="4.2.4" companyName="ROLI Ltd." aaxIdentifier="com.yourcompany.JuceDemoPlugin" buildAAX="0" pluginAAXCategory="AAX_ePlugInCategory_Dynamics" includeBinaryInAppConfig="1" buildVST3="1" pluginManufacturerEmail="support@yourcompany.com" diff --git a/examples/audio plugin demo/JuceLibraryCode/AppConfig.h b/examples/audio plugin demo/JuceLibraryCode/AppConfig.h index 08cf3a60..77267349 100644 --- a/examples/audio plugin demo/JuceLibraryCode/AppConfig.h +++ b/examples/audio plugin demo/JuceLibraryCode/AppConfig.h @@ -157,6 +157,14 @@ //#define JUCE_USE_CURL #endif +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES +#endif + //============================================================================== // juce_graphics flags: diff --git a/examples/audio plugin demo/Source/PluginEditor.cpp b/examples/audio plugin demo/Source/PluginEditor.cpp index 463a603b..8639737b 100644 --- a/examples/audio plugin demo/Source/PluginEditor.cpp +++ b/examples/audio plugin demo/Source/PluginEditor.cpp @@ -28,7 +28,10 @@ public: void valueChanged() override { - param.setValueNotifyingHost ((float) Slider::getValue()); + if (isMouseButtonDown()) + param.setValueNotifyingHost ((float) Slider::getValue()); + else + param.setValue ((float) Slider::getValue()); } void timerCallback() override { updateSliderPos(); } @@ -56,9 +59,9 @@ public: JuceDemoPluginAudioProcessorEditor::JuceDemoPluginAudioProcessorEditor (JuceDemoPluginAudioProcessor& owner) : AudioProcessorEditor (owner), midiKeyboard (owner.keyboardState, MidiKeyboardComponent::horizontalKeyboard), - timecodeDisplayLabel (String::empty), - gainLabel (String::empty, "Throughput level:"), - delayLabel (String::empty, "Delay:") + timecodeDisplayLabel (String()), + gainLabel (String(), "Throughput level:"), + delayLabel (String(), "Delay:") { // add some sliders.. addAndMakeVisible (gainSlider = new ParameterSlider (*owner.gainParam)); diff --git a/examples/audio plugin demo/Source/PluginProcessor.h b/examples/audio plugin demo/Source/PluginProcessor.h index 4a4bc315..3e9030c6 100644 --- a/examples/audio plugin demo/Source/PluginProcessor.h +++ b/examples/audio plugin demo/Source/PluginProcessor.h @@ -56,10 +56,10 @@ public: double getTailLengthSeconds() const override { return 0.0; } //============================================================================== - int getNumPrograms() override { return 1; } + int getNumPrograms() override { return 0; } int getCurrentProgram() override { return 0; } void setCurrentProgram (int /*index*/) override {} - const String getProgramName (int /*index*/) override { return "Default"; } + const String getProgramName (int /*index*/) override { return String(); } void changeProgramName (int /*index*/, const String& /*name*/) override {} //============================================================================== diff --git a/examples/audio plugin host/Builds/Linux/Makefile b/examples/audio plugin host/Builds/Linux/Makefile index 2257e6f5..baf2d4a0 100644 --- a/examples/audio plugin host/Builds/Linux/Makefile +++ b/examples/audio plugin host/Builds/Linux/Makefile @@ -4,181 +4,193 @@ # (this disables dependency generation if multiple architectures are set) DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD) +ifndef STRIP + STRIP=strip +endif + +ifndef AR + AR=ar +endif + ifndef CONFIG CONFIG=Debug endif ifeq ($(CONFIG),Debug) - BINDIR := build - LIBDIR := build - OBJDIR := build/intermediate/Debug - OUTDIR := build + JUCE_BINDIR := build + JUCE_LIBDIR := build + JUCE_OBJDIR := build/intermediate/Debug + JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) TARGET_ARCH := -march=native endif - CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_7346DA2A=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 -I /usr/include -I /usr/include/freetype2 -I ~/SDKs/VST3\ SDK -I ../../JuceLibraryCode -I ../../../../modules - CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 - CXXFLAGS += $(CFLAGS) -std=c++11 - LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_7346DA2A=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama) -pthread -I../../JuceLibraryCode -I../../../../modules + JUCE_CFLAGS += $(CFLAGS) $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 + JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) -std=c++11 + JUCE_LDFLAGS += $(LDFLAGS) $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa freetype2 libcurl x11 xext xinerama) -lGL -ldl -lpthread -lrt TARGET := Plugin\ Host - BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) - CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR) + BLDCMD = $(CXX) -o $(JUCE_OUTDIR)/$(TARGET) $(OBJECTS) $(JUCE_LDFLAGS) $(RESOURCES) $(TARGET_ARCH) + CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif ifeq ($(CONFIG),Release) - BINDIR := build - LIBDIR := build - OBJDIR := build/intermediate/Release - OUTDIR := build + JUCE_BINDIR := build + JUCE_LIBDIR := build + JUCE_OBJDIR := build/intermediate/Release + JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) TARGET_ARCH := -march=native endif - CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_7346DA2A=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 -I /usr/include -I /usr/include/freetype2 -I ~/SDKs/VST3\ SDK -I ../../JuceLibraryCode -I ../../../../modules - CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -Os - CXXFLAGS += $(CFLAGS) -std=c++11 - LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_7346DA2A=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama) -pthread -I../../JuceLibraryCode -I../../../../modules + JUCE_CFLAGS += $(CFLAGS) $(JUCE_CPPFLAGS) $(TARGET_ARCH) -Os + JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) -std=c++11 + JUCE_LDFLAGS += $(LDFLAGS) $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa freetype2 libcurl x11 xext xinerama) -lGL -ldl -lpthread -lrt TARGET := Plugin\ Host - BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) - CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR) + BLDCMD = $(CXX) -o $(JUCE_OUTDIR)/$(TARGET) $(OBJECTS) $(JUCE_LDFLAGS) $(RESOURCES) $(TARGET_ARCH) + CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif OBJECTS := \ - $(OBJDIR)/FilterGraph_62e9c017.o \ - $(OBJDIR)/GraphEditorPanel_3dbd4872.o \ - $(OBJDIR)/HostStartup_5ce96f96.o \ - $(OBJDIR)/InternalFilters_beb54bdf.o \ - $(OBJDIR)/MainHostWindow_e920295a.o \ - $(OBJDIR)/juce_audio_basics_6b797ca1.o \ - $(OBJDIR)/juce_audio_devices_a742c38b.o \ - $(OBJDIR)/juce_audio_formats_5a29c68a.o \ - $(OBJDIR)/juce_audio_processors_dea3173d.o \ - $(OBJDIR)/juce_audio_utils_c7eb679f.o \ - $(OBJDIR)/juce_core_75b14332.o \ - $(OBJDIR)/juce_cryptography_6de2ebff.o \ - $(OBJDIR)/juce_data_structures_72d3da2c.o \ - $(OBJDIR)/juce_events_d2be882c.o \ - $(OBJDIR)/juce_graphics_9c18891e.o \ - $(OBJDIR)/juce_gui_basics_8a6da59c.o \ - $(OBJDIR)/juce_gui_extra_4a026f23.o \ - $(OBJDIR)/juce_opengl_cd70b4c2.o \ - $(OBJDIR)/juce_video_f128c512.o \ + $(JUCE_OBJDIR)/FilterGraph_62e9c017.o \ + $(JUCE_OBJDIR)/GraphEditorPanel_3dbd4872.o \ + $(JUCE_OBJDIR)/HostStartup_5ce96f96.o \ + $(JUCE_OBJDIR)/InternalFilters_beb54bdf.o \ + $(JUCE_OBJDIR)/MainHostWindow_e920295a.o \ + $(JUCE_OBJDIR)/juce_audio_basics_6b797ca1.o \ + $(JUCE_OBJDIR)/juce_audio_devices_a742c38b.o \ + $(JUCE_OBJDIR)/juce_audio_formats_5a29c68a.o \ + $(JUCE_OBJDIR)/juce_audio_processors_dea3173d.o \ + $(JUCE_OBJDIR)/juce_audio_utils_c7eb679f.o \ + $(JUCE_OBJDIR)/juce_core_75b14332.o \ + $(JUCE_OBJDIR)/juce_cryptography_6de2ebff.o \ + $(JUCE_OBJDIR)/juce_data_structures_72d3da2c.o \ + $(JUCE_OBJDIR)/juce_events_d2be882c.o \ + $(JUCE_OBJDIR)/juce_graphics_9c18891e.o \ + $(JUCE_OBJDIR)/juce_gui_basics_8a6da59c.o \ + $(JUCE_OBJDIR)/juce_gui_extra_4a026f23.o \ + $(JUCE_OBJDIR)/juce_opengl_cd70b4c2.o \ + $(JUCE_OBJDIR)/juce_video_f128c512.o \ .PHONY: clean -$(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES) +$(JUCE_OUTDIR)/$(TARGET): check-pkg-config $(OBJECTS) $(RESOURCES) @echo Linking Plugin Host - -@mkdir -p $(BINDIR) - -@mkdir -p $(LIBDIR) - -@mkdir -p $(OUTDIR) + -@mkdir -p $(JUCE_BINDIR) + -@mkdir -p $(JUCE_LIBDIR) + -@mkdir -p $(JUCE_OUTDIR) @$(BLDCMD) +check-pkg-config: + @command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } + @pkg-config --print-errors alsa freetype2 libcurl x11 xext xinerama + clean: @echo Cleaning Plugin Host @$(CLEANCMD) strip: @echo Stripping Plugin Host - -@strip --strip-unneeded $(OUTDIR)/$(TARGET) + -@$(STRIP) --strip-unneeded $(JUCE_OUTDIR)/$(TARGET) -$(OBJDIR)/FilterGraph_62e9c017.o: ../../Source/FilterGraph.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/FilterGraph_62e9c017.o: ../../Source/FilterGraph.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling FilterGraph.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/GraphEditorPanel_3dbd4872.o: ../../Source/GraphEditorPanel.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/GraphEditorPanel_3dbd4872.o: ../../Source/GraphEditorPanel.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling GraphEditorPanel.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/HostStartup_5ce96f96.o: ../../Source/HostStartup.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/HostStartup_5ce96f96.o: ../../Source/HostStartup.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling HostStartup.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/InternalFilters_beb54bdf.o: ../../Source/InternalFilters.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/InternalFilters_beb54bdf.o: ../../Source/InternalFilters.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling InternalFilters.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/MainHostWindow_e920295a.o: ../../Source/MainHostWindow.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/MainHostWindow_e920295a.o: ../../Source/MainHostWindow.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling MainHostWindow.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_basics_6b797ca1.o: ../../JuceLibraryCode/juce_audio_basics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_basics_6b797ca1.o: ../../JuceLibraryCode/juce_audio_basics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_basics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_devices_a742c38b.o: ../../JuceLibraryCode/juce_audio_devices.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_devices_a742c38b.o: ../../JuceLibraryCode/juce_audio_devices.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_devices.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_formats_5a29c68a.o: ../../JuceLibraryCode/juce_audio_formats.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_formats_5a29c68a.o: ../../JuceLibraryCode/juce_audio_formats.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_formats.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_processors_dea3173d.o: ../../JuceLibraryCode/juce_audio_processors.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_processors_dea3173d.o: ../../JuceLibraryCode/juce_audio_processors.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_processors.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_utils_c7eb679f.o: ../../JuceLibraryCode/juce_audio_utils.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_utils_c7eb679f.o: ../../JuceLibraryCode/juce_audio_utils.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_utils.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_core.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_cryptography_6de2ebff.o: ../../JuceLibraryCode/juce_cryptography.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_cryptography_6de2ebff.o: ../../JuceLibraryCode/juce_cryptography.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_cryptography.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_data_structures_72d3da2c.o: ../../JuceLibraryCode/juce_data_structures.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_data_structures_72d3da2c.o: ../../JuceLibraryCode/juce_data_structures.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_data_structures.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_events_d2be882c.o: ../../JuceLibraryCode/juce_events.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_events_d2be882c.o: ../../JuceLibraryCode/juce_events.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_events.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_graphics_9c18891e.o: ../../JuceLibraryCode/juce_graphics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_graphics_9c18891e.o: ../../JuceLibraryCode/juce_graphics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_graphics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_gui_basics_8a6da59c.o: ../../JuceLibraryCode/juce_gui_basics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_gui_basics_8a6da59c.o: ../../JuceLibraryCode/juce_gui_basics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_gui_basics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_gui_extra_4a026f23.o: ../../JuceLibraryCode/juce_gui_extra.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_gui_extra_4a026f23.o: ../../JuceLibraryCode/juce_gui_extra.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_gui_extra.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_opengl_cd70b4c2.o: ../../JuceLibraryCode/juce_opengl.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_opengl_cd70b4c2.o: ../../JuceLibraryCode/juce_opengl.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_opengl.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_video_f128c512.o: ../../JuceLibraryCode/juce_video.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_video_f128c512.o: ../../JuceLibraryCode/juce_video.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_video.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -include $(OBJECTS:%.o=%.d) diff --git a/examples/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj b/examples/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj index 1a1f5515..08ccc369 100644 --- a/examples/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj +++ b/examples/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj @@ -71,6 +71,7 @@ 05B20BD978297F87BD60E6EC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MultiTouchMapper.h"; path = "../../../../modules/juce_gui_basics/native/juce_MultiTouchMapper.h"; sourceTree = "SOURCE_ROOT"; }; 05F4EC3408F31D59EF961555 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LagrangeInterpolator.h"; path = "../../../../modules/juce_audio_basics/effects/juce_LagrangeInterpolator.h"; sourceTree = "SOURCE_ROOT"; }; 0647115F688F4B35C22C0A56 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_KeyMappingEditorComponent.cpp"; path = "../../../../modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; + 069AD628740BD9731986CDFC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_VSTInterface.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_VSTInterface.h"; sourceTree = "SOURCE_ROOT"; }; 06C1447B9CBC6813BB7BEA53 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_StringPool.h"; path = "../../../../modules/juce_core/text/juce_StringPool.h"; sourceTree = "SOURCE_ROOT"; }; 06EB1158FAA7044D25A1B836 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DrawableComposite.h"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableComposite.h"; sourceTree = "SOURCE_ROOT"; }; 072056D37C68FC94B080506C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ResamplingAudioSource.cpp"; path = "../../../../modules/juce_audio_basics/sources/juce_ResamplingAudioSource.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -495,6 +496,7 @@ 5C24DE268797C1C7AC932837 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Socket.cpp"; path = "../../../../modules/juce_core/network/juce_Socket.cpp"; sourceTree = "SOURCE_ROOT"; }; 5CAD4033015519DB9995E82C = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SystemStats.h"; path = "../../../../modules/juce_core/system/juce_SystemStats.h"; sourceTree = "SOURCE_ROOT"; }; 5CD825D3FEC4CA9FEE05D4D2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AsyncUpdater.cpp"; path = "../../../../modules/juce_events/broadcasters/juce_AsyncUpdater.cpp"; sourceTree = "SOURCE_ROOT"; }; + 5D4FF9B8DDE175EF5807AA2F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexItem.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexItem.h"; sourceTree = "SOURCE_ROOT"; }; 5D6AF55EDB77231E95C23086 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AttributedString.h"; path = "../../../../modules/juce_graphics/fonts/juce_AttributedString.h"; sourceTree = "SOURCE_ROOT"; }; 5DF1460C31CD1BF8FADF56D3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ComponentAnimator.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp"; sourceTree = "SOURCE_ROOT"; }; 5E0882CA277CB65EBD9292BD = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_TemporaryFile.cpp"; path = "../../../../modules/juce_core/files/juce_TemporaryFile.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -937,6 +939,7 @@ BFC98B56313D64177AE6B385 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_GZIPDecompressorInputStream.h"; path = "../../../../modules/juce_core/zip/juce_GZIPDecompressorInputStream.h"; sourceTree = "SOURCE_ROOT"; }; BFCA358DEECC78ABB7B6E8A5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_XmlElement.cpp"; path = "../../../../modules/juce_core/xml/juce_XmlElement.cpp"; sourceTree = "SOURCE_ROOT"; }; BFE7688FBFC63D7180BC9D6A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioProcessorParameters.cpp"; path = "../../../../modules/juce_audio_processors/utilities/juce_AudioProcessorParameters.cpp"; sourceTree = "SOURCE_ROOT"; }; + C01972C590DF60155C0DEB02 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexBox.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.h"; sourceTree = "SOURCE_ROOT"; }; C0866AEADD1BEEDB904EE8A3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = lpc.h; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/lpc.h"; sourceTree = "SOURCE_ROOT"; }; C08CEA80C09A398668B42CF9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Sampler.h"; path = "../../../../modules/juce_audio_formats/sampler/juce_Sampler.h"; sourceTree = "SOURCE_ROOT"; }; C0EAB8DB78CC1330EBFB1BB4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_FileChooser.cpp"; path = "../../../../modules/juce_gui_basics/native/juce_win32_FileChooser.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -1038,6 +1041,7 @@ D5952905FC386C19D0818398 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_JPEGLoader.cpp"; path = "../../../../modules/juce_graphics/image_formats/juce_JPEGLoader.cpp"; sourceTree = "SOURCE_ROOT"; }; D5C074653417ED69A2B570AC = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_audio_processors.mm"; path = "../../../../modules/juce_audio_processors/juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; }; D5CCBF553F4EDCB7D7063619 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = backends.h; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/backends.h"; sourceTree = "SOURCE_ROOT"; }; + D6D2E69C959FC3BD17220770 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FlexBox.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.cpp"; sourceTree = "SOURCE_ROOT"; }; D6F2511A04A72954F91F6761 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = bitrate.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/bitrate.c"; sourceTree = "SOURCE_ROOT"; }; D7433453EBB3700D2805FF42 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_XmlDocument.h"; path = "../../../../modules/juce_core/xml/juce_XmlDocument.h"; sourceTree = "SOURCE_ROOT"; }; D773325946ED4F2F2A1285A0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jfdctfst.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jfdctfst.c"; sourceTree = "SOURCE_ROOT"; }; @@ -1586,6 +1590,7 @@ D99B064D47C6B0FDDBC66B02, ACE3FF969AC408A50E9A6A4C, B1CA1F3AE7555C4FB4CE52D2, + 069AD628740BD9731986CDFC, 10EE0138720A51EBAD46FFCC, A53F1F6AAA9F18823C239E6C, C270737E2B85C6D98E145525, ); name = "format_types"; sourceTree = ""; }; @@ -2320,6 +2325,9 @@ 6493E8C53EE6361EEA57D243, 96E7B79CFB1B3EC9EC2505CD, 5B6A592439B2BEA9C6B14720, + D6D2E69C959FC3BD17220770, + C01972C590DF60155C0DEB02, + 5D4FF9B8DDE175EF5807AA2F, E218E66CE4F1DDA0B9BED814, 559A2F8A7A121471D8026D81, F3FCF5C0D92A2991A513B0D3, @@ -2708,6 +2716,7 @@ HEADER_SEARCH_PATHS = ("\"~/SDKs/VST3 SDK\"", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; PRODUCT_BUNDLE_IDENTIFIER = com.roli.pluginhost; SDKROOT_ppc = macosx10.5; }; name = Debug; }; diff --git a/examples/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj b/examples/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj index d8c546c8..213946f6 100644 --- a/examples/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj +++ b/examples/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj @@ -1346,6 +1346,9 @@ true + + true + true @@ -1860,6 +1863,7 @@ + @@ -2177,6 +2181,8 @@ + + diff --git a/examples/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj.filters b/examples/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj.filters index dee059dd..2cbb0cb3 100644 --- a/examples/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj.filters +++ b/examples/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj.filters @@ -1669,6 +1669,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2586,6 +2589,9 @@ Juce Modules\juce_audio_processors\format_types + + Juce Modules\juce_audio_processors\format_types + Juce Modules\juce_audio_processors\format_types @@ -3537,6 +3543,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host.vcxproj b/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host.vcxproj index 2ae74a68..8b8b85c9 100644 --- a/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host.vcxproj +++ b/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host.vcxproj @@ -1352,6 +1352,9 @@ true + + true + true @@ -1866,6 +1869,7 @@ + @@ -2183,6 +2187,8 @@ + + diff --git a/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host.vcxproj.filters b/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host.vcxproj.filters index 525682c1..aefc8b19 100644 --- a/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host.vcxproj.filters +++ b/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host.vcxproj.filters @@ -1669,6 +1669,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2586,6 +2589,9 @@ Juce Modules\juce_audio_processors\format_types + + Juce Modules\juce_audio_processors\format_types + Juce Modules\juce_audio_processors\format_types @@ -3537,6 +3543,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host.vcxproj b/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host.vcxproj index 9bf9d7fc..5d19191e 100644 --- a/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host.vcxproj +++ b/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host.vcxproj @@ -1352,6 +1352,9 @@ true + + true + true @@ -1866,6 +1869,7 @@ + @@ -2183,6 +2187,8 @@ + + diff --git a/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host.vcxproj.filters b/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host.vcxproj.filters index 174835e6..53c77fbb 100644 --- a/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host.vcxproj.filters +++ b/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host.vcxproj.filters @@ -1669,6 +1669,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2586,6 +2589,9 @@ Juce Modules\juce_audio_processors\format_types + + Juce Modules\juce_audio_processors\format_types + Juce Modules\juce_audio_processors\format_types @@ -3537,6 +3543,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/examples/audio plugin host/JuceLibraryCode/AppConfig.h b/examples/audio plugin host/JuceLibraryCode/AppConfig.h index 4800c39b..5a6a6e8e 100644 --- a/examples/audio plugin host/JuceLibraryCode/AppConfig.h +++ b/examples/audio plugin host/JuceLibraryCode/AppConfig.h @@ -152,6 +152,14 @@ //#define JUCE_USE_CURL #endif +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES +#endif + //============================================================================== // juce_graphics flags: diff --git a/examples/audio plugin host/Plugin Host.jucer b/examples/audio plugin host/Plugin Host.jucer index c3068823..be48a6b9 100644 --- a/examples/audio plugin host/Plugin Host.jucer +++ b/examples/audio plugin host/Plugin Host.jucer @@ -2,7 +2,7 @@ xml (createXml()); - if (! xml->writeToFile (file, String::empty)) + if (! xml->writeToFile (file, String())) return Result::fail ("Couldn't write to the file"); return Result::ok(); diff --git a/examples/audio plugin host/Source/GraphEditorPanel.cpp b/examples/audio plugin host/Source/GraphEditorPanel.cpp index 1824551f..73944887 100644 --- a/examples/audio plugin host/Source/GraphEditorPanel.cpp +++ b/examples/audio plugin host/Source/GraphEditorPanel.cpp @@ -969,7 +969,7 @@ void GraphEditorPanel::dragConnector (const MouseEvent& e) if (draggingConnector != nullptr) { - draggingConnector->setTooltip (String::empty); + draggingConnector->setTooltip (String()); int x = e2.x; int y = e2.y; @@ -1013,7 +1013,7 @@ void GraphEditorPanel::endDraggingConnector (const MouseEvent& e) if (draggingConnector == nullptr) return; - draggingConnector->setTooltip (String::empty); + draggingConnector->setTooltip (String()); const MouseEvent e2 (e.getEventRelativeTo (this)); @@ -1091,14 +1091,14 @@ private: //============================================================================== GraphDocumentComponent::GraphDocumentComponent (AudioPluginFormatManager& formatManager, AudioDeviceManager* deviceManager_) - : graph (formatManager), deviceManager (deviceManager_), + : graph (new FilterGraph (formatManager)), deviceManager (deviceManager_), graphPlayer (getAppProperties().getUserSettings()->getBoolValue ("doublePrecisionProcessing", false)) { - addAndMakeVisible (graphPanel = new GraphEditorPanel (graph)); + addAndMakeVisible (graphPanel = new GraphEditorPanel (*graph)); deviceManager->addChangeListener (graphPanel); - graphPlayer.setProcessor (&graph.getGraph()); + graphPlayer.setProcessor (&graph->getGraph()); keyState.addListener (&graphPlayer.getMidiMessageCollector()); @@ -1108,23 +1108,16 @@ GraphDocumentComponent::GraphDocumentComponent (AudioPluginFormatManager& format addAndMakeVisible (statusBar = new TooltipBar()); deviceManager->addAudioCallback (&graphPlayer); - deviceManager->addMidiInputCallback (String::empty, &graphPlayer.getMidiMessageCollector()); + deviceManager->addMidiInputCallback (String(), &graphPlayer.getMidiMessageCollector()); graphPanel->updateComponents(); } GraphDocumentComponent::~GraphDocumentComponent() { - deviceManager->removeAudioCallback (&graphPlayer); - deviceManager->removeMidiInputCallback (String::empty, &graphPlayer.getMidiMessageCollector()); - deviceManager->removeChangeListener (graphPanel); + releaseGraph(); - deleteAllChildren(); - - graphPlayer.setProcessor (nullptr); keyState.removeListener (&graphPlayer.getMidiMessageCollector()); - - graph.clear(); } void GraphDocumentComponent::resized() @@ -1141,3 +1134,20 @@ void GraphDocumentComponent::createNewPlugin (const PluginDescription* desc, int { graphPanel->createNewPlugin (desc, x, y); } + +void GraphDocumentComponent::unfocusKeyboardComponent() +{ + keyboardComp->unfocusAllComponents(); +} + +void GraphDocumentComponent::releaseGraph() +{ + deviceManager->removeAudioCallback (&graphPlayer); + deviceManager->removeMidiInputCallback (String(), &graphPlayer.getMidiMessageCollector()); + deviceManager->removeChangeListener (graphPanel); + + deleteAllChildren(); + + graphPlayer.setProcessor (nullptr); + graph = nullptr; +} diff --git a/examples/audio plugin host/Source/GraphEditorPanel.h b/examples/audio plugin host/Source/GraphEditorPanel.h index dde5654e..9c3ee528 100644 --- a/examples/audio plugin host/Source/GraphEditorPanel.h +++ b/examples/audio plugin host/Source/GraphEditorPanel.h @@ -91,11 +91,17 @@ public: inline void setDoublePrecision (bool doublePrecision) { graphPlayer.setDoublePrecisionProcessing (doublePrecision); } //============================================================================== - FilterGraph graph; + ScopedPointer graph; //============================================================================== void resized(); + //============================================================================== + void unfocusKeyboardComponent(); + + //============================================================================== + void releaseGraph(); + private: //============================================================================== AudioDeviceManager* deviceManager; diff --git a/examples/audio plugin host/Source/HostStartup.cpp b/examples/audio plugin host/Source/HostStartup.cpp index 52184579..30a489b0 100644 --- a/examples/audio plugin host/Source/HostStartup.cpp +++ b/examples/audio plugin host/Source/HostStartup.cpp @@ -94,7 +94,8 @@ public: if (fileToOpen.existsAsFile()) if (GraphDocumentComponent* graph = mainWindow->getGraphEditor()) - graph->graph.loadFrom (fileToOpen, true); + if (FilterGraph* ioGraph = graph->graph.get()) + ioGraph->loadFrom (fileToOpen, true); } void shutdown() override diff --git a/examples/audio plugin host/Source/MainHostWindow.cpp b/examples/audio plugin host/Source/MainHostWindow.cpp index 8b24be85..63cbe225 100644 --- a/examples/audio plugin host/Source/MainHostWindow.cpp +++ b/examples/audio plugin host/Source/MainHostWindow.cpp @@ -105,7 +105,9 @@ MainHostWindow::MainHostWindow() ->getIntValue ("pluginSortMethod", KnownPluginList::sortByManufacturer); knownPluginList.addChangeListener (this); - getGraphEditor()->graph.addChangeListener (this); + + if (FilterGraph* filterGraph = getGraphEditor()->graph.get()) + filterGraph->addChangeListener (this); addKeyListener (getCommandManager().getKeyMappings()); @@ -123,18 +125,19 @@ MainHostWindow::MainHostWindow() MainHostWindow::~MainHostWindow() { pluginListWindow = nullptr; + knownPluginList.removeChangeListener (this); + + if (FilterGraph* filterGraph = getGraphEditor()->graph.get()) + filterGraph->removeChangeListener (this); + + getAppProperties().getUserSettings()->setValue ("mainWindowPos", getWindowStateAsString()); + clearContentComponent(); #if JUCE_MAC setMacMainMenu (nullptr); #else setMenuBar (nullptr); #endif - - knownPluginList.removeChangeListener (this); - getGraphEditor()->graph.removeChangeListener (this); - - getAppProperties().getUserSettings()->setValue ("mainWindowPos", getWindowStateAsString()); - clearContentComponent(); } void MainHostWindow::closeButtonPressed() @@ -147,8 +150,12 @@ bool MainHostWindow::tryToQuitApplication() PluginWindow::closeAllCurrentlyOpenWindows(); if (getGraphEditor() == nullptr - || getGraphEditor()->graph.saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) + || getGraphEditor()->graph->saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) { + // Some plug-ins do not want [NSApp stop] to be called + // before the plug-ins are not deallocated. + getGraphEditor()->releaseGraph(); + JUCEApplication::quit(); return true; } @@ -172,11 +179,11 @@ void MainHostWindow::changeListenerCallback (ChangeBroadcaster* changed) getAppProperties().saveIfNeeded(); } } - else if (changed == &getGraphEditor()->graph) + else if (changed == getGraphEditor()->graph) { String title = JUCEApplication::getInstance()->getApplicationName(); - File f = getGraphEditor()->graph.getFile(); + File f = getGraphEditor()->graph->getFile(); if (f.existsAsFile()) title = f.getFileName() + " - " + title; @@ -260,7 +267,8 @@ void MainHostWindow::menuItemSelected (int menuItemID, int /*topLevelMenuIndex*/ if (menuItemID == 250) { if (graphEditor != nullptr) - graphEditor->graph.clear(); + if (FilterGraph* filterGraph = getGraphEditor()->graph.get()) + filterGraph->clear(); } else if (menuItemID >= 100 && menuItemID < 200) { @@ -268,8 +276,10 @@ void MainHostWindow::menuItemSelected (int menuItemID, int /*topLevelMenuIndex*/ recentFiles.restoreFromString (getAppProperties().getUserSettings() ->getValue ("recentFilterGraphFiles")); - if (graphEditor != nullptr && graphEditor->graph.saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) - graphEditor->graph.loadFrom (recentFiles.getFile (menuItemID - 100), true); + if (graphEditor != nullptr + && getGraphEditor()->graph != nullptr + && graphEditor->graph->saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) + graphEditor->graph->loadFrom (recentFiles.getFile (menuItemID - 100), true); } else if (menuItemID >= 200 && menuItemID < 210) { @@ -291,6 +301,14 @@ void MainHostWindow::menuItemSelected (int menuItemID, int /*topLevelMenuIndex*/ } } +void MainHostWindow::menuBarActivated (bool isActivated) +{ + GraphDocumentComponent* const graphEditor = getGraphEditor(); + + if (graphEditor != nullptr && isActivated) + graphEditor->unfocusKeyboardComponent(); +} + void MainHostWindow::createPlugin (const PluginDescription* desc, int x, int y) { GraphDocumentComponent* const graphEditor = getGraphEditor(); @@ -369,12 +387,12 @@ void MainHostWindow::getCommandInfo (const CommandID commandID, ApplicationComma break; case CommandIDs::showPluginListEditor: - result.setInfo ("Edit the list of available plug-Ins...", String::empty, category, 0); + result.setInfo ("Edit the list of available plug-Ins...", String(), category, 0); result.addDefaultKeypress ('p', ModifierKeys::commandModifier); break; case CommandIDs::showAudioSettings: - result.setInfo ("Change the audio device settings", String::empty, category, 0); + result.setInfo ("Change the audio device settings", String(), category, 0); result.addDefaultKeypress ('a', ModifierKeys::commandModifier); break; @@ -383,7 +401,7 @@ void MainHostWindow::getCommandInfo (const CommandID commandID, ApplicationComma break; case CommandIDs::aboutBox: - result.setInfo ("About...", String::empty, category, 0); + result.setInfo ("About...", String(), category, 0); break; case CommandIDs::allWindowsForward: @@ -403,23 +421,23 @@ bool MainHostWindow::perform (const InvocationInfo& info) switch (info.commandID) { case CommandIDs::newFile: - if (graphEditor != nullptr && graphEditor->graph.saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) - graphEditor->graph.newDocument(); + if (graphEditor != nullptr && graphEditor->graph != nullptr && graphEditor->graph->saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) + graphEditor->graph->newDocument(); break; case CommandIDs::open: - if (graphEditor != nullptr && graphEditor->graph.saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) - graphEditor->graph.loadFromUserSpecifiedFile (true); + if (graphEditor != nullptr && graphEditor->graph != nullptr && graphEditor->graph->saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) + graphEditor->graph->loadFromUserSpecifiedFile (true); break; case CommandIDs::save: - if (graphEditor != nullptr) - graphEditor->graph.save (true, true); + if (graphEditor != nullptr && graphEditor->graph != nullptr) + graphEditor->graph->save (true, true); break; case CommandIDs::saveAs: - if (graphEditor != nullptr) - graphEditor->graph.saveAs (File::nonexistent, true, true, true); + if (graphEditor != nullptr && graphEditor->graph != nullptr) + graphEditor->graph->saveAs (File(), true, true, true); break; case CommandIDs::showPluginListEditor: @@ -498,8 +516,8 @@ void MainHostWindow::showAudioSettings() GraphDocumentComponent* const graphEditor = getGraphEditor(); - if (graphEditor != nullptr) - graphEditor->graph.removeIllegalConnections(); + if (graphEditor != nullptr && graphEditor->graph != nullptr) + graphEditor->graph->removeIllegalConnections(); } bool MainHostWindow::isInterestedInFileDrag (const StringArray&) @@ -527,8 +545,9 @@ void MainHostWindow::filesDropped (const StringArray& files, int x, int y) { if (files.size() == 1 && File (files[0]).hasFileExtension (filenameSuffix)) { - if (graphEditor->graph.saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) - graphEditor->graph.loadFrom (File (files[0]), true); + if (FilterGraph* filterGraph = graphEditor->graph.get()) + if (filterGraph->saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) + filterGraph->loadFrom (File (files[0]), true); } else { @@ -558,6 +577,6 @@ bool MainHostWindow::isDoublePrecisionProcessing() void MainHostWindow::updatePrecisionMenuItem (ApplicationCommandInfo& info) { - info.setInfo ("Double floating point precision rendering", String::empty, "General", 0); + info.setInfo ("Double floating point precision rendering", String(), "General", 0); info.setTicked (isDoublePrecisionProcessing()); } diff --git a/examples/audio plugin host/Source/MainHostWindow.h b/examples/audio plugin host/Source/MainHostWindow.h index ccde2ad8..fe4fda2b 100644 --- a/examples/audio plugin host/Source/MainHostWindow.h +++ b/examples/audio plugin host/Source/MainHostWindow.h @@ -70,6 +70,8 @@ public: void fileDragExit (const StringArray& files); void filesDropped (const StringArray& files, int, int); + void menuBarActivated (bool isActive); + StringArray getMenuBarNames(); PopupMenu getMenuForIndex (int topLevelMenuIndex, const String& menuName); void menuItemSelected (int menuItemID, int topLevelMenuIndex); diff --git a/extras/AudioPerformanceTest/AudioPerformanceTest.jucer b/extras/AudioPerformanceTest/AudioPerformanceTest.jucer index c2df6eed..a32fd6f8 100644 --- a/extras/AudioPerformanceTest/AudioPerformanceTest.jucer +++ b/extras/AudioPerformanceTest/AudioPerformanceTest.jucer @@ -2,7 +2,7 @@ + includeBinaryInAppConfig="1" jucerVersion="4.2.4"> diff --git a/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile b/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile index adb76892..86ac13bd 100644 --- a/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile +++ b/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile @@ -4,139 +4,151 @@ # (this disables dependency generation if multiple architectures are set) DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD) +ifndef STRIP + STRIP=strip +endif + +ifndef AR + AR=ar +endif + ifndef CONFIG CONFIG=Debug endif ifeq ($(CONFIG),Debug) - BINDIR := build - LIBDIR := build - OBJDIR := build/intermediate/Debug - OUTDIR := build + JUCE_BINDIR := build + JUCE_LIBDIR := build + JUCE_OBJDIR := build/intermediate/Debug + JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) TARGET_ARCH := -march=native endif - CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../../../modules - CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 - CXXFLAGS += $(CFLAGS) -std=c++11 - LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama) -pthread -I../../JuceLibraryCode -I../../../../modules + JUCE_CFLAGS += $(CFLAGS) $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 + JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) -std=c++11 + JUCE_LDFLAGS += $(LDFLAGS) $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa freetype2 libcurl x11 xext xinerama) -ldl -lpthread -lrt TARGET := AudioPerformanceTest - BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) - CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR) + BLDCMD = $(CXX) -o $(JUCE_OUTDIR)/$(TARGET) $(OBJECTS) $(JUCE_LDFLAGS) $(RESOURCES) $(TARGET_ARCH) + CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif ifeq ($(CONFIG),Release) - BINDIR := build - LIBDIR := build - OBJDIR := build/intermediate/Release - OUTDIR := build + JUCE_BINDIR := build + JUCE_LIBDIR := build + JUCE_OBJDIR := build/intermediate/Release + JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) TARGET_ARCH := -march=native endif - CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../../../modules - CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O3 - CXXFLAGS += $(CFLAGS) -std=c++11 - LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama) -pthread -I../../JuceLibraryCode -I../../../../modules + JUCE_CFLAGS += $(CFLAGS) $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 + JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) -std=c++11 + JUCE_LDFLAGS += $(LDFLAGS) $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa freetype2 libcurl x11 xext xinerama) -ldl -lpthread -lrt TARGET := AudioPerformanceTest - BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) - CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR) + BLDCMD = $(CXX) -o $(JUCE_OUTDIR)/$(TARGET) $(OBJECTS) $(JUCE_LDFLAGS) $(RESOURCES) $(TARGET_ARCH) + CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif OBJECTS := \ - $(OBJDIR)/Main_90ebc5c2.o \ - $(OBJDIR)/juce_audio_basics_6b797ca1.o \ - $(OBJDIR)/juce_audio_devices_a742c38b.o \ - $(OBJDIR)/juce_audio_formats_5a29c68a.o \ - $(OBJDIR)/juce_audio_processors_dea3173d.o \ - $(OBJDIR)/juce_audio_utils_c7eb679f.o \ - $(OBJDIR)/juce_core_75b14332.o \ - $(OBJDIR)/juce_data_structures_72d3da2c.o \ - $(OBJDIR)/juce_events_d2be882c.o \ - $(OBJDIR)/juce_graphics_9c18891e.o \ - $(OBJDIR)/juce_gui_basics_8a6da59c.o \ - $(OBJDIR)/juce_gui_extra_4a026f23.o \ + $(JUCE_OBJDIR)/Main_90ebc5c2.o \ + $(JUCE_OBJDIR)/juce_audio_basics_6b797ca1.o \ + $(JUCE_OBJDIR)/juce_audio_devices_a742c38b.o \ + $(JUCE_OBJDIR)/juce_audio_formats_5a29c68a.o \ + $(JUCE_OBJDIR)/juce_audio_processors_dea3173d.o \ + $(JUCE_OBJDIR)/juce_audio_utils_c7eb679f.o \ + $(JUCE_OBJDIR)/juce_core_75b14332.o \ + $(JUCE_OBJDIR)/juce_data_structures_72d3da2c.o \ + $(JUCE_OBJDIR)/juce_events_d2be882c.o \ + $(JUCE_OBJDIR)/juce_graphics_9c18891e.o \ + $(JUCE_OBJDIR)/juce_gui_basics_8a6da59c.o \ + $(JUCE_OBJDIR)/juce_gui_extra_4a026f23.o \ .PHONY: clean -$(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES) +$(JUCE_OUTDIR)/$(TARGET): check-pkg-config $(OBJECTS) $(RESOURCES) @echo Linking AudioPerformanceTest - -@mkdir -p $(BINDIR) - -@mkdir -p $(LIBDIR) - -@mkdir -p $(OUTDIR) + -@mkdir -p $(JUCE_BINDIR) + -@mkdir -p $(JUCE_LIBDIR) + -@mkdir -p $(JUCE_OUTDIR) @$(BLDCMD) +check-pkg-config: + @command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } + @pkg-config --print-errors alsa freetype2 libcurl x11 xext xinerama + clean: @echo Cleaning AudioPerformanceTest @$(CLEANCMD) strip: @echo Stripping AudioPerformanceTest - -@strip --strip-unneeded $(OUTDIR)/$(TARGET) + -@$(STRIP) --strip-unneeded $(JUCE_OUTDIR)/$(TARGET) -$(OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling Main.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_basics_6b797ca1.o: ../../JuceLibraryCode/juce_audio_basics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_basics_6b797ca1.o: ../../JuceLibraryCode/juce_audio_basics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_basics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_devices_a742c38b.o: ../../JuceLibraryCode/juce_audio_devices.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_devices_a742c38b.o: ../../JuceLibraryCode/juce_audio_devices.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_devices.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_formats_5a29c68a.o: ../../JuceLibraryCode/juce_audio_formats.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_formats_5a29c68a.o: ../../JuceLibraryCode/juce_audio_formats.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_formats.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_processors_dea3173d.o: ../../JuceLibraryCode/juce_audio_processors.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_processors_dea3173d.o: ../../JuceLibraryCode/juce_audio_processors.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_processors.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_utils_c7eb679f.o: ../../JuceLibraryCode/juce_audio_utils.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_utils_c7eb679f.o: ../../JuceLibraryCode/juce_audio_utils.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_utils.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_core.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_data_structures_72d3da2c.o: ../../JuceLibraryCode/juce_data_structures.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_data_structures_72d3da2c.o: ../../JuceLibraryCode/juce_data_structures.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_data_structures.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_events_d2be882c.o: ../../JuceLibraryCode/juce_events.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_events_d2be882c.o: ../../JuceLibraryCode/juce_events.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_events.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_graphics_9c18891e.o: ../../JuceLibraryCode/juce_graphics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_graphics_9c18891e.o: ../../JuceLibraryCode/juce_graphics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_graphics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_gui_basics_8a6da59c.o: ../../JuceLibraryCode/juce_gui_basics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_gui_basics_8a6da59c.o: ../../JuceLibraryCode/juce_gui_basics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_gui_basics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_gui_extra_4a026f23.o: ../../JuceLibraryCode/juce_gui_extra.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_gui_extra_4a026f23.o: ../../JuceLibraryCode/juce_gui_extra.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_gui_extra.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -include $(OBJECTS:%.o=%.d) diff --git a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj b/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj index 5802e70a..f1b5d51b 100644 --- a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj +++ b/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj @@ -676,6 +676,7 @@ 90BCC51EEB48DE909139B357 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_OpenSL.cpp"; path = "../../../../modules/juce_audio_devices/native/juce_android_OpenSL.cpp"; sourceTree = "SOURCE_ROOT"; }; 914D99CE5915E7B68BB47EEB = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_BluetoothMidiDevicePairingDialogue.h"; path = "../../../../modules/juce_audio_utils/gui/juce_BluetoothMidiDevicePairingDialogue.h"; sourceTree = "SOURCE_ROOT"; }; 9156CF6C64EE06DB55B57572 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_WebBrowserComponent.h"; path = "../../../../modules/juce_gui_extra/misc/juce_WebBrowserComponent.h"; sourceTree = "SOURCE_ROOT"; }; + 915E7E2F19B34D7C2817FC67 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_VSTInterface.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_VSTInterface.h"; sourceTree = "SOURCE_ROOT"; }; 9163D3EF55AD0B2B197493EC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jidctflt.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jidctflt.c"; sourceTree = "SOURCE_ROOT"; }; 917260F53ED8BE9007BBD18A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jddctmgr.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jddctmgr.c"; sourceTree = "SOURCE_ROOT"; }; 91EA75E4BBE8A87A9618D202 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ResizableCornerComponent.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_ResizableCornerComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -709,6 +710,7 @@ 958486C51C2FDFD3734B281C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_audio_processors.mm"; path = "../../../../modules/juce_audio_processors/juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; }; 95999D007040ED6D71F707F7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioProcessorGraph.cpp"; path = "../../../../modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp"; sourceTree = "SOURCE_ROOT"; }; 96465102CA605250058AC064 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MenuBarModel.h"; path = "../../../../modules/juce_gui_basics/menus/juce_MenuBarModel.h"; sourceTree = "SOURCE_ROOT"; }; + 964FF8CC7674C99B3BDA19C3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexItem.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexItem.h"; sourceTree = "SOURCE_ROOT"; }; 965C305E056C8DE917F22585 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ArrowButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_ArrowButton.h"; sourceTree = "SOURCE_ROOT"; }; 975F037FB7CE738278E88884 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = export.h; path = "../../../../modules/juce_audio_formats/codecs/flac/export.h"; sourceTree = "SOURCE_ROOT"; }; 97C2FBD16505F28651574ED4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ShapeButton.cpp"; path = "../../../../modules/juce_gui_basics/buttons/juce_ShapeButton.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -872,6 +874,7 @@ BFED281053143D5D8C5218DF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_NSViewComponentPeer.mm"; path = "../../../../modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm"; sourceTree = "SOURCE_ROOT"; }; BFFBF9E6ED32BDB7AF3DAA06 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = inffast.h; path = "../../../../modules/juce_core/zip/zlib/inffast.h"; sourceTree = "SOURCE_ROOT"; }; C03BC1AFDCE495377D00ECBD = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_StringPairArray.h"; path = "../../../../modules/juce_core/text/juce_StringPairArray.h"; sourceTree = "SOURCE_ROOT"; }; + C06642951FB2BCAC1BFFC1DF = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexBox.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.h"; sourceTree = "SOURCE_ROOT"; }; C0BEF915D866FC6F9D28B4B1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioProcessorEditor.cpp"; path = "../../../../modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp"; sourceTree = "SOURCE_ROOT"; }; C0C5B5C34349FD6B152E5B3B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MidiKeyboardComponent.cpp"; path = "../../../../modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; C0EE1D9B98C8AD2A1D605827 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioAppComponent.h"; path = "../../../../modules/juce_audio_utils/gui/juce_AudioAppComponent.h"; sourceTree = "SOURCE_ROOT"; }; @@ -881,6 +884,7 @@ C1DE13DF18998D7583EB6C05 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = zlib.h; path = "../../../../modules/juce_core/zip/zlib/zlib.h"; sourceTree = "SOURCE_ROOT"; }; C2386580F272DD8DA717AC5F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioSampleBuffer.h"; path = "../../../../modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h"; sourceTree = "SOURCE_ROOT"; }; C28CB68C6B675F148A21EB5A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_XMLCodeTokeniser.cpp"; path = "../../../../modules/juce_gui_extra/code_editor/juce_XMLCodeTokeniser.cpp"; sourceTree = "SOURCE_ROOT"; }; + C2C33484B546D89717341A07 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FlexBox.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.cpp"; sourceTree = "SOURCE_ROOT"; }; C2C6FDE8DDAFD2F83CB01949 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = uncompr.c; path = "../../../../modules/juce_core/zip/zlib/uncompr.c"; sourceTree = "SOURCE_ROOT"; }; C320A90C1F0F7C133C0C6C1B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Memory.h"; path = "../../../../modules/juce_core/memory/juce_Memory.h"; sourceTree = "SOURCE_ROOT"; }; C34F15FED2D289A1AC6D85A2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioProcessorListener.h"; path = "../../../../modules/juce_audio_processors/processors/juce_AudioProcessorListener.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1495,6 +1499,7 @@ 3DC079D7D7EFDF308DC44D4F, A5EF5FDF979BC1FF68D3EA33, 8F9FE852D4F12052C098EECE, + 915E7E2F19B34D7C2817FC67, 45333ACAF454F661FC30924E, 123831F52D2C1E9A68B75613, B8B0992FEC384EAE2FC83B39, ); name = "format_types"; sourceTree = ""; }; @@ -2208,6 +2213,9 @@ 07FFF8B1683CC2595613F38C, 83205FE6737B51491CAF017F, 89021205A4D054ED8FB19640, + C2C33484B546D89717341A07, + C06642951FB2BCAC1BFFC1DF, + 964FF8CC7674C99B3BDA19C3, 7DE749651A85480E34E2D909, 2B7BFB3838421DA82147C48E, F5330B527A064EF5B090EBF5, @@ -2522,6 +2530,7 @@ HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; PRODUCT_BUNDLE_IDENTIFIER = com.juce.AudioPerformanceTest; SDKROOT_ppc = macosx10.5; }; name = Debug; }; @@ -2544,6 +2553,7 @@ HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; PRODUCT_BUNDLE_IDENTIFIER = com.juce.AudioPerformanceTest; SDKROOT_ppc = macosx10.5; }; name = Release; }; diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.vcxproj b/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.vcxproj index 770d6b18..5be869eb 100644 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.vcxproj +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.vcxproj @@ -1327,6 +1327,9 @@ true + + true + true @@ -1787,6 +1790,7 @@ + @@ -2096,6 +2100,8 @@ + + diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.vcxproj.filters b/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.vcxproj.filters index 50904dd1..e39f1ba5 100644 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.vcxproj.filters +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.vcxproj.filters @@ -1600,6 +1600,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2439,6 +2442,9 @@ Juce Modules\juce_audio_processors\format_types + + Juce Modules\juce_audio_processors\format_types + Juce Modules\juce_audio_processors\format_types @@ -3366,6 +3372,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj b/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj index f972dfdc..5c3a3592 100644 --- a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj +++ b/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj @@ -678,6 +678,7 @@ 90BCC51EEB48DE909139B357 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_OpenSL.cpp"; path = "../../../../modules/juce_audio_devices/native/juce_android_OpenSL.cpp"; sourceTree = "SOURCE_ROOT"; }; 914D99CE5915E7B68BB47EEB = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_BluetoothMidiDevicePairingDialogue.h"; path = "../../../../modules/juce_audio_utils/gui/juce_BluetoothMidiDevicePairingDialogue.h"; sourceTree = "SOURCE_ROOT"; }; 9156CF6C64EE06DB55B57572 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_WebBrowserComponent.h"; path = "../../../../modules/juce_gui_extra/misc/juce_WebBrowserComponent.h"; sourceTree = "SOURCE_ROOT"; }; + 915E7E2F19B34D7C2817FC67 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_VSTInterface.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_VSTInterface.h"; sourceTree = "SOURCE_ROOT"; }; 9163D3EF55AD0B2B197493EC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jidctflt.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jidctflt.c"; sourceTree = "SOURCE_ROOT"; }; 917260F53ED8BE9007BBD18A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jddctmgr.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jddctmgr.c"; sourceTree = "SOURCE_ROOT"; }; 91EA75E4BBE8A87A9618D202 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ResizableCornerComponent.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_ResizableCornerComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -711,6 +712,7 @@ 958486C51C2FDFD3734B281C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_audio_processors.mm"; path = "../../../../modules/juce_audio_processors/juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; }; 95999D007040ED6D71F707F7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioProcessorGraph.cpp"; path = "../../../../modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp"; sourceTree = "SOURCE_ROOT"; }; 96465102CA605250058AC064 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MenuBarModel.h"; path = "../../../../modules/juce_gui_basics/menus/juce_MenuBarModel.h"; sourceTree = "SOURCE_ROOT"; }; + 964FF8CC7674C99B3BDA19C3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexItem.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexItem.h"; sourceTree = "SOURCE_ROOT"; }; 965C305E056C8DE917F22585 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ArrowButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_ArrowButton.h"; sourceTree = "SOURCE_ROOT"; }; 975F037FB7CE738278E88884 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = export.h; path = "../../../../modules/juce_audio_formats/codecs/flac/export.h"; sourceTree = "SOURCE_ROOT"; }; 97C2FBD16505F28651574ED4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ShapeButton.cpp"; path = "../../../../modules/juce_gui_basics/buttons/juce_ShapeButton.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -874,6 +876,7 @@ BFED281053143D5D8C5218DF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_NSViewComponentPeer.mm"; path = "../../../../modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm"; sourceTree = "SOURCE_ROOT"; }; BFFBF9E6ED32BDB7AF3DAA06 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = inffast.h; path = "../../../../modules/juce_core/zip/zlib/inffast.h"; sourceTree = "SOURCE_ROOT"; }; C03BC1AFDCE495377D00ECBD = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_StringPairArray.h"; path = "../../../../modules/juce_core/text/juce_StringPairArray.h"; sourceTree = "SOURCE_ROOT"; }; + C06642951FB2BCAC1BFFC1DF = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexBox.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.h"; sourceTree = "SOURCE_ROOT"; }; C0BEF915D866FC6F9D28B4B1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioProcessorEditor.cpp"; path = "../../../../modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp"; sourceTree = "SOURCE_ROOT"; }; C0C5B5C34349FD6B152E5B3B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MidiKeyboardComponent.cpp"; path = "../../../../modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; C0EE1D9B98C8AD2A1D605827 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioAppComponent.h"; path = "../../../../modules/juce_audio_utils/gui/juce_AudioAppComponent.h"; sourceTree = "SOURCE_ROOT"; }; @@ -883,6 +886,7 @@ C1DE13DF18998D7583EB6C05 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = zlib.h; path = "../../../../modules/juce_core/zip/zlib/zlib.h"; sourceTree = "SOURCE_ROOT"; }; C2386580F272DD8DA717AC5F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioSampleBuffer.h"; path = "../../../../modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h"; sourceTree = "SOURCE_ROOT"; }; C28CB68C6B675F148A21EB5A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_XMLCodeTokeniser.cpp"; path = "../../../../modules/juce_gui_extra/code_editor/juce_XMLCodeTokeniser.cpp"; sourceTree = "SOURCE_ROOT"; }; + C2C33484B546D89717341A07 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FlexBox.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.cpp"; sourceTree = "SOURCE_ROOT"; }; C2C6FDE8DDAFD2F83CB01949 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = uncompr.c; path = "../../../../modules/juce_core/zip/zlib/uncompr.c"; sourceTree = "SOURCE_ROOT"; }; C320A90C1F0F7C133C0C6C1B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Memory.h"; path = "../../../../modules/juce_core/memory/juce_Memory.h"; sourceTree = "SOURCE_ROOT"; }; C34F15FED2D289A1AC6D85A2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioProcessorListener.h"; path = "../../../../modules/juce_audio_processors/processors/juce_AudioProcessorListener.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1497,6 +1501,7 @@ 3DC079D7D7EFDF308DC44D4F, A5EF5FDF979BC1FF68D3EA33, 8F9FE852D4F12052C098EECE, + 915E7E2F19B34D7C2817FC67, 45333ACAF454F661FC30924E, 123831F52D2C1E9A68B75613, B8B0992FEC384EAE2FC83B39, ); name = "format_types"; sourceTree = ""; }; @@ -2210,6 +2215,9 @@ 07FFF8B1683CC2595613F38C, 83205FE6737B51491CAF017F, 89021205A4D054ED8FB19640, + C2C33484B546D89717341A07, + C06642951FB2BCAC1BFFC1DF, + 964FF8CC7674C99B3BDA19C3, 7DE749651A85480E34E2D909, 2B7BFB3838421DA82147C48E, F5330B527A064EF5B090EBF5, @@ -2564,6 +2572,7 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "AudioPerformanceTest"; SDKROOT = iphoneos; @@ -2583,6 +2592,7 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "AudioPerformanceTest"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h b/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h index bd436ee4..978cf634 100644 --- a/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h +++ b/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h @@ -149,6 +149,14 @@ //#define JUCE_USE_CURL #endif +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES +#endif + //============================================================================== // juce_graphics flags: diff --git a/extras/Projucer/Builds/LinuxMakefile/Makefile b/extras/Projucer/Builds/LinuxMakefile/Makefile index dd33a826..c084a0b2 100644 --- a/extras/Projucer/Builds/LinuxMakefile/Makefile +++ b/extras/Projucer/Builds/LinuxMakefile/Makefile @@ -4,397 +4,409 @@ # (this disables dependency generation if multiple architectures are set) DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD) +ifndef STRIP + STRIP=strip +endif + +ifndef AR + AR=ar +endif + ifndef CONFIG CONFIG=Debug endif ifeq ($(CONFIG),Debug) - BINDIR := build - LIBDIR := build - OBJDIR := build/intermediate/Debug - OUTDIR := build + JUCE_BINDIR := build + JUCE_LIBDIR := build + JUCE_OBJDIR := build/intermediate/Debug + JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) TARGET_ARCH := -march=native endif - CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=4.2.3 -DJUCE_APP_VERSION_HEX=0x40203 -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../../../modules - CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 -std=c++11 - CXXFLAGS += $(CFLAGS) -std=c++11 - LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -ldl -lfreetype -lpthread -lrt -lcurl + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=4.2.4 -DJUCE_APP_VERSION_HEX=0x40204 $(shell pkg-config --cflags freetype2 libcurl x11 xext xinerama) -pthread -I../../JuceLibraryCode -I../../../../modules + JUCE_CFLAGS += $(CFLAGS) $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 -std=c++11 + JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) -std=c++11 + JUCE_LDFLAGS += $(LDFLAGS) $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs freetype2 libcurl x11 xext xinerama) -ldl -lpthread -lrt TARGET := Projucer - BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) - CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR) + BLDCMD = $(CXX) -o $(JUCE_OUTDIR)/$(TARGET) $(OBJECTS) $(JUCE_LDFLAGS) $(RESOURCES) $(TARGET_ARCH) + CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif ifeq ($(CONFIG),Release) - BINDIR := build - LIBDIR := build - OBJDIR := build/intermediate/Release - OUTDIR := build + JUCE_BINDIR := build + JUCE_LIBDIR := build + JUCE_OBJDIR := build/intermediate/Release + JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) TARGET_ARCH := -march=native endif - CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=4.2.3 -DJUCE_APP_VERSION_HEX=0x40203 -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../../../modules - CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O3 -std=c++11 - CXXFLAGS += $(CFLAGS) -std=c++11 - LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -ldl -lfreetype -lpthread -lrt -lcurl + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=4.2.4 -DJUCE_APP_VERSION_HEX=0x40204 $(shell pkg-config --cflags freetype2 libcurl x11 xext xinerama) -pthread -I../../JuceLibraryCode -I../../../../modules + JUCE_CFLAGS += $(CFLAGS) $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 -std=c++11 + JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) -std=c++11 + JUCE_LDFLAGS += $(LDFLAGS) $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -fvisibility=hidden $(shell pkg-config --libs freetype2 libcurl x11 xext xinerama) -ldl -lpthread -lrt TARGET := Projucer - BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) - CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR) + BLDCMD = $(CXX) -o $(JUCE_OUTDIR)/$(TARGET) $(OBJECTS) $(JUCE_LDFLAGS) $(RESOURCES) $(TARGET_ARCH) + CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif OBJECTS := \ - $(OBJDIR)/jucer_AppearanceSettings_788d9889.o \ - $(OBJDIR)/jucer_AutoUpdater_ca658dc2.o \ - $(OBJDIR)/jucer_CommandLine_f35de107.o \ - $(OBJDIR)/jucer_DocumentEditorComponent_695dff1d.o \ - $(OBJDIR)/jucer_GlobalPreferences_b0f1bd3d.o \ - $(OBJDIR)/jucer_Main_f8488f5b.o \ - $(OBJDIR)/jucer_MainWindow_1e163aeb.o \ - $(OBJDIR)/jucer_OpenDocumentManager_4c72d210.o \ - $(OBJDIR)/projucer_CompileEngineClient_542e6b2d.o \ - $(OBJDIR)/projucer_CompileEngineServer_a5a32aa5.o \ - $(OBJDIR)/jucer_SourceCodeEditor_461f5487.o \ - $(OBJDIR)/jucer_ComponentTypeHandler_6bec6262.o \ - $(OBJDIR)/jucer_ButtonDocument_56c341cc.o \ - $(OBJDIR)/jucer_ComponentDocument_92868083.o \ - $(OBJDIR)/jucer_ColouredElement_70cbc839.o \ - $(OBJDIR)/jucer_PaintElement_653460.o \ - $(OBJDIR)/jucer_PaintElementPath_908894a5.o \ - $(OBJDIR)/jucer_ComponentLayoutEditor_aeb44f8d.o \ - $(OBJDIR)/jucer_ComponentOverlayComponent_fd508d63.o \ - $(OBJDIR)/jucer_EditingPanelBase_6c2ed9ee.o \ - $(OBJDIR)/jucer_JucerDocumentEditor_2c581e26.o \ - $(OBJDIR)/jucer_PaintRoutineEditor_f6ac0344.o \ - $(OBJDIR)/jucer_PaintRoutinePanel_c309a0d7.o \ - $(OBJDIR)/jucer_ResourceEditorPanel_a558f2e2.o \ - $(OBJDIR)/jucer_TestComponent_db757dc4.o \ - $(OBJDIR)/jucer_BinaryResources_e0f99b46.o \ - $(OBJDIR)/jucer_ComponentLayout_6ea00129.o \ - $(OBJDIR)/jucer_GeneratedCode_9ca4ef7e.o \ - $(OBJDIR)/jucer_JucerDocument_ff8afcc2.o \ - $(OBJDIR)/jucer_ObjectTypes_4406f01c.o \ - $(OBJDIR)/jucer_PaintRoutine_e1e891ee.o \ - $(OBJDIR)/jucer_DependencyPathPropertyComponent_4d137229.o \ - $(OBJDIR)/jucer_Module_3f7666a5.o \ - $(OBJDIR)/jucer_Project_c131864a.o \ - $(OBJDIR)/jucer_ProjectExporter_eefe2e5b.o \ - $(OBJDIR)/jucer_ProjectSaver_38b16c25.o \ - $(OBJDIR)/jucer_ResourceFile_6af120d3.o \ - $(OBJDIR)/jucer_CodeHelpers_c317179c.o \ - $(OBJDIR)/jucer_FileHelpers_f98ed0ad.o \ - $(OBJDIR)/jucer_Icons_9db2f51e.o \ - $(OBJDIR)/jucer_JucerTreeViewBase_d043309d.o \ - $(OBJDIR)/jucer_MiscUtilities_25b68c82.o \ - $(OBJDIR)/jucer_ProjucerLookAndFeel_d6c6b28a.o \ - $(OBJDIR)/jucer_SlidingPanelComponent_9aa7a2ab.o \ - $(OBJDIR)/jucer_StoredSettings_26078d2c.o \ - $(OBJDIR)/jucer_NewFileWizard_fac97f47.o \ - $(OBJDIR)/jucer_NewProjectWizardClasses_891f6fa2.o \ - $(OBJDIR)/BinaryData_ce4232d4.o \ - $(OBJDIR)/juce_core_75b14332.o \ - $(OBJDIR)/juce_cryptography_6de2ebff.o \ - $(OBJDIR)/juce_data_structures_72d3da2c.o \ - $(OBJDIR)/juce_events_d2be882c.o \ - $(OBJDIR)/juce_graphics_9c18891e.o \ - $(OBJDIR)/juce_gui_basics_8a6da59c.o \ - $(OBJDIR)/juce_gui_extra_4a026f23.o \ + $(JUCE_OBJDIR)/jucer_AppearanceSettings_788d9889.o \ + $(JUCE_OBJDIR)/jucer_AutoUpdater_ca658dc2.o \ + $(JUCE_OBJDIR)/jucer_CommandLine_f35de107.o \ + $(JUCE_OBJDIR)/jucer_DocumentEditorComponent_695dff1d.o \ + $(JUCE_OBJDIR)/jucer_GlobalPreferences_b0f1bd3d.o \ + $(JUCE_OBJDIR)/jucer_Main_f8488f5b.o \ + $(JUCE_OBJDIR)/jucer_MainWindow_1e163aeb.o \ + $(JUCE_OBJDIR)/jucer_OpenDocumentManager_4c72d210.o \ + $(JUCE_OBJDIR)/projucer_CompileEngineClient_542e6b2d.o \ + $(JUCE_OBJDIR)/projucer_CompileEngineServer_a5a32aa5.o \ + $(JUCE_OBJDIR)/jucer_SourceCodeEditor_461f5487.o \ + $(JUCE_OBJDIR)/jucer_ComponentTypeHandler_6bec6262.o \ + $(JUCE_OBJDIR)/jucer_ButtonDocument_56c341cc.o \ + $(JUCE_OBJDIR)/jucer_ComponentDocument_92868083.o \ + $(JUCE_OBJDIR)/jucer_ColouredElement_70cbc839.o \ + $(JUCE_OBJDIR)/jucer_PaintElement_653460.o \ + $(JUCE_OBJDIR)/jucer_PaintElementPath_908894a5.o \ + $(JUCE_OBJDIR)/jucer_ComponentLayoutEditor_aeb44f8d.o \ + $(JUCE_OBJDIR)/jucer_ComponentOverlayComponent_fd508d63.o \ + $(JUCE_OBJDIR)/jucer_EditingPanelBase_6c2ed9ee.o \ + $(JUCE_OBJDIR)/jucer_JucerDocumentEditor_2c581e26.o \ + $(JUCE_OBJDIR)/jucer_PaintRoutineEditor_f6ac0344.o \ + $(JUCE_OBJDIR)/jucer_PaintRoutinePanel_c309a0d7.o \ + $(JUCE_OBJDIR)/jucer_ResourceEditorPanel_a558f2e2.o \ + $(JUCE_OBJDIR)/jucer_TestComponent_db757dc4.o \ + $(JUCE_OBJDIR)/jucer_BinaryResources_e0f99b46.o \ + $(JUCE_OBJDIR)/jucer_ComponentLayout_6ea00129.o \ + $(JUCE_OBJDIR)/jucer_GeneratedCode_9ca4ef7e.o \ + $(JUCE_OBJDIR)/jucer_JucerDocument_ff8afcc2.o \ + $(JUCE_OBJDIR)/jucer_ObjectTypes_4406f01c.o \ + $(JUCE_OBJDIR)/jucer_PaintRoutine_e1e891ee.o \ + $(JUCE_OBJDIR)/jucer_DependencyPathPropertyComponent_4d137229.o \ + $(JUCE_OBJDIR)/jucer_Module_3f7666a5.o \ + $(JUCE_OBJDIR)/jucer_Project_c131864a.o \ + $(JUCE_OBJDIR)/jucer_ProjectExporter_eefe2e5b.o \ + $(JUCE_OBJDIR)/jucer_ProjectSaver_38b16c25.o \ + $(JUCE_OBJDIR)/jucer_ResourceFile_6af120d3.o \ + $(JUCE_OBJDIR)/jucer_CodeHelpers_c317179c.o \ + $(JUCE_OBJDIR)/jucer_FileHelpers_f98ed0ad.o \ + $(JUCE_OBJDIR)/jucer_Icons_9db2f51e.o \ + $(JUCE_OBJDIR)/jucer_JucerTreeViewBase_d043309d.o \ + $(JUCE_OBJDIR)/jucer_MiscUtilities_25b68c82.o \ + $(JUCE_OBJDIR)/jucer_ProjucerLookAndFeel_d6c6b28a.o \ + $(JUCE_OBJDIR)/jucer_SlidingPanelComponent_9aa7a2ab.o \ + $(JUCE_OBJDIR)/jucer_StoredSettings_26078d2c.o \ + $(JUCE_OBJDIR)/jucer_NewFileWizard_fac97f47.o \ + $(JUCE_OBJDIR)/jucer_NewProjectWizardClasses_891f6fa2.o \ + $(JUCE_OBJDIR)/BinaryData_ce4232d4.o \ + $(JUCE_OBJDIR)/juce_core_75b14332.o \ + $(JUCE_OBJDIR)/juce_cryptography_6de2ebff.o \ + $(JUCE_OBJDIR)/juce_data_structures_72d3da2c.o \ + $(JUCE_OBJDIR)/juce_events_d2be882c.o \ + $(JUCE_OBJDIR)/juce_graphics_9c18891e.o \ + $(JUCE_OBJDIR)/juce_gui_basics_8a6da59c.o \ + $(JUCE_OBJDIR)/juce_gui_extra_4a026f23.o \ .PHONY: clean -$(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES) +$(JUCE_OUTDIR)/$(TARGET): check-pkg-config $(OBJECTS) $(RESOURCES) @echo Linking Projucer - -@mkdir -p $(BINDIR) - -@mkdir -p $(LIBDIR) - -@mkdir -p $(OUTDIR) + -@mkdir -p $(JUCE_BINDIR) + -@mkdir -p $(JUCE_LIBDIR) + -@mkdir -p $(JUCE_OUTDIR) @$(BLDCMD) +check-pkg-config: + @command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } + @pkg-config --print-errors freetype2 libcurl x11 xext xinerama + clean: @echo Cleaning Projucer @$(CLEANCMD) strip: @echo Stripping Projucer - -@strip --strip-unneeded $(OUTDIR)/$(TARGET) + -@$(STRIP) --strip-unneeded $(JUCE_OUTDIR)/$(TARGET) -$(OBJDIR)/jucer_AppearanceSettings_788d9889.o: ../../Source/Application/jucer_AppearanceSettings.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_AppearanceSettings_788d9889.o: ../../Source/Application/jucer_AppearanceSettings.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_AppearanceSettings.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_AutoUpdater_ca658dc2.o: ../../Source/Application/jucer_AutoUpdater.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_AutoUpdater_ca658dc2.o: ../../Source/Application/jucer_AutoUpdater.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_AutoUpdater.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_CommandLine_f35de107.o: ../../Source/Application/jucer_CommandLine.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_CommandLine_f35de107.o: ../../Source/Application/jucer_CommandLine.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_CommandLine.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_DocumentEditorComponent_695dff1d.o: ../../Source/Application/jucer_DocumentEditorComponent.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_DocumentEditorComponent_695dff1d.o: ../../Source/Application/jucer_DocumentEditorComponent.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_DocumentEditorComponent.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_GlobalPreferences_b0f1bd3d.o: ../../Source/Application/jucer_GlobalPreferences.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_GlobalPreferences_b0f1bd3d.o: ../../Source/Application/jucer_GlobalPreferences.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_GlobalPreferences.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_Main_f8488f5b.o: ../../Source/Application/jucer_Main.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_Main_f8488f5b.o: ../../Source/Application/jucer_Main.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_Main.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_MainWindow_1e163aeb.o: ../../Source/Application/jucer_MainWindow.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_MainWindow_1e163aeb.o: ../../Source/Application/jucer_MainWindow.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_MainWindow.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_OpenDocumentManager_4c72d210.o: ../../Source/Application/jucer_OpenDocumentManager.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_OpenDocumentManager_4c72d210.o: ../../Source/Application/jucer_OpenDocumentManager.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_OpenDocumentManager.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/projucer_CompileEngineClient_542e6b2d.o: ../../Source/LiveBuildEngine/projucer_CompileEngineClient.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/projucer_CompileEngineClient_542e6b2d.o: ../../Source/LiveBuildEngine/projucer_CompileEngineClient.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling projucer_CompileEngineClient.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/projucer_CompileEngineServer_a5a32aa5.o: ../../Source/LiveBuildEngine/projucer_CompileEngineServer.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/projucer_CompileEngineServer_a5a32aa5.o: ../../Source/LiveBuildEngine/projucer_CompileEngineServer.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling projucer_CompileEngineServer.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_SourceCodeEditor_461f5487.o: ../../Source/Code\ Editor/jucer_SourceCodeEditor.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_SourceCodeEditor_461f5487.o: ../../Source/Code\ Editor/jucer_SourceCodeEditor.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_SourceCodeEditor.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_ComponentTypeHandler_6bec6262.o: ../../Source/ComponentEditor/components/jucer_ComponentTypeHandler.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_ComponentTypeHandler_6bec6262.o: ../../Source/ComponentEditor/components/jucer_ComponentTypeHandler.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_ComponentTypeHandler.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_ButtonDocument_56c341cc.o: ../../Source/ComponentEditor/documents/jucer_ButtonDocument.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_ButtonDocument_56c341cc.o: ../../Source/ComponentEditor/documents/jucer_ButtonDocument.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_ButtonDocument.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_ComponentDocument_92868083.o: ../../Source/ComponentEditor/documents/jucer_ComponentDocument.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_ComponentDocument_92868083.o: ../../Source/ComponentEditor/documents/jucer_ComponentDocument.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_ComponentDocument.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_ColouredElement_70cbc839.o: ../../Source/ComponentEditor/paintelements/jucer_ColouredElement.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_ColouredElement_70cbc839.o: ../../Source/ComponentEditor/paintelements/jucer_ColouredElement.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_ColouredElement.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_PaintElement_653460.o: ../../Source/ComponentEditor/paintelements/jucer_PaintElement.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_PaintElement_653460.o: ../../Source/ComponentEditor/paintelements/jucer_PaintElement.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_PaintElement.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_PaintElementPath_908894a5.o: ../../Source/ComponentEditor/paintelements/jucer_PaintElementPath.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_PaintElementPath_908894a5.o: ../../Source/ComponentEditor/paintelements/jucer_PaintElementPath.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_PaintElementPath.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_ComponentLayoutEditor_aeb44f8d.o: ../../Source/ComponentEditor/ui/jucer_ComponentLayoutEditor.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_ComponentLayoutEditor_aeb44f8d.o: ../../Source/ComponentEditor/ui/jucer_ComponentLayoutEditor.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_ComponentLayoutEditor.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_ComponentOverlayComponent_fd508d63.o: ../../Source/ComponentEditor/ui/jucer_ComponentOverlayComponent.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_ComponentOverlayComponent_fd508d63.o: ../../Source/ComponentEditor/ui/jucer_ComponentOverlayComponent.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_ComponentOverlayComponent.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_EditingPanelBase_6c2ed9ee.o: ../../Source/ComponentEditor/ui/jucer_EditingPanelBase.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_EditingPanelBase_6c2ed9ee.o: ../../Source/ComponentEditor/ui/jucer_EditingPanelBase.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_EditingPanelBase.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_JucerDocumentEditor_2c581e26.o: ../../Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_JucerDocumentEditor_2c581e26.o: ../../Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_JucerDocumentEditor.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_PaintRoutineEditor_f6ac0344.o: ../../Source/ComponentEditor/ui/jucer_PaintRoutineEditor.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_PaintRoutineEditor_f6ac0344.o: ../../Source/ComponentEditor/ui/jucer_PaintRoutineEditor.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_PaintRoutineEditor.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_PaintRoutinePanel_c309a0d7.o: ../../Source/ComponentEditor/ui/jucer_PaintRoutinePanel.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_PaintRoutinePanel_c309a0d7.o: ../../Source/ComponentEditor/ui/jucer_PaintRoutinePanel.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_PaintRoutinePanel.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_ResourceEditorPanel_a558f2e2.o: ../../Source/ComponentEditor/ui/jucer_ResourceEditorPanel.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_ResourceEditorPanel_a558f2e2.o: ../../Source/ComponentEditor/ui/jucer_ResourceEditorPanel.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_ResourceEditorPanel.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_TestComponent_db757dc4.o: ../../Source/ComponentEditor/ui/jucer_TestComponent.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_TestComponent_db757dc4.o: ../../Source/ComponentEditor/ui/jucer_TestComponent.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_TestComponent.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_BinaryResources_e0f99b46.o: ../../Source/ComponentEditor/jucer_BinaryResources.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_BinaryResources_e0f99b46.o: ../../Source/ComponentEditor/jucer_BinaryResources.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_BinaryResources.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_ComponentLayout_6ea00129.o: ../../Source/ComponentEditor/jucer_ComponentLayout.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_ComponentLayout_6ea00129.o: ../../Source/ComponentEditor/jucer_ComponentLayout.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_ComponentLayout.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_GeneratedCode_9ca4ef7e.o: ../../Source/ComponentEditor/jucer_GeneratedCode.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_GeneratedCode_9ca4ef7e.o: ../../Source/ComponentEditor/jucer_GeneratedCode.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_GeneratedCode.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_JucerDocument_ff8afcc2.o: ../../Source/ComponentEditor/jucer_JucerDocument.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_JucerDocument_ff8afcc2.o: ../../Source/ComponentEditor/jucer_JucerDocument.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_JucerDocument.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_ObjectTypes_4406f01c.o: ../../Source/ComponentEditor/jucer_ObjectTypes.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_ObjectTypes_4406f01c.o: ../../Source/ComponentEditor/jucer_ObjectTypes.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_ObjectTypes.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_PaintRoutine_e1e891ee.o: ../../Source/ComponentEditor/jucer_PaintRoutine.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_PaintRoutine_e1e891ee.o: ../../Source/ComponentEditor/jucer_PaintRoutine.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_PaintRoutine.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_DependencyPathPropertyComponent_4d137229.o: ../../Source/Project/jucer_DependencyPathPropertyComponent.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_DependencyPathPropertyComponent_4d137229.o: ../../Source/Project/jucer_DependencyPathPropertyComponent.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_DependencyPathPropertyComponent.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_Module_3f7666a5.o: ../../Source/Project/jucer_Module.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_Module_3f7666a5.o: ../../Source/Project/jucer_Module.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_Module.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_Project_c131864a.o: ../../Source/Project/jucer_Project.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_Project_c131864a.o: ../../Source/Project/jucer_Project.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_Project.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_ProjectExporter_eefe2e5b.o: ../../Source/Project\ Saving/jucer_ProjectExporter.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_ProjectExporter_eefe2e5b.o: ../../Source/Project\ Saving/jucer_ProjectExporter.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_ProjectExporter.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_ProjectSaver_38b16c25.o: ../../Source/Project\ Saving/jucer_ProjectSaver.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_ProjectSaver_38b16c25.o: ../../Source/Project\ Saving/jucer_ProjectSaver.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_ProjectSaver.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_ResourceFile_6af120d3.o: ../../Source/Project\ Saving/jucer_ResourceFile.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_ResourceFile_6af120d3.o: ../../Source/Project\ Saving/jucer_ResourceFile.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_ResourceFile.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_CodeHelpers_c317179c.o: ../../Source/Utility/jucer_CodeHelpers.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_CodeHelpers_c317179c.o: ../../Source/Utility/jucer_CodeHelpers.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_CodeHelpers.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_FileHelpers_f98ed0ad.o: ../../Source/Utility/jucer_FileHelpers.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_FileHelpers_f98ed0ad.o: ../../Source/Utility/jucer_FileHelpers.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_FileHelpers.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_Icons_9db2f51e.o: ../../Source/Utility/jucer_Icons.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_Icons_9db2f51e.o: ../../Source/Utility/jucer_Icons.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_Icons.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_JucerTreeViewBase_d043309d.o: ../../Source/Utility/jucer_JucerTreeViewBase.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_JucerTreeViewBase_d043309d.o: ../../Source/Utility/jucer_JucerTreeViewBase.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_JucerTreeViewBase.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_MiscUtilities_25b68c82.o: ../../Source/Utility/jucer_MiscUtilities.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_MiscUtilities_25b68c82.o: ../../Source/Utility/jucer_MiscUtilities.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_MiscUtilities.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_ProjucerLookAndFeel_d6c6b28a.o: ../../Source/Utility/jucer_ProjucerLookAndFeel.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_ProjucerLookAndFeel_d6c6b28a.o: ../../Source/Utility/jucer_ProjucerLookAndFeel.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_ProjucerLookAndFeel.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_SlidingPanelComponent_9aa7a2ab.o: ../../Source/Utility/jucer_SlidingPanelComponent.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_SlidingPanelComponent_9aa7a2ab.o: ../../Source/Utility/jucer_SlidingPanelComponent.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_SlidingPanelComponent.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_StoredSettings_26078d2c.o: ../../Source/Utility/jucer_StoredSettings.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_StoredSettings_26078d2c.o: ../../Source/Utility/jucer_StoredSettings.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_StoredSettings.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_NewFileWizard_fac97f47.o: ../../Source/Wizards/jucer_NewFileWizard.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_NewFileWizard_fac97f47.o: ../../Source/Wizards/jucer_NewFileWizard.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_NewFileWizard.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/jucer_NewProjectWizardClasses_891f6fa2.o: ../../Source/Wizards/jucer_NewProjectWizardClasses.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/jucer_NewProjectWizardClasses_891f6fa2.o: ../../Source/Wizards/jucer_NewProjectWizardClasses.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_NewProjectWizardClasses.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/BinaryData_ce4232d4.o: ../../JuceLibraryCode/BinaryData.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/BinaryData_ce4232d4.o: ../../JuceLibraryCode/BinaryData.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling BinaryData.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_core.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_cryptography_6de2ebff.o: ../../JuceLibraryCode/juce_cryptography.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_cryptography_6de2ebff.o: ../../JuceLibraryCode/juce_cryptography.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_cryptography.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_data_structures_72d3da2c.o: ../../JuceLibraryCode/juce_data_structures.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_data_structures_72d3da2c.o: ../../JuceLibraryCode/juce_data_structures.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_data_structures.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_events_d2be882c.o: ../../JuceLibraryCode/juce_events.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_events_d2be882c.o: ../../JuceLibraryCode/juce_events.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_events.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_graphics_9c18891e.o: ../../JuceLibraryCode/juce_graphics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_graphics_9c18891e.o: ../../JuceLibraryCode/juce_graphics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_graphics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_gui_basics_8a6da59c.o: ../../JuceLibraryCode/juce_gui_basics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_gui_basics_8a6da59c.o: ../../JuceLibraryCode/juce_gui_basics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_gui_basics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_gui_extra_4a026f23.o: ../../JuceLibraryCode/juce_gui_extra.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_gui_extra_4a026f23.o: ../../JuceLibraryCode/juce_gui_extra.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_gui_extra.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -include $(OBJECTS:%.o=%.d) diff --git a/extras/Projucer/Builds/MacOSX/Info-App.plist b/extras/Projucer/Builds/MacOSX/Info-App.plist index 86a8b55f..ba12f1b8 100644 --- a/extras/Projucer/Builds/MacOSX/Info-App.plist +++ b/extras/Projucer/Builds/MacOSX/Info-App.plist @@ -33,9 +33,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 4.2.3 + 4.2.4 CFBundleVersion - 4.2.3 + 4.2.4 NSHumanReadableCopyright NSHighResolutionCapable diff --git a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj index ce66ba69..22a8050b 100644 --- a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj +++ b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj @@ -219,6 +219,7 @@ 202591AAB1ABCFE458F33F7C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DrawableButton.cpp"; path = "../../../../modules/juce_gui_basics/buttons/juce_DrawableButton.cpp"; sourceTree = "SOURCE_ROOT"; }; 203CF0F8F72A516BB1CC5422 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V2.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h"; sourceTree = "SOURCE_ROOT"; }; 206D399250A42034706E5434 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ToolbarButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_ToolbarButton.h"; sourceTree = "SOURCE_ROOT"; }; + 2096FFC554268580C39D036D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FlexBox.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.cpp"; sourceTree = "SOURCE_ROOT"; }; 20FAAE9F3A7B96C2D8C75BB2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_SlidingPanelComponent.cpp"; path = "../../Source/Utility/jucer_SlidingPanelComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; 20FC504E8FB8D30E890A9837 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChoicePropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_ChoicePropertyComponent.h"; sourceTree = "SOURCE_ROOT"; }; 2107C02B684C7F5B75662333 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Registry.cpp"; path = "../../../../modules/juce_core/native/juce_win32_Registry.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -553,6 +554,7 @@ 7519822C13AE752FE0E71999 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jdphuff.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jdphuff.c"; sourceTree = "SOURCE_ROOT"; }; 75EB08697D38632CCBE734D8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SpinLock.h"; path = "../../../../modules/juce_core/threads/juce_SpinLock.h"; sourceTree = "SOURCE_ROOT"; }; 76439EAACE53C774CE07BD9E = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Toolbar.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_Toolbar.cpp"; sourceTree = "SOURCE_ROOT"; }; + 76AC916858C8F84550167257 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexBox.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.h"; sourceTree = "SOURCE_ROOT"; }; 7723BAE1917C8A0418F2D23B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TextEditor.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_TextEditor.h"; sourceTree = "SOURCE_ROOT"; }; 77B05CF7C9BB9778EC06C396 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_KeyPress.h"; path = "../../../../modules/juce_gui_basics/keyboard/juce_KeyPress.h"; sourceTree = "SOURCE_ROOT"; }; 77CA70448B5AB9C0EF12D2BD = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = png.c; path = "../../../../modules/juce_graphics/image_formats/pnglib/png.c"; sourceTree = "SOURCE_ROOT"; }; @@ -857,6 +859,7 @@ BDEBB0AC32DDA8C16FFE6011 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TooltipClient.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_TooltipClient.h"; sourceTree = "SOURCE_ROOT"; }; BE97579323E97AF084D41476 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DirectoryContentsList.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.cpp"; sourceTree = "SOURCE_ROOT"; }; BF171B0762D5550B797869F2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Expression.h"; path = "../../../../modules/juce_core/maths/juce_Expression.h"; sourceTree = "SOURCE_ROOT"; }; + BF1FA6FFE4F540CF723B31B4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexItem.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexItem.h"; sourceTree = "SOURCE_ROOT"; }; BF3CEF080FA013E2778DCE90 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_Project.h"; path = "../../Source/Project/jucer_Project.h"; sourceTree = "SOURCE_ROOT"; }; BF92CA3FD8F9A61AE358D151 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ActionBroadcaster.cpp"; path = "../../../../modules/juce_events/broadcasters/juce_ActionBroadcaster.cpp"; sourceTree = "SOURCE_ROOT"; }; BFD1891DABC7B4BD3C681A2E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = pngrio.c; path = "../../../../modules/juce_graphics/image_formats/pnglib/pngrio.c"; sourceTree = "SOURCE_ROOT"; }; @@ -2063,6 +2066,9 @@ AE3E427DBCC8D50E3F356402, 3DBB6D91397AE61D59C90510, A9FA71357C5B2A46A75D9230, + 2096FFC554268580C39D036D, + 76AC916858C8F84550167257, + BF1FA6FFE4F540CF723B31B4, 6EE91491434D058606460AFB, A8DB614600D348C730AC3930, EA0D43AB5F47506D5CDA81BB, @@ -2372,8 +2378,8 @@ "_DEBUG=1", "DEBUG=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=4.2.3", - "JUCE_APP_VERSION_HEX=0x40203", ); + "JUCE_APP_VERSION=4.2.4", + "JUCE_APP_VERSION_HEX=0x40204", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; @@ -2396,8 +2402,8 @@ "_NDEBUG=1", "NDEBUG=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=4.2.3", - "JUCE_APP_VERSION_HEX=0x40203", ); + "JUCE_APP_VERSION=4.2.4", + "JUCE_APP_VERSION_HEX=0x40204", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); diff --git a/extras/Projucer/Builds/VisualStudio2013/Projucer.vcxproj b/extras/Projucer/Builds/VisualStudio2013/Projucer.vcxproj index de6498d0..e94fdf1d 100644 --- a/extras/Projucer/Builds/VisualStudio2013/Projucer.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2013/Projucer.vcxproj @@ -58,7 +58,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=4.2.3;JUCE_APP_VERSION_HEX=0x40203;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=4.2.4;JUCE_APP_VERSION_HEX=0x40204;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -97,7 +97,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=4.2.3;JUCE_APP_VERSION_HEX=0x40203;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=4.2.4;JUCE_APP_VERSION_HEX=0x40204;%(PreprocessorDefinitions) MultiThreaded true @@ -1018,6 +1018,9 @@ true + + true + true @@ -1763,6 +1766,8 @@ + + diff --git a/extras/Projucer/Builds/VisualStudio2013/Projucer.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2013/Projucer.vcxproj.filters index 64f35bec..f13c3053 100644 --- a/extras/Projucer/Builds/VisualStudio2013/Projucer.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2013/Projucer.vcxproj.filters @@ -1288,6 +1288,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2982,6 +2985,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/extras/Projucer/Builds/VisualStudio2013/resources.rc b/extras/Projucer/Builds/VisualStudio2013/resources.rc index 21778ece..fe0989e3 100644 --- a/extras/Projucer/Builds/VisualStudio2013/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2013/resources.rc @@ -7,16 +7,16 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 4,2,3,0 +FILEVERSION 4,2,4,0 BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904E4" BEGIN VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "4.2.3\0" + VALUE "FileVersion", "4.2.4\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "4.2.3\0" + VALUE "ProductVersion", "4.2.4\0" END END diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer.vcxproj b/extras/Projucer/Builds/VisualStudio2015/Projucer.vcxproj index 59dc2eab..e4468cf7 100644 --- a/extras/Projucer/Builds/VisualStudio2015/Projucer.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2015/Projucer.vcxproj @@ -58,7 +58,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=4.2.3;JUCE_APP_VERSION_HEX=0x40203;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=4.2.4;JUCE_APP_VERSION_HEX=0x40204;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -97,7 +97,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=4.2.3;JUCE_APP_VERSION_HEX=0x40203;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=4.2.4;JUCE_APP_VERSION_HEX=0x40204;%(PreprocessorDefinitions) MultiThreaded true @@ -1018,6 +1018,9 @@ true + + true + true @@ -1763,6 +1766,8 @@ + + diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2015/Projucer.vcxproj.filters index 5835d984..431d56d5 100644 --- a/extras/Projucer/Builds/VisualStudio2015/Projucer.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2015/Projucer.vcxproj.filters @@ -1288,6 +1288,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2982,6 +2985,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/extras/Projucer/Builds/VisualStudio2015/resources.rc b/extras/Projucer/Builds/VisualStudio2015/resources.rc index 21778ece..fe0989e3 100644 --- a/extras/Projucer/Builds/VisualStudio2015/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2015/resources.rc @@ -7,16 +7,16 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 4,2,3,0 +FILEVERSION 4,2,4,0 BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904E4" BEGIN VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "4.2.3\0" + VALUE "FileVersion", "4.2.4\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "4.2.3\0" + VALUE "ProductVersion", "4.2.4\0" END END diff --git a/extras/Projucer/JuceLibraryCode/AppConfig.h b/extras/Projucer/JuceLibraryCode/AppConfig.h index e7eb6c00..f48f6cdf 100644 --- a/extras/Projucer/JuceLibraryCode/AppConfig.h +++ b/extras/Projucer/JuceLibraryCode/AppConfig.h @@ -68,6 +68,14 @@ #define JUCE_USE_CURL 1 #endif +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES +#endif + //============================================================================== // juce_graphics flags: diff --git a/extras/Projucer/JuceLibraryCode/JuceHeader.h b/extras/Projucer/JuceLibraryCode/JuceHeader.h index 8db2f1c3..e65f304f 100644 --- a/extras/Projucer/JuceLibraryCode/JuceHeader.h +++ b/extras/Projucer/JuceLibraryCode/JuceHeader.h @@ -35,8 +35,8 @@ namespace ProjectInfo { const char* const projectName = "Projucer"; - const char* const versionString = "4.2.3"; - const int versionNumber = 0x40203; + const char* const versionString = "4.2.4"; + const int versionNumber = 0x40204; } #endif diff --git a/extras/Projucer/Projucer.jucer b/extras/Projucer/Projucer.jucer index 5fc7dd25..672aed62 100644 --- a/extras/Projucer/Projucer.jucer +++ b/extras/Projucer/Projucer.jucer @@ -1,7 +1,7 @@ - - + + @@ -626,5 +626,6 @@ + diff --git a/extras/Projucer/Source/Application/jucer_AppearanceSettings.cpp b/extras/Projucer/Source/Application/jucer_AppearanceSettings.cpp index 3366b4d3..1bf93361 100644 --- a/extras/Projucer/Source/Application/jucer_AppearanceSettings.cpp +++ b/extras/Projucer/Source/Application/jucer_AppearanceSettings.cpp @@ -170,7 +170,7 @@ bool AppearanceSettings::readFromFile (const File& file) bool AppearanceSettings::writeToFile (const File& file) const { const ScopedPointer xml (settings.createXml()); - return xml != nullptr && xml->writeToFile (file, String::empty); + return xml != nullptr && xml->writeToFile (file, String()); } Font AppearanceSettings::getDefaultCodeFont() diff --git a/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp b/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp index 455efdfa..72d4270e 100644 --- a/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp +++ b/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp @@ -642,7 +642,7 @@ void LatestVersionChecker::checkForNewVersion() startTimer (100); } - void LatestVersionChecker::processResult (var reply, const String& downloadPath) + bool LatestVersionChecker::processResult (var reply, const String& downloadPath) { if (statusCode == 303) { @@ -657,7 +657,7 @@ void LatestVersionChecker::checkForNewVersion() String extraHeaders; URL newVersionToDownload = getLatestVersionURL (extraHeaders, downloadPath); - askUserAboutNewVersion (version, releaseNotes, newVersionToDownload, extraHeaders); + return askUserAboutNewVersion (version, releaseNotes, newVersionToDownload, extraHeaders); } } } @@ -677,12 +677,17 @@ void LatestVersionChecker::checkForNewVersion() AlertWindow::showMessageBox (AlertWindow::WarningIcon, TRANS("JUCE Updater"), message); + + return false; } } } + + // try again + return true; } -void LatestVersionChecker::askUserAboutNewVersion (const LatestVersionChecker::JuceVersionTriple& version, +bool LatestVersionChecker::askUserAboutNewVersion (const LatestVersionChecker::JuceVersionTriple& version, const String& releaseNotes, URL& newVersionToDownload, const String& extraHeaders) @@ -715,7 +720,11 @@ void LatestVersionChecker::askUserAboutNewVersion (const LatestVersionChecker::J if (ModalComponentManager* mm = ModalComponentManager::getInstance()) mm->attachCallback (modalDialog, callback); } + + return false; } + + return true; } void LatestVersionChecker::modalStateFinished (int result, @@ -723,6 +732,7 @@ void LatestVersionChecker::modalStateFinished (int result, const String& extraHeaders, File appParentFolder) { + if (result == 1 || result == 2) { if (result == 1 || ! allowCustomLocation()) @@ -800,11 +810,14 @@ void LatestVersionChecker::timerCallback() if (hasAttemptedToReadWebsite) { + bool restartTimer = true; if (jsonReply.isObject()) - processResult (jsonReply, newRelativeDownloadPath); + restartTimer = processResult (jsonReply, newRelativeDownloadPath); hasAttemptedToReadWebsite = false; - startTimer (7200000); + + if (restartTimer) + startTimer (7200000); } else { diff --git a/extras/Projucer/Source/Application/jucer_AutoUpdater.h b/extras/Projucer/Source/Application/jucer_AutoUpdater.h index cdc4ef27..47426b42 100644 --- a/extras/Projucer/Source/Application/jucer_AutoUpdater.h +++ b/extras/Projucer/Source/Application/jucer_AutoUpdater.h @@ -65,9 +65,9 @@ public: URL getLatestVersionURL (String& headers) const; void checkForNewVersion(); - void processResult (var reply, const String& downloadPath); + bool processResult (var reply, const String& downloadPath); - void askUserAboutNewVersion (const JuceVersionTriple& version, + bool askUserAboutNewVersion (const JuceVersionTriple& version, const String& releaseNotes, URL& newVersionToDownload, const String& extraHeaders); diff --git a/extras/Projucer/Source/Application/jucer_GlobalPreferences.cpp b/extras/Projucer/Source/Application/jucer_GlobalPreferences.cpp index ad542277..c113c598 100644 --- a/extras/Projucer/Source/Application/jucer_GlobalPreferences.cpp +++ b/extras/Projucer/Source/Application/jucer_GlobalPreferences.cpp @@ -34,7 +34,6 @@ PathSettingsTab::PathSettingsTab (DependencyPathOS os) StoredSettings& settings = getAppSettings(); - vst2PathComponent = pathComponents.add (new TextPropertyComponent (settings.getGlobalPath (Ids::vst2Path, os), "VST SDK", maxChars, false)); vst3PathComponent = pathComponents.add (new TextPropertyComponent (settings.getGlobalPath (Ids::vst3Path, os), "VST3 SDK", maxChars, false)); #if ! JUCE_LINUX @@ -70,7 +69,6 @@ void PathSettingsTab::textPropertyComponentChanged (TextPropertyComponent* textP Identifier PathSettingsTab::getKeyForPropertyComponent (TextPropertyComponent* component) const { - if (component == vst2PathComponent) return Ids::vst2Path; if (component == vst3PathComponent) return Ids::vst3Path; if (component == rtasPathComponent) return Ids::rtasPath; if (component == aaxPathComponent) return Ids::aaxPath; @@ -79,7 +77,7 @@ Identifier PathSettingsTab::getKeyForPropertyComponent (TextPropertyComponent* c // this property component does not have a key associated to it! jassertfalse; - return String::empty; + return String(); } Component* PathSettingsTab::getContent() @@ -288,7 +286,7 @@ struct AppearanceEditor StringArray names; names.add (""); - names.add (String::empty); + names.add (String()); names.addArray (getAppSettings().monospacedFontNames); return new ChoicePropertyComponent (Value (new FontNameValueSource (value)), diff --git a/extras/Projucer/Source/Application/jucer_GlobalPreferences.h b/extras/Projucer/Source/Application/jucer_GlobalPreferences.h index c1720fac..e9fcc14f 100644 --- a/extras/Projucer/Source/Application/jucer_GlobalPreferences.h +++ b/extras/Projucer/Source/Application/jucer_GlobalPreferences.h @@ -64,7 +64,6 @@ private: OwnedArray pathComponents; - TextPropertyComponent* vst2PathComponent; TextPropertyComponent* vst3PathComponent; TextPropertyComponent* rtasPathComponent; TextPropertyComponent* aaxPathComponent; diff --git a/extras/Projucer/Source/Application/jucer_MainWindow.cpp b/extras/Projucer/Source/Application/jucer_MainWindow.cpp index 1fe39637..7ac45ec6 100644 --- a/extras/Projucer/Source/Application/jucer_MainWindow.cpp +++ b/extras/Projucer/Source/Application/jucer_MainWindow.cpp @@ -276,6 +276,29 @@ void MainWindow::activeWindowStatusChanged() pcc->updateMissingFileStatuses(); ProjucerApplication::getApp().openDocumentManager.reloadModifiedFiles(); + + if (Project* p = getProject()) + { + if (p->hasProjectBeenModified()) + { + const int r = AlertWindow::showOkCancelBox (AlertWindow::QuestionIcon, + TRANS ("The .jucer file has been modified since the last save."), + TRANS ("Do you want to keep the current project or re-load from disk?"), + TRANS ("Keep"), + TRANS ("Re-load from disk")); + + if (r == 0) + { + File projectFile = p->getFile(); + setProject (nullptr); + openFile (projectFile); + } + else if (r == 1) + { + ProjucerApplication::getApp().getCommandManager().invokeDirectly (CommandIDs::saveProject, true); + } + } + } } void MainWindow::updateTitle (const String& documentName) diff --git a/extras/Projucer/Source/Application/jucer_OpenDocumentManager.cpp b/extras/Projucer/Source/Application/jucer_OpenDocumentManager.cpp index 81b55af4..bbc46d09 100644 --- a/extras/Projucer/Source/Application/jucer_OpenDocumentManager.cpp +++ b/extras/Projucer/Source/Application/jucer_OpenDocumentManager.cpp @@ -62,7 +62,7 @@ public: Component* createEditor() override { return new ItemPreviewComponent (file); } Component* createViewer() override { return createEditor(); } void fileHasBeenRenamed (const File& newFile) override { file = newFile; } - String getState() const override { return String::empty; } + String getState() const override { return String(); } void restoreState (const String&) override {} String getType() const override @@ -333,7 +333,7 @@ OpenDocumentManager::Document* RecentDocumentList::getPrevious() if (! canGoToPrevious()) return nullptr; - nextDocs.insert (0, previousDocs.remove (previousDocs.size() - 1)); + nextDocs.insert (0, previousDocs.removeAndReturn (previousDocs.size() - 1)); return previousDocs.getLast(); } @@ -342,7 +342,7 @@ OpenDocumentManager::Document* RecentDocumentList::getNext() if (! canGoToNext()) return nullptr; - OpenDocumentManager::Document* d = nextDocs.remove (0); + OpenDocumentManager::Document* d = nextDocs.removeAndReturn (0); previousDocs.add (d); return d; } diff --git a/extras/Projucer/Source/Application/jucer_OpenDocumentManager.h b/extras/Projucer/Source/Application/jucer_OpenDocumentManager.h index 43a34e98..b5f8a19a 100644 --- a/extras/Projucer/Source/Application/jucer_OpenDocumentManager.h +++ b/extras/Projucer/Source/Application/jucer_OpenDocumentManager.h @@ -62,7 +62,7 @@ public: virtual void fileHasBeenRenamed (const File& newFile) = 0; virtual String getState() const = 0; virtual void restoreState (const String& state) = 0; - virtual File getCounterpartFile() const { return File::nonexistent; } + virtual File getCounterpartFile() const { return File(); } }; //============================================================================== diff --git a/extras/Projucer/Source/Code Editor/jucer_SourceCodeEditor.cpp b/extras/Projucer/Source/Code Editor/jucer_SourceCodeEditor.cpp index 32367158..1afb1367 100644 --- a/extras/Projucer/Source/Code Editor/jucer_SourceCodeEditor.cpp +++ b/extras/Projucer/Source/Code Editor/jucer_SourceCodeEditor.cpp @@ -639,7 +639,7 @@ void CppCodeEditorComponent::insertComponentClass() const char* classNameField = "Class Name"; - aw.addTextEditor (classNameField, String::empty, String::empty, false); + aw.addTextEditor (classNameField, String(), String(), false); aw.addButton (TRANS ("Insert Code"), 1, KeyPress (KeyPress::returnKey)); aw.addButton (TRANS ("Cancel"), 0, KeyPress (KeyPress::escapeKey)); diff --git a/extras/Projucer/Source/Code Editor/jucer_SourceCodeEditor.h b/extras/Projucer/Source/Code Editor/jucer_SourceCodeEditor.h index 5106004b..62cb112b 100644 --- a/extras/Projucer/Source/Code Editor/jucer_SourceCodeEditor.h +++ b/extras/Projucer/Source/Code Editor/jucer_SourceCodeEditor.h @@ -46,7 +46,7 @@ public: bool needsSaving() const override { return codeDoc != nullptr && codeDoc->hasChangedSinceSavePoint(); } bool hasFileBeenModifiedExternally() override { return modDetector.hasBeenModified(); } void fileHasBeenRenamed (const File& newFile) override { modDetector.fileHasBeenRenamed (newFile); } - String getState() const override { return lastState != nullptr ? lastState->toString() : String::empty; } + String getState() const override { return lastState != nullptr ? lastState->toString() : String(); } void restoreState (const String& state) override { lastState = new CodeEditorComponent::State (state); } File getCounterpartFile() const override diff --git a/extras/Projucer/Source/ComponentEditor/components/jucer_ComboBoxHandler.h b/extras/Projucer/Source/ComponentEditor/components/jucer_ComboBoxHandler.h index e328d9af..288406eb 100644 --- a/extras/Projucer/Source/ComponentEditor/components/jucer_ComboBoxHandler.h +++ b/extras/Projucer/Source/ComponentEditor/components/jucer_ComboBoxHandler.h @@ -55,14 +55,14 @@ public: if (! ComponentTypeHandler::restoreFromXml (xml, comp, layout)) return false; - ComboBox defaultBox (String::empty); + ComboBox defaultBox; ComboBox* const c = dynamic_cast (comp); jassert (c != nullptr); c->setEditableText (xml.getBoolAttribute ("editable", defaultBox.isTextEditable())); c->setJustificationType (Justification (xml.getIntAttribute ("layout", defaultBox.getJustificationType().getFlags()))); - c->getProperties().set ("items", xml.getStringAttribute ("items", String::empty)); + c->getProperties().set ("items", xml.getStringAttribute ("items", String())); c->setTextWhenNothingSelected (xml.getStringAttribute ("textWhenNonSelected", defaultBox.getTextWhenNothingSelected())); c->setTextWhenNoChoicesAvailable (xml.getStringAttribute ("textWhenNoItems", defaultBox.getTextWhenNoChoicesAvailable())); diff --git a/extras/Projucer/Source/ComponentEditor/components/jucer_ComponentTypeHandler.cpp b/extras/Projucer/Source/ComponentEditor/components/jucer_ComponentTypeHandler.cpp index f9687e78..16bdedee 100644 --- a/extras/Projucer/Source/ComponentEditor/components/jucer_ComponentTypeHandler.cpp +++ b/extras/Projucer/Source/ComponentEditor/components/jucer_ComponentTypeHandler.cpp @@ -196,7 +196,7 @@ bool ComponentTypeHandler::restoreFromXml (const XmlElement& xml, for (int i = 0; i < colours.size(); ++i) { - const String col (xml.getStringAttribute (colours[i]->xmlTagName, String::empty)); + const String col (xml.getStringAttribute (colours[i]->xmlTagName, String())); if (col.isNotEmpty()) comp->setColour (colours[i]->colourId, Colour::fromString (col)); @@ -518,12 +518,12 @@ void ComponentTypeHandler::fillInResizeCode (GeneratedCode& code, Component* com if (pos.rect.isPositionAbsolute()) code.constructorCode += r + "\n"; else - code.getCallbackCode (String::empty, "void", "resized()", false) += r; + code.getCallbackCode (String(), "void", "resized()", false) += r; } String ComponentTypeHandler::getCreationParameters (GeneratedCode&, Component*) { - return String::empty; + return String(); } void ComponentTypeHandler::fillInCreationCode (GeneratedCode& code, Component* component, const String& memberVariableName) diff --git a/extras/Projucer/Source/ComponentEditor/components/jucer_GenericComponentHandler.h b/extras/Projucer/Source/ComponentEditor/components/jucer_GenericComponentHandler.h index 6d4e9940..3e3301d8 100644 --- a/extras/Projucer/Source/ComponentEditor/components/jucer_GenericComponentHandler.h +++ b/extras/Projucer/Source/ComponentEditor/components/jucer_GenericComponentHandler.h @@ -93,7 +93,7 @@ public: return false; ((GenericComponent*) comp)->actualClassName = xml.getStringAttribute ("class", "Component"); - ((GenericComponent*) comp)->constructorParams = xml.getStringAttribute ("params", String::empty); + ((GenericComponent*) comp)->constructorParams = xml.getStringAttribute ("params", String()); return true; } diff --git a/extras/Projucer/Source/ComponentEditor/components/jucer_GroupComponentHandler.h b/extras/Projucer/Source/ComponentEditor/components/jucer_GroupComponentHandler.h index 45bea8ee..4e9e4c36 100644 --- a/extras/Projucer/Source/ComponentEditor/components/jucer_GroupComponentHandler.h +++ b/extras/Projucer/Source/ComponentEditor/components/jucer_GroupComponentHandler.h @@ -44,7 +44,7 @@ public: XmlElement* e = ComponentTypeHandler::createXmlFor (comp, layout); e->setAttribute ("title", g->getText()); - GroupComponent defaultComp (String::empty, String::empty); + GroupComponent defaultComp; if (g->getTextLabelPosition().getFlags() != defaultComp.getTextLabelPosition().getFlags()) e->setAttribute ("textpos", g->getTextLabelPosition().getFlags()); @@ -82,7 +82,7 @@ public: String s; - GroupComponent defaultComp (String::empty, String::empty); + GroupComponent defaultComp; if (g->getTextLabelPosition().getFlags() != defaultComp.getTextLabelPosition().getFlags()) { diff --git a/extras/Projucer/Source/ComponentEditor/components/jucer_ImageButtonHandler.h b/extras/Projucer/Source/ComponentEditor/components/jucer_ImageButtonHandler.h index a7d17d92..e6e8419e 100644 --- a/extras/Projucer/Source/ComponentEditor/components/jucer_ImageButtonHandler.h +++ b/extras/Projucer/Source/ComponentEditor/components/jucer_ImageButtonHandler.h @@ -101,15 +101,15 @@ public: setImageKeepProportions (l, ib, xml.getBoolAttribute ("keepProportions", true), false); - setImageResource (l, ib, normalImage, xml.getStringAttribute ("resourceNormal", String::empty), false); + setImageResource (l, ib, normalImage, xml.getStringAttribute ("resourceNormal", String()), false); setImageOpacity (l, ib, normalImage, (float) xml.getDoubleAttribute ("opacityNormal", 1.0f), false); setImageColour (l, ib, normalImage, Colour::fromString (xml.getStringAttribute ("colourNormal", "0")), false); - setImageResource (l, ib, overImage, xml.getStringAttribute ("resourceOver", String::empty), false); + setImageResource (l, ib, overImage, xml.getStringAttribute ("resourceOver", String()), false); setImageOpacity (l, ib, overImage, (float) xml.getDoubleAttribute ("opacityOver", 1.0f), false); setImageColour (l, ib, overImage, Colour::fromString (xml.getStringAttribute ("colourOver", "0")), false); - setImageResource (l, ib, downImage, xml.getStringAttribute ("resourceDown", String::empty), false); + setImageResource (l, ib, downImage, xml.getStringAttribute ("resourceDown", String()), false); setImageOpacity (l, ib, downImage, (float) xml.getDoubleAttribute ("opacityDown", 1.0f), false); setImageColour (l, ib, downImage, Colour::fromString (xml.getStringAttribute ("colourDown", "0")), false); diff --git a/extras/Projucer/Source/ComponentEditor/components/jucer_LabelHandler.h b/extras/Projucer/Source/ComponentEditor/components/jucer_LabelHandler.h index c71fce65..bbfa3099 100644 --- a/extras/Projucer/Source/ComponentEditor/components/jucer_LabelHandler.h +++ b/extras/Projucer/Source/ComponentEditor/components/jucer_LabelHandler.h @@ -68,7 +68,7 @@ public: if (! ComponentTypeHandler::restoreFromXml (xml, comp, layout)) return false; - Label defaultLabel (String::empty, String::empty); + Label defaultLabel; Font font; font.setHeight ((float) xml.getDoubleAttribute ("fontsize", 15.0)); diff --git a/extras/Projucer/Source/ComponentEditor/components/jucer_TabbedComponentHandler.h b/extras/Projucer/Source/ComponentEditor/components/jucer_TabbedComponentHandler.h index 37933ca7..399a3589 100644 --- a/extras/Projucer/Source/ComponentEditor/components/jucer_TabbedComponentHandler.h +++ b/extras/Projucer/Source/ComponentEditor/components/jucer_TabbedComponentHandler.h @@ -147,7 +147,7 @@ public: default: jassertfalse; break; } - return String::empty; + return String(); } void fillInCreationCode (GeneratedCode& code, Component* component, const String& memberVariableName) @@ -275,7 +275,7 @@ public: TabDemoContentComp* const tdc = dynamic_cast (tc->getTabContentComponent (tabIndex)); jassert (tdc != nullptr); - return tdc != 0 ? tdc->contentClassName : String::empty; + return tdc != 0 ? tdc->contentClassName : String(); } static void setTabClassName (TabbedComponent* tc, int tabIndex, const String& newName) @@ -295,7 +295,7 @@ public: TabDemoContentComp* const tdc = dynamic_cast (tc->getTabContentComponent (tabIndex)); jassert (tdc != nullptr); - return tdc != 0 ? tdc->constructorParams : String::empty; + return tdc != 0 ? tdc->constructorParams : String(); } static void setTabConstructorParams (TabbedComponent* tc, int tabIndex, const String& newParams) @@ -315,7 +315,7 @@ public: TabDemoContentComp* const tdc = dynamic_cast (tc->getTabContentComponent (tabIndex)); jassert (tdc != nullptr); - return tdc != 0 ? tdc->jucerComponentFile : String::empty; + return tdc != 0 ? tdc->jucerComponentFile : String(); } static void setTabJucerFile (TabbedComponent* tc, int tabIndex, const String& newFile) diff --git a/extras/Projucer/Source/ComponentEditor/components/jucer_ViewportHandler.h b/extras/Projucer/Source/ComponentEditor/components/jucer_ViewportHandler.h index 30873433..4afacc95 100644 --- a/extras/Projucer/Source/ComponentEditor/components/jucer_ViewportHandler.h +++ b/extras/Projucer/Source/ComponentEditor/components/jucer_ViewportHandler.h @@ -66,7 +66,7 @@ public: v->setScrollBarThickness (xml.getIntAttribute ("scrollbarThickness", defaultViewport.getScrollBarThickness())); - setViewportJucerComponentFile (v, xml.getStringAttribute ("jucerFile", String::empty)); + setViewportJucerComponentFile (v, xml.getStringAttribute ("jucerFile", String())); setViewportGenericComponentClass (v, xml.getStringAttribute ("contentClass")); setViewportContentType (v, xml.getIntAttribute ("contentType", 0)); setViewportConstructorParams (v, xml.getStringAttribute ("constructorParams")); @@ -150,7 +150,7 @@ public: } else { - classNm = String::empty; + classNm = String(); } } @@ -505,7 +505,7 @@ private: const String filename (getViewportJucerComponentFile (component)); if (filename.isEmpty()) - return File::nonexistent; + return File(); return document.getCppFile().getSiblingFile (filename); } diff --git a/extras/Projucer/Source/ComponentEditor/documents/jucer_ButtonDocument.cpp b/extras/Projucer/Source/ComponentEditor/documents/jucer_ButtonDocument.cpp index db6fe139..597a3a25 100644 --- a/extras/Projucer/Source/ComponentEditor/documents/jucer_ButtonDocument.cpp +++ b/extras/Projucer/Source/ComponentEditor/documents/jucer_ButtonDocument.cpp @@ -275,7 +275,7 @@ class ButtonTestComponent : public Button { public: ButtonTestComponent (ButtonDocument* const doc, const bool fillBackground) - : Button (String::empty), + : Button (String()), document (doc), alwaysFillBackground (fillBackground) { diff --git a/extras/Projucer/Source/ComponentEditor/jucer_BinaryResources.cpp b/extras/Projucer/Source/ComponentEditor/jucer_BinaryResources.cpp index 84d19c1a..d085e29e 100644 --- a/extras/Projucer/Source/ComponentEditor/jucer_BinaryResources.cpp +++ b/extras/Projucer/Source/ComponentEditor/jucer_BinaryResources.cpp @@ -158,7 +158,7 @@ String BinaryResources::browseForResource (const String& title, return name; } - return String::empty; + return String(); } String BinaryResources::findUniqueName (const String& rootName) const diff --git a/extras/Projucer/Source/ComponentEditor/jucer_ComponentLayout.cpp b/extras/Projucer/Source/ComponentEditor/jucer_ComponentLayout.cpp index 95a35178..77d349ca 100644 --- a/extras/Projucer/Source/ComponentEditor/jucer_ComponentLayout.cpp +++ b/extras/Projucer/Source/ComponentEditor/jucer_ComponentLayout.cpp @@ -715,7 +715,7 @@ void ComponentLayout::fillInGeneratedCode (GeneratedCode& code) const String ComponentLayout::getComponentMemberVariableName (Component* comp) const { if (comp == nullptr) - return String::empty; + return String(); String name (comp->getProperties() ["memberName"].toString()); @@ -730,7 +730,7 @@ void ComponentLayout::setComponentMemberVariableName (Component* comp, const Str jassert (comp != nullptr); const String oldName (getComponentMemberVariableName (comp)); - comp->getProperties().set ("memberName", String::empty); + comp->getProperties().set ("memberName", String()); const String n (getUnusedMemberName (CodeHelpers::makeValidIdentifier (newName, false, true, false), comp)); comp->getProperties().set ("memberName", n); @@ -775,7 +775,7 @@ String ComponentLayout::getUnusedMemberName (String nameRoot, Component* comp) c String ComponentLayout::getComponentVirtualClassName (Component* comp) const { if (comp == nullptr) - return String::empty; + return String(); return comp->getProperties() ["virtualName"]; } diff --git a/extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp b/extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp index d3f95499..29767fbe 100644 --- a/extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp +++ b/extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp @@ -173,7 +173,7 @@ void JucerDocument::setParentClasses (const String& classes) s = s.fromFirstOccurrenceOf (" ", false, false); if (s.trim().isEmpty()) - type = s = String::empty; + type = s = String(); } s = type + CodeHelpers::makeValidIdentifier (s.trim(), false, false, true); @@ -378,11 +378,11 @@ bool JucerDocument::loadFromXml (const XmlElement& xml) && getTypeName().equalsIgnoreCase (xml.getStringAttribute ("documentType"))) { className = xml.getStringAttribute ("className", defaultClassName); - templateFile = xml.getStringAttribute ("template", String::empty); - componentName = xml.getStringAttribute ("componentName", String::empty); + templateFile = xml.getStringAttribute ("template", String()); + componentName = xml.getStringAttribute ("componentName", String()); parentClasses = xml.getStringAttribute ("parentClasses", defaultParentClasses); - constructorParams = xml.getStringAttribute ("constructorParams", String::empty); - variableInitialisers = xml.getStringAttribute ("variableInitialisers", String::empty); + constructorParams = xml.getStringAttribute ("constructorParams", String()); + variableInitialisers = xml.getStringAttribute ("variableInitialisers", String()); fixedSize = xml.getBoolAttribute ("fixedSize", false); initialWidth = xml.getIntAttribute ("initialWidth", 300); @@ -425,10 +425,10 @@ void JucerDocument::fillInGeneratedCode (GeneratedCode& code) const code.constructorCode << "setName (" + quotedString (componentName, false) + ");\n"; // call these now, just to make sure they're the first two methods in the list. - code.getCallbackCode (String::empty, "void", "paint (Graphics& g)", false) + code.getCallbackCode (String(), "void", "paint (Graphics& g)", false) << "//[UserPrePaint] Add your own custom painting code here..\n//[/UserPrePaint]\n\n"; - code.getCallbackCode (String::empty, "void", "resized()", false) + code.getCallbackCode (String(), "void", "resized()", false) << "//[UserPreResize] Add your own custom resize code here..\n//[/UserPreResize]\n\n"; if (ComponentLayout* l = getComponentLayout()) @@ -449,10 +449,10 @@ void JucerDocument::fillInGeneratedCode (GeneratedCode& code) const if (initialWidth > 0 || initialHeight > 0) code.constructorCode << "\nsetSize (" << initialWidth << ", " << initialHeight << ");\n"; - code.getCallbackCode (String::empty, "void", "paint (Graphics& g)", false) + code.getCallbackCode (String(), "void", "paint (Graphics& g)", false) << "//[UserPaint] Add your own custom painting code here..\n//[/UserPaint]"; - code.getCallbackCode (String::empty, "void", "resized()", false) + code.getCallbackCode (String(), "void", "resized()", false) << "//[UserResized] Add your own custom resize handling here..\n//[/UserResized]"; // add optional methods @@ -491,7 +491,7 @@ void JucerDocument::fillInPaintCode (GeneratedCode& code) const { for (int i = 0; i < getNumPaintRoutines(); ++i) getPaintRoutine (i) - ->fillInGeneratedCode (code, code.getCallbackCode (String::empty, "void", "paint (Graphics& g)", false)); + ->fillInGeneratedCode (code, code.getCallbackCode (String(), "void", "paint (Graphics& g)", false)); } void JucerDocument::setTemplateFile (const String& newFile) diff --git a/extras/Projucer/Source/ComponentEditor/paintelements/jucer_ColouredElement.cpp b/extras/Projucer/Source/ComponentEditor/paintelements/jucer_ColouredElement.cpp index 6171f8a0..0e65f2cd 100644 --- a/extras/Projucer/Source/ComponentEditor/paintelements/jucer_ColouredElement.cpp +++ b/extras/Projucer/Source/ComponentEditor/paintelements/jucer_ColouredElement.cpp @@ -377,7 +377,7 @@ public: String getResource() const { if (element == nullptr) - return String::empty; + return String(); if (isForStroke) return element->getStrokeType().fill.imageResourceName; @@ -893,12 +893,12 @@ void ColouredElement::addColourAttributes (XmlElement* const e) const bool ColouredElement::loadColourAttributes (const XmlElement& xml) { - fillType.restoreFromString (xml.getStringAttribute ("fill", String::empty)); + fillType.restoreFromString (xml.getStringAttribute ("fill", String())); isStrokePresent = showOutline && xml.getBoolAttribute ("hasStroke", false); - strokeType.restoreFromString (xml.getStringAttribute ("stroke", String::empty)); - strokeType.fill.restoreFromString (xml.getStringAttribute ("strokeColour", String::empty)); + strokeType.restoreFromString (xml.getStringAttribute ("stroke", String())); + strokeType.fill.restoreFromString (xml.getStringAttribute ("strokeColour", String())); return true; } diff --git a/extras/Projucer/Source/ComponentEditor/paintelements/jucer_FillType.h b/extras/Projucer/Source/ComponentEditor/paintelements/jucer_FillType.h index 9d8e75e4..1db45605 100644 --- a/extras/Projucer/Source/ComponentEditor/paintelements/jucer_FillType.h +++ b/extras/Projucer/Source/ComponentEditor/paintelements/jucer_FillType.h @@ -202,7 +202,7 @@ public: break; } - return String::empty; + return String(); } void restoreFromString (const String& s) diff --git a/extras/Projucer/Source/ComponentEditor/paintelements/jucer_ImageResourceProperty.h b/extras/Projucer/Source/ComponentEditor/paintelements/jucer_ImageResourceProperty.h index 23e2fe08..40203105 100644 --- a/extras/Projucer/Source/ComponentEditor/paintelements/jucer_ImageResourceProperty.h +++ b/extras/Projucer/Source/ComponentEditor/paintelements/jucer_ImageResourceProperty.h @@ -77,8 +77,8 @@ public: String resource (document.getResources() .browseForResource ("Select an image file to add as a resource", "*.jpg;*.jpeg;*.png;*.gif;*.svg", - File::nonexistent, - String::empty)); + File(), + String())); if (resource.isNotEmpty()) setResource (resource); @@ -86,7 +86,7 @@ public: else { if (choices[newIndex] == getNoneText() && allowChoiceOfNoResource) - setResource (String::empty); + setResource (String()); else setResource (choices [newIndex]); } @@ -110,7 +110,7 @@ public: choices.clear(); choices.add ("-- create a new image resource -- "); - choices.add (String::empty); + choices.add (String()); if (allowChoiceOfNoResource) choices.add (getNoneText()); diff --git a/extras/Projucer/Source/ComponentEditor/paintelements/jucer_PaintElementImage.h b/extras/Projucer/Source/ComponentEditor/paintelements/jucer_PaintElementImage.h index ac7a9b98..1f6240aa 100644 --- a/extras/Projucer/Source/ComponentEditor/paintelements/jucer_PaintElementImage.h +++ b/extras/Projucer/Source/ComponentEditor/paintelements/jucer_PaintElementImage.h @@ -368,7 +368,7 @@ public: if (xml.hasTagName (getTagName())) { position.restoreFromXml (xml, position); - resourceName = xml.getStringAttribute ("resource", String::empty); + resourceName = xml.getStringAttribute ("resource", String()); opacity = xml.getDoubleAttribute ("opacity", 1.0); mode = (StretchMode) xml.getIntAttribute ("mode", (int) stretched); @@ -405,7 +405,7 @@ private: if (element != nullptr) return element->getResource(); - return String::empty; + return String(); } }; diff --git a/extras/Projucer/Source/ComponentEditor/paintelements/jucer_PaintElementPath.cpp b/extras/Projucer/Source/ComponentEditor/paintelements/jucer_PaintElementPath.cpp index 75d08f15..69fa3a31 100644 --- a/extras/Projucer/Source/ComponentEditor/paintelements/jucer_PaintElementPath.cpp +++ b/extras/Projucer/Source/ComponentEditor/paintelements/jucer_PaintElementPath.cpp @@ -425,7 +425,7 @@ void PaintElementPath::fillInGeneratedCode (GeneratedCode& code, String& paintMe r << '\n'; if (somePointsAreRelative) - code.getCallbackCode (String::empty, "void", "resized()", false) + code.getCallbackCode (String(), "void", "resized()", false) << pathVariable << ".clear();\n" << r; else code.constructorCode << r; diff --git a/extras/Projucer/Source/ComponentEditor/properties/jucer_FilePropertyComponent.h b/extras/Projucer/Source/ComponentEditor/properties/jucer_FilePropertyComponent.h index 902e9244..7a4d867e 100644 --- a/extras/Projucer/Source/ComponentEditor/properties/jucer_FilePropertyComponent.h +++ b/extras/Projucer/Source/ComponentEditor/properties/jucer_FilePropertyComponent.h @@ -35,9 +35,9 @@ public: const bool allowEditingOfFilename, const String& fileBrowserWildcard = "*") : PropertyComponent (name), - filenameComp (name, File::nonexistent, allowEditingOfFilename, + filenameComp (name, File(), allowEditingOfFilename, isDirectory, false, fileBrowserWildcard, - String::empty, String::empty) + String(), String()) { addAndMakeVisible (filenameComp); filenameComp.addListener (this); diff --git a/extras/Projucer/Source/ComponentEditor/properties/jucer_FontPropertyComponent.h b/extras/Projucer/Source/ComponentEditor/properties/jucer_FontPropertyComponent.h index 27fdda76..43519c4f 100644 --- a/extras/Projucer/Source/ComponentEditor/properties/jucer_FontPropertyComponent.h +++ b/extras/Projucer/Source/ComponentEditor/properties/jucer_FontPropertyComponent.h @@ -36,7 +36,7 @@ public: choices.add (getDefaultSans()); choices.add (getDefaultSerif()); choices.add (getDefaultMono()); - choices.add (String::empty); + choices.add (String()); static StringArray fontNames; @@ -90,7 +90,7 @@ public: static String getTypefaceNameCode (const String& typefaceName) { - if (typefaceName == getDefaultFont()) return String::empty; + if (typefaceName == getDefaultFont()) return String(); if (typefaceName == getDefaultSans()) return "Font::getDefaultSansSerifFontName(), "; if (typefaceName == getDefaultSerif()) return "Font::getDefaultSerifFontName(), "; if (typefaceName == getDefaultMono()) return "Font::getDefaultMonospacedFontName(), "; diff --git a/extras/Projucer/Source/ComponentEditor/properties/jucer_PositionPropertyBase.h b/extras/Projucer/Source/ComponentEditor/properties/jucer_PositionPropertyBase.h index c02dad83..9051c314 100644 --- a/extras/Projucer/Source/ComponentEditor/properties/jucer_PositionPropertyBase.h +++ b/extras/Projucer/Source/ComponentEditor/properties/jucer_PositionPropertyBase.h @@ -414,7 +414,7 @@ protected: public: PositionPropLabel (PositionPropertyBase& owner_) - : Label (String::empty, String::empty), + : Label (String(), String()), owner (owner_) { setEditable (true, true, false); diff --git a/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp b/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp index c4753bd3..5b175d08 100644 --- a/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp +++ b/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp @@ -47,7 +47,7 @@ public: : PropertyComponent ("extra callbacks", 250), document (doc) { - addAndMakeVisible (listBox = new ListBox (String::empty, this)); + addAndMakeVisible (listBox = new ListBox (String(), this)); listBox->setRowHeight (22); document.addChangeListener (this); @@ -817,20 +817,20 @@ void JucerDocumentEditor::getCommandInfo (const CommandID commandID, Application break; case StandardApplicationCommandIDs::cut: - result.setInfo (TRANS ("Cut"), String::empty, "Editing", 0); + result.setInfo (TRANS ("Cut"), String(), "Editing", 0); result.setActive (isSomethingSelected()); result.defaultKeypresses.add (KeyPress ('x', cmd, 0)); break; case StandardApplicationCommandIDs::copy: - result.setInfo (TRANS ("Copy"), String::empty, "Editing", 0); + result.setInfo (TRANS ("Copy"), String(), "Editing", 0); result.setActive (isSomethingSelected()); result.defaultKeypresses.add (KeyPress ('c', cmd, 0)); break; case StandardApplicationCommandIDs::paste: { - result.setInfo (TRANS ("Paste"), String::empty, "Editing", 0); + result.setInfo (TRANS ("Paste"), String(), "Editing", 0); result.defaultKeypresses.add (KeyPress ('v', cmd, 0)); bool canPaste = false; @@ -851,18 +851,18 @@ void JucerDocumentEditor::getCommandInfo (const CommandID commandID, Application break; case StandardApplicationCommandIDs::del: - result.setInfo (TRANS ("Delete"), String::empty, "Editing", 0); + result.setInfo (TRANS ("Delete"), String(), "Editing", 0); result.setActive (isSomethingSelected()); break; case StandardApplicationCommandIDs::selectAll: - result.setInfo (TRANS ("Select All"), String::empty, "Editing", 0); + result.setInfo (TRANS ("Select All"), String(), "Editing", 0); result.setActive (currentPaintRoutine != nullptr || currentLayout != nullptr); result.defaultKeypresses.add (KeyPress ('a', cmd, 0)); break; case StandardApplicationCommandIDs::deselectAll: - result.setInfo (TRANS ("Deselect All"), String::empty, "Editing", 0); + result.setInfo (TRANS ("Deselect All"), String(), "Editing", 0); result.setActive (currentPaintRoutine != nullptr || currentLayout != nullptr); result.defaultKeypresses.add (KeyPress ('d', cmd, 0)); break; diff --git a/extras/Projucer/Source/ComponentEditor/ui/jucer_ResourceEditorPanel.cpp b/extras/Projucer/Source/ComponentEditor/ui/jucer_ResourceEditorPanel.cpp index 897c134e..e7e813c7 100644 --- a/extras/Projucer/Source/ComponentEditor/ui/jucer_ResourceEditorPanel.cpp +++ b/extras/Projucer/Source/ComponentEditor/ui/jucer_ResourceEditorPanel.cpp @@ -84,7 +84,7 @@ ResourceEditorPanel::ResourceEditorPanel (JucerDocument& doc) delButton.addListener (this); delButton.setEnabled (false); - addAndMakeVisible (listBox = new TableListBox (String::empty, this)); + addAndMakeVisible (listBox = new TableListBox (String(), this)); listBox->getHeader().addColumn ("name", 1, 150, 80, 400); listBox->getHeader().addColumn ("original file", 2, 350, 80, 800); listBox->getHeader().addColumn ("size", 3, 100, 40, 150); @@ -247,8 +247,8 @@ void ResourceEditorPanel::buttonClicked (Button* b) document.getResources() .browseForResource ("Select a file to add as a resource", "*", - File::nonexistent, - String::empty); + File(), + String()); } else if (b == &delButton) { diff --git a/extras/Projucer/Source/LiveBuildEngine/projucer_ClassDatabase.h b/extras/Projucer/Source/LiveBuildEngine/projucer_ClassDatabase.h index 906f69f7..f68d4391 100644 --- a/extras/Projucer/Source/LiveBuildEngine/projucer_ClassDatabase.h +++ b/extras/Projucer/Source/LiveBuildEngine/projucer_ClassDatabase.h @@ -219,7 +219,7 @@ struct ClassDatabase if (isAbstract) return "This class is abstract"; if (noDefaultConstructor) return "This class has no default constructor"; if (inAnonymousNamespace) return "This class is declared inside an anonymous namespace"; - return String::empty; + return String(); } bool isDisallowed (const InstantiationFlags& disallowedFlags) const diff --git a/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp b/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp index 388b96fe..e8cd6108 100644 --- a/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp +++ b/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp @@ -89,9 +89,15 @@ namespace ProjectProperties static File getCacheLocation (Project& project) { + String cacheFolderName = project.getProjectFilenameRoot() + "_" + project.getProjectUID(); + + #if JUCE_DEBUG + cacheFolderName += "_debug"; + #endif + return getProjucerTempFolder() .getChildFile ("Intermediate Files") - .getChildFile (project.getProjectFilenameRoot() + "_" + project.getProjectUID()); + .getChildFile (cacheFolderName); } } @@ -481,7 +487,6 @@ private: if (project.getProjectType().isAudioPlugin()) { - paths.add (getAppSettings().getGlobalPath (Ids::vst2Path, TargetOS::getThisOS()).toString()); paths.add (getAppSettings().getGlobalPath (Ids::vst3Path, TargetOS::getThisOS()).toString()); } diff --git a/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineServer.cpp b/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineServer.cpp index 9cfc99a3..39e459ce 100644 --- a/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineServer.cpp +++ b/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineServer.cpp @@ -230,7 +230,7 @@ String createCommandLineForLaunchingServer (const String& pipeName, const String const File exe (File::getSpecialLocation (File::currentExecutableFile).getFullPathName()); - return exe.getFullPathName() + " " + commandPrefix + info.joinIntoString (commandTokenSeparator); + return "\"" + exe.getFullPathName() + "\" " + commandPrefix + info.joinIntoString (commandTokenSeparator); } static ServerIPC* currentServer = nullptr; diff --git a/extras/Projucer/Source/LiveBuildEngine/projucer_ComponentListComp.h b/extras/Projucer/Source/LiveBuildEngine/projucer_ComponentListComp.h index e18a990f..5dae23b1 100644 --- a/extras/Projucer/Source/LiveBuildEngine/projucer_ComponentListComp.h +++ b/extras/Projucer/Source/LiveBuildEngine/projucer_ComponentListComp.h @@ -82,7 +82,7 @@ private: } String getRenamingName() const override { return getDisplayName(); } - String getDisplayName() const override { return (namespaceToShow != nullptr ? namespaceToShow->name : String::empty) + "::"; } + String getDisplayName() const override { return (namespaceToShow != nullptr ? namespaceToShow->name : String()) + "::"; } void setName (const String&) override {} bool isMissing() override { return false; } Icon getIcon() const override { return Icon (getIcons().graph, getContrastingColour (Colours::darkred, 0.5f)); } diff --git a/extras/Projucer/Source/LiveBuildEngine/projucer_CppHelpers.h b/extras/Projucer/Source/LiveBuildEngine/projucer_CppHelpers.h index 829a7b65..bb2f2ac5 100644 --- a/extras/Projucer/Source/LiveBuildEngine/projucer_CppHelpers.h +++ b/extras/Projucer/Source/LiveBuildEngine/projucer_CppHelpers.h @@ -190,7 +190,7 @@ struct CppParserHelpers if (CPlusPlusCodeTokeniser::isReservedKeyword (ed.getText().replaceSection (ed.getHighlightedRegion().getStart(), ed.getHighlightedRegion().getLength(), s))) - return String::empty; + return String(); return s; } diff --git a/extras/Projucer/Source/LiveBuildEngine/projucer_ErrorListComponent.h b/extras/Projucer/Source/LiveBuildEngine/projucer_ErrorListComponent.h index 61181f92..543e11ad 100644 --- a/extras/Projucer/Source/LiveBuildEngine/projucer_ErrorListComponent.h +++ b/extras/Projucer/Source/LiveBuildEngine/projucer_ErrorListComponent.h @@ -27,7 +27,7 @@ class ErrorListComp : public TreePanelBase, { public: ErrorListComp (ErrorList& el) - : TreePanelBase (nullptr, String::empty), + : TreePanelBase (nullptr, String()), errorList (el) { setName ("Errors and Warnings"); diff --git a/extras/Projucer/Source/LiveBuildEngine/projucer_SourceCodeRange.h b/extras/Projucer/Source/LiveBuildEngine/projucer_SourceCodeRange.h index a6b0b5b9..1db9fdd2 100644 --- a/extras/Projucer/Source/LiveBuildEngine/projucer_SourceCodeRange.h +++ b/extras/Projucer/Source/LiveBuildEngine/projucer_SourceCodeRange.h @@ -82,7 +82,7 @@ struct SourceCodeRange String toString() const { if (file.isEmpty() && range.isEmpty()) - return String::empty; + return String(); return file + ":" + String (range.getStart()) + ":" + String (range.getEnd()); } diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_AndroidStudio.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_AndroidStudio.h index 0ff93cb0..4b873964 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_AndroidStudio.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_AndroidStudio.h @@ -179,7 +179,7 @@ public: return defaultInstallation; #endif - return File::nonexistent; + return File(); } protected: diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_CodeBlocks.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_CodeBlocks.h index 241793d0..199bff29 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_CodeBlocks.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_CodeBlocks.h @@ -188,7 +188,7 @@ private: if (isCodeBlocks() && isWindows()) { defines.set ("__MINGW__", "1"); - defines.set ("__MINGW_EXTENSION", String::empty); + defines.set ("__MINGW_EXTENSION", String()); } else { @@ -433,7 +433,6 @@ private: DependencyPathOS pathOS = isLinux() ? TargetOS::linux : TargetOS::windows; - vst2Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vstFolder), Ids::vst2Path, pathOS))); vst3Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vst3Folder), Ids::vst3Path, pathOS))); if (! isLinux()) diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h index 9f741b3e..bc58f252 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h @@ -165,8 +165,20 @@ private: config->getValue (Ids::useRuntimeLibDLL) = true; if (isVST3) + { if (config->getValue (Ids::postbuildCommand).toString().isEmpty()) - config->getValue (Ids::postbuildCommand) = "copy /Y \"$(OutDir)\\$(TargetFileName)\" \"$(OutDir)\\$(TargetName).vst3\""; + { + const String previousBuildCommands = config->getValue (Ids::internalPostBuildComamnd).toString(); + + String script; + if (previousBuildCommands.isNotEmpty()) + script += "\r\n"; + + script += "copy /Y \"$(OutDir)\\$(TargetFileName)\" \"$(OutDir)\\$(TargetName).vst3\""; + + config->getValue (Ids::internalPostBuildComamnd) = previousBuildCommands + script; + } + } } } @@ -175,9 +187,40 @@ private: const RelativePath aaxLibsFolder = RelativePath (getAAXPathValue().toString(), RelativePath::projectFolder).getChildFile ("Libs"); for (ProjectExporter::ConfigIterator config (*this); config.next();) + { if (config->getValue (Ids::useRuntimeLibDLL).getValue().isVoid()) config->getValue (Ids::useRuntimeLibDLL) = true; + if (config->getValue(Ids::postbuildCommand).toString().isEmpty()) + { + const String previousBuildCommands = config->getValue (Ids::internalPostBuildComamnd).toString(); + + const bool is64Bit = (config->getValue (Ids::winArchitecture) == "x64"); + const String bundleDir = "$(OutDir)\\$(TargetName).aaxplugin"; + const String bundleContents = bundleDir + "\\Contents"; + const String macOSDir = bundleContents + String ("\\") + (is64Bit ? "x64" : "Win32"); + const String executable = macOSDir + String ("\\$(TargetName).aaxplugin"); + const String bundleScript = aaxPath.toString() + String ("\\Utilities\\CreatePackage.bat"); + String iconFilePath = getTargetFolder().getChildFile ("icon.ico").getFullPathName(); + + if (! File (iconFilePath).existsAsFile()) + iconFilePath = aaxPath.toString() + String ("\\Utilities\\PlugIn.ico"); + + String script; + + if (previousBuildCommands.isNotEmpty()) + script += "\r\n"; + + script += String ("mkdir \"") + bundleDir + String ("\"\r\n"); + script += String ("mkdir \"") + bundleContents + String ("\"\r\n"); + script += String ("mkdir \"") + macOSDir + String ("\"\r\n"); + script += String ("copy /Y \"$(OutDir)\\$(TargetFileName)\" \"") + executable + String ("\"\r\n"); + script += bundleScript + String (" \"") + macOSDir + String ("\" \"") + iconFilePath + String ("\""); + + config->getValue (Ids::internalPostBuildComamnd) = previousBuildCommands + script; + } + } + msvcExtraPreprocessorDefs.set ("JucePlugin_AAXLibs_path", createRebasedPath (aaxLibsFolder)); } @@ -210,10 +253,19 @@ private: config->getValue (Ids::useRuntimeLibDLL) = true; if (config->getValue (Ids::postbuildCommand).toString().isEmpty()) - config->getValue (Ids::postbuildCommand) - = "copy /Y " - + modulePath.getChildFile ("juce_RTAS_WinResources.rsr").toWindowsStyle().quoted() - + " \"$(TargetPath)\".rsr"; + { + const String previousBuildCommands = config->getValue (Ids::internalPostBuildComamnd).toString(); + + String script; + if (previousBuildCommands.isNotEmpty()) + script += "\r\n"; + + script += "copy /Y " + + modulePath.getChildFile("juce_RTAS_WinResources.rsr").toWindowsStyle().quoted() + + " \"$(TargetPath)\".rsr"; + + config->getValue (Ids::internalPostBuildComamnd) = previousBuildCommands + script; + } } RelativePath juceWrapperFolder (project.getGeneratedCodeFolder(), @@ -329,6 +381,8 @@ protected: Value getPostbuildCommand() { return getValue (Ids::postbuildCommand); } String getPostbuildCommandString() const { return config [Ids::postbuildCommand]; } + Value getInternalPostbuildCommands() { return getValue (Ids::internalPostBuildComamnd); } + Value shouldGenerateDebugSymbolsValue() { return getValue (Ids::alwaysGenerateDebugSymbols); } bool shouldGenerateDebugSymbols() const { return config [Ids::alwaysGenerateDebugSymbols]; } @@ -713,7 +767,7 @@ protected: << newLine << "#endif" << newLine; - if (iconFile != File::nonexistent) + if (iconFile != File()) mo << newLine << "IDI_ICON1 ICON DISCARDABLE " << iconFile.getFileName().quoted() << newLine @@ -749,10 +803,6 @@ protected: void initialiseDependencyPathValues() { - vst2Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vstFolder), - Ids::vst2Path, - TargetOS::windows))); - vst3Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vst3Folder), Ids::vst3Path, TargetOS::windows))); @@ -812,7 +862,7 @@ public: if (group.getID() == ProjectSaver::getGeneratedGroupID()) { - if (iconFile != File::nonexistent) + if (iconFile != File()) { group.addFileAtIndex (iconFile, -1, true); group.findItemForFile (iconFile).getShouldAddToBinaryResourcesValue() = false; @@ -834,7 +884,7 @@ public: { MemoryOutputStream mo; - writeSolutionFile (mo, getSolutionVersionString(), String::empty, getVCProjFile()); + writeSolutionFile (mo, getSolutionVersionString(), String(), getVCProjFile()); overwriteFileIfDifferentOrThrow (getSLNFile(), mo); } @@ -1432,13 +1482,18 @@ protected: { XmlElement* intdir = props->createNewChildElement ("IntDir"); setConditionAttribute (*intdir, config); - intdir->addTextElement (FileHelpers::windowsStylePath (config.getIntermediatesPath()) + "\\"); + + String intermediatesPath = config.getIntermediatesPath(); + if (! intermediatesPath.endsWith ("\\")) + intermediatesPath << "\\"; + + intdir->addTextElement (FileHelpers::windowsStylePath (intermediatesPath)); } { XmlElement* targetName = props->createNewChildElement ("TargetName"); setConditionAttribute (*targetName, config); - targetName->addTextElement (config.getOutputFilename (String::empty, true)); + targetName->addTextElement (config.getOutputFilename (String(), true)); } { @@ -1583,10 +1638,11 @@ protected: ->createNewChildElement ("Command") ->addTextElement (config.getPrebuildCommandString()); - if (config.getPostbuildCommandString().isNotEmpty()) + const String internalPostBuildScripts = config.config[Ids::internalPostBuildComamnd].toString(); + if (config.getPostbuildCommandString().isNotEmpty() || internalPostBuildScripts.isNotEmpty()) group->createNewChildElement ("PostBuildEvent") ->createNewChildElement ("Command") - ->addTextElement (config.getPostbuildCommandString()); + ->addTextElement (config.getPostbuildCommandString() + internalPostBuildScripts); } ScopedPointer otherFilesGroup (new XmlElement ("ItemGroup")); @@ -1604,7 +1660,7 @@ protected: } } - if (iconFile != File::nonexistent) + if (iconFile != File()) { XmlElement* e = otherFilesGroup->createNewChildElement ("None"); e->setAttribute ("Include", prependDot (iconFile.getFileName())); @@ -1638,7 +1694,7 @@ protected: if (projectType.isStaticLibrary()) return "StaticLibrary"; jassertfalse; - return String::empty; + return String(); } static const char* getOptimisationLevelString (int level) @@ -1665,7 +1721,7 @@ protected: jassert (path.getRoot() == RelativePath::buildTargetFolder); - if (path.hasFileExtension (cOrCppFileExtensions)) + if (path.hasFileExtension (cOrCppFileExtensions) || path.hasFileExtension (asmFileExtensions)) { XmlElement* e = cpps.createNewChildElement ("ClCompile"); e->setAttribute ("Include", path.toWindowsStyle()); @@ -1721,7 +1777,7 @@ protected: for (int i = 0; i < projectItem.getNumChildren(); ++i) addFilesToFilter (projectItem.getChild(i), - (path.isEmpty() ? String::empty : (path + "\\")) + projectItem.getChild(i).getName(), + (path.isEmpty() ? String() : (path + "\\")) + projectItem.getChild(i).getName(), cpps, headers, otherFiles, groups); } else if (projectItem.shouldBeAddedToTargetProject()) diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Make.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Make.h index 4a43c790..7ed90c5c 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Make.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Make.h @@ -29,6 +29,9 @@ public: static const char* getNameLinux() { return "Linux Makefile"; } static const char* getValueTreeTypeName() { return "LINUX_MAKE"; } + Value getExtraPkgConfig() { return getSetting (Ids::linuxExtraPkgConfig); } + String getExtraPkgConfigString() const { return getSettingString (Ids::linuxExtraPkgConfig); } + static MakefileProjectExporter* createForSettings (Project& project, const ValueTree& settings) { if (settings.hasType (getValueTreeTypeName())) @@ -90,6 +93,9 @@ public: StringArray (cppStandardNames), Array (cppStandardValues)), "The C++ standard to specify in the makefile"); + + properties.add (new TextPropertyComponent (getExtraPkgConfig(), "pkg-config libraries", 8192, false), + "Extra pkg-config libraries for you application. Each package should be space separated."); } //============================================================================== @@ -126,7 +132,6 @@ protected: MakeBuildConfiguration (Project& p, const ValueTree& settings, const ProjectExporter& e) : BuildConfiguration (p, settings, e) { - setValueIfVoid (getLibrarySearchPathValue(), "/usr/X11R6/lib/"); } Value getArchitectureType() { return getValue (Ids::linuxArchitecture); } @@ -191,18 +196,36 @@ private: StringArray searchPaths (extraSearchPaths); searchPaths.addArray (config.getHeaderSearchPaths()); - searchPaths.insert (0, "/usr/include/freetype2"); - searchPaths.insert (0, "/usr/include"); + StringArray packages; + packages.addTokens (getExtraPkgConfigString(), " ", "\"'"); + packages.removeEmptyStrings(); + + if (linuxPackages.size() > 0 || packages.size() > 0) + { + out << " $(shell pkg-config --cflags"; + + for (int i = 0; i < linuxPackages.size(); ++i) + out << " " << linuxPackages[i]; + + for (int i = 0; i < packages.size(); ++i) + out << " " << packages[i]; + + out << ")"; + } + + if (linuxLibs.contains("pthread")) + out << " -pthread"; searchPaths = getCleanedStringArray (searchPaths); + // Replace ~ character with $(HOME) environment variable for (int i = 0; i < searchPaths.size(); ++i) - out << " -I " << escapeSpaces (FileHelpers::unixStylePath (replacePreprocessorTokens (config, searchPaths[i]))); + out << " -I" << escapeSpaces (FileHelpers::unixStylePath (replacePreprocessorTokens (config, searchPaths[i]))).replace ("~", "$(HOME)"); } void writeCppFlags (OutputStream& out, const BuildConfiguration& config) const { - out << " CPPFLAGS := $(DEPFLAGS)"; + out << " JUCE_CPPFLAGS := $(DEPFLAGS)"; writeDefineFlags (out, config); writeHeaderPathFlags (out, config); out << newLine; @@ -210,7 +233,7 @@ private: void writeLinkerFlags (OutputStream& out, const BuildConfiguration& config) const { - out << " LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR)"; + out << " JUCE_LDFLAGS += $(LDFLAGS) $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR)"; { StringArray flags (makefileExtraLinkerFlags); @@ -227,12 +250,26 @@ private: out << config.getGCCLibraryPathFlags(); + StringArray packages; + packages.addTokens (getExtraPkgConfigString(), " ", "\"'"); + packages.removeEmptyStrings(); + + if (linuxPackages.size() > 0 || packages.size() > 0) + { + out << " $(shell pkg-config --libs"; + + for (int i = 0; i < linuxPackages.size(); ++i) + out << " " << linuxPackages[i]; + + for (int i = 0; i < packages.size(); ++i) + out << " " << packages[i]; + + out << ")"; + } + for (int i = 0; i < linuxLibs.size(); ++i) out << " -l" << linuxLibs[i]; - if (getProject().isConfigFlagEnabled ("JUCE_USE_CURL")) - out << " -lcurl"; - StringArray libraries; libraries.addTokens (getExternalLibrariesString(), ";", "\"'"); libraries.removeEmptyStrings(); @@ -257,10 +294,10 @@ private: } out << "ifeq ($(CONFIG)," << escapeSpaces (config.getName()) << ")" << newLine; - out << " BINDIR := " << escapeSpaces (buildDirName) << newLine - << " LIBDIR := " << escapeSpaces (buildDirName) << newLine - << " OBJDIR := " << escapeSpaces (intermediatesDirName) << newLine - << " OUTDIR := " << escapeSpaces (outputDir) << newLine + out << " JUCE_BINDIR := " << escapeSpaces (buildDirName) << newLine + << " JUCE_LIBDIR := " << escapeSpaces (buildDirName) << newLine + << " JUCE_OBJDIR := " << escapeSpaces (intermediatesDirName) << newLine + << " JUCE_OUTDIR := " << escapeSpaces (outputDir) << newLine << newLine << " ifeq ($(TARGET_ARCH),)" << newLine << " TARGET_ARCH := " << getArchFlags (config) << newLine @@ -269,7 +306,7 @@ private: writeCppFlags (out, config); - out << " CFLAGS += $(CPPFLAGS) $(TARGET_ARCH)"; + out << " JUCE_CFLAGS += $(CFLAGS) $(JUCE_CPPFLAGS) $(TARGET_ARCH)"; if (config.isDebug()) out << " -g -ggdb"; @@ -286,7 +323,7 @@ private: if (cppStandardToUse.isEmpty()) cppStandardToUse = "-std=c++11"; - out << " CXXFLAGS += $(CFLAGS) " + out << " JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) " << cppStandardToUse << newLine; @@ -304,11 +341,11 @@ private: out << " TARGET := " << escapeSpaces (targetName) << newLine; if (projectType.isStaticLibrary()) - out << " BLDCMD = ar -rcs $(OUTDIR)/$(TARGET) $(OBJECTS)" << newLine; + out << " BLDCMD = $(AR) -rcs $(JUCE_OUTDIR)/$(TARGET) $(OBJECTS)" << newLine; else - out << " BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)" << newLine; + out << " BLDCMD = $(CXX) -o $(JUCE_OUTDIR)/$(TARGET) $(OBJECTS) $(JUCE_LDFLAGS) $(RESOURCES) $(TARGET_ARCH)" << newLine; - out << " CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)" << newLine + out << " CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR)" << newLine << "endif" << newLine << newLine; } @@ -319,7 +356,7 @@ private: for (int i = 0; i < files.size(); ++i) if (shouldFileBeCompiledByDefault (files.getReference(i))) - out << " $(OBJDIR)/" << escapeSpaces (getObjectFileFor (files.getReference(i))) << " \\" << newLine; + out << " $(JUCE_OBJDIR)/" << escapeSpaces (getObjectFileFor (files.getReference(i))) << " \\" << newLine; out << newLine; } @@ -334,6 +371,16 @@ private: << "DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD)" << newLine << newLine; + out << "ifndef STRIP" << newLine + << " STRIP=strip" << newLine + << "endif" << newLine + << newLine; + + out << "ifndef AR" << newLine + << " AR=ar" << newLine + << "endif" << newLine + << newLine; + out << "ifndef CONFIG" << newLine << " CONFIG=" << escapeSpaces (getConfiguration(0)->getName()) << newLine << "endif" << newLine @@ -347,14 +394,39 @@ private: out << ".PHONY: clean" << newLine << newLine; - out << "$(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES)" << newLine + StringArray packages; + packages.addTokens (getExtraPkgConfigString(), " ", "\"'"); + packages.removeEmptyStrings(); + + bool useLinuxPackages = (linuxPackages.size() > 0 || packages.size() > 0); + + out << "$(JUCE_OUTDIR)/$(TARGET): " + << ((useLinuxPackages) ? "check-pkg-config " : "") + << "$(OBJECTS) $(RESOURCES)" << newLine << "\t@echo Linking " << projectName << newLine - << "\t-@mkdir -p $(BINDIR)" << newLine - << "\t-@mkdir -p $(LIBDIR)" << newLine - << "\t-@mkdir -p $(OUTDIR)" << newLine + << "\t-@mkdir -p $(JUCE_BINDIR)" << newLine + << "\t-@mkdir -p $(JUCE_LIBDIR)" << newLine + << "\t-@mkdir -p $(JUCE_OUTDIR)" << newLine << "\t@$(BLDCMD)" << newLine << newLine; + if (useLinuxPackages) + { + out << "check-pkg-config:" << newLine + << "\t@command -v pkg-config >/dev/null 2>&1 || " + "{ echo >&2 \"pkg-config not installed. Please, install it.\"; " + "exit 1; }" << newLine + << "\t@pkg-config --print-errors"; + + for (int i = 0; i < linuxPackages.size(); ++i) + out << " " << linuxPackages[i]; + + for (int i = 0; i < packages.size(); ++i) + out << " " << packages[i]; + + out << newLine << newLine; + } + out << "clean:" << newLine << "\t@echo Cleaning " << projectName << newLine << "\t@$(CLEANCMD)" << newLine @@ -362,7 +434,7 @@ private: out << "strip:" << newLine << "\t@echo Stripping " << projectName << newLine - << "\t-@strip --strip-unneeded $(OUTDIR)/$(TARGET)" << newLine + << "\t-@$(STRIP) --strip-unneeded $(JUCE_OUTDIR)/$(TARGET)" << newLine << newLine; for (int i = 0; i < files.size(); ++i) @@ -371,12 +443,12 @@ private: { jassert (files.getReference(i).getRoot() == RelativePath::buildTargetFolder); - out << "$(OBJDIR)/" << escapeSpaces (getObjectFileFor (files.getReference(i))) + out << "$(JUCE_OBJDIR)/" << escapeSpaces (getObjectFileFor (files.getReference(i))) << ": " << escapeSpaces (files.getReference(i).toUnixStyle()) << newLine - << "\t-@mkdir -p $(OBJDIR)" << newLine + << "\t-@mkdir -p $(JUCE_OBJDIR)" << newLine << "\t@echo \"Compiling " << files.getReference(i).getFileName() << "\"" << newLine - << (files.getReference(i).hasFileExtension ("c;s;S") ? "\t@$(CC) $(CFLAGS) -o \"$@\" -c \"$<\"" - : "\t@$(CXX) $(CXXFLAGS) -o \"$@\" -c \"$<\"") + << (files.getReference(i).hasFileExtension ("c;s;S") ? "\t@$(CC) $(JUCE_CFLAGS) -o \"$@\" -c \"$<\"" + : "\t@$(CXX) $(JUCE_CXXFLAGS) -o \"$@\" -c \"$<\"") << newLine << newLine; } } @@ -401,10 +473,6 @@ private: void initialiseDependencyPathValues() { - vst2Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vstFolder), - Ids::vst2Path, - TargetOS::linux))); - vst3Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vst3Folder), Ids::vst3Path, TargetOS::linux))); diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h index 632b520f..c8196152 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h @@ -29,7 +29,7 @@ namespace { const char* const osxVersionDefault = "default"; const int oldestSDKVersion = 5; - const int currentSDKVersion = 11; + const int currentSDKVersion = 12; const char* const osxArch_Default = "default"; const char* const osxArch_Native = "Native"; @@ -124,7 +124,7 @@ public: bool isOSX() const override { return ! iOS; } bool isiOS() const override { return iOS; } - bool supportsVST() const override { return true; } + bool supportsVST() const override { return ! iOS; } bool supportsVST3() const override { return ! iOS; } bool supportsAAX() const override { return ! iOS; } bool supportsRTAS() const override { return ! iOS; } @@ -374,8 +374,8 @@ protected: if (iOS) { - const char* iosVersions[] = { "Use Default", "7.0", "7.1", "8.0", "8.1", "8.2", "8.3", "8.4", "9.0", "9.1", "9.2", "9.3", 0 }; - const char* iosVersionValues[] = { osxVersionDefault, "7.0", "7.1", "8.0", "8.1", "8.2", "8.3", "8.4", "9.0", "9.1", "9.2", "9.3", 0 }; + const char* iosVersions[] = { "Use Default", "7.0", "7.1", "8.0", "8.1", "8.2", "8.3", "8.4", "9.0", "9.1", "9.2", "9.3", "10.0", 0 }; + const char* iosVersionValues[] = { osxVersionDefault, "7.0", "7.1", "8.0", "8.1", "8.2", "8.3", "8.4", "9.0", "9.1", "9.2", "9.3", "10.0", 0 }; props.add (new ChoicePropertyComponent (iosDeploymentTarget.getPropertyAsValue(), "iOS Deployment Target", StringArray (iosVersions), Array (iosVersionValues)), @@ -550,7 +550,7 @@ public: xcodeIsExecutable = true; xcodeCreatePList = false; xcodeFileType = "compiled.mach-o.executable"; - xcodeBundleExtension = String::empty; + xcodeBundleExtension = String(); xcodeProductType = "com.apple.product-type.tool"; xcodeCopyToProductInstallPathAfterBuild = false; break; @@ -957,12 +957,17 @@ public: const String sdk (config.osxSDKVersion.get()); const String sdkCompat (config.osxDeploymentTarget.get()); + // if the user doesn't set it, then use the last known version that works well with JUCE + String deploymentTarget = "10.11"; + for (int ver = oldestSDKVersion; ver <= currentSDKVersion; ++ver) { if (sdk == getSDKName (ver)) s.add ("SDKROOT = macosx10." + String (ver)); - if (sdkCompat == getSDKName (ver)) s.add ("MACOSX_DEPLOYMENT_TARGET = 10." + String (ver)); + if (sdkCompat == getSDKName (ver)) deploymentTarget = "10." + String (ver); } + s.add ("MACOSX_DEPLOYMENT_TARGET = " + deploymentTarget); + s.add ("MACOSX_DEPLOYMENT_TARGET_ppc = 10.4"); s.add ("SDKROOT_ppc = macosx10.5"); @@ -1093,7 +1098,7 @@ public: void getLinkerSettings (const BuildConfiguration& config, StringArray& flags, StringArray& librarySearchPaths) const { if (xcodeIsBundle) - flags.add ("-bundle"); + flags.add (owner.isiOS() ? "-bitcode_bundle" : "-bundle"); const Array& extraLibs = config.isDebug() ? xcodeExtraLibrariesDebug : xcodeExtraLibrariesRelease; @@ -1947,6 +1952,8 @@ private: const String iosVersion (config.iosDeploymentTarget.get()); if (iosVersion.isNotEmpty() && iosVersion != osxVersionDefault) s.add ("IPHONEOS_DEPLOYMENT_TARGET = " + iosVersion); + else + s.add ("IPHONEOS_DEPLOYMENT_TARGET = 9.3"); } else { @@ -2706,7 +2713,6 @@ private: void initialiseDependencyPathValues() { - vst2Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vstFolder), Ids::vst2Path, TargetOS::osx))); vst3Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vst3Folder), Ids::vst3Path, TargetOS::osx))); aaxPath. referTo (Value (new DependencyPathValueSource (getSetting (Ids::aaxFolder), Ids::aaxPath, TargetOS::osx))); rtasPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::rtasFolder), Ids::rtasPath, TargetOS::osx))); diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp b/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp index faa0934f..c43b44f2 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp @@ -242,15 +242,9 @@ void ProjectExporter::createPropertyEditors (PropertyListBuilder& props) void ProjectExporter::createDependencyPathProperties (PropertyListBuilder& props) { - if (supportsVST() && (project.shouldBuildVST().getValue() || project.isVSTPluginHost())) - { - props.add (new DependencyPathPropertyComponent (getVSTPathValue (false), "VST SDK Folder"), - "If you're building a VST plugin or host, this must be the folder containing the VST SDK. This can be an absolute path, or a path relative to the Projucer project file."); - } - if (supportsVST3() && (project.shouldBuildVST3().getValue() || project.isVST3PluginHost())) { - props.add (new DependencyPathPropertyComponent (getVSTPathValue (true), "VST3 SDK Folder"), + props.add (new DependencyPathPropertyComponent (getVST3PathValue(), "VST3 SDK Folder"), "If you're building a VST3 plugin or host, this must be the folder containing the VST3 SDK. This can be an absolute path, or a path relative to the Projucer project file."); } @@ -306,14 +300,8 @@ void ProjectExporter::addSettingsForProjectType (const ProjectType& type) void ProjectExporter::addVSTPathsIfPluginOrHost() { - if (supportsVST()) - { - if (project.shouldBuildVST().getValue()) - makefileTargetSuffix = ".so"; - - if (project.shouldBuildVST().getValue() || project.isVSTPluginHost()) - addVSTFolderToPath (false); - } + if (supportsVST() && project.shouldBuildVST().getValue()) + makefileTargetSuffix = ".so"; if (supportsVST3()) { @@ -321,7 +309,7 @@ void ProjectExporter::addVSTPathsIfPluginOrHost() makefileTargetSuffix = ".so"; if (project.shouldBuildVST3().getValue() || project.isVST3PluginHost()) - addVSTFolderToPath (true); + addVST3FolderToPath(); } } @@ -336,12 +324,12 @@ void ProjectExporter::addCommonAudioPluginSettings() // Note: RTAS paths are platform-dependent, impl -> addPlatformSpecificSettingsForProjectType } -void ProjectExporter::addVSTFolderToPath (bool isVST3) +void ProjectExporter::addVST3FolderToPath() { - const String vstFolder (getVSTPathValue (isVST3).toString()); + const String vst3Folder (getVST3PathValue().toString()); - if (vstFolder.isNotEmpty()) - addToExtraSearchPaths (RelativePath (vstFolder, RelativePath::projectFolder), 0); + if (vst3Folder.isNotEmpty()) + addToExtraSearchPaths (RelativePath (vst3Folder, RelativePath::projectFolder), 0); } void ProjectExporter::addAAXFoldersToPath() @@ -831,7 +819,7 @@ String ProjectExporter::BuildConfiguration::getGCCLibraryPathFlags() const const StringArray libraryPaths (getLibrarySearchPaths()); for (int i = 0; i < libraryPaths.size(); ++i) - s << " -L" << escapeSpaces (libraryPaths[i]); + s << " -L" << escapeSpaces (libraryPaths[i]).replace ("~", "$(HOME)"); return s; } @@ -845,5 +833,5 @@ String ProjectExporter::getExternalLibraryFlags (const BuildConfiguration& confi if (libraries.size() != 0) return replacePreprocessorTokens (config, "-l" + libraries.joinIntoString (" -l")).trim(); - return String::empty; + return String(); } diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.h index b99519de..cb7ea20b 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.h @@ -131,7 +131,7 @@ public: Value getUserNotes() { return getSetting (Ids::userNotes); } - Value getVSTPathValue (bool isVST3) const { return isVST3 ? vst3Path : vst2Path; } + Value getVST3PathValue() const { return vst3Path; } Value getRTASPathValue() const { return rtasPath; } Value getAAXPathValue() const { return aaxPath; } @@ -189,7 +189,7 @@ public: //============================================================================== String makefileTargetSuffix; bool makefileIsDLL; - StringArray linuxLibs, makefileExtraLinkerFlags; + StringArray linuxLibs, linuxPackages, makefileExtraLinkerFlags; //============================================================================== String msvcTargetSuffix; @@ -341,7 +341,7 @@ protected: const ProjectType& projectType; const String projectName; const File projectFolder; - Value vst2Path, vst3Path, rtasPath, aaxPath; // these must be initialised in the specific exporter c'tors! + Value vst3Path, rtasPath, aaxPath; // these must be initialised in the specific exporter c'tors! mutable Array itemGroups; void initItemGroups() const; @@ -384,7 +384,7 @@ protected: static void writeXmlOrThrow (const XmlElement& xml, const File& file, const String& encoding, int maxCharsPerLine, bool useUnixNewLines = false) { MemoryOutputStream mo; - xml.writeToStream (mo, String::empty, false, true, encoding, maxCharsPerLine); + xml.writeToStream (mo, String(), false, true, encoding, maxCharsPerLine); if (useUnixNewLines) { @@ -406,7 +406,7 @@ private: void createIconProperties (PropertyListBuilder&); void addVSTPathsIfPluginOrHost(); void addCommonAudioPluginSettings(); - void addVSTFolderToPath (bool isVST3); + void addVST3FolderToPath(); void addAAXFoldersToPath(); JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProjectExporter) diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectSaver.h b/extras/Projucer/Source/Project Saving/jucer_ProjectSaver.h index 4d5307eb..ebdb6749 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectSaver.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectSaver.h @@ -104,6 +104,8 @@ public: return Result::fail (errors[0]); } + project.updateModificationTime(); + return Result::ok(); } @@ -285,7 +287,7 @@ private: if (xml != nullptr) { MemoryOutputStream mo; - xml->writeToStream (mo, String::empty); + xml->writeToStream (mo, String()); replaceFileIfDifferent (projectFile, mo); } } @@ -322,9 +324,9 @@ private: if (! foundCodeSection) { - userContent.add (String::empty); + userContent.add (String()); userContent.add ("// (You can add your own code in this section, and the Projucer will not overwrite it)"); - userContent.add (String::empty); + userContent.add (String()); } return userContent.joinIntoString (newLine) + newLine; @@ -432,8 +434,11 @@ private: out << " #define " << f->symbol << " 1"; else if (value == Project::configFlagDisabled) out << " #define " << f->symbol << " 0"; - else + else if (f->defaultValue.isEmpty()) out << " //#define " << f->symbol; + else + out << " #define " << f->symbol << " " << f->defaultValue; + out << newLine << "#endif" << newLine diff --git a/extras/Projucer/Source/Project Saving/jucer_TextWithDefaultPropertyComponent.h b/extras/Projucer/Source/Project Saving/jucer_TextWithDefaultPropertyComponent.h index e881bdaa..5117a1fb 100644 --- a/extras/Projucer/Source/Project Saving/jucer_TextWithDefaultPropertyComponent.h +++ b/extras/Projucer/Source/Project Saving/jucer_TextWithDefaultPropertyComponent.h @@ -36,7 +36,7 @@ class TextWithDefaultPropertyComponent : public PropertyComponent, { public: LabelComp (TextWithDefaultPropertyComponent& tpc, const int charLimit) - : Label (String::empty, String::empty), + : Label (String(), String()), owner (tpc), maxChars (charLimit) { @@ -158,7 +158,7 @@ private: void editorShown (Label*, TextEditor& editor) override { if (cachedValue.isUsingDefault()) - editor.setText (String::empty, dontSendNotification); + editor.setText (String(), dontSendNotification); } void editorHidden (Label*, TextEditor&) override {} diff --git a/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp b/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp index da5cff05..69d9e3f6 100644 --- a/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp +++ b/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp @@ -65,7 +65,7 @@ try : TextPropertyComponent (propertyName, 1024, false), // which has set the project value to whatever is displayed in the label (this may be the // global/fallback value). In this case we have to reset the project value to blank: if (initialValueIsEmpty) - getValue().setValue (String::empty); + getValue().setValue (String()); getValue().addListener (this); setColour (textColourId, getTextColourToDisplay()); @@ -114,7 +114,7 @@ void DependencyPathPropertyComponent::labelTextChanged (Label*) void DependencyPathPropertyComponent::editorShown (Label* /*label*/, TextEditor& editor) { if (! pathValueSource.isUsingProjectSettings()) - editor.setText (String::empty, dontSendNotification); + editor.setText (String(), dontSendNotification); } void DependencyPathPropertyComponent::editorHidden (Label*, TextEditor&) diff --git a/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.h b/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.h index 64d7225d..36dd1f59 100644 --- a/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.h +++ b/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.h @@ -90,7 +90,7 @@ private: if ((value.refersToSameSourceAs (globalSettingsValue) && isUsingGlobalSettings())) { sendChangeMessage (true); - setValue (String::empty); // make sure that the project-specific value is still blank + setValue (String()); // make sure that the project-specific value is still blank } } diff --git a/extras/Projucer/Source/Project/jucer_Module.cpp b/extras/Projucer/Source/Project/jucer_Module.cpp index ff59f9f0..307c52db 100644 --- a/extras/Projucer/Source/Project/jucer_Module.cpp +++ b/extras/Projucer/Source/Project/jucer_Module.cpp @@ -338,6 +338,7 @@ void LibraryModule::addSettingsForModuleToExporter (ProjectExporter& exporter, P else if (exporter.isLinux()) { parseAndAddLibs (exporter.linuxLibs, moduleInfo.moduleInfo ["linuxLibs"].toString()); + parseAndAddLibs (exporter.linuxPackages, moduleInfo.moduleInfo ["linuxPackages"].toString()); } else if (exporter.isCodeBlocks() && exporter.isWindows()) { @@ -760,7 +761,7 @@ void EnabledModuleList::addModuleFromUserSelectedFile() { static File lastLocation (findDefaultModulesFolder (project)); - FileChooser fc ("Select a module to add...", lastLocation, String::empty, false); + FileChooser fc ("Select a module to add...", lastLocation, String(), false); if (fc.browseForDirectory()) { diff --git a/extras/Projucer/Source/Project/jucer_Module.h b/extras/Projucer/Source/Project/jucer_Module.h index 49d20370..3c6c524a 100644 --- a/extras/Projucer/Source/Project/jucer_Module.h +++ b/extras/Projucer/Source/Project/jucer_Module.h @@ -118,6 +118,7 @@ public: private: mutable Array sourceFiles; + OwnedArray configFlags; void addBrowseableCode (ProjectExporter&, const Array& compiled, const File& localModuleFolder) const; }; diff --git a/extras/Projucer/Source/Project/jucer_Project.cpp b/extras/Projucer/Source/Project/jucer_Project.cpp index 29be7e38..9ad61e4a 100644 --- a/extras/Projucer/Source/Project/jucer_Project.cpp +++ b/extras/Projucer/Source/Project/jucer_Project.cpp @@ -59,6 +59,8 @@ Project::Project (const File& f) setChangedFlag (false); projectRoot.addListener (this); + + modificationTime = getFile().getLastModificationTime(); } Project::~Project() @@ -374,6 +376,20 @@ void Project::valueTreeChildRemoved (ValueTree&, ValueTree&, int) { changed(); void Project::valueTreeChildOrderChanged (ValueTree&, int, int) { changed(); } void Project::valueTreeParentChanged (ValueTree&) {} +//============================================================================== +bool Project::hasProjectBeenModified() +{ + Time newModificationTime = getFile().getLastModificationTime(); + + if (newModificationTime != modificationTime) + { + modificationTime = newModificationTime; + return true; + } + + return false; +} + //============================================================================== File Project::resolveFilename (String filename) const { @@ -1215,15 +1231,13 @@ void Project::createExporterForCurrentPlatform() String Project::getFileTemplate (const String& templateName) { int dataSize; - const char* data = BinaryData::getNamedResource (templateName.toUTF8(), dataSize); - if (data == nullptr) - { - jassertfalse; - return String::empty; - } + if (const char* data = BinaryData::getNamedResource (templateName.toUTF8(), dataSize)) + return String::fromUTF8 (data, dataSize); + + jassertfalse; + return String(); - return String::fromUTF8 (data, dataSize); } //============================================================================== diff --git a/extras/Projucer/Source/Project/jucer_Project.h b/extras/Projucer/Source/Project/jucer_Project.h index f923408c..520c5cf6 100644 --- a/extras/Projucer/Source/Project/jucer_Project.h +++ b/extras/Projucer/Source/Project/jucer_Project.h @@ -278,13 +278,14 @@ public: //============================================================================== struct ConfigFlag { - String symbol, description, sourceModuleID; + String symbol, description, sourceModuleID, defaultValue; Value value; // 1 = true, 2 = false, anything else = use default }; static const char* const configFlagDefault; static const char* const configFlagEnabled; static const char* const configFlagDisabled; + Value getConfigFlag (const String& name); bool isConfigFlagEnabled (const String& name) const; @@ -310,6 +311,10 @@ public: //============================================================================== static const char* projectFileExtension; + //============================================================================== + bool hasProjectBeenModified(); + void updateModificationTime() { modificationTime = getFile().getLastModificationTime(); } + private: //============================================================================== void setMissingAudioPluginDefaultValues(); @@ -333,6 +338,8 @@ private: void updateOldModulePaths(); void warnAboutOldProjucerVersion(); + Time modificationTime; + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Project) }; diff --git a/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp b/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp index f65729fd..40a66429 100644 --- a/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp +++ b/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp @@ -354,65 +354,95 @@ struct BuildTabComponent : public ConcertinaPanel struct ProjucerDisabledComp : public Component, private Button::Listener { - ProjucerDisabledComp (String message, bool loggedIn, bool canLogin, bool requirePurchase = false, - const String& loginName = String()) - : isLoggedIn (loggedIn), isPurchaseButton (requirePurchase) + ProjucerDisabledComp (String message, bool loggedIn, bool showSubscribeButton, + bool showSignInButton, bool showSwitchAccountButton) + : isLoggedIn (loggedIn) { infoLabel.setColour (Label::textColourId, findColour (mainBackgroundColourId).contrasting (0.7f)); infoLabel.setJustificationType (Justification::centred); infoLabel.setText (message, dontSendNotification); addAndMakeVisible (infoLabel); - if (canLogin) + if (showSubscribeButton) { - addAndMakeVisible (loginButton); - loginButton.addListener (this); + subscribeButton = new TextButton (String ( "Subscribe...")); + addAndMakeVisible (*subscribeButton); + subscribeButton->addListener (this); + } - if (isPurchaseButton) - { - loginButton.setButtonText ("Purchase JUCE Pro..."); - signOutButton = new TextButton (String ("Sign Out ") + loginName); - addAndMakeVisible (*signOutButton); - signOutButton->addListener (this); - } + if (showSignInButton) + { + signInButton = new TextButton (String ( "Sign in...")); + addAndMakeVisible (*signInButton); + signInButton->addListener (this); + } + + if (showSwitchAccountButton) + { + switchAccountButton = new TextButton (String ("Switch account...")); + addAndMakeVisible (*switchAccountButton); + switchAccountButton->addListener (this); } } void resized() override { - infoLabel.centreWithSize (proportionOfWidth (0.9f), 200); - loginButton.setSize (jmin (getWidth() - 10, 150), 22); - loginButton.setCentrePosition (infoLabel.getBounds().getCentreX(), - infoLabel.getBottom() + loginButton.getHeight() * 2); + int infoWidth = proportionOfWidth (0.9f); + int infoHeight = 100; + + infoLabel.centreWithSize (infoWidth, infoHeight); - if (signOutButton != nullptr) + int buttonWidth = jmin (getWidth() - 10, 150); + int buttonHeight = 22; + int itemDistance = 10; + + int buttonCenterX = infoLabel.getBounds().getCentreX(); + int buttonCenterY = infoLabel.getBottom() + itemDistance + buttonHeight / 2; + + if (subscribeButton.get() != nullptr) { - signOutButton->setSize (jmin (getWidth() - 10, 150), 22); - signOutButton->setCentrePosition (infoLabel.getBounds().getCentreX(), - loginButton.getBottom() + 20); + subscribeButton->setSize (buttonWidth, buttonHeight); + subscribeButton->setCentrePosition (buttonCenterX, buttonCenterY); + buttonCenterY += itemDistance + buttonHeight; + } + + if (signInButton.get() != nullptr) + { + signInButton->setSize (buttonWidth, buttonHeight); + signInButton->setCentrePosition (buttonCenterX, buttonCenterY); + buttonCenterY += itemDistance + buttonHeight; + } + + if (switchAccountButton.get() != nullptr) + { + switchAccountButton->setSize (buttonWidth, buttonHeight); + switchAccountButton->setCentrePosition (buttonCenterX, buttonCenterY); } } void buttonClicked (Button* btn) override { - if (btn == &loginButton) + if (btn == subscribeButton.get()) + { + URL ("http://www.juce.com/get-juce").launchInDefaultBrowser(); + } + else if (btn == signInButton.get()) { - if (isPurchaseButton) - URL ("http://www.juce.com").launchInDefaultBrowser(); - else - ProjucerApplication::getApp().showLoginForm(); + ProjucerApplication::getApp().showLoginForm(); } - else if (btn == signOutButton.get()) + else if (btn == switchAccountButton.get()) { - ProjucerLicenses::getInstance()->logout(); - ProjucerApplication::getApp().updateAllBuildTabs(); + ProjucerApplication::getApp().showLoginForm(); } } + bool isLoggedIn; + +private: Label infoLabel { "info", String() }; - TextButton loginButton { "Log-in..." }; - ScopedPointer signOutButton; - bool isLoggedIn, isPurchaseButton; + ScopedPointer subscribeButton; + ScopedPointer signInButton; + ScopedPointer switchAccountButton; }; struct EnableBuildComp : public Component @@ -449,7 +479,7 @@ Component* ProjectContentComponent::createBuildTab (CompileEngineChildProcess* c #if JUCE_LINUX ignoreUnused (child); return new ProjucerDisabledComp ("Linux support is still under development - " - "please check for updates at www.juce.com!", false, false); + "please check for updates at www.juce.com!", false, false, false, false); #else if (child != nullptr) { @@ -458,33 +488,30 @@ Component* ProjectContentComponent::createBuildTab (CompileEngineChildProcess* c return new BuildTabComponent (child, new ProjucerAppClasses::ErrorListComp (child->errorList)); } - auto& unlockStatus = *ProjucerLicenses::getInstance(); - - if (unlockStatus.hasLiveCodingLicence() - && project != nullptr - && LiveBuildProjectSettings::isBuildDisabled (*project)) - return new EnableBuildComp(); - - if (unlockStatus.isLoggedIn()) - return new ProjucerDisabledComp (String ("The Projucer's live-build features are currently disabled!") + newLine - + newLine - + "Your account " + unlockStatus.getLoginName().quoted() - + " does not have an asscociated JUCE Pro license:", - true, true, true, unlockStatus.getLoginName()); - - if (! unlockStatus.isDLLPresent()) - return new ProjucerDisabledComp (String ("The live-building DLL is missing!") + newLine - + newLine - + "To enable the compiler, you'll need to install the missing DLL " - + CompileEngineDLL::getDLLName().quoted() + newLine - + newLine - + "Visit the JUCE website/forum for more help on getting and installing the DLL!", - false, false); - - return new ProjucerDisabledComp ("The Projucer's live-build features are currently disabled!\n\n" - "To enable them, you'll need to log-in with your JUCE account details:", - false, true, false); + jassert (project != nullptr); + const auto& unlockStatus = *ProjucerLicenses::getInstance(); + + if (unlockStatus.hasLiveCodingLicence()) + { + jassert (unlockStatus.isLoggedIn()); + jassert (unlockStatus.isDLLPresent()); + return new EnableBuildComp(); + } + + return createDisabledBuildTab(unlockStatus.isLoggedIn(), + unlockStatus.isDLLPresent()); #endif +}; + +//============================================================================== +Component* ProjectContentComponent::createDisabledBuildTab(bool loggedIn, bool dllPresent) { + bool showSubscribeButton = true; + bool showSignInButton = dllPresent && ! loggedIn; + bool showSwitchAccountButton = dllPresent && loggedIn; + + return new ProjucerDisabledComp ( + "Subscribe to JUCE Pro or Indie to use the Projucer's live-build features:", + loggedIn, showSubscribeButton, showSignInButton, showSwitchAccountButton); } BuildTabComponent* findBuildTab (const TabbedComponent& tabs) @@ -610,7 +637,7 @@ bool ProjectContentComponent::hasFileInRecentList (const File& f) const File ProjectContentComponent::getCurrentFile() const { return currentDocument != nullptr ? currentDocument->getFile() - : File::nonexistent; + : File(); } bool ProjectContentComponent::showDocument (OpenDocumentManager::Document* doc, bool grabFocus) @@ -1147,7 +1174,7 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica break; case CommandIDs::deleteSelectedItem: - result.setInfo ("Delete Selected File", String::empty, CommandCategories::general, 0); + result.setInfo ("Delete Selected File", String(), CommandCategories::general, 0); result.defaultKeypresses.add (KeyPress (KeyPress::deleteKey, 0, 0)); result.defaultKeypresses.add (KeyPress (KeyPress::backspaceKey, 0, 0)); result.setActive (dynamic_cast (treeViewTabs.getCurrentContentComponent()) != nullptr); @@ -1499,7 +1526,8 @@ void ProjectContentComponent::handleMissingSystemHeaders() deleteProjectTabs(); createProjectTabs(); - ProjucerDisabledComp* buildTab = new ProjucerDisabledComp (tabMessage, false, false); + bool isLoggedIn = ProjucerLicenses::getInstance()->isLoggedIn(); + ProjucerDisabledComp* buildTab = new ProjucerDisabledComp (tabMessage, isLoggedIn, false, false, false); treeViewTabs.addTab ("Build", Colours::transparentBlack, buildTab, true); showBuildTab(); diff --git a/extras/Projucer/Source/Project/jucer_ProjectContentComponent.h b/extras/Projucer/Source/Project/jucer_ProjectContentComponent.h index f87eab62..534079f2 100644 --- a/extras/Projucer/Source/Project/jucer_ProjectContentComponent.h +++ b/extras/Projucer/Source/Project/jucer_ProjectContentComponent.h @@ -154,6 +154,8 @@ private: void timerCallback() override; Component* createBuildTab (CompileEngineChildProcess*); + Component* createDisabledBuildTab (bool loggedIn, bool dllPresent); + bool isContinuousRebuildEnabled() { return getAppSettings().getGlobalProperties().getBoolValue ("continuousRebuild", true); } void setContinuousRebuildEnabled (bool b) { getAppSettings().getGlobalProperties().setValue ("continuousRebuild", b); } void rebuildNow(); diff --git a/extras/Projucer/Source/Project/jucer_ProjectTree_Base.h b/extras/Projucer/Source/Project/jucer_ProjectTree_Base.h index 3bddcb45..1ae76651 100644 --- a/extras/Projucer/Source/Project/jucer_ProjectTree_Base.h +++ b/extras/Projucer/Source/Project/jucer_ProjectTree_Base.h @@ -140,7 +140,7 @@ public: virtual void browseToAddExistingFiles() { const File location (item.isGroup() ? item.determineGroupFolder() : getFile()); - FileChooser fc ("Add Files to Jucer Project", location, String::empty, false); + FileChooser fc ("Add Files to Jucer Project", location, String(), false); if (fc.browseForMultipleFilesOrDirectories()) { @@ -156,7 +156,7 @@ public: virtual void checkFileStatus() // (recursive) { const File file (getFile()); - const bool nowMissing = file != File::nonexistent && ! file.exists(); + const bool nowMissing = file != File() && ! file.exists(); if (nowMissing != isFileMissing) { @@ -235,7 +235,7 @@ public: bool mightContainSubItems() override { return item.getNumChildren() > 0; } String getUniqueName() const override { jassert (item.getID().isNotEmpty()); return item.getID(); } bool canBeSelected() const override { return true; } - String getTooltip() override { return String::empty; } + String getTooltip() override { return String(); } File getDraggableFile() const override { return getFile(); } var getDragSourceDescription() override diff --git a/extras/Projucer/Source/Utility/jucer_DialogLookAndFeel.h b/extras/Projucer/Source/Utility/jucer_DialogLookAndFeel.h index 3ee866b9..6fbcc4d4 100644 --- a/extras/Projucer/Source/Utility/jucer_DialogLookAndFeel.h +++ b/extras/Projucer/Source/Utility/jucer_DialogLookAndFeel.h @@ -37,12 +37,21 @@ public: void drawToggleButton (Graphics& g, ToggleButton& button, bool /*isMouseOverButton*/, bool /*isButtonDown*/) override { g.setColour (Colours::white); - g.fillEllipse (4.0f, 4.0f, 13.0f, 13.0f); + Rectangle box (4.0f, 4.0f, 13.0f, 13.0f); + g.fillRoundedRectangle (box, 3.0f); if (button.getToggleState()) { g.setColour (Colours::black); - g.fillEllipse (6.0f, 6.0f, 9.0f, 9.0f); + + Path tick; + tick.startNewSubPath (box.getX(), box.getCentreY() + 1.0f); + tick.lineTo (box.getCentreX() - 1.0f, box.getBottom()); + tick.lineTo (box.getRight(), box.getY()); + + const AffineTransform trans (AffineTransform::scale (0.75, 0.75, box.getCentreX(), box.getCentreY())); + + g.strokePath (tick, PathStrokeType (3.0f), trans); } g.setColour (button.findColour (ToggleButton::textColourId)); diff --git a/extras/Projucer/Source/Utility/jucer_FilePathPropertyComponent.h b/extras/Projucer/Source/Utility/jucer_FilePathPropertyComponent.h index b6e966e1..0c536b7e 100644 --- a/extras/Projucer/Source/Utility/jucer_FilePathPropertyComponent.h +++ b/extras/Projucer/Source/Utility/jucer_FilePathPropertyComponent.h @@ -39,7 +39,7 @@ public: const String& propertyDescription, bool isDirectory, const String& wildcards = "*", - const File& rootToUseForRelativePaths = File::nonexistent) + const File& rootToUseForRelativePaths = File()) : PropertyComponent (propertyDescription), innerComp (valueToControl, isDirectory, wildcards, rootToUseForRelativePaths) { @@ -122,8 +122,8 @@ private: void setTo (const File& f) { - value = (root == File::nonexistent) ? f.getFullPathName() - : f.getRelativePathFrom (root); + value = (root == File()) ? f.getFullPathName() + : f.getRelativePathFrom (root); } Value value; diff --git a/extras/Projucer/Source/Utility/jucer_PresetIDs.h b/extras/Projucer/Source/Utility/jucer_PresetIDs.h index f9203f33..e594a8c8 100644 --- a/extras/Projucer/Source/Utility/jucer_PresetIDs.h +++ b/extras/Projucer/Source/Utility/jucer_PresetIDs.h @@ -55,11 +55,9 @@ namespace Ids DECLARE_ID (intermediatesPath); DECLARE_ID (modulePaths); DECLARE_ID (searchpaths); - DECLARE_ID (vstFolder); DECLARE_ID (vst3Folder); DECLARE_ID (rtasFolder); DECLARE_ID (auFolder); - DECLARE_ID (vst2Path); DECLARE_ID (vst3Path); DECLARE_ID (rtasPath); DECLARE_ID (aaxPath); @@ -114,6 +112,7 @@ namespace Ids DECLARE_ID (jucerVersion); DECLARE_ID (prebuildCommand); DECLARE_ID (postbuildCommand); + DECLARE_ID (internalPostBuildComamnd); DECLARE_ID (generateManifest); DECLARE_ID (useRuntimeLibDLL); DECLARE_ID (wholeProgramOptimisation); @@ -177,6 +176,7 @@ namespace Ids DECLARE_ID (gradleWrapperVersion); DECLARE_ID (gradleToolchain); DECLARE_ID (gradleToolchainVersion); + DECLARE_ID (linuxExtraPkgConfig); DECLARE_ID (font); DECLARE_ID (colour); DECLARE_ID (userNotes); diff --git a/extras/Projucer/Source/Utility/jucer_SVGPathDataComponent.h b/extras/Projucer/Source/Utility/jucer_SVGPathDataComponent.h index af29a2c5..7be4607d 100644 --- a/extras/Projucer/Source/Utility/jucer_SVGPathDataComponent.h +++ b/extras/Projucer/Source/Utility/jucer_SVGPathDataComponent.h @@ -27,7 +27,7 @@ class SVGPathDataComponent : public Component, { public: SVGPathDataComponent() - : desc (String::empty, + : desc (String(), "Paste an SVG path string into the top box, and it'll be converted to some C++ " "code that will load it as a Path object..") { diff --git a/extras/Projucer/Source/Utility/jucer_StoredSettings.cpp b/extras/Projucer/Source/Utility/jucer_StoredSettings.cpp index 9228c673..506038a3 100644 --- a/extras/Projucer/Source/Utility/jucer_StoredSettings.cpp +++ b/extras/Projucer/Source/Utility/jucer_StoredSettings.cpp @@ -236,7 +236,7 @@ Value StoredSettings::getGlobalPath (const Identifier& key, DependencyPathOS os) String StoredSettings::getFallbackPath (const Identifier& key, DependencyPathOS os) { - if (key == Ids::vst2Path || key == Ids::vst3Path) + if (key == Ids::vst3Path) return os == TargetOS::windows ? "c:\\SDKs\\VST3 SDK" : "~/SDKs/VST3 SDK"; @@ -275,11 +275,7 @@ bool StoredSettings::isGlobalPathValid (const Identifier& key, const String& pat { String fileToCheckFor; - if (key == Ids::vst2Path) - { - fileToCheckFor = "public.sdk/source/vst2.x/audioeffectx.h"; - } - else if (key == Ids::vst3Path) + if (key == Ids::vst3Path) { fileToCheckFor = "base/source/baseiids.cpp"; } diff --git a/extras/Projucer/Source/Utility/jucer_TranslationTool.h b/extras/Projucer/Source/Utility/jucer_TranslationTool.h index 2fa6f927..cf37e6ed 100644 --- a/extras/Projucer/Source/Utility/jucer_TranslationTool.h +++ b/extras/Projucer/Source/Utility/jucer_TranslationTool.h @@ -201,7 +201,7 @@ struct TranslationHelpers if (currentItem.isNotEmpty()) result.add (currentItem); - currentItem = String::empty; + currentItem = String(); } else { @@ -273,7 +273,7 @@ struct TranslationHelpers { lines.add ("language: " + original.getLanguageName()); lines.add ("countries: " + original.getCountryCodes().joinIntoString (" ")); - lines.add (String::empty); + lines.add (String()); const StringArray& originalKeys (originalStrings.getAllKeys()); const StringArray& originalValues (originalStrings.getAllValues()); @@ -296,7 +296,7 @@ struct TranslationHelpers { lines.add ("language: [enter full name of the language here!]"); lines.add ("countries: [enter list of 2-character country codes here!]"); - lines.add (String::empty); + lines.add (String()); } for (int i = 0; i < preStrings.size(); ++i) @@ -429,8 +429,7 @@ private: void loadFile() { FileChooser fc ("Choose a translation file to load", - File::nonexistent, - "*"); + File(), "*"); if (fc.browseForFileToOpen()) { diff --git a/extras/Projucer/Source/Utility/jucer_UTF8Component.h b/extras/Projucer/Source/Utility/jucer_UTF8Component.h index 23a363c0..bc8edf59 100644 --- a/extras/Projucer/Source/Utility/jucer_UTF8Component.h +++ b/extras/Projucer/Source/Utility/jucer_UTF8Component.h @@ -27,7 +27,7 @@ class UTF8Component : public Component, { public: UTF8Component() - : desc (String::empty, + : desc (String(), "Type any string into the box, and it'll be shown below as a portable UTF-8 literal, " "ready to cut-and-paste into your source-code...") { diff --git a/extras/Projucer/Source/Wizards/jucer_NewFileWizard.cpp b/extras/Projucer/Source/Wizards/jucer_NewFileWizard.cpp index 0946db02..b0079111 100644 --- a/extras/Projucer/Source/Wizards/jucer_NewFileWizard.cpp +++ b/extras/Projucer/Source/Wizards/jucer_NewFileWizard.cpp @@ -142,7 +142,7 @@ public: TRANS ("Please enter the name for the new class"), AlertWindow::NoIcon, nullptr); - aw.addTextEditor (getClassNameFieldName(), String::empty, String::empty, false); + aw.addTextEditor (getClassNameFieldName(), String(), String(), false); aw.addButton (TRANS ("Create Files"), 1, KeyPress (KeyPress::returnKey)); aw.addButton (TRANS ("Cancel"), 0, KeyPress (KeyPress::escapeKey)); diff --git a/extras/Projucer/Source/Wizards/jucer_NewProjectWizard.h b/extras/Projucer/Source/Wizards/jucer_NewProjectWizard.h index 6656c051..56204c40 100644 --- a/extras/Projucer/Source/Wizards/jucer_NewProjectWizard.h +++ b/extras/Projucer/Source/Wizards/jucer_NewProjectWizard.h @@ -38,7 +38,7 @@ static ComboBox& createFileCreationOptionComboBox (Component& setupComp, c->addItemList (fileOptions, 1); c->setSelectedId (1, dontSendNotification); - Label* l = new Label (String::empty, TRANS("Files to Auto-Generate") + ":"); + Label* l = new Label (String(), TRANS("Files to Auto-Generate") + ":"); l->attachToComponent (c, true); itemsCreated.add (l); diff --git a/extras/Projucer/Source/Wizards/jucer_NewProjectWizardComponent.h b/extras/Projucer/Source/Wizards/jucer_NewProjectWizardComponent.h index 98797ed8..db454bb8 100644 --- a/extras/Projucer/Source/Wizards/jucer_NewProjectWizardComponent.h +++ b/extras/Projucer/Source/Wizards/jucer_NewProjectWizardComponent.h @@ -34,9 +34,9 @@ public: ModulesFolderPathBox (File initialFileOrDirectory) : currentPathBox ("currentPathBox"), openFolderButton (TRANS("...")), - modulesLabel (String::empty, TRANS("Modules Folder") + ":") + modulesLabel (String(), TRANS("Modules Folder") + ":") { - if (initialFileOrDirectory == File::nonexistent) + if (initialFileOrDirectory == File()) initialFileOrDirectory = findDefaultModulesFolder(); setModulesFolder (initialFileOrDirectory); @@ -263,14 +263,14 @@ public: WizardComp() : platformTargets(), projectName (TRANS("Project name")), - nameLabel (String::empty, TRANS("Project Name") + ":"), - typeLabel (String::empty, TRANS("Project Type") + ":"), + nameLabel (String(), TRANS("Project Name") + ":"), + typeLabel (String(), TRANS("Project Type") + ":"), fileBrowser (FileBrowserComponent::saveMode | FileBrowserComponent::canSelectDirectories | FileBrowserComponent::doNotClearFileNameOnRootChange, NewProjectWizardClasses::getLastWizardFolder(), nullptr, nullptr), - fileOutline (String::empty, TRANS("Project Folder") + ":"), - targetsOutline (String::empty, TRANS("Target Platforms") + ":"), + fileOutline (String(), TRANS("Project Folder") + ":"), + targetsOutline (String(), TRANS("Target Platforms") + ":"), createButton (TRANS("Create") + "..."), cancelButton (TRANS("Cancel")), modulesPathBox (findDefaultModulesFolder()) diff --git a/extras/Projucer/Source/Wizards/jucer_TemplateThumbnailsComponent.h b/extras/Projucer/Source/Wizards/jucer_TemplateThumbnailsComponent.h index 13413d8b..dff337dd 100644 --- a/extras/Projucer/Source/Wizards/jucer_TemplateThumbnailsComponent.h +++ b/extras/Projucer/Source/Wizards/jucer_TemplateThumbnailsComponent.h @@ -254,7 +254,7 @@ public: appFolder = appFolder.getParentDirectory(); } - return File::nonexistent; + return File(); } private: diff --git a/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile b/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile index 68cd0d73..99761d26 100644 --- a/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile +++ b/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile @@ -4,157 +4,169 @@ # (this disables dependency generation if multiple architectures are set) DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD) +ifndef STRIP + STRIP=strip +endif + +ifndef AR + AR=ar +endif + ifndef CONFIG CONFIG=Debug endif ifeq ($(CONFIG),Debug) - BINDIR := build - LIBDIR := build - OBJDIR := build/intermediate/Debug - OUTDIR := build + JUCE_BINDIR := build + JUCE_LIBDIR := build + JUCE_OBJDIR := build/intermediate/Debug + JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) TARGET_ARCH := -march=native endif - CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../../../modules - CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 - CXXFLAGS += $(CFLAGS) -std=c++11 - LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama) -pthread -I../../JuceLibraryCode -I../../../../modules + JUCE_CFLAGS += $(CFLAGS) $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 + JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) -std=c++11 + JUCE_LDFLAGS += $(LDFLAGS) $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa freetype2 libcurl x11 xext xinerama) -lGL -ldl -lpthread -lrt TARGET := UnitTestRunner - BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) - CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR) + BLDCMD = $(CXX) -o $(JUCE_OUTDIR)/$(TARGET) $(OBJECTS) $(JUCE_LDFLAGS) $(RESOURCES) $(TARGET_ARCH) + CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif ifeq ($(CONFIG),Release) - BINDIR := build - LIBDIR := build - OBJDIR := build/intermediate/Release - OUTDIR := build + JUCE_BINDIR := build + JUCE_LIBDIR := build + JUCE_OBJDIR := build/intermediate/Release + JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) TARGET_ARCH := -march=native endif - CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../../../modules - CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O3 - CXXFLAGS += $(CFLAGS) -std=c++11 - LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama) -pthread -I../../JuceLibraryCode -I../../../../modules + JUCE_CFLAGS += $(CFLAGS) $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 + JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) -std=c++11 + JUCE_LDFLAGS += $(LDFLAGS) $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa freetype2 libcurl x11 xext xinerama) -lGL -ldl -lpthread -lrt TARGET := UnitTestRunner - BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) - CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR) + BLDCMD = $(CXX) -o $(JUCE_OUTDIR)/$(TARGET) $(OBJECTS) $(JUCE_LDFLAGS) $(RESOURCES) $(TARGET_ARCH) + CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif OBJECTS := \ - $(OBJDIR)/Main_90ebc5c2.o \ - $(OBJDIR)/juce_audio_basics_6b797ca1.o \ - $(OBJDIR)/juce_audio_devices_a742c38b.o \ - $(OBJDIR)/juce_audio_formats_5a29c68a.o \ - $(OBJDIR)/juce_audio_processors_dea3173d.o \ - $(OBJDIR)/juce_core_75b14332.o \ - $(OBJDIR)/juce_cryptography_6de2ebff.o \ - $(OBJDIR)/juce_data_structures_72d3da2c.o \ - $(OBJDIR)/juce_events_d2be882c.o \ - $(OBJDIR)/juce_graphics_9c18891e.o \ - $(OBJDIR)/juce_gui_basics_8a6da59c.o \ - $(OBJDIR)/juce_gui_extra_4a026f23.o \ - $(OBJDIR)/juce_opengl_cd70b4c2.o \ - $(OBJDIR)/juce_osc_be4cee16.o \ - $(OBJDIR)/juce_video_f128c512.o \ + $(JUCE_OBJDIR)/Main_90ebc5c2.o \ + $(JUCE_OBJDIR)/juce_audio_basics_6b797ca1.o \ + $(JUCE_OBJDIR)/juce_audio_devices_a742c38b.o \ + $(JUCE_OBJDIR)/juce_audio_formats_5a29c68a.o \ + $(JUCE_OBJDIR)/juce_audio_processors_dea3173d.o \ + $(JUCE_OBJDIR)/juce_core_75b14332.o \ + $(JUCE_OBJDIR)/juce_cryptography_6de2ebff.o \ + $(JUCE_OBJDIR)/juce_data_structures_72d3da2c.o \ + $(JUCE_OBJDIR)/juce_events_d2be882c.o \ + $(JUCE_OBJDIR)/juce_graphics_9c18891e.o \ + $(JUCE_OBJDIR)/juce_gui_basics_8a6da59c.o \ + $(JUCE_OBJDIR)/juce_gui_extra_4a026f23.o \ + $(JUCE_OBJDIR)/juce_opengl_cd70b4c2.o \ + $(JUCE_OBJDIR)/juce_osc_be4cee16.o \ + $(JUCE_OBJDIR)/juce_video_f128c512.o \ .PHONY: clean -$(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES) +$(JUCE_OUTDIR)/$(TARGET): check-pkg-config $(OBJECTS) $(RESOURCES) @echo Linking UnitTestRunner - -@mkdir -p $(BINDIR) - -@mkdir -p $(LIBDIR) - -@mkdir -p $(OUTDIR) + -@mkdir -p $(JUCE_BINDIR) + -@mkdir -p $(JUCE_LIBDIR) + -@mkdir -p $(JUCE_OUTDIR) @$(BLDCMD) +check-pkg-config: + @command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } + @pkg-config --print-errors alsa freetype2 libcurl x11 xext xinerama + clean: @echo Cleaning UnitTestRunner @$(CLEANCMD) strip: @echo Stripping UnitTestRunner - -@strip --strip-unneeded $(OUTDIR)/$(TARGET) + -@$(STRIP) --strip-unneeded $(JUCE_OUTDIR)/$(TARGET) -$(OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling Main.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_basics_6b797ca1.o: ../../JuceLibraryCode/juce_audio_basics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_basics_6b797ca1.o: ../../JuceLibraryCode/juce_audio_basics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_basics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_devices_a742c38b.o: ../../JuceLibraryCode/juce_audio_devices.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_devices_a742c38b.o: ../../JuceLibraryCode/juce_audio_devices.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_devices.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_formats_5a29c68a.o: ../../JuceLibraryCode/juce_audio_formats.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_formats_5a29c68a.o: ../../JuceLibraryCode/juce_audio_formats.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_formats.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_audio_processors_dea3173d.o: ../../JuceLibraryCode/juce_audio_processors.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_audio_processors_dea3173d.o: ../../JuceLibraryCode/juce_audio_processors.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_audio_processors.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_core.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_cryptography_6de2ebff.o: ../../JuceLibraryCode/juce_cryptography.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_cryptography_6de2ebff.o: ../../JuceLibraryCode/juce_cryptography.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_cryptography.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_data_structures_72d3da2c.o: ../../JuceLibraryCode/juce_data_structures.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_data_structures_72d3da2c.o: ../../JuceLibraryCode/juce_data_structures.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_data_structures.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_events_d2be882c.o: ../../JuceLibraryCode/juce_events.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_events_d2be882c.o: ../../JuceLibraryCode/juce_events.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_events.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_graphics_9c18891e.o: ../../JuceLibraryCode/juce_graphics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_graphics_9c18891e.o: ../../JuceLibraryCode/juce_graphics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_graphics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_gui_basics_8a6da59c.o: ../../JuceLibraryCode/juce_gui_basics.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_gui_basics_8a6da59c.o: ../../JuceLibraryCode/juce_gui_basics.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_gui_basics.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_gui_extra_4a026f23.o: ../../JuceLibraryCode/juce_gui_extra.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_gui_extra_4a026f23.o: ../../JuceLibraryCode/juce_gui_extra.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_gui_extra.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_opengl_cd70b4c2.o: ../../JuceLibraryCode/juce_opengl.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_opengl_cd70b4c2.o: ../../JuceLibraryCode/juce_opengl.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_opengl.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_osc_be4cee16.o: ../../JuceLibraryCode/juce_osc.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_osc_be4cee16.o: ../../JuceLibraryCode/juce_osc.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_osc.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_video_f128c512.o: ../../JuceLibraryCode/juce_video.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_video_f128c512.o: ../../JuceLibraryCode/juce_video.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_video.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -include $(OBJECTS:%.o=%.d) diff --git a/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj b/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj index 92c2d9f0..691121de 100644 --- a/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj +++ b/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj @@ -122,6 +122,7 @@ 160B1F8323819A36A4CC4C3F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ImageButton.cpp"; path = "../../../../modules/juce_gui_basics/buttons/juce_ImageButton.cpp"; sourceTree = "SOURCE_ROOT"; }; 16397F1BBEA97057B0654612 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MouseCursor.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_MouseCursor.h"; sourceTree = "SOURCE_ROOT"; }; 16593ED55AEBE25460A4EBA6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MouseInactivityDetector.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_MouseInactivityDetector.h"; sourceTree = "SOURCE_ROOT"; }; + 16CA9656E3C51EFD0962ABC4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_VSTInterface.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_VSTInterface.h"; sourceTree = "SOURCE_ROOT"; }; 17062116C1616CD502D341A4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lpc.c; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/lpc.c"; sourceTree = "SOURCE_ROOT"; }; 171628256C4807C720EDF3B8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jinclude.h; path = "../../../../modules/juce_graphics/image_formats/jpglib/jinclude.h"; sourceTree = "SOURCE_ROOT"; }; 1763FA2F0163DB596EF3700A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_PluginListComponent.h"; path = "../../../../modules/juce_audio_processors/scanning/juce_PluginListComponent.h"; sourceTree = "SOURCE_ROOT"; }; @@ -199,6 +200,7 @@ 260BCCEEC92A36331EEFF027 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OSCArgument.cpp"; path = "../../../../modules/juce_osc/osc/juce_OSCArgument.cpp"; sourceTree = "SOURCE_ROOT"; }; 262E707413C300E64622593C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_SystemTrayIconComponent.cpp"; path = "../../../../modules/juce_gui_extra/misc/juce_SystemTrayIconComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; 26C762280E4F60A092DFFB34 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ColourSelector.cpp"; path = "../../../../modules/juce_gui_extra/misc/juce_ColourSelector.cpp"; sourceTree = "SOURCE_ROOT"; }; + 26E5B298938701E1D018220A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexBox.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.h"; sourceTree = "SOURCE_ROOT"; }; 27166FCCEBF8B19FC2ED5B17 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = bitreader.c; path = "../../../../modules/juce_audio_formats/codecs/flac/libFLAC/bitreader.c"; sourceTree = "SOURCE_ROOT"; }; 2741E1112861631B9834FBC6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FileListComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; 2755EC73A85568278839728D = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TextLayout.h"; path = "../../../../modules/juce_graphics/fonts/juce_TextLayout.h"; sourceTree = "SOURCE_ROOT"; }; @@ -842,6 +844,7 @@ B1626CB532C9DF380E7B7CD4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileTreeComponent.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.h"; sourceTree = "SOURCE_ROOT"; }; B16C1AED530B3A79338D5259 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_posix_NamedPipe.cpp"; path = "../../../../modules/juce_core/native/juce_posix_NamedPipe.cpp"; sourceTree = "SOURCE_ROOT"; }; B18BD25724FF16CA47FF7E50 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp"; sourceTree = "SOURCE_ROOT"; }; + B25FBFC3C69276864F38B667 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FlexItem.h"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexItem.h"; sourceTree = "SOURCE_ROOT"; }; B2AA22B23779CE171655790B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioIODevice.cpp"; path = "../../../../modules/juce_audio_devices/audio_io/juce_AudioIODevice.cpp"; sourceTree = "SOURCE_ROOT"; }; B2B2B0D649F7F56CA1204146 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_audio_basics.h"; path = "../../../../modules/juce_audio_basics/juce_audio_basics.h"; sourceTree = "SOURCE_ROOT"; }; B2B8E7BE0607DA166DAAEFEF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_audio_devices.mm"; path = "../../../../modules/juce_audio_devices/juce_audio_devices.mm"; sourceTree = "SOURCE_ROOT"; }; @@ -1083,6 +1086,7 @@ E51C2746AF287DBC983CAF65 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_VSTMidiEventList.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h"; sourceTree = "SOURCE_ROOT"; }; E55B6C4F535EDA51815F5DE7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "setup_44u.h"; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/modes/setup_44u.h"; sourceTree = "SOURCE_ROOT"; }; E5EFB122EEF47FB2E7A3FB77 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "setup_11.h"; path = "../../../../modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/modes/setup_11.h"; sourceTree = "SOURCE_ROOT"; }; + E5F7384BF7C987FE5EACA732 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FlexBox.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_FlexBox.cpp"; sourceTree = "SOURCE_ROOT"; }; E61E0DA3871788BA6154F2E3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_Midi.cpp"; path = "../../../../modules/juce_audio_devices/native/juce_android_Midi.cpp"; sourceTree = "SOURCE_ROOT"; }; E674FC044530BA5A4171B4D7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jidctfst.c; path = "../../../../modules/juce_graphics/image_formats/jpglib/jidctfst.c"; sourceTree = "SOURCE_ROOT"; }; E7153B9DA221B856B57005B2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_VST3Headers.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_VST3Headers.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1559,6 +1563,7 @@ E7153B9DA221B856B57005B2, 458AFB04FC657C0B8E140C57, D42D77C52B0B860D000123A7, + 16CA9656E3C51EFD0962ABC4, E51C2746AF287DBC983CAF65, E3D8F97C26B8E03820AFC971, 763A365B46F5D3EDD8F8B1EF, ); name = "format_types"; sourceTree = ""; }; @@ -2261,6 +2266,9 @@ 4426EC205176AA7852F91116, E4DCAABE4085DF010D24210A, 6D2B5D8FEC6A4D43F0F6256A, + E5F7384BF7C987FE5EACA732, + 26E5B298938701E1D018220A, + B25FBFC3C69276864F38B667, 7C1569CE706496770E9FF916, 564B46F9A1C2CEE40DC7E381, E1A16FFA5C8586083CB95802, diff --git a/extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner.vcxproj b/extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner.vcxproj index 540363f7..8bfa5732 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner.vcxproj +++ b/extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner.vcxproj @@ -1315,6 +1315,9 @@ true + + true + true @@ -1852,6 +1855,7 @@ + @@ -2158,6 +2162,8 @@ + + diff --git a/extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner.vcxproj.filters b/extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner.vcxproj.filters index 49116029..98d585b9 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner.vcxproj.filters +++ b/extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner.vcxproj.filters @@ -1612,6 +1612,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2544,6 +2547,9 @@ Juce Modules\juce_audio_processors\format_types + + Juce Modules\juce_audio_processors\format_types + Juce Modules\juce_audio_processors\format_types @@ -3462,6 +3468,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/extras/UnitTestRunner/JuceLibraryCode/AppConfig.h b/extras/UnitTestRunner/JuceLibraryCode/AppConfig.h index 09b5b816..400560f9 100644 --- a/extras/UnitTestRunner/JuceLibraryCode/AppConfig.h +++ b/extras/UnitTestRunner/JuceLibraryCode/AppConfig.h @@ -152,6 +152,14 @@ //#define JUCE_USE_CURL #endif +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES +#endif + //============================================================================== // juce_graphics flags: diff --git a/extras/UnitTestRunner/UnitTestRunner.jucer b/extras/UnitTestRunner/UnitTestRunner.jucer index 759f4539..fe6b5ba5 100644 --- a/extras/UnitTestRunner/UnitTestRunner.jucer +++ b/extras/UnitTestRunner/UnitTestRunner.jucer @@ -2,7 +2,7 @@ + jucerVersion="4.2.4" defines="JUCE_UNIT_TESTS=1"> diff --git a/extras/binarybuilder/BinaryBuilder.jucer b/extras/binarybuilder/BinaryBuilder.jucer index 237f6a49..35fe457d 100644 --- a/extras/binarybuilder/BinaryBuilder.jucer +++ b/extras/binarybuilder/BinaryBuilder.jucer @@ -1,7 +1,7 @@ /dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } + @pkg-config --print-errors libcurl + clean: @echo Cleaning BinaryBuilder @$(CLEANCMD) strip: @echo Stripping BinaryBuilder - -@strip --strip-unneeded $(OUTDIR)/$(TARGET) + -@$(STRIP) --strip-unneeded $(JUCE_OUTDIR)/$(TARGET) -$(OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling Main.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp - -@mkdir -p $(OBJDIR) +$(JUCE_OBJDIR)/juce_core_75b14332.o: ../../JuceLibraryCode/juce_core.cpp + -@mkdir -p $(JUCE_OBJDIR) @echo "Compiling juce_core.cpp" - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + @$(CXX) $(JUCE_CXXFLAGS) -o "$@" -c "$<" -include $(OBJECTS:%.o=%.d) diff --git a/extras/binarybuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj b/extras/binarybuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj index c347d8f2..21240035 100644 --- a/extras/binarybuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj +++ b/extras/binarybuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj @@ -551,6 +551,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INSTALL_PATH = "/usr/bin"; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; PRODUCT_BUNDLE_IDENTIFIER = com.rawmaterialsoftware.binarybuilder; SDKROOT_ppc = macosx10.5; }; name = Debug; }; @@ -572,6 +573,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INSTALL_PATH = "/usr/bin"; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; PRODUCT_BUNDLE_IDENTIFIER = com.rawmaterialsoftware.binarybuilder; SDKROOT_ppc = macosx10.5; }; name = Release; }; diff --git a/extras/binarybuilder/JuceLibraryCode/AppConfig.h b/extras/binarybuilder/JuceLibraryCode/AppConfig.h index 4e8f993b..0f39490c 100644 --- a/extras/binarybuilder/JuceLibraryCode/AppConfig.h +++ b/extras/binarybuilder/JuceLibraryCode/AppConfig.h @@ -62,5 +62,13 @@ //#define JUCE_USE_CURL #endif +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES +#endif + #endif // __JUCE_APPCONFIG_3T6YQETY1__ diff --git a/extras/windows dll/Builds/VisualStudio2010/juce_dll.vcxproj b/extras/windows dll/Builds/VisualStudio2010/juce_dll.vcxproj index 03eb1e30..16c3d0ec 100644 --- a/extras/windows dll/Builds/VisualStudio2010/juce_dll.vcxproj +++ b/extras/windows dll/Builds/VisualStudio2010/juce_dll.vcxproj @@ -1341,6 +1341,9 @@ true + + true + true @@ -1851,6 +1854,7 @@ + @@ -2168,6 +2172,8 @@ + + diff --git a/extras/windows dll/Builds/VisualStudio2010/juce_dll.vcxproj.filters b/extras/windows dll/Builds/VisualStudio2010/juce_dll.vcxproj.filters index 84ac26dd..b4065dfa 100644 --- a/extras/windows dll/Builds/VisualStudio2010/juce_dll.vcxproj.filters +++ b/extras/windows dll/Builds/VisualStudio2010/juce_dll.vcxproj.filters @@ -1657,6 +1657,9 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout @@ -2562,6 +2565,9 @@ Juce Modules\juce_audio_processors\format_types + + Juce Modules\juce_audio_processors\format_types + Juce Modules\juce_audio_processors\format_types @@ -3513,6 +3519,12 @@ Juce Modules\juce_gui_basics\layout + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + Juce Modules\juce_gui_basics\layout diff --git a/extras/windows dll/JuceLibraryCode/AppConfig.h b/extras/windows dll/JuceLibraryCode/AppConfig.h index 4cf7fcc8..7fc1d5e2 100644 --- a/extras/windows dll/JuceLibraryCode/AppConfig.h +++ b/extras/windows dll/JuceLibraryCode/AppConfig.h @@ -152,6 +152,14 @@ //#define JUCE_USE_CURL #endif +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES +#endif + //============================================================================== // juce_graphics flags: diff --git a/extras/windows dll/jucedll.jucer b/extras/windows dll/jucedll.jucer index 967c659f..88dcba0e 100644 --- a/extras/windows dll/jucedll.jucer +++ b/extras/windows dll/jucedll.jucer @@ -2,7 +2,7 @@ + jucerVersion="4.2.4" defines="JUCE_DLL_BUILD=1" includeBinaryInAppConfig="1"> diff --git a/modules/JUCE Module Format.txt b/modules/JUCE Module Format.txt index 164777db..28275691 100644 --- a/modules/JUCE Module Format.txt +++ b/modules/JUCE Module Format.txt @@ -133,8 +133,10 @@ Possible values: OSXFrameworks: (Optional) A list (space or comma-separated) of OSX frameworks that are needed by this module iOSFrameworks: (Optional) Like OSXFrameworks, but for iOS targets - linuxLibs: (Optional) A list (space or comma-separated) of static libs that should be linked in a + linuxLibs: (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in a linux build (these are passed to the linker via the -l flag) + linuxPackages: (Optional) A list (space or comma-separated) pkg-config packages that should be used to pass + compiler (CFLAGS) and linker (LDFLAGS) flags mingwLibs: (Optional) A list (space or comma-separated) of static libs that should be linked in a win32 mingw build (these are passed to the linker via the -l flag) diff --git a/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h b/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h index 19e91bb8..05c47832 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h +++ b/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h @@ -397,9 +397,9 @@ public: convert between 32 and 64 bit float buffer types. */ template - void makeCopyOf (const AudioBuffer& other) + void makeCopyOf (const AudioBuffer& other, bool avoidReallocating = false) { - setSize (other.getNumChannels(), other.getNumSamples()); + setSize (other.getNumChannels(), other.getNumSamples(), false, false, avoidReallocating); if (other.hasBeenCleared()) { diff --git a/modules/juce_audio_basics/juce_audio_basics.h b/modules/juce_audio_basics/juce_audio_basics.h index 6742c9e9..cbd3300d 100644 --- a/modules/juce_audio_basics/juce_audio_basics.h +++ b/modules/juce_audio_basics/juce_audio_basics.h @@ -33,7 +33,7 @@ ID: juce_audio_basics vendor: juce - version: 4.2.3 + version: 4.2.4 name: JUCE audio and MIDI data classes description: Classes for audio buffer manipulation, midi message handling, synthesis, etc. website: http://www.juce.com/juce diff --git a/modules/juce_audio_basics/midi/juce_MidiFile.cpp b/modules/juce_audio_basics/midi/juce_MidiFile.cpp index c9abe863..fe5937b2 100644 --- a/modules/juce_audio_basics/midi/juce_MidiFile.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiFile.cpp @@ -248,7 +248,7 @@ bool MidiFile::readFrom (InputStream& sourceStream) clear(); MemoryBlock data; - const int maxSensibleMidiFileSize = 2 * 1024 * 1024; + const int maxSensibleMidiFileSize = 200 * 1024 * 1024; // (put a sanity-check on the file size, as midi files are generally small) if (sourceStream.readIntoMemoryBlock (data, maxSensibleMidiFileSize)) diff --git a/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp b/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp index 919b9843..30e2411a 100644 --- a/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp @@ -25,7 +25,8 @@ MPESynthesiserBase::MPESynthesiserBase() : instrument (new MPEInstrument), sampleRate (0), - minimumSubBlockSize (32) + minimumSubBlockSize (32), + subBlockSubdivisionIsStrict (false) { instrument->addListener (this); } @@ -123,7 +124,7 @@ void MPESynthesiserBase::renderNextBlock (AudioBuffer& outputAudio, break; } - if (samplesToNextMidiMessage < (firstEvent ? 1 : minimumSubBlockSize)) + if (samplesToNextMidiMessage < ((firstEvent && ! subBlockSubdivisionIsStrict) ? 1 : minimumSubBlockSize)) { handleMidiEvent (m); continue; @@ -157,8 +158,9 @@ void MPESynthesiserBase::setCurrentPlaybackSampleRate (const double newRate) } //============================================================================== -void MPESynthesiserBase::setMinimumRenderingSubdivisionSize (int numSamples) noexcept +void MPESynthesiserBase::setMinimumRenderingSubdivisionSize (int numSamples, bool shouldBeStrict) noexcept { jassert (numSamples > 0); // it wouldn't make much sense for this to be less than 1 minimumSubBlockSize = numSamples; + subBlockSubdivisionIsStrict = shouldBeStrict; } diff --git a/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h b/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h index ad492845..d85a9a43 100644 --- a/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h +++ b/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h @@ -127,8 +127,14 @@ public: The default setting is 32, which means that midi messages are accurate to about < 1ms accuracy, which is probably fine for most purposes, but you may want to increase or decrease this value for your synth. + + If shouldBeStrict is true, the audio sub-blocks will strictly never be smaller than numSamples. + + If shouldBeStrict is false (default), the first audio sub-block in the buffer is allowed + to be smaller, to make sure that the first MIDI event in a buffer will always be sample-accurate + (this can sometimes help to avoid quantisation or phasing issues). */ - void setMinimumRenderingSubdivisionSize (int numSamples) noexcept; + void setMinimumRenderingSubdivisionSize (int numSamples, bool shouldBeStrict = false) noexcept; //============================================================================== /** Puts the synthesiser into legacy mode. @@ -185,6 +191,7 @@ private: CriticalSection noteStateLock; double sampleRate; int minimumSubBlockSize; + bool subBlockSubdivisionIsStrict; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MPESynthesiserBase) }; diff --git a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.cpp b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.cpp index bd92836a..8bc95838 100644 --- a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.cpp +++ b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.cpp @@ -88,6 +88,7 @@ Synthesiser::Synthesiser() : sampleRate (0), lastNoteOnCounter (0), minimumSubBlockSize (32), + subBlockSubdivisionIsStrict (false), shouldStealNotes (true) { for (int i = 0; i < numElementsInArray (lastPitchWheelValues); ++i) @@ -147,10 +148,11 @@ void Synthesiser::setNoteStealingEnabled (const bool shouldSteal) shouldStealNotes = shouldSteal; } -void Synthesiser::setMinimumRenderingSubdivisionSize (int numSamples) noexcept +void Synthesiser::setMinimumRenderingSubdivisionSize (int numSamples, bool shouldBeStrict) noexcept { jassert (numSamples > 0); // it wouldn't make much sense for this to be less than 1 minimumSubBlockSize = numSamples; + subBlockSubdivisionIsStrict = shouldBeStrict; } //============================================================================== @@ -204,7 +206,7 @@ void Synthesiser::processNextBlock (AudioBuffer& outputAudio, break; } - if (samplesToNextMidiMessage < (firstEvent ? 1 : minimumSubBlockSize)) + if (samplesToNextMidiMessage < ((firstEvent && ! subBlockSubdivisionIsStrict) ? 1 : minimumSubBlockSize)) { handleMidiEvent (m); continue; diff --git a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h index 0cf92dc7..9cb2f053 100644 --- a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h +++ b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h @@ -539,8 +539,14 @@ public: The default setting is 32, which means that midi messages are accurate to about < 1ms accuracy, which is probably fine for most purposes, but you may want to increase or decrease this value for your synth. + + If shouldBeStrict is true, the audio sub-blocks will strictly never be smaller than numSamples. + + If shouldBeStrict is false (default), the first audio sub-block in the buffer is allowed + to be smaller, to make sure that the first MIDI event in a buffer will always be sample-accurate + (this can sometimes help to avoid quantisation or phasing issues). */ - void setMinimumRenderingSubdivisionSize (int numSamples) noexcept; + void setMinimumRenderingSubdivisionSize (int numSamples, bool shouldBeStrict = false) noexcept; protected: //============================================================================== @@ -615,6 +621,7 @@ private: double sampleRate; uint32 lastNoteOnCounter; int minimumSubBlockSize; + bool subBlockSubdivisionIsStrict; bool shouldStealNotes; BigInteger sustainPedalsDown; diff --git a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp index 25678d7b..62c99379 100755 --- a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp +++ b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp @@ -151,7 +151,6 @@ AudioDeviceManager::AudioDeviceManager() : numInputChansNeeded (0), numOutputChansNeeded (2), listNeedsScanning (true), - inputLevel (0), cpuUsageMs (0), timeToCpuScale (0) { @@ -761,31 +760,8 @@ void AudioDeviceManager::audioDeviceIOCallbackInt (const float** inputChannelDat { const ScopedLock sl (audioCallbackLock); - if (inputLevelMeasurementEnabledCount.get() > 0 && numInputChannels > 0) - { - for (int j = 0; j < numSamples; ++j) - { - float s = 0; - - for (int i = 0; i < numInputChannels; ++i) - s += std::abs (inputChannelData[i][j]); - - s /= numInputChannels; - - const double decayFactor = 0.99992; - - if (s > inputLevel) - inputLevel = s; - else if (inputLevel > 0.001f) - inputLevel *= decayFactor; - else - inputLevel = 0; - } - } - else - { - inputLevel = 0; - } + inputLevelMeter.updateLevel (inputChannelData, numInputChannels, numSamples); + outputLevelMeter.updateLevel (const_cast (outputChannelData), numOutputChannels, numSamples); if (callbacks.size() > 0) { @@ -1141,18 +1117,51 @@ void AudioDeviceManager::playTestSound() } //============================================================================== -void AudioDeviceManager::enableInputLevelMeasurement (const bool enableMeasurement) +AudioDeviceManager::LevelMeter::LevelMeter() noexcept : level() {} + +void AudioDeviceManager::LevelMeter::updateLevel (const float* const* channelData, int numChannels, int numSamples) noexcept { - if (enableMeasurement) - ++inputLevelMeasurementEnabledCount; + if (enabled.get() != 0 && numChannels > 0) + { + for (int j = 0; j < numSamples; ++j) + { + float s = 0; + + for (int i = 0; i < numChannels; ++i) + s += std::abs (channelData[i][j]); + + s /= numChannels; + + const double decayFactor = 0.99992; + + if (s > level) + level = s; + else if (level > 0.001f) + level *= decayFactor; + else + level = 0; + } + } else - --inputLevelMeasurementEnabledCount; + { + level = 0; + } +} - inputLevel = 0; +void AudioDeviceManager::LevelMeter::setEnabled (bool shouldBeEnabled) noexcept +{ + enabled.set (shouldBeEnabled ? 1 : 0); + level = 0; } -double AudioDeviceManager::getCurrentInputLevel() const +double AudioDeviceManager::LevelMeter::getCurrentLevel() const noexcept { - jassert (inputLevelMeasurementEnabledCount.get() > 0); // you need to call enableInputLevelMeasurement() before using this! - return inputLevel; + jassert (enabled.get() != 0); // you need to call setEnabled (true) before using this! + return level; } + +double AudioDeviceManager::getCurrentInputLevel() const noexcept { return inputLevelMeter.getCurrentLevel(); } +double AudioDeviceManager::getCurrentOutputLevel() const noexcept { return outputLevelMeter.getCurrentLevel(); } + +void AudioDeviceManager::enableInputLevelMeasurement (bool enable) noexcept { inputLevelMeter.setEnabled (enable); } +void AudioDeviceManager::enableOutputLevelMeasurement (bool enable) noexcept { outputLevelMeter.setEnabled (enable); } diff --git a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h index 4d94b53b..59977c63 100644 --- a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h +++ b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h @@ -456,26 +456,27 @@ public: bool playOnAllOutputChannels = false); //============================================================================== - /** Turns on level-measuring. - - When enabled, the device manager will measure the peak input level - across all channels, and you can get this level by calling getCurrentInputLevel(). - - This is mainly intended for audio setup UI panels to use to create a mic - level display, so that the user can check that they've selected the right - device. + /** Turns on level-measuring for input channels. + @see getCurrentInputLevel() + */ + void enableInputLevelMeasurement (bool enableMeasurement) noexcept; - A simple filter is used to make the level decay smoothly, but this is - only intended for giving rough feedback, and not for any kind of accurate - measurement. + /** Turns on level-measuring for output channels. + @see getCurrentOutputLevel() */ - void enableInputLevelMeasurement (bool enableMeasurement); + void enableOutputLevelMeasurement (bool enableMeasurement) noexcept; /** Returns the current input level. To use this, you must first enable it by calling enableInputLevelMeasurement(). - See enableInputLevelMeasurement() for more info. + @see enableInputLevelMeasurement() + */ + double getCurrentInputLevel() const noexcept; + + /** Returns the current output level. + To use this, you must first enable it by calling enableOutputLevelMeasurement(). + @see enableOutputLevelMeasurement() */ - double getCurrentInputLevel() const; + double getCurrentOutputLevel() const noexcept; /** Returns the a lock that can be used to synchronise access to the audio callback. Obviously while this is locked, you're blocking the audio thread from running, so @@ -502,8 +503,6 @@ private: BigInteger inputChannels, outputChannels; ScopedPointer lastExplicitSettings; mutable bool listNeedsScanning; - Atomic inputLevelMeasurementEnabledCount; - double inputLevel; AudioSampleBuffer tempBuffer; struct MidiCallbackInfo @@ -522,6 +521,19 @@ private: double cpuUsageMs, timeToCpuScale; + struct LevelMeter + { + LevelMeter() noexcept; + void updateLevel (const float* const*, int numChannels, int numSamples) noexcept; + void setEnabled (bool) noexcept; + double getCurrentLevel() const noexcept; + + Atomic enabled; + double level; + }; + + LevelMeter inputLevelMeter, outputLevelMeter; + //============================================================================== class CallbackHandler; friend class CallbackHandler; diff --git a/modules/juce_audio_devices/juce_audio_devices.cpp b/modules/juce_audio_devices/juce_audio_devices.cpp index e5717830..86669c04 100644 --- a/modules/juce_audio_devices/juce_audio_devices.cpp +++ b/modules/juce_audio_devices/juce_audio_devices.cpp @@ -55,10 +55,14 @@ #import #import + #if TARGET_OS_SIMULATOR + #import + #endif + //============================================================================== #elif JUCE_WINDOWS #if JUCE_WASAPI - #include + #include #endif #if JUCE_ASIO diff --git a/modules/juce_audio_devices/juce_audio_devices.h b/modules/juce_audio_devices/juce_audio_devices.h index a342c9cb..bdb0c24e 100644 --- a/modules/juce_audio_devices/juce_audio_devices.h +++ b/modules/juce_audio_devices/juce_audio_devices.h @@ -33,7 +33,7 @@ ID: juce_audio_devices vendor: juce - version: 4.2.3 + version: 4.2.4 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 @@ -42,7 +42,7 @@ dependencies: juce_audio_basics, juce_audio_formats, juce_events OSXFrameworks: CoreAudio CoreMIDI DiscRecording iOSFrameworks: CoreAudio CoreMIDI AudioToolbox AVFoundation - linuxLibs: asound + linuxPackages: alsa mingwLibs: winmm END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_audio_devices/native/juce_ios_Audio.cpp b/modules/juce_audio_devices/native/juce_ios_Audio.cpp index d4734a0e..fc782c9f 100644 --- a/modules/juce_audio_devices/native/juce_ios_Audio.cpp +++ b/modules/juce_audio_devices/native/juce_ios_Audio.cpp @@ -438,6 +438,8 @@ public: void handleStatusChange (bool enabled, const char* reason) { + const ScopedLock myScopedLock (callbackLock); + JUCE_IOS_AUDIO_LOG ("handleStatusChange: enabled: " << (int) enabled << ", reason: " << reason); isRunning = enabled; @@ -454,6 +456,8 @@ public: void handleRouteChange (const char* reason) { + const ScopedLock myScopedLock (callbackLock); + JUCE_IOS_AUDIO_LOG ("handleRouteChange: reason: " << reason); fixAudioRouteIfSetToReceiver(); @@ -525,9 +529,9 @@ private: if (audioInputIsAvailable && numInputChannels > 0) err = AudioUnitRender (audioUnit, flags, time, 1, numFrames, data); - const ScopedLock sl (callbackLock); + const ScopedTryLock stl (callbackLock); - if (callback != nullptr) + if (stl.isLocked() && callback != nullptr) { if ((int) numFrames > floatData.getNumSamples()) prepareFloatBuffers ((int) numFrames); @@ -778,8 +782,24 @@ void AudioSessionHolder::handleStatusChange (bool enabled, const char* reason) c void AudioSessionHolder::handleRouteChange (const char* reason) const { - for (auto device: activeDevices) - device->handleRouteChange (reason); + struct RouteChangeMessage : public CallbackMessage + { + RouteChangeMessage (Array devs, const char* r) + : devices (devs), changeReason (r) + { + } + + void messageCallback() override + { + for (auto device: devices) + device->handleRouteChange (changeReason); + } + + Array devices; + const char* changeReason; + }; + + (new RouteChangeMessage (activeDevices, reason))->post(); } #undef JUCE_NSERROR_CHECK diff --git a/modules/juce_audio_devices/native/juce_linux_Midi.cpp b/modules/juce_audio_devices/native/juce_linux_Midi.cpp index 9ec37a64..1bea000b 100644 --- a/modules/juce_audio_devices/native/juce_linux_Midi.cpp +++ b/modules/juce_audio_devices/native/juce_linux_Midi.cpp @@ -45,37 +45,17 @@ class AlsaClient : public ReferenceCountedObject public: typedef ReferenceCountedObjectPtr Ptr; - AlsaClient (bool forInput) - : input (forInput), handle (nullptr) + static Ptr getInstance (bool forInput) { - snd_seq_open (&handle, "default", forInput ? SND_SEQ_OPEN_INPUT - : SND_SEQ_OPEN_OUTPUT, 0); - } + AlsaClient*& instance = (forInput ? inInstance : outInstance); + if (instance == nullptr) + instance = new AlsaClient (forInput); - ~AlsaClient() - { - if (handle != nullptr) - { - snd_seq_close (handle); - handle = nullptr; - } - - jassert (activeCallbacks.size() == 0); - - if (inputThread) - { - inputThread->stopThread (3000); - inputThread = nullptr; - } + return instance; } bool isInput() const noexcept { return input; } - void setName (const String& name) - { - snd_seq_set_client_name (handle, name.toUTF8()); - } - void registerCallback (AlsaPortAndCallback* cb) { if (cb != nullptr) @@ -115,6 +95,50 @@ private: Array activeCallbacks; CriticalSection callbackLock; + static AlsaClient* inInstance; + static AlsaClient* outInstance; + + //============================================================================== + friend class ReferenceCountedObjectPtr; + friend struct ContainerDeletePolicy; + + AlsaClient (bool forInput) + : input (forInput), handle (nullptr) + { + AlsaClient*& instance = (input ? inInstance : outInstance); + jassert (instance == nullptr); + + instance = this; + + snd_seq_open (&handle, "default", forInput ? SND_SEQ_OPEN_INPUT + : SND_SEQ_OPEN_OUTPUT, 0); + + snd_seq_set_client_name (handle, forInput ? JUCE_ALSA_MIDI_INPUT_NAME + : JUCE_ALSA_MIDI_OUTPUT_NAME); + } + + ~AlsaClient() + { + AlsaClient*& instance = (input ? inInstance : outInstance); + jassert (instance != nullptr); + + instance = nullptr; + + if (handle != nullptr) + { + snd_seq_close (handle); + handle = nullptr; + } + + jassert (activeCallbacks.size() == 0); + + if (inputThread) + { + inputThread->stopThread (3000); + inputThread = nullptr; + } + } + //============================================================================== class MidiInputThread : public Thread { @@ -183,24 +207,8 @@ private: ScopedPointer inputThread; }; - -static AlsaClient::Ptr globalAlsaSequencerIn() -{ - static AlsaClient::Ptr global (new AlsaClient (true)); - return global; -} - -static AlsaClient::Ptr globalAlsaSequencerOut() -{ - static AlsaClient::Ptr global (new AlsaClient (false)); - return global; -} - -static AlsaClient::Ptr globalAlsaSequencer (bool input) -{ - return input ? globalAlsaSequencerIn() - : globalAlsaSequencerOut(); -} +AlsaClient* AlsaClient::inInstance = nullptr; +AlsaClient* AlsaClient::outInstance = nullptr; //============================================================================== // represents an input or output port of the supplied AlsaClient @@ -336,19 +344,23 @@ static AlsaPort iterateMidiClient (const AlsaClient::Ptr& seq, && (snd_seq_port_info_get_capability (portInfo) & (forInput ? SND_SEQ_PORT_CAP_READ : SND_SEQ_PORT_CAP_WRITE)) != 0) { - deviceNamesFound.add (snd_seq_client_info_get_name (clientInfo)); + const String clientName = snd_seq_client_info_get_name (clientInfo); + const String portName = snd_seq_port_info_get_name(portInfo); + + if (clientName == portName) + deviceNamesFound.add (clientName); + else + deviceNamesFound.add (clientName + ": " + portName); if (deviceNamesFound.size() == deviceIndexToOpen + 1) { const int sourcePort = snd_seq_port_info_get_port (portInfo); - const int sourceClient = snd_seq_client_info_get_client (clientInfo); if (sourcePort != -1) { - const String name (forInput ? JUCE_ALSA_MIDI_INPUT_NAME - : JUCE_ALSA_MIDI_OUTPUT_NAME); - seq->setName (name); - port.createPort (seq, name, forInput); + const int sourceClient = snd_seq_client_info_get_client (clientInfo); + + port.createPort (seq, portName, forInput); port.connectWith (sourceClient, sourcePort); } } @@ -366,7 +378,7 @@ static AlsaPort iterateMidiDevices (const bool forInput, const int deviceIndexToOpen) { AlsaPort port; - const AlsaClient::Ptr client (globalAlsaSequencer (forInput)); + const AlsaClient::Ptr client (AlsaClient::getInstance (forInput)); if (snd_seq_t* const seqHandle = client->get()) { @@ -398,19 +410,6 @@ static AlsaPort iterateMidiDevices (const bool forInput, return port; } -AlsaPort createMidiDevice (const bool forInput, const String& deviceNameToOpen) -{ - AlsaPort port; - AlsaClient::Ptr client (new AlsaClient (forInput)); - - if (client->get()) - { - client->setName (deviceNameToOpen + (forInput ? " Input" : " Output")); - port.createPort (client, forInput ? "in" : "out", forInput); - } - - return port; -} //============================================================================== class MidiOutputDevice @@ -461,7 +460,7 @@ public: numBytes -= numSent; data += numSent; - snd_seq_ev_set_source (&event, 0); + snd_seq_ev_set_source (&event, port.portId); snd_seq_ev_set_subs (&event); snd_seq_ev_set_direct (&event); @@ -518,8 +517,11 @@ MidiOutput* MidiOutput::openDevice (int deviceIndex) MidiOutput* MidiOutput::createNewDevice (const String& deviceName) { MidiOutput* newDevice = nullptr; + AlsaPort port; + + const AlsaClient::Ptr client (AlsaClient::getInstance (false)); - AlsaPort port (createMidiDevice (false, deviceName)); + port.createPort (client, deviceName, false); if (port.isValid()) { @@ -595,8 +597,11 @@ MidiInput* MidiInput::openDevice (int deviceIndex, MidiInputCallback* callback) MidiInput* MidiInput::createNewDevice (const String& deviceName, MidiInputCallback* callback) { MidiInput* newDevice = nullptr; + AlsaPort port; + + const AlsaClient::Ptr client (AlsaClient::getInstance (true)); - AlsaPort port (createMidiDevice (true, deviceName)); + port.createPort (client, deviceName, true); if (port.isValid()) { diff --git a/modules/juce_audio_devices/native/juce_mac_AudioCDBurner.mm b/modules/juce_audio_devices/native/juce_mac_AudioCDBurner.mm index 3489a804..84b25404 100644 --- a/modules/juce_audio_devices/native/juce_mac_AudioCDBurner.mm +++ b/modules/juce_audio_devices/native/juce_mac_AudioCDBurner.mm @@ -254,7 +254,7 @@ struct OpenDiskDevice [device releaseMediaReservation]; [device releaseExclusiveAccess]; - return String::empty; + return String(); } DRDevice* device; diff --git a/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp b/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp index 39fc33c9..adbdd705 100644 --- a/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp +++ b/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp @@ -149,6 +149,7 @@ bool JUCE_CALLTYPE SystemAudioVolume::setMuted (bool mute) { return SystemVol struct CoreAudioClasses { +class CoreAudioIODeviceType; class CoreAudioIODevice; //============================================================================== @@ -847,6 +848,11 @@ private: intern->deviceDetailsChanged(); break; + case kAudioObjectPropertyOwnedObjects: + intern->stop (false); + intern->owner.deviceType.triggerAsyncAudioDeviceListChange(); + break; + case kAudioDevicePropertyBufferSizeRange: case kAudioDevicePropertyVolumeScalar: case kAudioDevicePropertyMute: @@ -902,10 +908,12 @@ private: class CoreAudioIODevice : public AudioIODevice { public: - CoreAudioIODevice (const String& deviceName, + CoreAudioIODevice (CoreAudioIODeviceType& dt, + const String& deviceName, AudioDeviceID inputDeviceId, const int inputIndex_, AudioDeviceID outputDeviceId, const int outputIndex_) : AudioIODevice (deviceName, "CoreAudio"), + deviceType (dt), inputIndex (inputIndex_), outputIndex (outputIndex_), isOpen_ (false), @@ -1060,6 +1068,12 @@ public: return lastError; } + void audioDeviceListChanged() + { + deviceType.audioDeviceListChanged(); + } + + CoreAudioIODeviceType& deviceType; int inputIndex, outputIndex; private: @@ -1745,7 +1759,8 @@ private: //============================================================================== -class CoreAudioIODeviceType : public AudioIODeviceType +class CoreAudioIODeviceType : public AudioIODeviceType, + private AsyncUpdater { public: CoreAudioIODeviceType() @@ -1771,7 +1786,7 @@ public: } //============================================================================== - void scanForDevices() + void scanForDevices() override { hasScanned = true; @@ -1827,7 +1842,7 @@ public: outputDeviceNames.appendNumbersToDuplicates (false, true); } - StringArray getDeviceNames (bool wantInputNames) const + StringArray getDeviceNames (bool wantInputNames) const override { jassert (hasScanned); // need to call scanForDevices() before doing this @@ -1835,7 +1850,7 @@ public: : outputDeviceNames; } - int getDefaultDeviceIndex (bool forInput) const + int getDefaultDeviceIndex (bool forInput) const override { jassert (hasScanned); // need to call scanForDevices() before doing this @@ -1870,7 +1885,7 @@ public: return 0; } - int getIndexOfDevice (AudioIODevice* device, bool asInput) const + int getIndexOfDevice (AudioIODevice* device, bool asInput) const override { jassert (hasScanned); // need to call scanForDevices() before doing this @@ -1894,10 +1909,10 @@ public: return -1; } - bool hasSeparateInputsAndOutputs() const { return true; } + bool hasSeparateInputsAndOutputs() const override { return true; } AudioIODevice* createDevice (const String& outputDeviceName, - const String& inputDeviceName) + const String& inputDeviceName) override { jassert (hasScanned); // need to call scanForDevices() before doing this @@ -1913,15 +1928,15 @@ public: String combinedName (outputDeviceName.isEmpty() ? inputDeviceName : outputDeviceName); if (inputDeviceID == outputDeviceID) - return new CoreAudioIODevice (combinedName, inputDeviceID, inputIndex, outputDeviceID, outputIndex); + return new CoreAudioIODevice (*this, combinedName, inputDeviceID, inputIndex, outputDeviceID, outputIndex); ScopedPointer in, out; if (inputDeviceID != 0) - in = new CoreAudioIODevice (inputDeviceName, inputDeviceID, inputIndex, 0, -1); + in = new CoreAudioIODevice (*this, inputDeviceName, inputDeviceID, inputIndex, 0, -1); if (outputDeviceID != 0) - out = new CoreAudioIODevice (outputDeviceName, 0, -1, outputDeviceID, outputIndex); + out = new CoreAudioIODevice (*this, outputDeviceName, 0, -1, outputDeviceID, outputIndex); if (in == nullptr) return out.release(); if (out == nullptr) return in.release(); @@ -1932,6 +1947,17 @@ public: return combo.release(); } + void audioDeviceListChanged() + { + scanForDevices(); + callDeviceChangeListeners(); + } + + void triggerAsyncAudioDeviceListChange() + { + triggerAsyncUpdate(); + } + //============================================================================== private: StringArray inputDeviceNames, outputDeviceNames; @@ -1969,18 +1995,17 @@ private: return total; } - void audioDeviceListChanged() - { - scanForDevices(); - callDeviceChangeListeners(); - } - static OSStatus hardwareListenerProc (AudioDeviceID, UInt32, const AudioObjectPropertyAddress*, void* clientData) { static_cast (clientData)->audioDeviceListChanged(); return noErr; } + void handleAsyncUpdate() override + { + audioDeviceListChanged(); + } + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CoreAudioIODeviceType) }; diff --git a/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp b/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp index 7e49c6b8..310de94f 100644 --- a/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp +++ b/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp @@ -220,6 +220,14 @@ namespace CoreMidiHelpers // correctly when called from the message thread! jassert (MessageManager::getInstance()->isThisTheMessageThread()); + #if TARGET_OS_SIMULATOR + // Enable MIDI for iOS simulator + MIDINetworkSession* session = [MIDINetworkSession defaultSession]; + session.enabled = YES; + session.connectionPolicy = MIDINetworkConnectionPolicy_Anyone; + #endif + + CoreMidiHelpers::ScopedCFString name; name.cfString = getGlobalMidiClientName().toCFString(); CHECK_ERROR (MIDIClientCreate (name.cfString, &globalSystemChangeCallback, nullptr, &globalMidiClient)); diff --git a/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp b/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp index d2b6422b..708538f3 100644 --- a/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp +++ b/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp @@ -96,11 +96,18 @@ bool check (HRESULT hr) } #if JUCE_MINGW + #define JUCE_COMCLASS(name, guid) \ struct name; \ template<> struct UUIDGetter { static CLSID get() { return uuidFromString (guid); } }; \ struct name + #ifdef __uuidof + #undef __uuidof + #endif + + #define __uuidof(cls) UUIDGetter::get() + struct PROPERTYKEY { GUID fmtid; diff --git a/modules/juce_audio_devices/sources/juce_AudioTransportSource.h b/modules/juce_audio_devices/sources/juce_AudioTransportSource.h index d964d920..459881a3 100644 --- a/modules/juce_audio_devices/sources/juce_AudioTransportSource.h +++ b/modules/juce_audio_devices/sources/juce_AudioTransportSource.h @@ -60,7 +60,7 @@ public: The source passed in will not be deleted by this object, so must be managed by the caller. - @param newSource the new input source to use. This may be zero + @param newSource the new input source to use. This may be a nullptr @param readAheadBufferSize a size of buffer to use for reading ahead. If this is zero, no reading ahead will be done; if it's greater than zero, a BufferingAudioSource will be used diff --git a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp index dd3d5254..bc346fef 100644 --- a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp @@ -95,6 +95,8 @@ namespace FlacNamespace #if JUCE_MSVC #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4312 4505 4365 4005 4334 181 111) + #else + #define HAVE_LROUND 1 #endif #if JUCE_MAC @@ -122,7 +124,7 @@ namespace FlacNamespace #define FLAC__HAS_X86INTRIN 1 #endif -#undef __STDC_LIMIT_MACROS + #undef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #define flac_max jmax #define flac_min jmin diff --git a/modules/juce_audio_formats/juce_audio_formats.h b/modules/juce_audio_formats/juce_audio_formats.h index ee94ceed..221ab2a5 100644 --- a/modules/juce_audio_formats/juce_audio_formats.h +++ b/modules/juce_audio_formats/juce_audio_formats.h @@ -33,7 +33,7 @@ ID: juce_audio_formats vendor: juce - version: 4.2.3 + version: 4.2.4 name: JUCE audio file format codecs description: Classes for reading and writing various audio file formats. website: http://www.juce.com/juce diff --git a/modules/juce_audio_plugin_client/AAX/juce_AAX_Modifier_Injector.h b/modules/juce_audio_plugin_client/AAX/juce_AAX_Modifier_Injector.h index db3ae30f..9261ec72 100644 --- a/modules/juce_audio_plugin_client/AAX/juce_AAX_Modifier_Injector.h +++ b/modules/juce_audio_plugin_client/AAX/juce_AAX_Modifier_Injector.h @@ -38,4 +38,4 @@ struct ModifierKeyReceiver virtual void removeModifierKeyProvider () = 0; }; -#endif \ No newline at end of file +#endif diff --git a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h index d1f3ea03..b5b39e44 100644 --- a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h +++ b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h @@ -34,6 +34,9 @@ computer's audio/MIDI devices using AudioDeviceManager and AudioProcessorPlayer. */ class StandalonePluginHolder + #if JUCE_IOS || JUCE_ANDROID + : private Timer + #endif { public: /** Creates an instance of the default plugin. @@ -61,10 +64,18 @@ public: setupAudioDevices (preferredDefaultDeviceName, preferredSetupOptions); reloadPluginState(); startPlaying(); + + #if JUCE_IOS || JUCE_ANDROID + startTimer (500); + #endif } virtual ~StandalonePluginHolder() { + #if JUCE_IOS || JUCE_ANDROID + stopTimer(); + #endif + deletePlugin(); shutDownAudioDevices(); } @@ -118,7 +129,7 @@ public: if (settings != nullptr) f = File (settings->getValue ("lastStateFile")); - if (f == File::nonexistent) + if (f == File()) f = File::getSpecialLocation (File::userDocumentsDirectory); return f; @@ -133,6 +144,7 @@ public: /** Pops up a dialog letting the user save the processor's state to a file. */ void askUserToSaveState (const String& fileSuffix = String()) { + #if JUCE_MODAL_LOOPS_PERMITTED FileChooser fc (TRANS("Save current state"), getLastFile(), getFilePatterns (fileSuffix)); if (fc.browseForFileToSave (true)) @@ -147,11 +159,15 @@ public: TRANS("Error whilst saving"), TRANS("Couldn't write to the specified file!")); } + #else + ignoreUnused (fileSuffix); + #endif } /** Pops up a dialog letting the user re-load the processor's state from a file. */ void askUserToLoadState (const String& fileSuffix = String()) { + #if JUCE_MODAL_LOOPS_PERMITTED FileChooser fc (TRANS("Load a saved state"), getLastFile(), getFilePatterns (fileSuffix)); if (fc.browseForFileToOpen()) @@ -167,6 +183,9 @@ public: TRANS("Error whilst loading"), TRANS("Couldn't read from the specified file!")); } + #else + ignoreUnused (fileSuffix); + #endif } //============================================================================== @@ -257,6 +276,10 @@ public: AudioDeviceManager deviceManager; AudioProcessorPlayer player; + #if JUCE_IOS || JUCE_ANDROID + StringArray lastMidiDevices; + #endif + private: void setupAudioDevices (const String& preferredDefaultDeviceName, const AudioDeviceManager::AudioDeviceSetup* preferredSetupOptions) @@ -275,6 +298,43 @@ private: deviceManager.removeAudioCallback (&player); } + #if JUCE_IOS || JUCE_ANDROID + void timerCallback() override + { + StringArray midiInputDevices = MidiInput::getDevices(); + if (midiInputDevices != lastMidiDevices) + { + { + const int n = lastMidiDevices.size(); + for (int i = 0; i < n; ++i) + { + const String& oldDevice = lastMidiDevices[i]; + + if (! midiInputDevices.contains (oldDevice)) + { + deviceManager.setMidiInputEnabled (oldDevice, false); + deviceManager.removeMidiInputCallback (oldDevice, &player); + } + } + } + + { + const int n = midiInputDevices.size(); + for (int i = 0; i < n; ++i) + { + const String& newDevice = midiInputDevices[i]; + + if (! lastMidiDevices.contains (newDevice)) + { + deviceManager.addMidiInputCallback (newDevice, &player); + deviceManager.setMidiInputEnabled (newDevice, true); + } + } + } + } + } + #endif + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (StandalonePluginHolder) }; 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 7d671525..b5b7116a 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -57,23 +57,7 @@ #pragma warning (disable : 4458) #endif -/* These files come with the Steinberg VST SDK - to get them, you'll need to - visit the Steinberg website and agree to whatever is currently required to - get them. The best version to get is the VST3 SDK, which also contains - the older VST2.4 files. - - Then, you'll need to make sure your include path contains your "VST SDK3" - directory (or whatever you've named it on your machine). The Projucer has - a special box for setting this path. -*/ -#include -#include -#include -#include - -#if ! VST_2_4_EXTENSIONS - #error "It looks like you're trying to include an out-of-date VSTSDK version - make sure you have at least version 2.4" -#endif +#include "../../juce_audio_processors/format_types/juce_VSTInterface.h" #ifndef JUCE_VST3_CAN_REPLACE_VST2 #define JUCE_VST3_CAN_REPLACE_VST2 1 @@ -229,8 +213,7 @@ static Array activePlugins; /** This is an AudioEffectX object that holds and wraps our AudioProcessor... */ -class JuceVSTWrapper : public AudioEffectX, - public AudioProcessorListener, +class JuceVSTWrapper : public AudioProcessorListener, public AudioPlayHead, private Timer, private AsyncUpdater @@ -256,10 +239,21 @@ private: juce::AudioBuffer processTempBuffer; }; + /** Use the same names as the VST SDK. */ + struct VstOpCodeArguments + { + int32 index; + pointer_sized_int value; + void* ptr; + float opt; + }; + public: //============================================================================== - JuceVSTWrapper (audioMasterCallback audioMasterCB, AudioProcessor* const af) - : AudioEffectX (audioMasterCB, af->getNumPrograms(), af->getNumParameters()), + JuceVSTWrapper (VstHostCallback cb, AudioProcessor* const af) + : hostCallback (cb), + sampleRate (44100.f), + blockSize (1024), filter (af), busUtils (*filter, true, 64), chunkMemoryTime (0), @@ -270,13 +264,11 @@ public: firstProcessCallback (true), shouldDeleteEditor (false), #if JUCE_64BIT - useNSView (true) + useNSView (true), #else - useNSView (false) - #endif - #if ! JUCE_IOS - , hostWindow (0) + useNSView (false), #endif + hostWindow (0) { busUtils.init(); @@ -296,7 +288,7 @@ public: bool success = setBusArrangementFromTotalChannelNum (maxNumInChannels, maxNumOutChannels); ignoreUnused (success); - // please file a bug if you hit this assertsion! + // please file a bug if you hit this assertion! jassert (maxNumInChannels == busUtils.findTotalNumChannels (true) && success && maxNumOutChannels == busUtils.findTotalNumChannels (false)); } @@ -305,24 +297,34 @@ public: filter->setPlayHead (this); filter->addListener (this); - cEffect.flags |= effFlagsHasEditor; - cEffect.version = convertHexVersionToDecimal (JucePlugin_VersionCode); - - setUniqueID ((int) (JucePlugin_VSTUniqueID)); - - setNumInputs (maxNumInChannels); - setNumOutputs (maxNumOutChannels); - - canProcessReplacing (true); - canDoubleReplacing (filter->supportsDoublePrecisionProcessing()); - - isSynth ((JucePlugin_IsSynth) != 0); - setInitialDelay (filter->getLatencySamples()); - programsAreChunks (true); + memset (&vstEffect, 0, sizeof (vstEffect)); + vstEffect.interfaceIdentifier = juceVstInterfaceIdentifier; + vstEffect.dispatchFunction = dispatcherCB; + vstEffect.processAudioFunction = nullptr; + vstEffect.setParameterValueFunction = setParameterCB; + vstEffect.getParameterValueFunction = getParameterCB; + vstEffect.numPrograms = jmax (1, af->getNumPrograms()); + vstEffect.numParameters = af->getNumParameters(); + vstEffect.numInputChannels = maxNumInChannels; + vstEffect.numOutputChannels = maxNumOutChannels; + vstEffect.latency = filter->getLatencySamples(); + vstEffect.effectPointer = this; + vstEffect.plugInIdentifier = JucePlugin_VSTUniqueID; + vstEffect.plugInVersion = convertHexVersionToDecimal (JucePlugin_VersionCode); + vstEffect.processAudioInplaceFunction = processReplacingCB; + vstEffect.processDoubleAudioInplaceFunction = processDoubleReplacingCB; + + vstEffect.flags |= vstEffectFlagHasEditor; + + vstEffect.flags |= vstEffectFlagInplaceAudio; + if (filter->supportsDoublePrecisionProcessing()) + vstEffect.flags |= vstEffectFlagInplaceDoubleAudio; + + #if JucePlugin_IsSynth + vstEffect.flags |= vstEffectFlagIsSynth; + #endif - // NB: For reasons best known to themselves, some hosts fail to load/save plugin - // state correctly if the plugin doesn't report that it has at least 1 program. - jassert (af->getNumPrograms() > 0); + vstEffect.flags |= vstEffectFlagDataInChunks; activePlugins.add (this); } @@ -343,9 +345,7 @@ public: delete filter; filter = nullptr; - #if ! JUCE_IOS jassert (editorComp == 0); - #endif deleteTempChannels(); @@ -365,138 +365,14 @@ public: #endif } } - } - - void open() override - { - // Note: most hosts call this on the UI thread, but wavelab doesn't, so be careful in here. - if (filter->hasEditor()) - cEffect.flags |= effFlagsHasEditor; - else - cEffect.flags &= ~effFlagsHasEditor; - } - - void close() override - { - // Note: most hosts call this on the UI thread, but wavelab doesn't, so be careful in here. - stopTimer(); - - if (MessageManager::getInstance()->isThisTheMessageThread()) - deleteEditor (false); - } - - //============================================================================== - bool getEffectName (char* name) override - { - String (JucePlugin_Name).copyToUTF8 (name, 64 + 1); - return true; - } - - bool getVendorString (char* text) override - { - String (JucePlugin_Manufacturer).copyToUTF8 (text, 64 + 1); - return true; - } - - bool getProductString (char* text) override { return getEffectName (text); } - VstInt32 getVendorVersion() override { return convertHexVersionToDecimal (JucePlugin_VersionCode); } - VstPlugCategory getPlugCategory() override { return JucePlugin_VSTCategory; } - bool keysRequired() { return (JucePlugin_EditorRequiresKeyboardFocus) != 0; } - - VstInt32 canDo (char* text) override - { - if (strcmp (text, "receiveVstEvents") == 0 - || strcmp (text, "receiveVstMidiEvent") == 0 - || strcmp (text, "receiveVstMidiEvents") == 0) - { - #if JucePlugin_WantsMidiInput - return 1; - #else - return -1; - #endif - } - - if (strcmp (text, "sendVstEvents") == 0 - || strcmp (text, "sendVstMidiEvent") == 0 - || strcmp (text, "sendVstMidiEvents") == 0) - { - #if JucePlugin_ProducesMidiOutput - return 1; - #else - return -1; - #endif - } - - if (strcmp (text, "receiveVstTimeInfo") == 0 - || strcmp (text, "conformsToWindowRules") == 0 - || strcmp (text, "bypass") == 0) - { - return 1; - } - - // This tells Wavelab to use the UI thread to invoke open/close, - // like all other hosts do. - if (strcmp (text, "openCloseAnyThread") == 0) - return -1; - - if (strcmp (text, "MPE") == 0) - return filter->supportsMPE() ? 1 : 0; - - #if JUCE_MAC - if (strcmp (text, "hasCockosViewAsConfig") == 0) - { - useNSView = true; - return (VstInt32) 0xbeef0000; - } - #endif - - return 0; - } - - VstIntPtr vendorSpecific (VstInt32 lArg, VstIntPtr lArg2, void* ptrArg, float floatArg) override - { - ignoreUnused (lArg, lArg2, ptrArg, floatArg); - - #if JucePlugin_Build_VST3 && JUCE_VST3_CAN_REPLACE_VST2 - if ((lArg == 'stCA' || lArg == 'stCa') && lArg2 == 'FUID' && ptrArg != nullptr) - { - memcpy (ptrArg, getJuceVST3ComponentIID(), 16); - return 1; - } - #endif - - return 0; - } - - bool setBypass (bool b) override - { - isBypassed = b; - return true; - } - - VstInt32 getGetTailSize() override - { - if (filter != nullptr) - return (VstInt32) (filter->getTailLengthSeconds() * getSampleRate()); - return 0; } - //============================================================================== - VstInt32 processEvents (VstEvents* events) override - { - #if JucePlugin_WantsMidiInput - VSTMidiEventList::addEventsToMidiBuffer (events, midiEvents); - return 1; - #else - ignoreUnused (events); - return 0; - #endif - } + VstEffectInterface* getVstEffectInterface() noexcept { return &vstEffect; } template void internalProcessReplacing (FloatType** inputs, FloatType** outputs, - VstInt32 numSamples, VstTempBuffers& tmpBuffers) + int32 numSamples, VstTempBuffers& tmpBuffers) { if (firstProcessCallback) { @@ -510,7 +386,7 @@ public: if (! isProcessing) resume(); - filter->setNonRealtime (getCurrentProcessLevel() == 4 /* kVstProcessLevelOffline */); + filter->setNonRealtime (isProcessLevelOffline()); #if JUCE_WINDOWS if (getHostType().isWavelab()) @@ -606,7 +482,7 @@ public: outgoingEvents.ensureSize (numEvents); outgoingEvents.clear(); - const juce::uint8* midiEventData; + const uint8* midiEventData; int midiEventSize, midiEventPosition; MidiBuffer::Iterator i (midiEvents); @@ -617,7 +493,9 @@ public: outgoingEvents.addEvent (midiEventData, midiEventSize, midiEventPosition); } - sendVstEventsToHost (outgoingEvents.events); + // Send VST events to the host. + if (hostCallback != nullptr) + hostCallback (&vstEffect, hostOpcodePreAudioProcessingEvents, 0, 0, outgoingEvents.events, 0); #elif JUCE_DEBUG /* This assertion is caused when you've added some events to the midiMessages array in your processBlock() method, which usually means @@ -640,55 +518,45 @@ public: } } - void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames) override + void processReplacing (float** inputs, float** outputs, int32 sampleFrames) { jassert (! filter->isUsingDoublePrecision()); internalProcessReplacing (inputs, outputs, sampleFrames, floatTempBuffers); } - void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames) override + static void processReplacingCB (VstEffectInterface* vstInterface, float** inputs, float** outputs, int32 sampleFrames) + { + getWrapper (vstInterface)->processReplacing (inputs, outputs, sampleFrames); + } + + void processDoubleReplacing (double** inputs, double** outputs, int32 sampleFrames) { jassert (filter->isUsingDoublePrecision()); internalProcessReplacing (inputs, outputs, sampleFrames, doubleTempBuffers); } - //============================================================================== - VstInt32 startProcess() override { return 0; } - VstInt32 stopProcess() override { return 0; } - - //============================================================================== - bool setProcessPrecision (VstInt32 vstPrecision) override + static void processDoubleReplacingCB (VstEffectInterface* vstInterface, double** inputs, double** outputs, int32 sampleFrames) { - if (! isProcessing) - { - if (filter != nullptr) - { - filter->setProcessingPrecision (vstPrecision == kVstProcessPrecision64 && filter->supportsDoublePrecisionProcessing() - ? AudioProcessor::doublePrecision - : AudioProcessor::singlePrecision); - - return true; - } - } - - return false; + getWrapper (vstInterface)->processDoubleReplacing (inputs, outputs, sampleFrames); } - void resume() override + //============================================================================== + void resume() { if (filter != nullptr) { isProcessing = true; - floatTempBuffers .channels.calloc ((size_t) (cEffect.numInputs + cEffect.numOutputs)); - doubleTempBuffers.channels.calloc ((size_t) (cEffect.numInputs + cEffect.numOutputs)); + const size_t nInAndOutChannels = static_cast (vstEffect.numInputChannels + vstEffect.numOutputChannels); + floatTempBuffers .channels.calloc (nInAndOutChannels); + doubleTempBuffers.channels.calloc (nInAndOutChannels); - const double currentRate = getSampleRate(); - const int currentBlockSize = getBlockSize(); + const double currentRate = sampleRate; + const int currentBlockSize = blockSize; firstProcessCallback = true; - filter->setNonRealtime (getCurrentProcessLevel() == 4 /* kVstProcessLevelOffline */); + filter->setNonRealtime (isProcessLevelOffline()); filter->setRateAndBufferSizeDetails (currentRate, currentBlockSize); deleteTempChannels(); @@ -698,9 +566,17 @@ public: midiEvents.ensureSize (2048); midiEvents.clear(); - setInitialDelay (filter->getLatencySamples()); + vstEffect.latency = filter->getLatencySamples(); - AudioEffectX::resume(); + /** If this plug-in is a synth or it can receive midi events we need to tell the + host that we want midi. In the SDK this method is marked as deprecated, but + some hosts rely on this behaviour. + */ + if (vstEffect.flags & vstEffectFlagIsSynth || JucePlugin_WantsMidiInput) + { + if (hostCallback != nullptr) + hostCallback (&vstEffect, hostOpcodePlugInWantsMidi, 0, 1, 0, 0); + } #if JucePlugin_ProducesMidiOutput outgoingEvents.ensureSize (512); @@ -708,12 +584,10 @@ public: } } - void suspend() override + void suspend() { if (filter != nullptr) { - AudioEffectX::suspend(); - filter->releaseResources(); outgoingEvents.freeEvents(); @@ -725,20 +599,31 @@ public: } } + //============================================================================== bool getCurrentPosition (AudioPlayHead::CurrentPositionInfo& info) override { - const VstTimeInfo* const ti = getTimeInfo (kVstPpqPosValid | kVstTempoValid | kVstBarsValid | kVstCyclePosValid - | kVstTimeSigValid | kVstSmpteValid | kVstClockValid); + const VstTimingInformation* ti = nullptr; + + if (hostCallback != nullptr) + { + int32 flags = vstTimingInfoFlagMusicalPositionValid | vstTimingInfoFlagTempoValid + | vstTimingInfoFlagLastBarPositionValid | vstTimingInfoFlagLoopPositionValid + | vstTimingInfoFlagTimeSignatureValid | vstTimingInfoFlagSmpteValid + | vstTimingInfoFlagNearestClockValid; + + pointer_sized_int result = hostCallback (&vstEffect, hostOpcodeGetTimingInfo, 0, flags, 0, 0); + ti = reinterpret_cast (result); + } if (ti == nullptr || ti->sampleRate <= 0) return false; - info.bpm = (ti->flags & kVstTempoValid) != 0 ? ti->tempo : 0.0; + info.bpm = (ti->flags & vstTimingInfoFlagTempoValid) != 0 ? ti->tempoBPM : 0.0; - if ((ti->flags & kVstTimeSigValid) != 0) + if ((ti->flags & vstTimingInfoFlagTimeSignatureValid) != 0) { - info.timeSigNumerator = ti->timeSigNumerator; - info.timeSigDenominator = ti->timeSigDenominator; + info.timeSigNumerator = ti->timeSignatureNumerator; + info.timeSigDenominator = ti->timeSignatureDenominator; } else { @@ -746,34 +631,34 @@ public: info.timeSigDenominator = 4; } - info.timeInSamples = (int64) (ti->samplePos + 0.5); - info.timeInSeconds = ti->samplePos / ti->sampleRate; - info.ppqPosition = (ti->flags & kVstPpqPosValid) != 0 ? ti->ppqPos : 0.0; - info.ppqPositionOfLastBarStart = (ti->flags & kVstBarsValid) != 0 ? ti->barStartPos : 0.0; + info.timeInSamples = (int64) (ti->samplePosition + 0.5); + info.timeInSeconds = ti->samplePosition / ti->sampleRate; + info.ppqPosition = (ti->flags & vstTimingInfoFlagMusicalPositionValid) != 0 ? ti->musicalPosition : 0.0; + info.ppqPositionOfLastBarStart = (ti->flags & vstTimingInfoFlagLastBarPositionValid) != 0 ? ti->lastBarPosition : 0.0; - if ((ti->flags & kVstSmpteValid) != 0) + if ((ti->flags & vstTimingInfoFlagSmpteValid) != 0) { AudioPlayHead::FrameRateType rate = AudioPlayHead::fpsUnknown; double fps = 1.0; - switch (ti->smpteFrameRate) + switch (ti->smpteRate) { - case kVstSmpte24fps: rate = AudioPlayHead::fps24; fps = 24.0; break; - case kVstSmpte25fps: rate = AudioPlayHead::fps25; fps = 25.0; break; - case kVstSmpte2997fps: rate = AudioPlayHead::fps2997; fps = 29.97; break; - case kVstSmpte30fps: rate = AudioPlayHead::fps30; fps = 30.0; break; - case kVstSmpte2997dfps: rate = AudioPlayHead::fps2997drop; fps = 29.97; break; - case kVstSmpte30dfps: rate = AudioPlayHead::fps30drop; fps = 30.0; break; - - case kVstSmpteFilm16mm: - case kVstSmpteFilm35mm: fps = 24.0; break; - - case kVstSmpte239fps: fps = 23.976; break; - case kVstSmpte249fps: fps = 24.976; break; - case kVstSmpte599fps: fps = 59.94; break; - case kVstSmpte60fps: fps = 60; break; - - default: jassertfalse; // unknown frame-rate.. + case vstSmpteRateFps24: rate = AudioPlayHead::fps24; fps = 24.0; break; + case vstSmpteRateFps25: rate = AudioPlayHead::fps25; fps = 25.0; break; + case vstSmpteRateFps2997: rate = AudioPlayHead::fps2997; fps = 29.97; break; + case vstSmpteRateFps30: rate = AudioPlayHead::fps30; fps = 30.0; break; + case vstSmpteRateFps2997drop: rate = AudioPlayHead::fps2997drop; fps = 29.97; break; + case vstSmpteRateFps30drop: rate = AudioPlayHead::fps30drop; fps = 30.0; break; + + case vstSmpteRate16mmFilm: + case vstSmpteRate35mmFilm: fps = 24.0; break; + + case vstSmpteRateFps239: fps = 23.976; break; + case vstSmpteRateFps249: fps = 24.976; break; + case vstSmpteRateFps599: fps = 59.94; break; + case vstSmpteRateFps60: fps = 60; break; + + default: jassertfalse; // unknown frame-rate.. } info.frameRate = rate; @@ -785,14 +670,14 @@ public: info.editOriginTime = 0; } - info.isRecording = (ti->flags & kVstTransportRecording) != 0; - info.isPlaying = (ti->flags & (kVstTransportRecording | kVstTransportPlaying)) != 0; - info.isLooping = (ti->flags & kVstTransportCycleActive) != 0; + info.isRecording = (ti->flags & vstTimingInfoFlagCurrentlyRecording) != 0; + info.isPlaying = (ti->flags & (vstTimingInfoFlagCurrentlyRecording | vstTimingInfoFlagCurrentlyPlaying)) != 0; + info.isLooping = (ti->flags & vstTimingInfoFlagLoopActive) != 0; - if ((ti->flags & kVstCyclePosValid) != 0) + if ((ti->flags & vstTimingInfoFlagLoopPositionValid) != 0) { - info.ppqLoopStart = ti->cycleStartPos; - info.ppqLoopEnd = ti->cycleEndPos; + info.ppqLoopStart = ti->loopStartPosition; + info.ppqLoopEnd = ti->loopEndPosition; } else { @@ -804,42 +689,7 @@ public: } //============================================================================== - VstInt32 getProgram() override - { - return filter != nullptr ? filter->getCurrentProgram() : 0; - } - - void setProgram (VstInt32 program) override - { - if (filter != nullptr) - filter->setCurrentProgram (program); - } - - void setProgramName (char* name) override - { - if (filter != nullptr) - filter->changeProgramName (filter->getCurrentProgram(), name); - } - - void getProgramName (char* name) override - { - if (filter != nullptr) - filter->getProgramName (filter->getCurrentProgram()).copyToUTF8 (name, 24 + 1); - } - - bool getProgramNameIndexed (VstInt32 /*category*/, VstInt32 index, char* text) override - { - if (filter != nullptr && isPositiveAndBelow (index, filter->getNumPrograms())) - { - filter->getProgramName (index).copyToUTF8 (text, 24 + 1); - return true; - } - - return false; - } - - //============================================================================== - float getParameter (VstInt32 index) override + float getParameter (int32 index) const { if (filter == nullptr) return 0.0f; @@ -848,245 +698,116 @@ public: return filter->getParameter (index); } - void setParameter (VstInt32 index, float value) override + static float getParameterCB (VstEffectInterface* vstInterface, int32 index) { - if (filter != nullptr) - { - jassert (isPositiveAndBelow (index, filter->getNumParameters())); - filter->setParameter (index, value); - } + return getWrapper (vstInterface)->getParameter (index); } - void getParameterDisplay (VstInt32 index, char* text) override + void setParameter (int32 index, float value) { if (filter != nullptr) { jassert (isPositiveAndBelow (index, filter->getNumParameters())); - filter->getParameterText (index, 24).copyToUTF8 (text, 24 + 1); // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more. + filter->setParameter (index, value); } } - bool string2parameter (VstInt32 index, char* text) override + static void setParameterCB (VstEffectInterface* vstInterface, int32 index, float value) { - if (filter != nullptr) - { - jassert (isPositiveAndBelow (index, filter->getNumParameters())); - - if (AudioProcessorParameter* p = filter->getParameters()[index]) - { - filter->setParameter (index, p->getValueForText (String::fromUTF8 (text))); - return true; - } - } - - return false; + getWrapper (vstInterface)->setParameter (index, value); } - void getParameterName (VstInt32 index, char* text) override + void audioProcessorParameterChanged (AudioProcessor*, int index, float newValue) override { - if (filter != nullptr) - { - jassert (isPositiveAndBelow (index, filter->getNumParameters())); - filter->getParameterName (index, 16).copyToUTF8 (text, 16 + 1); // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more. - } + if (hostCallback != nullptr) + hostCallback (&vstEffect, hostOpcodeParameterChanged, index, 0, 0, newValue); } - void getParameterLabel (VstInt32 index, char* text) override + void audioProcessorParameterChangeGestureBegin (AudioProcessor*, int index) override { - if (filter != nullptr) - { - jassert (isPositiveAndBelow (index, filter->getNumParameters())); - filter->getParameterLabel (index).copyToUTF8 (text, 24 + 1); // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more. - } + if (hostCallback != nullptr) + hostCallback (&vstEffect, hostOpcodeParameterChangeGestureBegin, index, 0, 0, 0); } - void audioProcessorParameterChanged (AudioProcessor*, int index, float newValue) override + void audioProcessorParameterChangeGestureEnd (AudioProcessor*, int index) override { - if (audioMaster != nullptr) - audioMaster (&cEffect, audioMasterAutomate, index, 0, 0, newValue); + if (hostCallback != nullptr) + hostCallback (&vstEffect, hostOpcodeParameterChangeGestureEnd, index, 0, 0, 0); } - void audioProcessorParameterChangeGestureBegin (AudioProcessor*, int index) override { beginEdit (index); } - void audioProcessorParameterChangeGestureEnd (AudioProcessor*, int index) override { endEdit (index); } - void audioProcessorChanged (AudioProcessor*) override { - setInitialDelay (filter->getLatencySamples()); - updateDisplay(); + vstEffect.latency = filter->getLatencySamples(); + + if (hostCallback != nullptr) + hostCallback (&vstEffect, hostOpcodeUpdateView, 0, 0, 0, 0); + triggerAsyncUpdate(); } void handleAsyncUpdate() override { - ioChanged(); - } - - bool canParameterBeAutomated (VstInt32 index) override - { - return filter != nullptr && filter->isParameterAutomatable ((int) index); + if (hostCallback != nullptr) + hostCallback (&vstEffect, hostOpcodeIOModified, 0, 0, 0, 0); } - bool setSpeakerArrangement (VstSpeakerArrangement* pluginInput, - VstSpeakerArrangement* pluginOutput) override + bool getPinProperties (VstPinInfo& properties, bool direction, int index) const { - const int numIns = busUtils.getBusCount (true); - const int numOuts = busUtils.getBusCount (false);; - - if (pluginInput != nullptr && numIns == 0) - return false; + // fill with default + properties.flags = vstPinInfoFlagValid; + properties.text[0] = 0; + properties.shortText[0] = 0; + properties.configurationType = vstSpeakerConfigTypeEmpty; - if (pluginOutput != nullptr && numOuts == 0) + // index refers to the absolute index when combining all channels of every bus + if (index >= (direction ? vstEffect.numInputChannels : vstEffect.numOutputChannels)) return false; - if (numIns > 1 || numOuts > 1) + const int n = busUtils.getBusCount(direction); + int busIdx; + for (busIdx = 0; busIdx < n; ++busIdx) { - int newNumInChannels = (pluginInput != nullptr && pluginInput-> numChannels >= 0) ? pluginInput-> numChannels - : busUtils.findTotalNumChannels (true); - int newNumOutChannels = (pluginOutput != nullptr && pluginOutput->numChannels >= 0) ? pluginOutput->numChannels - : busUtils.findTotalNumChannels (false); - - newNumInChannels = jmin (newNumInChannels, maxNumInChannels); - newNumOutChannels = jmin (newNumOutChannels, maxNumOutChannels); + const int numChans = busUtils.getNumChannels (direction, busIdx); + if (index < numChans) + break; - if (! setBusArrangementFromTotalChannelNum (newNumInChannels, newNumOutChannels)) - return false; + index -= numChans; } - else - { - PluginBusUtilities::ScopedBusRestorer busRestorer (busUtils); - AudioChannelSet inLayoutType; - if (pluginInput != nullptr && pluginInput-> numChannels >= 0) - { - inLayoutType = SpeakerMappings::vstArrangementTypeToChannelSet (*pluginInput); - if (busUtils.getChannelSet (true, 0) != inLayoutType) - if (! filter->setPreferredBusArrangement (true, 0, inLayoutType)) - return false; - } + if (busIdx >= n) + return true; - if (pluginOutput != nullptr && pluginOutput->numChannels >= 0) - { - AudioChannelSet newType = SpeakerMappings::vstArrangementTypeToChannelSet (*pluginOutput); - if (busUtils.getChannelSet (false, 0) != newType) - if (! filter->setPreferredBusArrangement (false, 0, newType)) - return false; + const AudioProcessor::AudioProcessorBus& busInfo = busUtils.getFilterBus (direction).getReference (busIdx); - // re-check the input - if ((! inLayoutType.isDisabled()) && busUtils.getChannelSet (true, 0) != inLayoutType) - return false; + String channelName = busInfo.name; + #ifdef JucePlugin_PreferredChannelConfigurations + channelName += String (" ") + String (index); + #else + if (busUtils.getNumChannels (direction, busIdx) > 1) + channelName += String (" ") + AudioChannelSet::getAbbreviatedChannelTypeName (busInfo.channels.getTypeOfChannel (index)); + #endif - busRestorer.release(); - } - } + channelName.copyToUTF8 (properties.text, (size_t) (vstMaxParameterOrPinLabelLength + 1)); + channelName.copyToUTF8 (properties.shortText, (size_t) (vstMaxParameterOrPinShortLabelLength + 1)); + + properties.flags = vstPinInfoFlagValid | vstPinInfoFlagIsActive; + properties.configurationType = SpeakerMappings::channelSetToVstArrangementType (busInfo.channels); + + if (properties.configurationType == vstSpeakerConfigTypeEmpty) + properties.flags &= vstPinInfoFlagIsActive; + + if (busInfo.channels.size() == 2) + properties.flags |= vstPinInfoFlagIsStereo; - filter->setRateAndBufferSizeDetails(0, 0); return true; } - bool getSpeakerArrangement (VstSpeakerArrangement** pluginInput, VstSpeakerArrangement** pluginOutput) override + //============================================================================== + struct SpeakerMappings : private AudioChannelSet // (inheritance only to give easier access to items in the namespace) { - *pluginInput = 0; - *pluginOutput = 0; - - if (! AudioEffectX::allocateArrangement (pluginInput, busUtils.findTotalNumChannels (true))) - return false; - - if (! AudioEffectX::allocateArrangement (pluginOutput, busUtils.findTotalNumChannels (false))) + struct Mapping { - AudioEffectX::deallocateArrangement (pluginInput); - *pluginInput = 0; - return false; - } - - if (pluginHasSidechainsOrAuxs()) - { - int numIns = busUtils.findTotalNumChannels (true); - int numOuts = busUtils.findTotalNumChannels (false); - - AudioChannelSet layout = AudioChannelSet::canonicalChannelSet (numIns); - SpeakerMappings::channelSetToVstArrangement (layout, **pluginInput); - - layout = AudioChannelSet::canonicalChannelSet (numOuts); - SpeakerMappings::channelSetToVstArrangement (layout, **pluginOutput); - } - else - { - SpeakerMappings::channelSetToVstArrangement (busUtils.getChannelSet (true, 0), **pluginInput); - SpeakerMappings::channelSetToVstArrangement (busUtils.getChannelSet (false, 0), **pluginOutput); - } - - return true; - } - - bool getInputProperties (VstInt32 index, VstPinProperties* properties) override - { - return filter != nullptr - && getPinProperties (*properties, true, (int) index); - } - - bool getOutputProperties (VstInt32 index, VstPinProperties* properties) override - { - return filter != nullptr - && getPinProperties (*properties, false, (int) index); - } - - bool getPinProperties (VstPinProperties& properties, bool direction, int index) const - { - // fill with default - properties.flags = kVstPinUseSpeaker; - properties.label[0] = 0; - properties.shortLabel[0] = 0; - properties.arrangementType = kSpeakerArrEmpty; - - // index refers to the absolute index when combining all channels of every bus - if (index >= (direction ? cEffect.numInputs : cEffect.numOutputs)) - return false; - - const int n = busUtils.getBusCount(direction); - int busIdx; - for (busIdx = 0; busIdx < n; ++busIdx) - { - const int numChans = busUtils.getNumChannels (direction, busIdx); - if (index < numChans) - break; - - index -= numChans; - } - - if (busIdx >= n) - return true; - - const AudioProcessor::AudioProcessorBus& busInfo = busUtils.getFilterBus (direction).getReference (busIdx); - - #ifdef JucePlugin_PreferredChannelConfigurations - String abbvChannelName = String (index); - #else - String abbvChannelName = AudioChannelSet::getAbbreviatedChannelTypeName (busInfo.channels.getTypeOfChannel(index)); - #endif - - String channelName = busInfo.name + String (" ") + abbvChannelName; - - channelName.copyToUTF8 (properties.label, (size_t) (kVstMaxLabelLen + 1)); - channelName.copyToUTF8 (properties.shortLabel, (size_t) (kVstMaxShortLabelLen + 1)); - - properties.flags = kVstPinUseSpeaker | kVstPinIsActive; - properties.arrangementType = SpeakerMappings::channelSetToVstArrangementType (busInfo.channels); - - if (properties.arrangementType == kSpeakerArrEmpty) - properties.flags &= ~kVstPinIsActive; - - if (busInfo.channels.size() == 2) - properties.flags |= kVstPinIsStereo; - - return true; - } - - //============================================================================== - struct SpeakerMappings : private AudioChannelSet // (inheritance only to give easier access to items in the namespace) - { - struct Mapping - { - VstInt32 vst2; + int32 vst2; ChannelType channels[13]; bool matches (const Array& chans) const noexcept @@ -1106,9 +827,9 @@ public: } }; - static AudioChannelSet vstArrangementTypeToChannelSet (const VstSpeakerArrangement& arr) + static AudioChannelSet vstArrangementTypeToChannelSet (const VstSpeakerConfiguration& arr) { - for (const Mapping* m = getMappings(); m->vst2 != kSpeakerArrEmpty; ++m) + for (const Mapping* m = getMappings(); m->vst2 != vstSpeakerConfigTypeEmpty; ++m) { if (m->vst2 == arr.type) { @@ -1121,33 +842,33 @@ public: } } - return AudioChannelSet::discreteChannels (arr.numChannels); + return AudioChannelSet::discreteChannels (arr.numberOfChannels); } - static VstInt32 channelSetToVstArrangementType (AudioChannelSet channels) + static int32 channelSetToVstArrangementType (AudioChannelSet channels) { Array chans (channels.getChannelTypes()); if (channels == AudioChannelSet::disabled()) - return kSpeakerArrEmpty; + return vstSpeakerConfigTypeEmpty; - for (const Mapping* m = getMappings(); m->vst2 != kSpeakerArrEmpty; ++m) + for (const Mapping* m = getMappings(); m->vst2 != vstSpeakerConfigTypeEmpty; ++m) if (m->matches (chans)) return m->vst2; - return kSpeakerArrUserDefined; + return vstSpeakerConfigTypeUser; } - static void channelSetToVstArrangement (const AudioChannelSet& channels, VstSpeakerArrangement& result) + static void channelSetToVstArrangement (const AudioChannelSet& channels, VstSpeakerConfiguration& result) { result.type = channelSetToVstArrangementType (channels); - result.numChannels = channels.size(); + result.numberOfChannels = channels.size(); - for (int i = 0; i < result.numChannels; ++i) + for (int i = 0; i < result.numberOfChannels; ++i) { - VstSpeakerProperties& speaker = result.speakers[i]; + VstIndividualSpeakerInfo& speaker = result.speakers[i]; - zeromem (&speaker, sizeof (VstSpeakerProperties)); + zeromem (&speaker, sizeof (VstIndividualSpeakerInfo)); speaker.type = getSpeakerType (channels.getTypeOfChannel (i)); } } @@ -1156,93 +877,93 @@ public: { static const Mapping mappings[] = { - { kSpeakerArrMono, { centre, unknown } }, - { kSpeakerArrStereo, { left, right, unknown } }, - { kSpeakerArrStereoSurround, { leftSurround, rightSurround, unknown } }, - { kSpeakerArrStereoCenter, { leftCentre, rightCentre, unknown } }, - { kSpeakerArrStereoSide, { leftRearSurround, rightRearSurround, unknown } }, - { kSpeakerArrStereoCLfe, { centre, subbass, unknown } }, - { kSpeakerArr30Cine, { left, right, centre, unknown } }, - { kSpeakerArr30Music, { left, right, surround, unknown } }, - { kSpeakerArr31Cine, { left, right, centre, subbass, unknown } }, - { kSpeakerArr31Music, { left, right, subbass, surround, unknown } }, - { kSpeakerArr40Cine, { left, right, centre, surround, unknown } }, - { kSpeakerArr40Music, { left, right, leftSurround, rightSurround, unknown } }, - { kSpeakerArr41Cine, { left, right, centre, subbass, surround, unknown } }, - { kSpeakerArr41Music, { left, right, subbass, leftSurround, rightSurround, unknown } }, - { kSpeakerArr50, { left, right, centre, leftSurround, rightSurround, unknown } }, - { kSpeakerArr51, { left, right, centre, subbass, leftSurround, rightSurround, unknown } }, - { kSpeakerArr60Cine, { left, right, centre, leftSurround, rightSurround, surround, unknown } }, - { kSpeakerArr60Music, { left, right, leftSurround, rightSurround, leftRearSurround, rightRearSurround, unknown } }, - { kSpeakerArr61Cine, { left, right, centre, subbass, leftSurround, rightSurround, surround, unknown } }, - { kSpeakerArr61Music, { left, right, subbass, leftSurround, rightSurround, leftRearSurround, rightRearSurround, unknown } }, - { kSpeakerArr70Cine, { left, right, centre, leftSurround, rightSurround, topFrontLeft, topFrontRight, unknown } }, - { kSpeakerArr70Music, { left, right, centre, leftSurround, rightSurround, leftRearSurround, rightRearSurround, unknown } }, - { kSpeakerArr71Cine, { left, right, centre, subbass, leftSurround, rightSurround, topFrontLeft, topFrontRight, unknown } }, - { kSpeakerArr71Music, { left, right, centre, subbass, leftSurround, rightSurround, leftRearSurround, rightRearSurround, unknown } }, - { kSpeakerArr80Cine, { left, right, centre, leftSurround, rightSurround, topFrontLeft, topFrontRight, surround, unknown } }, - { kSpeakerArr80Music, { left, right, centre, leftSurround, rightSurround, surround, leftRearSurround, rightRearSurround, unknown } }, - { kSpeakerArr81Cine, { left, right, centre, subbass, leftSurround, rightSurround, topFrontLeft, topFrontRight, surround, unknown } }, - { kSpeakerArr81Music, { left, right, centre, subbass, leftSurround, rightSurround, surround, leftRearSurround, rightRearSurround, unknown } }, - { kSpeakerArr102, { left, right, centre, subbass, leftSurround, rightSurround, topFrontLeft, topFrontCentre, topFrontRight, topRearLeft, topRearRight, subbass2, unknown } }, - { kSpeakerArrEmpty, { unknown } } + { vstSpeakerConfigTypeMono, { centre, unknown } }, + { vstSpeakerConfigTypeLR, { left, right, unknown } }, + { vstSpeakerConfigTypeLsRs, { leftSurround, rightSurround, unknown } }, + { vstSpeakerConfigTypeLcRc, { leftCentre, rightCentre, unknown } }, + { vstSpeakerConfigTypeSlSr, { leftRearSurround, rightRearSurround, unknown } }, + { vstSpeakerConfigTypeCLfe, { centre, subbass, unknown } }, + { vstSpeakerConfigTypeLRC, { left, right, centre, unknown } }, + { vstSpeakerConfigTypeLRS, { left, right, surround, unknown } }, + { vstSpeakerConfigTypeLRCLfe, { left, right, centre, subbass, unknown } }, + { vstSpeakerConfigTypeLRLfeS, { left, right, subbass, surround, unknown } }, + { vstSpeakerConfigTypeLRCS, { left, right, centre, surround, unknown } }, + { vstSpeakerConfigTypeLRLsRs, { left, right, leftSurround, rightSurround, unknown } }, + { vstSpeakerConfigTypeLRCLfeS, { left, right, centre, subbass, surround, unknown } }, + { vstSpeakerConfigTypeLRLfeLsRs, { left, right, subbass, leftSurround, rightSurround, unknown } }, + { vstSpeakerConfigTypeLRCLsRs, { left, right, centre, leftSurround, rightSurround, unknown } }, + { vstSpeakerConfigTypeLRCLfeLsRs, { left, right, centre, subbass, leftSurround, rightSurround, unknown } }, + { vstSpeakerConfigTypeLRCLsRsCs, { left, right, centre, leftSurround, rightSurround, surround, unknown } }, + { vstSpeakerConfigTypeLRLsRsSlSr, { left, right, leftSurround, rightSurround, leftRearSurround, rightRearSurround, unknown } }, + { vstSpeakerConfigTypeLRCLfeLsRsCs, { left, right, centre, subbass, leftSurround, rightSurround, surround, unknown } }, + { vstSpeakerConfigTypeLRLfeLsRsSlSr, { left, right, subbass, leftSurround, rightSurround, leftRearSurround, rightRearSurround, unknown } }, + { vstSpeakerConfigTypeLRCLsRsLcRc, { left, right, centre, leftSurround, rightSurround, topFrontLeft, topFrontRight, unknown } }, + { vstSpeakerConfigTypeLRCLsRsSlSr, { left, right, centre, leftSurround, rightSurround, leftRearSurround, rightRearSurround, unknown } }, + { vstSpeakerConfigTypeLRCLfeLsRsLcRc, { left, right, centre, subbass, leftSurround, rightSurround, topFrontLeft, topFrontRight, unknown } }, + { vstSpeakerConfigTypeLRCLfeLsRsSlSr, { left, right, centre, subbass, leftSurround, rightSurround, leftRearSurround, rightRearSurround, unknown } }, + { vstSpeakerConfigTypeLRCLsRsLcRcCs, { left, right, centre, leftSurround, rightSurround, topFrontLeft, topFrontRight, surround, unknown } }, + { vstSpeakerConfigTypeLRCLsRsCsSlSr, { left, right, centre, leftSurround, rightSurround, surround, leftRearSurround, rightRearSurround, unknown } }, + { vstSpeakerConfigTypeLRCLfeLsRsLcRcCs, { left, right, centre, subbass, leftSurround, rightSurround, topFrontLeft, topFrontRight, surround, unknown } }, + { vstSpeakerConfigTypeLRCLfeLsRsCsSlSr, { left, right, centre, subbass, leftSurround, rightSurround, surround, leftRearSurround, rightRearSurround, unknown } }, + { vstSpeakerConfigTypeLRCLfeLsRsTflTfcTfrTrlTrrLfe2, { left, right, centre, subbass, leftSurround, rightSurround, topFrontLeft, topFrontCentre, topFrontRight, topRearLeft, topRearRight, subbass2, unknown } }, + { vstSpeakerConfigTypeEmpty, { unknown } } }; return mappings; } - static inline VstInt32 getSpeakerType (AudioChannelSet::ChannelType type) noexcept + static inline int32 getSpeakerType (AudioChannelSet::ChannelType type) noexcept { switch (type) { - case AudioChannelSet::left: return kSpeakerL; - case AudioChannelSet::right: return kSpeakerR; - case AudioChannelSet::centre: return kSpeakerC; - case AudioChannelSet::subbass: return kSpeakerLfe; - case AudioChannelSet::leftSurround: return kSpeakerLs; - case AudioChannelSet::rightSurround: return kSpeakerRs; - case AudioChannelSet::leftCentre: return kSpeakerLc; - case AudioChannelSet::rightCentre: return kSpeakerRc; - case AudioChannelSet::surround: return kSpeakerS; - case AudioChannelSet::leftRearSurround: return kSpeakerSl; - case AudioChannelSet::rightRearSurround: return kSpeakerSr; - case AudioChannelSet::topMiddle: return kSpeakerTm; - case AudioChannelSet::topFrontLeft: return kSpeakerTfl; - case AudioChannelSet::topFrontCentre: return kSpeakerTfc; - case AudioChannelSet::topFrontRight: return kSpeakerTfr; - case AudioChannelSet::topRearLeft: return kSpeakerTrl; - case AudioChannelSet::topRearCentre: return kSpeakerTrc; - case AudioChannelSet::topRearRight: return kSpeakerTrr; - case AudioChannelSet::subbass2: return kSpeakerLfe2; + case AudioChannelSet::left: return vstIndividualSpeakerTypeLeft; + case AudioChannelSet::right: return vstIndividualSpeakerTypeRight; + case AudioChannelSet::centre: return vstIndividualSpeakerTypeCentre; + case AudioChannelSet::subbass: return vstIndividualSpeakerTypeSubbass; + case AudioChannelSet::leftSurround: return vstIndividualSpeakerTypeLeftSurround; + case AudioChannelSet::rightSurround: return vstIndividualSpeakerTypeRightSurround; + case AudioChannelSet::leftCentre: return vstIndividualSpeakerTypeLeftCentre; + case AudioChannelSet::rightCentre: return vstIndividualSpeakerTypeRightCentre; + case AudioChannelSet::surround: return vstIndividualSpeakerTypeSurround; + case AudioChannelSet::leftRearSurround: return vstIndividualSpeakerTypeLeftRearSurround; + case AudioChannelSet::rightRearSurround: return vstIndividualSpeakerTypeRightRearSurround; + case AudioChannelSet::topMiddle: return vstIndividualSpeakerTypeTopMiddle; + case AudioChannelSet::topFrontLeft: return vstIndividualSpeakerTypeTopFrontLeft; + case AudioChannelSet::topFrontCentre: return vstIndividualSpeakerTypeTopFrontCentre; + case AudioChannelSet::topFrontRight: return vstIndividualSpeakerTypeTopFrontRight; + case AudioChannelSet::topRearLeft: return vstIndividualSpeakerTypeTopRearLeft; + case AudioChannelSet::topRearCentre: return vstIndividualSpeakerTypeTopRearCentre; + case AudioChannelSet::topRearRight: return vstIndividualSpeakerTypeTopRearRight; + case AudioChannelSet::subbass2: return vstIndividualSpeakerTypeSubbass2; default: break; } return 0; } - static inline AudioChannelSet::ChannelType getChannelType (VstInt32 type) noexcept + static inline AudioChannelSet::ChannelType getChannelType (int32 type) noexcept { switch (type) { - case kSpeakerL: return AudioChannelSet::left; - case kSpeakerR: return AudioChannelSet::right; - case kSpeakerC: return AudioChannelSet::centre; - case kSpeakerLfe: return AudioChannelSet::subbass; - case kSpeakerLs: return AudioChannelSet::leftSurround; - case kSpeakerRs: return AudioChannelSet::rightSurround; - case kSpeakerLc: return AudioChannelSet::leftCentre; - case kSpeakerRc: return AudioChannelSet::rightCentre; - case kSpeakerS: return AudioChannelSet::surround; - case kSpeakerSl: return AudioChannelSet::leftRearSurround; - case kSpeakerSr: return AudioChannelSet::rightRearSurround; - case kSpeakerTm: return AudioChannelSet::topMiddle; - case kSpeakerTfl: return AudioChannelSet::topFrontLeft; - case kSpeakerTfc: return AudioChannelSet::topFrontCentre; - case kSpeakerTfr: return AudioChannelSet::topFrontRight; - case kSpeakerTrl: return AudioChannelSet::topRearLeft; - case kSpeakerTrc: return AudioChannelSet::topRearCentre; - case kSpeakerTrr: return AudioChannelSet::topRearRight; - case kSpeakerLfe2: return AudioChannelSet::subbass2; + case vstIndividualSpeakerTypeLeft: return AudioChannelSet::left; + case vstIndividualSpeakerTypeRight: return AudioChannelSet::right; + case vstIndividualSpeakerTypeCentre: return AudioChannelSet::centre; + case vstIndividualSpeakerTypeSubbass: return AudioChannelSet::subbass; + case vstIndividualSpeakerTypeLeftSurround: return AudioChannelSet::leftSurround; + case vstIndividualSpeakerTypeRightSurround: return AudioChannelSet::rightSurround; + case vstIndividualSpeakerTypeLeftCentre: return AudioChannelSet::leftCentre; + case vstIndividualSpeakerTypeRightCentre: return AudioChannelSet::rightCentre; + case vstIndividualSpeakerTypeSurround: return AudioChannelSet::surround; + case vstIndividualSpeakerTypeLeftRearSurround: return AudioChannelSet::leftRearSurround; + case vstIndividualSpeakerTypeRightRearSurround: return AudioChannelSet::rightRearSurround; + case vstIndividualSpeakerTypeTopMiddle: return AudioChannelSet::topMiddle; + case vstIndividualSpeakerTypeTopFrontLeft: return AudioChannelSet::topFrontLeft; + case vstIndividualSpeakerTypeTopFrontCentre: return AudioChannelSet::topFrontCentre; + case vstIndividualSpeakerTypeTopFrontRight: return AudioChannelSet::topFrontRight; + case vstIndividualSpeakerTypeTopRearLeft: return AudioChannelSet::topRearLeft; + case vstIndividualSpeakerTypeTopRearCentre: return AudioChannelSet::topRearCentre; + case vstIndividualSpeakerTypeTopRearRight: return AudioChannelSet::topRearRight; + case vstIndividualSpeakerTypeSubbass2: return AudioChannelSet::subbass2; default: break; } @@ -1250,46 +971,6 @@ public: } }; - //============================================================================== - VstInt32 getChunk (void** data, bool onlyStoreCurrentProgramData) override - { - if (filter == nullptr) - return 0; - - chunkMemory.reset(); - if (onlyStoreCurrentProgramData) - filter->getCurrentProgramStateInformation (chunkMemory); - else - filter->getStateInformation (chunkMemory); - - *data = (void*) chunkMemory.getData(); - - // because the chunk is only needed temporarily by the host (or at least you'd - // hope so) we'll give it a while and then free it in the timer callback. - chunkMemoryTime = juce::Time::getApproximateMillisecondCounter(); - - return (VstInt32) chunkMemory.getSize(); - } - - VstInt32 setChunk (void* data, VstInt32 byteSize, bool onlyRestoreCurrentProgramData) override - { - if (filter != nullptr) - { - chunkMemory.reset(); - chunkMemoryTime = 0; - - if (byteSize > 0 && data != nullptr) - { - if (onlyRestoreCurrentProgramData) - filter->setCurrentProgramStateInformation (data, byteSize); - else - filter->setStateInformation (data, byteSize); - } - } - - return 0; - } - void timerCallback() override { if (shouldDeleteEditor) @@ -1312,28 +993,8 @@ public: #endif } - void doIdleCallback() - { - // (wavelab calls this on a separate thread and causes a deadlock).. - if (MessageManager::getInstance()->isThisTheMessageThread() - && ! recursionCheck) - { - ScopedValueSetter svs (recursionCheck, true, false); - - JUCE_AUTORELEASEPOOL - { - Timer::callPendingTimersSynchronously(); - - for (int i = ComponentPeer::getNumPeers(); --i >= 0;) - if (ComponentPeer* p = ComponentPeer::getPeer(i)) - p->performAnyPendingRepaintsNow(); - } - } - } - void createEditorComp() { - #if ! JUCE_IOS if (hasShutdown || filter == nullptr) return; @@ -1341,7 +1002,7 @@ public: { if (AudioProcessorEditor* const ed = filter->createEditorIfNeeded()) { - cEffect.flags |= effFlagsHasEditor; + vstEffect.flags |= vstEffectFlagHasEditor; ed->setOpaque (true); ed->setVisible (true); @@ -1349,19 +1010,15 @@ public: } else { - cEffect.flags &= ~effFlagsHasEditor; + vstEffect.flags &= ~vstEffectFlagHasEditor; } } - #endif shouldDeleteEditor = false; } void deleteEditor (bool canDeleteLaterIfModal) { - #if JUCE_IOS - ignoreUnused (canDeleteLaterIfModal); - #else JUCE_AUTORELEASEPOOL { PopupMenu::dismissAllActiveMenus(); @@ -1403,95 +1060,88 @@ public: hostWindow = 0; #endif } - #endif } - VstIntPtr dispatcher (VstInt32 opCode, VstInt32 index, VstIntPtr value, void* ptr, float opt) override + pointer_sized_int dispatcher (int32 opCode, VstOpCodeArguments args) { if (hasShutdown) return 0; - #if ! JUCE_IOS - if (opCode == effEditIdle) - { - doIdleCallback(); - return 0; - } - else if (opCode == effEditOpen) - { - checkWhetherMessageThreadIsCorrect(); - const MessageManagerLock mmLock; - jassert (! recursionCheck); - - startTimer (1000 / 4); // performs misc housekeeping chores - - deleteEditor (true); - createEditorComp(); - - if (editorComp != nullptr) - { - editorComp->setOpaque (true); - editorComp->setVisible (false); - - #if JUCE_WINDOWS - editorComp->addToDesktop (0, ptr); - hostWindow = (HWND) ptr; - #elif JUCE_LINUX - editorComp->addToDesktop (0, ptr); - hostWindow = (Window) ptr; - Window editorWnd = (Window) editorComp->getWindowHandle(); - XReparentWindow (display, editorWnd, hostWindow, 0, 0); - #elif JUCE_MAC - hostWindow = attachComponentToWindowRefVST (editorComp, ptr, useNSView); - #endif - editorComp->setVisible (true); - - return 1; - } - } - else if (opCode == effEditClose) - { - checkWhetherMessageThreadIsCorrect(); - const MessageManagerLock mmLock; - deleteEditor (true); - return 0; + switch (opCode) + { + case plugInOpcodeOpen: return handleOpen (args); + case plugInOpcodeClose: return handleClose (args); + case plugInOpcodeSetCurrentProgram: return handleSetCurrentProgram (args); + case plugInOpcodeGetCurrentProgram: return handleGetCurrentProgram (args); + case plugInOpcodeSetCurrentProgramName: return handleSetCurrentProgramName (args); + case plugInOpcodeGetCurrentProgramName: return handleGetCurrentProgramName (args); + case plugInOpcodeGetParameterLabel: return handleGetParameterLabel (args); + case plugInOpcodeGetParameterText: return handleGetParameterText (args); + case plugInOpcodeGetParameterName: return handleGetParameterName (args); + case plugInOpcodeSetSampleRate: return handleSetSampleRate (args); + case plugInOpcodeSetBlockSize: return handleSetBlockSize (args); + case plugInOpcodeResumeSuspend: return handleResumeSuspend (args); + case plugInOpcodeGetEditorBounds: return handleGetEditorBounds (args); + case plugInOpcodeOpenEditor: return handleOpenEditor (args); + case plugInOpcodeCloseEditor: return handleCloseEditor (args); + case plugInOpcodeGetData: return handleGetData (args); + case plugInOpcodeSetData: return handleSetData (args); + case plugInOpcodePreAudioProcessingEvents: return handlePreAudioProcessingEvents (args); + case plugInOpcodeIsParameterAutomatable: return handleIsParameterAutomatable (args); + case plugInOpcodeParameterValueForText: return handleParameterValueForText (args); + case plugInOpcodeGetProgramName: return handleGetProgramName (args); + case plugInOpcodeGetInputPinProperties: return handleGetInputPinProperties (args); + case plugInOpcodeGetOutputPinProperties: return handleGetOutputPinProperties (args); + case plugInOpcodeGetPlugInCategory: return handleGetPlugInCategory (args); + case plugInOpcodeSetSpeakerConfiguration: return handleSetSpeakerConfiguration (args); + case plugInOpcodeSetBypass: return handleSetBypass (args); + case plugInOpcodeGetPlugInName: return handleGetPlugInName (args); + case plugInOpcodeGetManufacturerProductName: return handleGetPlugInName (args); + case plugInOpcodeGetManufacturerName: return handleGetManufacturerName (args); + case plugInOpcodeGetManufacturerVersion: return handleGetManufacturerVersion (args); + case plugInOpcodeManufacturerSpecific: return handleManufacturerSpecific (args); + case plugInOpcodeCanPlugInDo: return handleCanPlugInDo (args); + case plugInOpcodeGetTailSize: return handleGetTailSize (args); + case plugInOpcodeKeyboardFocusRequired: return handleKeyboardFocusRequired (args); + case plugInOpcodeGetVstInterfaceVersion: return handleGetVstInterfaceVersion (args); + case plugInOpcodeGetCurrentMidiProgram: return handleGetCurrentMidiProgram (args); + case plugInOpcodeGetSpeakerArrangement: return handleGetSpeakerConfiguration (args); + case plugInOpcodeSetNumberOfSamplesToProcess: return handleSetNumberOfSamplesToProcess (args); + case plugInOpcodeSetSampleFloatType: return handleSetSampleFloatType (args); + default: return 0; + } + } + + static pointer_sized_int dispatcherCB (VstEffectInterface* vstInterface, int32 opCode, int32 index, + pointer_sized_int value, void* ptr, float opt) + { + JuceVSTWrapper* wrapper = getWrapper (vstInterface); + VstOpCodeArguments args = { index, value, ptr, opt }; + + if (opCode == plugInOpcodeClose) + { + wrapper->dispatcher (opCode, args); + delete wrapper; + return 1; } - else if (opCode == effEditGetRect) - { - checkWhetherMessageThreadIsCorrect(); - const MessageManagerLock mmLock; - createEditorComp(); - - if (editorComp != nullptr) - { - editorSize.left = 0; - editorSize.top = 0; - editorSize.right = (VstInt16) editorComp->getWidth(); - editorSize.bottom = (VstInt16) editorComp->getHeight(); - - *((ERect**) ptr) = &editorSize; - - return (VstIntPtr) (pointer_sized_int) &editorSize; - } - return 0; - } - #endif - return AudioEffectX::dispatcher (opCode, index, value, ptr, opt); + return wrapper->dispatcher (opCode, args); } - #if ! JUCE_IOS void resizeHostWindow (int newWidth, int newHeight) { if (editorComp != nullptr) { bool sizeWasSuccessful = false; - if (canHostDo (const_cast ("sizeWindow"))) + if (hostCallback != nullptr) { - isInSizeWindow = true; - sizeWasSuccessful = sizeWindow (newWidth, newHeight); - isInSizeWindow = false; + if (hostCallback (&vstEffect, hostOpcodeCanHostDo, 0, 0, const_cast ("sizeWindow"), 0)) + { + isInSizeWindow = true; + sizeWasSuccessful = (hostCallback (&vstEffect, hostOpcodeWindowSize, newWidth, newHeight, 0, 0) != 0); + isInSizeWindow = false; + } } if (! sizeWasSuccessful) @@ -1578,7 +1228,7 @@ public: addMouseListener (this, true); #endif - ignoreUnused (fakeMouseGenerator); + ignoreUnused (fakeMouseGenerator); } ~EditorCompWrapper() @@ -1669,18 +1319,19 @@ public: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EditorCompWrapper) }; - #endif //============================================================================== private: + VstHostCallback hostCallback; + float sampleRate; + int32 blockSize; + VstEffectInterface vstEffect; AudioProcessor* filter; PluginBusUtilities busUtils; juce::MemoryBlock chunkMemory; juce::uint32 chunkMemoryTime; - #if ! JUCE_IOS ScopedPointer editorComp; - ERect editorSize; - #endif + VstEditorBounds editorBounds; MidiBuffer midiEvents; VSTMidiEventList outgoingEvents; bool isProcessing, isBypassed, hasShutdown, isInSizeWindow, firstProcessCallback; @@ -1693,16 +1344,23 @@ private: void* hostWindow; #elif JUCE_LINUX Window hostWindow; - #elif JUCE_WINDOWS + #else HWND hostWindow; #endif - static inline VstInt32 convertHexVersionToDecimal (const unsigned int hexVersion) + static JuceVSTWrapper* getWrapper (VstEffectInterface* vstInterface) noexcept { return static_cast (vstInterface->effectPointer); } + + bool isProcessLevelOffline() + { + return hostCallback != nullptr && (int32) hostCallback (&vstEffect, hostOpcodeGetCurrentAudioProcessingLevel, 0, 0, 0, 0) == 4; + } + + static inline int32 convertHexVersionToDecimal (const unsigned int hexVersion) { #if JUCE_VST_RETURN_HEX_VERSION_NUMBER_DIRECTLY - return (VstInt32) hexVersion; + return (int32) hexVersion; #else - return (VstInt32) (((hexVersion >> 24) & 0xff) * 1000 + return (int32) (((hexVersion >> 24) & 0xff) * 1000 + ((hexVersion >> 16) & 0xff) * 100 + ((hexVersion >> 8) & 0xff) * 10 + (hexVersion & 0xff)); @@ -1746,8 +1404,8 @@ private: if (filter != nullptr) { - int numChannels = cEffect.numInputs + cEffect.numOutputs; - tmpBuffers.tempChannels.insertMultiple (0, nullptr, numChannels); + const int nInputAndOutputChannels = vstEffect.numInputChannels + vstEffect.numOutputChannels; + tmpBuffers.tempChannels.insertMultiple (0, nullptr, nInputAndOutputChannels); } } @@ -1867,7 +1525,7 @@ private: } for (i = 0; i < n; ++i) - if ((config[i] = (config[i] + 1) % maxChans[i]) > 0) + if ((config[i] = maxChans[i] ? (config[i] + 1) % maxChans[i] : 0) > 0) break; } @@ -1936,8 +1594,28 @@ private: return false; } + void allocateSpeakerArrangement (VstSpeakerConfiguration** arrangement, int32 nChannels) + { + if (*arrangement) + delete [] (char*) *arrangement; + + // The last member of a full VstSpeakerConfiguration struct is an array of 8 + // VstIndividualSpeakerInfo. Here we only allocate space for channels we will + // actually use. + const size_t allocationSizeToSubtract = static_cast (8 - nChannels) * sizeof (VstIndividualSpeakerInfo); + const size_t allocationSize = sizeof (VstSpeakerConfiguration) - allocationSizeToSubtract; + char* newAllocation = new char[allocationSize]; + memset (newAllocation, 0, allocationSize); + + *arrangement = (VstSpeakerConfiguration*) newAllocation; + (*arrangement)->numberOfChannels = nChannels; + } + //============================================================================== - bool pluginHasSidechainsOrAuxs() const { return (busUtils.getBusCount (true) > 1 || busUtils.getBusCount (false) > 1); } + bool pluginHasSidechainsOrAuxs() const + { + return (busUtils.getBusCount (true) > 1 || busUtils.getBusCount (false) > 1); + } static int sumOfConfig (const int config[], int num) noexcept { @@ -1947,69 +1625,584 @@ private: return retval; } + //============================================================================== - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceVSTWrapper) -}; + /** Host to plug-in calls. */ -//============================================================================== -namespace -{ - AEffect* pluginEntryPoint (audioMasterCallback audioMaster) + pointer_sized_int handleOpen (VstOpCodeArguments) { - JUCE_AUTORELEASEPOOL - { - initialiseJuce_GUI(); + // Note: most hosts call this on the UI thread, but wavelab doesn't, so be careful in here. + if (filter->hasEditor()) + vstEffect.flags |= vstEffectFlagHasEditor; + else + vstEffect.flags &= ~vstEffectFlagHasEditor; - try - { - if (audioMaster (0, audioMasterVersion, 0, 0, 0, 0) != 0) - { - #if JUCE_LINUX - MessageManagerLock mmLock; - #endif + return 0; + } - AudioProcessor* const filter = createPluginFilterOfType (AudioProcessor::wrapperType_VST); - JuceVSTWrapper* const wrapper = new JuceVSTWrapper (audioMaster, filter); - return wrapper->getAeffect(); - } - } - catch (...) - {} + pointer_sized_int handleClose (VstOpCodeArguments) + { + // Note: most hosts call this on the UI thread, but wavelab doesn't, so be careful in here. + stopTimer(); + + if (MessageManager::getInstance()->isThisTheMessageThread()) + deleteEditor (false); + + return 0; + } + + pointer_sized_int handleSetCurrentProgram (VstOpCodeArguments args) + { + if (filter != nullptr && isPositiveAndBelow((int) args.value, filter->getNumPrograms())) + filter->setCurrentProgram ((int) args.value); + + return 0; + } + + pointer_sized_int handleGetCurrentProgram (VstOpCodeArguments) + { + return (filter != nullptr && filter->getNumPrograms() > 0 ? filter->getCurrentProgram() : 0); + } + + pointer_sized_int handleSetCurrentProgramName (VstOpCodeArguments args) + { + if (filter != nullptr && filter->getNumPrograms() > 0) + filter->changeProgramName (filter->getCurrentProgram(), (char*) args.ptr); + + return 0; + } + + pointer_sized_int handleGetCurrentProgramName (VstOpCodeArguments args) + { + if (filter != nullptr && filter->getNumPrograms() > 0) + filter->getProgramName (filter->getCurrentProgram()).copyToUTF8 ((char*) args.ptr, 24 + 1); + + return 0; + } + + pointer_sized_int handleGetParameterLabel (VstOpCodeArguments args) + { + if (filter != nullptr) + { + jassert (isPositiveAndBelow (args.index, filter->getNumParameters())); + // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more. + filter->getParameterLabel (args.index).copyToUTF8 ((char*) args.ptr, 24 + 1); } - return nullptr; + return 0; } -} -#if ! JUCE_WINDOWS - #define JUCE_EXPORTED_FUNCTION extern "C" __attribute__ ((visibility("default"))) -#endif + pointer_sized_int handleGetParameterText (VstOpCodeArguments args) + { + if (filter != nullptr) + { + jassert (isPositiveAndBelow (args.index, filter->getNumParameters())); + // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more. + filter->getParameterText (args.index, 24).copyToUTF8 ((char*) args.ptr, 24 + 1); + } -//============================================================================== -// Mac startup code.. -#if JUCE_MAC || JUCE_IOS + return 0; + } - JUCE_EXPORTED_FUNCTION AEffect* VSTPluginMain (audioMasterCallback audioMaster); - JUCE_EXPORTED_FUNCTION AEffect* VSTPluginMain (audioMasterCallback audioMaster) + pointer_sized_int handleGetParameterName (VstOpCodeArguments args) { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; + if (filter != nullptr) + { + jassert (isPositiveAndBelow (args.index, filter->getNumParameters())); + // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more. + filter->getParameterName (args.index, 16).copyToUTF8 ((char*) args.ptr, 16 + 1); + } - #if JUCE_MAC - initialiseMacVST(); - #endif + return 0; + } - return pluginEntryPoint (audioMaster); + pointer_sized_int handleSetSampleRate (VstOpCodeArguments args) + { + sampleRate = args.opt; + return 0; } - JUCE_EXPORTED_FUNCTION AEffect* main_macho (audioMasterCallback audioMaster); - JUCE_EXPORTED_FUNCTION AEffect* main_macho (audioMasterCallback audioMaster) + pointer_sized_int handleSetBlockSize (VstOpCodeArguments args) { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; + blockSize = (int32) args.value; + return 0; + } - #if JUCE_MAC - initialiseMacVST(); - #endif + pointer_sized_int handleResumeSuspend (VstOpCodeArguments args) + { + if (args.value) + resume(); + else + suspend(); + return 0; + } + + pointer_sized_int handleGetEditorBounds (VstOpCodeArguments args) + { + checkWhetherMessageThreadIsCorrect(); + const MessageManagerLock mmLock; + createEditorComp(); + + if (editorComp != nullptr) + { + editorBounds.upper = 0; + editorBounds.leftmost = 0; + editorBounds.lower = (int16) editorComp->getHeight(); + editorBounds.rightmost = (int16) editorComp->getWidth(); + + *((VstEditorBounds**) args.ptr) = &editorBounds; + + return (pointer_sized_int) (pointer_sized_int) &editorBounds; + } + + return 0; + } + + pointer_sized_int handleOpenEditor (VstOpCodeArguments args) + { + checkWhetherMessageThreadIsCorrect(); + const MessageManagerLock mmLock; + jassert (! recursionCheck); + + startTimer (1000 / 4); // performs misc housekeeping chores + + deleteEditor (true); + createEditorComp(); + + if (editorComp != nullptr) + { + editorComp->setOpaque (true); + editorComp->setVisible (false); + + #if JUCE_WINDOWS + editorComp->addToDesktop (0, args.ptr); + hostWindow = (HWND) args.ptr; + #elif JUCE_LINUX + editorComp->addToDesktop (0, args.ptr); + hostWindow = (Window) args.ptr; + Window editorWnd = (Window) editorComp->getWindowHandle(); + XReparentWindow (display, editorWnd, hostWindow, 0, 0); + #else + hostWindow = attachComponentToWindowRefVST (editorComp, args.ptr, useNSView); + #endif + editorComp->setVisible (true); + + return 1; + } + return 0; + } + + pointer_sized_int handleCloseEditor (VstOpCodeArguments) + { + checkWhetherMessageThreadIsCorrect(); + const MessageManagerLock mmLock; + deleteEditor (true); + return 0; + } + + pointer_sized_int handleGetData (VstOpCodeArguments args) + { + void** data = (void**) args.ptr; + bool onlyStoreCurrentProgramData = (args.index != 0); + + if (filter == nullptr) + return 0; + + chunkMemory.reset(); + if (onlyStoreCurrentProgramData) + filter->getCurrentProgramStateInformation (chunkMemory); + else + filter->getStateInformation (chunkMemory); + + *data = (void*) chunkMemory.getData(); + + // because the chunk is only needed temporarily by the host (or at least you'd + // hope so) we'll give it a while and then free it in the timer callback. + chunkMemoryTime = juce::Time::getApproximateMillisecondCounter(); + + return (int32) chunkMemory.getSize(); + } + + pointer_sized_int handleSetData (VstOpCodeArguments args) + { + void* data = args.ptr; + int32 byteSize = (int32) args.value; + bool onlyRestoreCurrentProgramData = (args.index != 0); + + if (filter != nullptr) + { + chunkMemory.reset(); + chunkMemoryTime = 0; + + if (byteSize > 0 && data != nullptr) + { + if (onlyRestoreCurrentProgramData) + filter->setCurrentProgramStateInformation (data, byteSize); + else + filter->setStateInformation (data, byteSize); + } + } + + return 0; + } + + pointer_sized_int handlePreAudioProcessingEvents (VstOpCodeArguments args) + { + #if JucePlugin_WantsMidiInput + VSTMidiEventList::addEventsToMidiBuffer ((VstEventBlock*) args.ptr, midiEvents); + return 1; + #else + ignoreUnused (args); + return 0; + #endif + } + + pointer_sized_int handleIsParameterAutomatable (VstOpCodeArguments args) + { + return (filter != nullptr && filter->isParameterAutomatable (args.index)) ? 1 : 0; + } + + pointer_sized_int handleParameterValueForText (VstOpCodeArguments args) + { + if (filter != nullptr) + { + jassert (isPositiveAndBelow (args.index, filter->getNumParameters())); + + if (AudioProcessorParameter* p = filter->getParameters()[args.index]) + { + filter->setParameter (args.index, p->getValueForText (String::fromUTF8 ((char*) args.ptr))); + return 1; + } + } + + return 0; + } + + pointer_sized_int handleGetProgramName (VstOpCodeArguments args) + { + if (filter != nullptr && isPositiveAndBelow (args.index, filter->getNumPrograms())) + { + filter->getProgramName (args.index).copyToUTF8 ((char*) args.ptr, 24 + 1); + return 1; + } + + return 0; + } + + pointer_sized_int handleGetInputPinProperties (VstOpCodeArguments args) + { + return (filter != nullptr && getPinProperties (*(VstPinInfo*) args.ptr, true, args.index)) ? 1 : 0; + } + + pointer_sized_int handleGetOutputPinProperties (VstOpCodeArguments args) + { + return (filter != nullptr && getPinProperties (*(VstPinInfo*) args.ptr, false, args.index)) ? 1 : 0; + } + + pointer_sized_int handleGetPlugInCategory (VstOpCodeArguments) + { + return JucePlugin_VSTCategory; + } + + pointer_sized_int handleSetSpeakerConfiguration (VstOpCodeArguments args) + { + VstSpeakerConfiguration* pluginInput = reinterpret_cast (args.value); + VstSpeakerConfiguration* pluginOutput = (VstSpeakerConfiguration*) args.ptr; + + const int numIns = busUtils.getBusCount (true); + const int numOuts = busUtils.getBusCount (false);; + + if (pluginInput != nullptr && numIns == 0) + return 0; + + if (pluginOutput != nullptr && numOuts == 0) + return 0; + + if (pluginInput != nullptr && pluginInput->type >= 0) + { + // inconsistent request? + if (SpeakerMappings::vstArrangementTypeToChannelSet (*pluginInput).size() != pluginInput->numberOfChannels) + return 0; + } + + if (pluginOutput != nullptr && pluginOutput->type >= 0) + { + // inconsistent request? + if (SpeakerMappings::vstArrangementTypeToChannelSet (*pluginOutput).size() != pluginOutput->numberOfChannels) + return 0; + } + + if (numIns > 1 || numOuts > 1) + { + int newNumInChannels = (pluginInput != nullptr && pluginInput-> numberOfChannels >= 0) + ? pluginInput-> numberOfChannels + : busUtils.findTotalNumChannels (true); + int newNumOutChannels = (pluginOutput != nullptr && pluginOutput->numberOfChannels >= 0) + ? pluginOutput->numberOfChannels + : busUtils.findTotalNumChannels (false); + + newNumInChannels = jmin (newNumInChannels, maxNumInChannels); + newNumOutChannels = jmin (newNumOutChannels, maxNumOutChannels); + + if (! setBusArrangementFromTotalChannelNum (newNumInChannels, newNumOutChannels)) + return 0; + } + else + { + PluginBusUtilities::ScopedBusRestorer busRestorer (busUtils); + AudioChannelSet inLayoutType; + + if (pluginInput != nullptr && pluginInput-> numberOfChannels >= 0) + { + inLayoutType = SpeakerMappings::vstArrangementTypeToChannelSet (*pluginInput); + if (busUtils.getChannelSet (true, 0) != inLayoutType) + if (! filter->setPreferredBusArrangement (true, 0, inLayoutType)) + return 0; + } + + if (pluginOutput != nullptr && pluginOutput->numberOfChannels >= 0) + { + AudioChannelSet newType = SpeakerMappings::vstArrangementTypeToChannelSet (*pluginOutput); + + if (busUtils.getChannelSet (false, 0) != newType) + if (! filter->setPreferredBusArrangement (false, 0, newType)) + return 0; + + // re-check the input + if ((! inLayoutType.isDisabled()) && busUtils.getChannelSet (true, 0) != inLayoutType) + return 0; + + busRestorer.release(); + } + } + + filter->setRateAndBufferSizeDetails(0, 0); + return 1; + } + + pointer_sized_int handleSetBypass (VstOpCodeArguments args) + { + isBypassed = (args.value != 0); + return 1; + } + + pointer_sized_int handleGetPlugInName (VstOpCodeArguments args) + { + String (JucePlugin_Name).copyToUTF8 ((char*) args.ptr, 64 + 1); + return 1; + } + + pointer_sized_int handleGetManufacturerName (VstOpCodeArguments args) + { + String (JucePlugin_Manufacturer).copyToUTF8 ((char*) args.ptr, 64 + 1); + return 1; + } + + pointer_sized_int handleGetManufacturerVersion (VstOpCodeArguments) + { + return convertHexVersionToDecimal (JucePlugin_VersionCode); + } + + pointer_sized_int handleManufacturerSpecific (VstOpCodeArguments args) + { + #if JucePlugin_Build_VST3 && JUCE_VST3_CAN_REPLACE_VST2 + if ((args.index == 'stCA' || args.index == 'stCa') && args.value == 'FUID' && args.ptr != nullptr) + { + memcpy (args.ptr, getJuceVST3ComponentIID(), 16); + return 1; + } + #else + ignoreUnused (args); + #endif + return 0; + } + + pointer_sized_int handleCanPlugInDo (VstOpCodeArguments args) + { + char* text = (char*) args.ptr; + if (strcmp (text, "receiveVstEvents") == 0 + || strcmp (text, "receiveVstMidiEvent") == 0 + || strcmp (text, "receiveVstMidiEvents") == 0) + { + #if JucePlugin_WantsMidiInput + return 1; + #else + return -1; + #endif + } + + if (strcmp (text, "sendVstEvents") == 0 + || strcmp (text, "sendVstMidiEvent") == 0 + || strcmp (text, "sendVstMidiEvents") == 0) + { + #if JucePlugin_ProducesMidiOutput + return 1; + #else + return -1; + #endif + } + + if (strcmp (text, "receiveVstTimeInfo") == 0 + || strcmp (text, "conformsToWindowRules") == 0 + || strcmp (text, "bypass") == 0) + { + return 1; + } + + // This tells Wavelab to use the UI thread to invoke open/close, + // like all other hosts do. + if (strcmp (text, "openCloseAnyThread") == 0) + return -1; + + if (strcmp (text, "MPE") == 0) + return filter->supportsMPE() ? 1 : 0; + + #if JUCE_MAC + if (strcmp (text, "hasCockosViewAsConfig") == 0) + { + useNSView = true; + return (int32) 0xbeef0000; + } + #endif + + return 0; + } + + pointer_sized_int handleGetTailSize (VstOpCodeArguments) + { + if (filter != nullptr) + return (pointer_sized_int) (filter->getTailLengthSeconds() * sampleRate); + + return 0; + } + + pointer_sized_int handleKeyboardFocusRequired (VstOpCodeArguments) + { + return (JucePlugin_EditorRequiresKeyboardFocus != 0) ? 1 : 0; + } + + pointer_sized_int handleGetVstInterfaceVersion (VstOpCodeArguments) + { + return juceVstInterfaceVersion; + } + + pointer_sized_int handleGetCurrentMidiProgram (VstOpCodeArguments) + { + return -1; + } + + pointer_sized_int handleGetSpeakerConfiguration (VstOpCodeArguments args) + { + VstSpeakerConfiguration** pluginInput = reinterpret_cast (args.value); + VstSpeakerConfiguration** pluginOutput = (VstSpeakerConfiguration**) args.ptr; + *pluginInput = nullptr; + *pluginOutput = nullptr; + + allocateSpeakerArrangement (pluginInput, busUtils.findTotalNumChannels (true)); + allocateSpeakerArrangement (pluginOutput, busUtils.findTotalNumChannels (false)); + + if (pluginHasSidechainsOrAuxs()) + { + int numIns = busUtils.findTotalNumChannels (true); + int numOuts = busUtils.findTotalNumChannels (false); + + AudioChannelSet layout = AudioChannelSet::canonicalChannelSet (numIns); + SpeakerMappings::channelSetToVstArrangement (layout, **pluginInput); + + layout = AudioChannelSet::canonicalChannelSet (numOuts); + SpeakerMappings::channelSetToVstArrangement (layout, **pluginOutput); + } + else + { + SpeakerMappings::channelSetToVstArrangement (busUtils.getChannelSet (true, 0), **pluginInput); + SpeakerMappings::channelSetToVstArrangement (busUtils.getChannelSet (false, 0), **pluginOutput); + } + + return 1; + } + + pointer_sized_int handleSetNumberOfSamplesToProcess (VstOpCodeArguments args) + { + return args.value; + } + + pointer_sized_int handleSetSampleFloatType (VstOpCodeArguments args) + { + if (! isProcessing) + { + if (filter != nullptr) + { + filter->setProcessingPrecision (args.value == vstProcessingSampleTypeDouble + && filter->supportsDoublePrecisionProcessing() + ? AudioProcessor::doublePrecision + : AudioProcessor::singlePrecision); + + return 1; + } + } + + return 0; + } + + //============================================================================== + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceVSTWrapper) +}; + + +//============================================================================== +namespace +{ + VstEffectInterface* pluginEntryPoint (VstHostCallback audioMaster) + { + JUCE_AUTORELEASEPOOL + { + initialiseJuce_GUI(); + + try + { + if (audioMaster (0, hostOpcodeVstVersion, 0, 0, 0, 0) != 0) + { + #if JUCE_LINUX + MessageManagerLock mmLock; + #endif + + AudioProcessor* const filter = createPluginFilterOfType (AudioProcessor::wrapperType_VST); + JuceVSTWrapper* const wrapper = new JuceVSTWrapper (audioMaster, filter); + return wrapper->getVstEffectInterface(); + } + } + catch (...) + {} + } + + return nullptr; + } +} + +#if ! JUCE_WINDOWS + #define JUCE_EXPORTED_FUNCTION extern "C" __attribute__ ((visibility("default"))) +#endif + +//============================================================================== +// Mac startup code.. +#if JUCE_MAC + + JUCE_EXPORTED_FUNCTION VstEffectInterface* VSTPluginMain (VstHostCallback audioMaster); + JUCE_EXPORTED_FUNCTION VstEffectInterface* VSTPluginMain (VstHostCallback audioMaster) + { + PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; + + initialiseMacVST(); + return pluginEntryPoint (audioMaster); + } + + JUCE_EXPORTED_FUNCTION VstEffectInterface* main_macho (VstHostCallback audioMaster); + JUCE_EXPORTED_FUNCTION VstEffectInterface* main_macho (VstHostCallback audioMaster) + { + PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; + + initialiseMacVST(); return pluginEntryPoint (audioMaster); } @@ -2017,8 +2210,8 @@ namespace // Linux startup code.. #elif JUCE_LINUX - JUCE_EXPORTED_FUNCTION AEffect* VSTPluginMain (audioMasterCallback audioMaster); - JUCE_EXPORTED_FUNCTION AEffect* VSTPluginMain (audioMasterCallback audioMaster) + JUCE_EXPORTED_FUNCTION VstEffectInterface* VSTPluginMain (VstHostCallback audioMaster); + JUCE_EXPORTED_FUNCTION VstEffectInterface* VSTPluginMain (VstHostCallback audioMaster) { PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; @@ -2026,8 +2219,8 @@ namespace return pluginEntryPoint (audioMaster); } - JUCE_EXPORTED_FUNCTION AEffect* main_plugin (audioMasterCallback audioMaster) asm ("main"); - JUCE_EXPORTED_FUNCTION AEffect* main_plugin (audioMasterCallback audioMaster) + JUCE_EXPORTED_FUNCTION VstEffectInterface* main_plugin (VstHostCallback audioMaster) asm ("main"); + JUCE_EXPORTED_FUNCTION VstEffectInterface* main_plugin (VstHostCallback audioMaster) { PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; @@ -2042,7 +2235,7 @@ namespace // Win32 startup code.. #else - extern "C" __declspec (dllexport) AEffect* VSTPluginMain (audioMasterCallback audioMaster) + extern "C" __declspec (dllexport) VstEffectInterface* VSTPluginMain (VstHostCallback audioMaster) { PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; @@ -2050,7 +2243,7 @@ namespace } #ifndef JUCE_64BIT // (can't compile this on win64, but it's not needed anyway with VST2.4) - extern "C" __declspec (dllexport) int main (audioMasterCallback audioMaster) + extern "C" __declspec (dllexport) int main (VstHostCallback audioMaster) { PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; 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 794f791a..345addae 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -40,6 +40,7 @@ #include "../utility/juce_IncludeModuleHeaders.h" #include "../utility/juce_WindowsHooks.h" #include "../utility/juce_PluginBusUtilities.h" +#include "../utility/juce_FakeMouseMoveGenerator.h" #include "../../juce_audio_processors/format_types/juce_VST3Common.h" #ifndef JUCE_VST3_CAN_REPLACE_VST2 @@ -224,6 +225,8 @@ public: if (v != valueNormalized) { valueNormalized = v; + owner.setParameter (paramIndex, static_cast (v)); + changed(); return true; } @@ -847,6 +850,8 @@ private: setBounds (pluginEditor->getLocalBounds()); resizeHostWindow(); } + + ignoreUnused (fakeMouseGenerator); } ~ContentWrapperComponent() @@ -908,6 +913,7 @@ private: private: JuceVST3Editor& owner; + FakeMouseMoveGenerator fakeMouseGenerator; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ContentWrapperComponent) }; @@ -2093,6 +2099,10 @@ private: { const Vst::ParamID paramID = JuceVST3EditController::generateVSTParamIDForIndex (pluginInstance, i); + // Consider yourself very unlucky if you hit this assertion. The hash code of your + // parameter ids are not unique. + jassert (! vstParamIDs.contains (static_cast (paramID))); + vstParamIDs.add (paramID); paramMap.set (static_cast (paramID), i); } 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 5dbbb6cc..4cf04165 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client.h +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client.h @@ -33,7 +33,7 @@ ID: juce_audio_plugin_client vendor: juce - version: 4.2.3 + version: 4.2.4 name: JUCE audio plugin wrapper classes description: Classes for building VST, VST3, AudioUnit, AAX and RTAS plugins. website: http://www.juce.com/juce diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp index cf78781f..6571e03e 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp @@ -23,7 +23,7 @@ */ #if ! JUCE_MODULE_AVAILABLE_juce_audio_utils - #error To compile AudioUnitv3 and/or Standalone plug-ins, you need to add the juce_audio_utils module! + #error To compile AudioUnitv3 and/or Standalone plug-ins, you need to add the juce_audio_utils and juce_audio_devices modules! #endif #include "Standalone/juce_StandaloneFilterApp.cpp" diff --git a/modules/juce_audio_plugin_client/utility/juce_FakeMouseMoveGenerator.h b/modules/juce_audio_plugin_client/utility/juce_FakeMouseMoveGenerator.h index d239cc1e..a324d318 100644 --- a/modules/juce_audio_plugin_client/utility/juce_FakeMouseMoveGenerator.h +++ b/modules/juce_audio_plugin_client/utility/juce_FakeMouseMoveGenerator.h @@ -25,10 +25,10 @@ #ifndef JUCE_FAKEMOUSEMOVEGENERATOR_H_INCLUDED #define JUCE_FAKEMOUSEMOVEGENERATOR_H_INCLUDED -#if JUCE_MAC && JUCE_SUPPORT_CARBON +#if JUCE_MAC //============================================================================== -// Helper class to workaround carbon windows not getting mouse-moves.. +// Helper class to workaround windows not getting mouse-moves... class FakeMouseMoveGenerator : private Timer { public: @@ -39,7 +39,7 @@ public: void timerCallback() override { - // workaround for carbon windows not getting mouse-moves.. + // Workaround for windows not getting mouse-moves... const Point screenPos (Desktop::getInstance().getMainMouseSource().getScreenPosition()); if (screenPos != lastScreenPos) diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h index fcc90905..5aed3fe4 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h @@ -63,8 +63,10 @@ private: #endif //============================================================================== +#if MAC_OS_X_VERSION_MAX_ALLOWED < 101200 enum { /** Custom AudioUnit property used to indicate MPE support */ - kAudioUnitProperty_SupportsMPE = 75001 + kAudioUnitProperty_SupportsMPE = 58 }; +#endif diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm index 552d4154..14d1964e 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm @@ -399,18 +399,7 @@ public: (int) (numOutputBusChannels * numOutputBusses), rate, blockSize); setLatencySamples (0); - - if (parameters.size() == 0) - { - // some plugins crash if initialiseAudioUnit() is called too soon (sigh..), so we'll - // only call it here if it seems like they it's one of the awkward plugins that can - // only create their parameters after it has been initialised. - if (! initialiseAudioUnit()) - return false; - - refreshParameterList(); - } - + refreshParameterList(); setPluginCallbacks(); return true; } @@ -532,7 +521,7 @@ public: resetBusses(); jassert (! prepared); - initialiseAudioUnit(); + prepared = (AudioUnitInitialize (audioUnit) == noErr); } } @@ -552,14 +541,6 @@ public: incomingMidi.clear(); } - bool initialiseAudioUnit() - { - if (! prepared) - prepared = (AudioUnitInitialize (audioUnit) == noErr); - - return prepared; - } - void resetBusses() { for (AudioUnitElement i = 0; i < numInputBusses; ++i) AudioUnitReset (audioUnit, kAudioUnitScope_Input, i); @@ -873,8 +854,6 @@ public: if (propertyList != 0) { - initialiseAudioUnit(); - AudioUnitSetProperty (audioUnit, kAudioUnitProperty_ClassInfo, kAudioUnitScope_Global, 0, &propertyList, sizeof (propertyList)); @@ -1072,7 +1051,6 @@ private: event.mEventType = kAudioUnitEvent_PropertyChange; event.mArgument.mProperty.mPropertyID = type; event.mArgument.mProperty.mAudioUnit = audioUnit; - event.mArgument.mProperty.mPropertyID = kAudioUnitProperty_PresentPreset; event.mArgument.mProperty.mScope = kAudioUnitScope_Global; event.mArgument.mProperty.mElement = 0; AUEventListenerAddEventType (eventListenerRef, nullptr, &event); @@ -1080,28 +1058,39 @@ private: void eventCallback (const AudioUnitEvent& event, AudioUnitParameterValue newValue) { + int paramIndex = -1; + + if (event.mEventType == kAudioUnitEvent_ParameterValueChange + || event.mEventType == kAudioUnitEvent_BeginParameterChangeGesture + || event.mEventType == kAudioUnitEvent_EndParameterChangeGesture) + { + for (paramIndex = 0; paramIndex < parameters.size(); ++paramIndex) + { + const ParamInfo& p = *parameters.getUnchecked(paramIndex); + + if (p.paramID == event.mArgument.mParameter.mParameterID) + break; + } + + if (! isPositiveAndBelow (paramIndex, parameters.size())) + return; + } + switch (event.mEventType) { case kAudioUnitEvent_ParameterValueChange: - for (int i = 0; i < parameters.size(); ++i) { - const ParamInfo& p = *parameters.getUnchecked(i); - - if (p.paramID == event.mArgument.mParameter.mParameterID) - { - sendParamChangeMessageToListeners (i, (newValue - p.minValue) / (p.maxValue - p.minValue)); - break; - } + const ParamInfo& p = *parameters.getUnchecked(paramIndex); + sendParamChangeMessageToListeners (paramIndex, (newValue - p.minValue) / (p.maxValue - p.minValue)); } - break; case kAudioUnitEvent_BeginParameterChangeGesture: - beginParameterChangeGesture ((int) event.mArgument.mParameter.mParameterID); + beginParameterChangeGesture (paramIndex); break; case kAudioUnitEvent_EndParameterChangeGesture: - endParameterChangeGesture ((int) event.mArgument.mParameter.mParameterID); + endParameterChangeGesture (paramIndex); break; default: @@ -1535,9 +1524,6 @@ private: bool createView (const bool createGenericViewIfNeeded) { - if (! plugin.initialiseAudioUnit()) - return false; - JUCE_IOS_MAC_VIEW* pluginView = nil; UInt32 dataSize = 0; Boolean isWritable = false; diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index 486bf020..2ba2b14f 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -1664,8 +1664,8 @@ public: isControllerInitialised = true; editController->setComponentHandler (host); grabInformationObjects(); - synchroniseStates(); interconnectComponentAndController(); + synchroniseStates(); syncProgramNames(); setupIO(); return true; diff --git a/modules/juce_audio_processors/format_types/juce_VSTInterface.h b/modules/juce_audio_processors/format_types/juce_VSTInterface.h new file mode 100644 index 00000000..b0d1bd05 --- /dev/null +++ b/modules/juce_audio_processors/format_types/juce_VSTInterface.h @@ -0,0 +1,458 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2016 - ROLI Ltd. + + Permission is granted to use this software under the terms of either: + a) the GPL v2 (or any later version) + b) the Affero GPL v3 + + Details of these licenses can be found at: www.gnu.org/licenses + + JUCE is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + ----------------------------------------------------------------------------- + + To release a closed-source product which uses JUCE, commercial licenses are + available: visit www.juce.com for more information. + + ============================================================================== +*/ + +#ifndef JUCE_VSTINTERFACE_H_INCLUDED +#define JUCE_VSTINTERFACE_H_INCLUDED + +#include "../../juce_core/juce_core.h" + +using namespace juce; + +#if JUCE_MSVC + #define VSTINTERFACECALL __cdecl + #pragma pack(push) + #pragma pack(8) +#elif JUCE_MAC || JUCE_IOS + #define VSTINTERFACECALL + #if JUCE_64BIT + #pragma options align=power + #else + #pragma options align=mac68k + #endif +#else + #define VSTINTERFACECALL + #pragma pack(push, 8) +#endif + +const int32 juceVstInterfaceVersion = 2400; +const int32 juceVstInterfaceIdentifier = 0x56737450; // The "magic" identifier in the SDK is 'VstP'. + +//============================================================================== +struct VstEffectInterface +{ + int32 interfaceIdentifier; + pointer_sized_int (VSTINTERFACECALL* dispatchFunction) (VstEffectInterface*, int32 op, int32 index, pointer_sized_int value, void* ptr, float opt); + void (VSTINTERFACECALL* processAudioFunction) (VstEffectInterface*, float** inputs, float** outputs, int32 numSamples); + void (VSTINTERFACECALL* setParameterValueFunction) (VstEffectInterface*, int32 parameterIndex, float value); + float (VSTINTERFACECALL* getParameterValueFunction) (VstEffectInterface*, int32 parameterIndex); + int32 numPrograms; + int32 numParameters; + int32 numInputChannels; + int32 numOutputChannels; + int32 flags; + pointer_sized_int hostSpace1; + pointer_sized_int hostSpace2; + int32 latency; + int32 deprecated1; + int32 deprecated2; + float deprecated3; + void* effectPointer; + void* userPointer; + int32 plugInIdentifier; + int32 plugInVersion; + void (VSTINTERFACECALL* processAudioInplaceFunction) (VstEffectInterface*, float** inputs, float** outputs, int32 numSamples); + void (VSTINTERFACECALL* processDoubleAudioInplaceFunction) (VstEffectInterface*, double** inputs, double** outputs, int32 numSamples); + char emptySpace[56]; +}; + +typedef pointer_sized_int (VSTINTERFACECALL* VstHostCallback) (VstEffectInterface*, int32 op, int32 index, pointer_sized_int value, void* ptr, float opt); + +enum VstEffectInterfaceFlags +{ + vstEffectFlagHasEditor = 1, + vstEffectFlagInplaceAudio = 16, + vstEffectFlagDataInChunks = 32, + vstEffectFlagIsSynth = 256, + vstEffectFlagInplaceDoubleAudio = 4096 +}; + +//============================================================================== +enum VstHostToPlugInOpcodes +{ + plugInOpcodeOpen, + plugInOpcodeClose, + plugInOpcodeSetCurrentProgram, + plugInOpcodeGetCurrentProgram, + plugInOpcodeSetCurrentProgramName, + plugInOpcodeGetCurrentProgramName, + plugInOpcodeGetParameterLabel, + plugInOpcodeGetParameterText, + plugInOpcodeGetParameterName, + plugInOpcodeSetSampleRate = plugInOpcodeGetParameterName + 2, + plugInOpcodeSetBlockSize, + plugInOpcodeResumeSuspend, + plugInOpcodeGetEditorBounds, + plugInOpcodeOpenEditor, + plugInOpcodeCloseEditor, + plugInOpcodeDrawEditor, + plugInOpcodeGetMouse, + plugInOpcodeEditorIdle = plugInOpcodeGetMouse + 2, + plugInOpcodeeffEditorTop, + plugInOpcodeSleepEditor, + plugInOpcodeIdentify, + plugInOpcodeGetData, + plugInOpcodeSetData, + plugInOpcodePreAudioProcessingEvents, + plugInOpcodeIsParameterAutomatable, + plugInOpcodeParameterValueForText, + plugInOpcodeGetProgramName = plugInOpcodeParameterValueForText + 2, + plugInOpcodeConnectInput = plugInOpcodeGetProgramName + 2, + plugInOpcodeConnectOutput, + plugInOpcodeGetInputPinProperties, + plugInOpcodeGetOutputPinProperties, + plugInOpcodeGetPlugInCategory, + plugInOpcodeSetSpeakerConfiguration = plugInOpcodeGetPlugInCategory + 7, + plugInOpcodeSetBypass = plugInOpcodeSetSpeakerConfiguration + 2, + plugInOpcodeGetPlugInName, + plugInOpcodeGetManufacturerName = plugInOpcodeGetPlugInName + 2, + plugInOpcodeGetManufacturerProductName, + plugInOpcodeGetManufacturerVersion, + plugInOpcodeManufacturerSpecific, + plugInOpcodeCanPlugInDo, + plugInOpcodeGetTailSize, + plugInOpcodeIdle, + plugInOpcodeKeyboardFocusRequired = plugInOpcodeIdle + 4, + plugInOpcodeGetVstInterfaceVersion, + plugInOpcodeGetCurrentMidiProgram = plugInOpcodeGetVstInterfaceVersion + 5, + plugInOpcodeGetSpeakerArrangement = plugInOpcodeGetCurrentMidiProgram + 6, + plugInOpcodeNextPlugInUniqueID, + plugInOpcodeStartProcess, + plugInOpcodeStopProcess, + plugInOpcodeSetNumberOfSamplesToProcess, + plugInOpcodeSetSampleFloatType = plugInOpcodeSetNumberOfSamplesToProcess + 4, + plugInOpcodeMaximum = plugInOpcodeSetSampleFloatType +}; + + +enum VstPlugInToHostOpcodes +{ + hostOpcodeParameterChanged, + hostOpcodeVstVersion, + hostOpcodeCurrentId, + hostOpcodeIdle, + hostOpcodePinConnected, + hostOpcodePlugInWantsMidi = hostOpcodePinConnected + 2, + hostOpcodeGetTimingInfo, + hostOpcodePreAudioProcessingEvents, + hostOpcodeSetTime, + hostOpcodeTempoAt, + hostOpcodeGetNumberOfAutomatableParameters, + hostOpcodeGetParameterInterval, + hostOpcodeIOModified, + hostOpcodeNeedsIdle, + hostOpcodeWindowSize, + hostOpcodeGetSampleRate, + hostOpcodeGetBlockSize, + hostOpcodeGetInputLatency, + hostOpcodeGetOutputLatency, + hostOpcodeGetPreviousPlugIn, + hostOpcodeGetNextPlugIn, + hostOpcodeWillReplace, + hostOpcodeGetCurrentAudioProcessingLevel, + hostOpcodeGetAutomationState, + hostOpcodeOfflineStart, + hostOpcodeOfflineReadSource, + hostOpcodeOfflineWrite, + hostOpcodeOfflineGetCurrentPass, + hostOpcodeOfflineGetCurrentMetaPass, + hostOpcodeSetOutputSampleRate, + hostOpcodeGetOutputSpeakerConfiguration, + hostOpcodeGetManufacturerName, + hostOpcodeGetProductName, + hostOpcodeGetManufacturerVersion, + hostOpcodeManufacturerSpecific, + hostOpcodeSetIcon, + hostOpcodeCanHostDo, + hostOpcodeGetLanguage, + hostOpcodeOpenEditorWindow, + hostOpcodeCloseEditorWindow, + hostOpcodeGetDirectory, + hostOpcodeUpdateView, + hostOpcodeParameterChangeGestureBegin, + hostOpcodeParameterChangeGestureEnd, +}; + +//============================================================================== +enum VstProcessingSampleType +{ + vstProcessingSampleTypeFloat, + vstProcessingSampleTypeDouble +}; + +//============================================================================== +// These names must be identical to the Steinberg SDK so JUCE users can set +// exactly what they want. +enum VstPlugInCategory +{ + kPlugCategUnknown, + kPlugCategEffect, + kPlugCategSynth, + kPlugCategAnalysis, + kPlugCategMastering, + kPlugCategSpacializer, + kPlugCategRoomFx, + kPlugSurroundFx, + kPlugCategRestoration, + kPlugCategOfflineProcess, + kPlugCategShell, + kPlugCategGenerator +}; + +//============================================================================== +struct VstEditorBounds +{ + int16 upper; + int16 leftmost; + int16 lower; + int16 rightmost; +}; + +//============================================================================== +enum VstMaxStringLengths +{ + vstMaxNameLength = 64, + vstMaxParameterOrPinLabelLength = 64, + vstMaxParameterOrPinShortLabelLength = 8, + vstMaxCategoryLength = 24, + vstMaxManufacturerStringLength = 64, + vstMaxPlugInNameStringLength = 64 +}; + +//============================================================================== +struct VstPinInfo +{ + char text[vstMaxParameterOrPinLabelLength]; + int32 flags; + int32 configurationType; + char shortText[vstMaxParameterOrPinShortLabelLength]; + char unused[48]; +}; + +enum VstPinInfoFlags +{ + vstPinInfoFlagIsActive = 1, + vstPinInfoFlagIsStereo = 2, + vstPinInfoFlagValid = 4 +}; + +//============================================================================== +struct VstEvent +{ + int32 type; + int32 size; + int32 sampleOffset; + int32 flags; + char content[16]; +}; + +enum VstEventTypes +{ + vstMidiEventType = 1, + vstSysExEventType = 6 +}; + +struct VstEventBlock +{ + int32 numberOfEvents; + pointer_sized_int future; + VstEvent* events[2]; +}; + +struct VstMidiEvent +{ + int32 type; + int32 size; + int32 sampleOffset; + int32 flags; + int32 noteSampleLength; + int32 noteSampleOffset; + char midiData[4]; + char tuning; + char noteVelocityOff; + char future1; + char future2; +}; + +enum VstMidiEventFlags +{ + vstMidiEventIsRealtime = 1 +}; + +struct VstSysExEvent +{ + int32 type; + int32 size; + int32 offsetSamples; + int32 flags; + int32 sysExDumpSize; + pointer_sized_int future1; + char* sysExDump; + pointer_sized_int future2; +}; + +//============================================================================== +struct VstTimingInformation +{ + double samplePosition; + double sampleRate; + double systemTimeNanoseconds; + double musicalPosition; + double tempoBPM; + double lastBarPosition; + double loopStartPosition; + double loopEndPosition; + int32 timeSignatureNumerator; + int32 timeSignatureDenominator; + int32 smpteOffset; + int32 smpteRate; + int32 samplesToNearestClock; + int32 flags; +}; + +enum VstTimingInformationFlags +{ + vstTimingInfoFlagTransportChanged = 1, + vstTimingInfoFlagCurrentlyPlaying = 2, + vstTimingInfoFlagLoopActive = 4, + vstTimingInfoFlagCurrentlyRecording = 8, + vstTimingInfoFlagAutomationWriteModeActive = 64, + vstTimingInfoFlagAutomationReadModeActive = 128, + vstTimingInfoFlagNanosecondsValid = 256, + vstTimingInfoFlagMusicalPositionValid = 512, + vstTimingInfoFlagTempoValid = 1024, + vstTimingInfoFlagLastBarPositionValid = 2056, + vstTimingInfoFlagLoopPositionValid = 4096, + vstTimingInfoFlagTimeSignatureValid = 8192, + vstTimingInfoFlagSmpteValid = 16384, + vstTimingInfoFlagNearestClockValid = 32768 +}; + +//============================================================================== +enum VstSmpteRates +{ + vstSmpteRateFps24, + vstSmpteRateFps25, + vstSmpteRateFps2997, + vstSmpteRateFps30, + vstSmpteRateFps2997drop, + vstSmpteRateFps30drop, + + vstSmpteRate16mmFilm, + vstSmpteRate35mmFilm, + + vstSmpteRateFps239 = vstSmpteRate35mmFilm + 3, + vstSmpteRateFps249 , + vstSmpteRateFps599, + vstSmpteRateFps60 +}; + +//============================================================================== +struct VstIndividualSpeakerInfo +{ + float azimuthalAngle; + float elevationAngle; + float radius; + float reserved; + char label[vstMaxNameLength]; + int32 type; + char unused[28]; +}; + +enum VstIndividualSpeakerType +{ + vstIndividualSpeakerTypeUndefined = 0x7fffffff, + vstIndividualSpeakerTypeMono = 0, + vstIndividualSpeakerTypeLeft, + vstIndividualSpeakerTypeRight, + vstIndividualSpeakerTypeCentre, + vstIndividualSpeakerTypeSubbass, + vstIndividualSpeakerTypeLeftSurround, + vstIndividualSpeakerTypeRightSurround, + vstIndividualSpeakerTypeLeftCentre, + vstIndividualSpeakerTypeRightCentre, + vstIndividualSpeakerTypeSurround, + vstIndividualSpeakerTypeCentreSurround = vstIndividualSpeakerTypeSurround, + vstIndividualSpeakerTypeLeftRearSurround, + vstIndividualSpeakerTypeRightRearSurround, + vstIndividualSpeakerTypeTopMiddle, + vstIndividualSpeakerTypeTopFrontLeft, + vstIndividualSpeakerTypeTopFrontCentre, + vstIndividualSpeakerTypeTopFrontRight, + vstIndividualSpeakerTypeTopRearLeft, + vstIndividualSpeakerTypeTopRearCentre, + vstIndividualSpeakerTypeTopRearRight, + vstIndividualSpeakerTypeSubbass2 +}; + +struct VstSpeakerConfiguration +{ + int32 type; + int32 numberOfChannels; + VstIndividualSpeakerInfo speakers[8]; +}; + +enum VstSpeakerConfigurationType +{ + vstSpeakerConfigTypeUser = -2, + vstSpeakerConfigTypeEmpty = -1, + vstSpeakerConfigTypeMono = 0, + vstSpeakerConfigTypeLR, + vstSpeakerConfigTypeLsRs, + vstSpeakerConfigTypeLcRc, + vstSpeakerConfigTypeSlSr, + vstSpeakerConfigTypeCLfe, + vstSpeakerConfigTypeLRC, + vstSpeakerConfigTypeLRS, + vstSpeakerConfigTypeLRCLfe, + vstSpeakerConfigTypeLRLfeS, + vstSpeakerConfigTypeLRCS, + vstSpeakerConfigTypeLRLsRs, + vstSpeakerConfigTypeLRCLfeS, + vstSpeakerConfigTypeLRLfeLsRs, + vstSpeakerConfigTypeLRCLsRs, + vstSpeakerConfigTypeLRCLfeLsRs, + vstSpeakerConfigTypeLRCLsRsCs, + vstSpeakerConfigTypeLRLsRsSlSr, + vstSpeakerConfigTypeLRCLfeLsRsCs, + vstSpeakerConfigTypeLRLfeLsRsSlSr, + vstSpeakerConfigTypeLRCLsRsLcRc, + vstSpeakerConfigTypeLRCLsRsSlSr, + vstSpeakerConfigTypeLRCLfeLsRsLcRc, + vstSpeakerConfigTypeLRCLfeLsRsSlSr, + vstSpeakerConfigTypeLRCLsRsLcRcCs, + vstSpeakerConfigTypeLRCLsRsCsSlSr, + vstSpeakerConfigTypeLRCLfeLsRsLcRcCs, + vstSpeakerConfigTypeLRCLfeLsRsCsSlSr, + vstSpeakerConfigTypeLRCLfeLsRsTflTfcTfrTrlTrrLfe2 +}; + +#if JUCE_MSVC + #pragma pack(pop) +#elif JUCE_MAC || JUCE_IOS + #pragma options align=reset +#else + #pragma pack(pop) +#endif + +#endif // JUCE_VSTINTERFACE_H_INCLUDED diff --git a/modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h b/modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h index 11cbe4f7..2d486a59 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h +++ b/modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h @@ -22,7 +22,8 @@ ============================================================================== */ -#ifdef __aeffect__ // NB: this must come first, *before* the header-guard. +// NB: this must come first, *before* the header-guard. +#ifdef JUCE_VSTINTERFACE_H_INCLUDED #ifndef JUCE_VSTMIDIEVENTLIST_H_INCLUDED #define JUCE_VSTMIDIEVENTLIST_H_INCLUDED @@ -53,7 +54,7 @@ public: numEventsUsed = 0; if (events != nullptr) - events->numEvents = 0; + events->numberOfEvents = 0; } void addEvent (const void* const midiData, const int numBytes, const int frameOffset) @@ -61,65 +62,65 @@ public: ensureSize (numEventsUsed + 1); VstMidiEvent* const e = (VstMidiEvent*) (events->events [numEventsUsed]); - events->numEvents = ++numEventsUsed; + events->numberOfEvents = ++numEventsUsed; if (numBytes <= 4) { - if (e->type == kVstSysExType) + if (e->type == vstSysExEventType) { - delete[] (((VstMidiSysexEvent*) e)->sysexDump); - e->type = kVstMidiType; - e->byteSize = sizeof (VstMidiEvent); - e->noteLength = 0; - e->noteOffset = 0; - e->detune = 0; - e->noteOffVelocity = 0; + delete[] (((VstSysExEvent*) e)->sysExDump); + e->type = vstMidiEventType; + e->size = sizeof (VstMidiEvent); + e->noteSampleLength = 0; + e->noteSampleOffset = 0; + e->tuning = 0; + e->noteVelocityOff = 0; } - e->deltaFrames = frameOffset; + e->sampleOffset = frameOffset; memcpy (e->midiData, midiData, (size_t) numBytes); } else { - VstMidiSysexEvent* const se = (VstMidiSysexEvent*) e; + VstSysExEvent* const se = (VstSysExEvent*) e; - if (se->type == kVstSysExType) - delete[] se->sysexDump; + if (se->type == vstSysExEventType) + delete[] se->sysExDump; - se->sysexDump = new char [numBytes]; - memcpy (se->sysexDump, midiData, (size_t) numBytes); + se->sysExDump = new char [(size_t) numBytes]; + memcpy (se->sysExDump, midiData, (size_t) numBytes); - se->type = kVstSysExType; - se->byteSize = sizeof (VstMidiSysexEvent); - se->deltaFrames = frameOffset; + se->type = vstSysExEventType; + se->size = sizeof (VstSysExEvent); + se->offsetSamples = frameOffset; se->flags = 0; - se->dumpBytes = numBytes; - se->resvd1 = 0; - se->resvd2 = 0; + se->sysExDumpSize = numBytes; + se->future1 = 0; + se->future2 = 0; } } //============================================================================== // Handy method to pull the events out of an event buffer supplied by the host // or plugin. - static void addEventsToMidiBuffer (const VstEvents* events, MidiBuffer& dest) + static void addEventsToMidiBuffer (const VstEventBlock* events, MidiBuffer& dest) { - for (int i = 0; i < events->numEvents; ++i) + for (int i = 0; i < events->numberOfEvents; ++i) { const VstEvent* const e = events->events[i]; if (e != nullptr) { - if (e->type == kVstMidiType) + if (e->type == vstMidiEventType) { dest.addEvent ((const juce::uint8*) ((const VstMidiEvent*) e)->midiData, - 4, e->deltaFrames); + 4, e->sampleOffset); } - else if (e->type == kVstSysExType) + else if (e->type == vstSysExEventType) { - dest.addEvent ((const juce::uint8*) ((const VstMidiSysexEvent*) e)->sysexDump, - (int) ((const VstMidiSysexEvent*) e)->dumpBytes, - e->deltaFrames); + dest.addEvent ((const juce::uint8*) ((const VstSysExEvent*) e)->sysExDump, + (int) ((const VstSysExEvent*) e)->sysExDumpSize, + e->sampleOffset); } } } @@ -160,24 +161,24 @@ public: } //============================================================================== - HeapBlock events; + HeapBlock events; private: int numEventsUsed, numEventsAllocated; static VstEvent* allocateVSTEvent() { - VstEvent* const e = (VstEvent*) std::calloc (1, sizeof (VstMidiEvent) > sizeof (VstMidiSysexEvent) ? sizeof (VstMidiEvent) - : sizeof (VstMidiSysexEvent)); - e->type = kVstMidiType; - e->byteSize = sizeof (VstMidiEvent); + VstEvent* const e = (VstEvent*) std::calloc (1, sizeof (VstMidiEvent) > sizeof (VstSysExEvent) ? sizeof (VstMidiEvent) + : sizeof (VstSysExEvent)); + e->type = vstMidiEventType; + e->size = sizeof (VstMidiEvent); return e; } static void freeVSTEvent (VstEvent* e) { - if (e->type == kVstSysExType) - delete[] (((VstMidiSysexEvent*) e)->sysexDump); + if (e->type == vstSysExEventType) + delete[] (((VstSysExEvent*) e)->sysExDump); std::free (e); } diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index 46adb5c0..0fe23042 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -31,7 +31,6 @@ //============================================================================== #undef PRAGMA_ALIGN_SUPPORTED -#define VST_FORCE_DEPRECATED 0 #if JUCE_MSVC #pragma warning (push) @@ -40,13 +39,10 @@ #define __cdecl #endif -/* Obviously you're going to need the Steinberg vstsdk2.4 folder in - your include path if you want to add VST support. - - If you're not interested in VSTs, you can disable them by setting the - JUCE_PLUGINHOST_VST flag to 0. -*/ -#include "pluginterfaces/vst2.x/aeffectx.h" +namespace +{ +#include "juce_VSTInterface.h" +} #if JUCE_MSVC #pragma warning (pop) @@ -83,67 +79,67 @@ namespace struct fxProgram { - VstInt32 chunkMagic; // 'CcnK' - VstInt32 byteSize; // of this chunk, excl. magic + byteSize - VstInt32 fxMagic; // 'FxCk' - VstInt32 version; - VstInt32 fxID; // fx unique id - VstInt32 fxVersion; - VstInt32 numParams; + int32 chunkMagic; // 'CcnK' + int32 byteSize; // of this chunk, excl. magic + byteSize + int32 fxMagic; // 'FxCk' + int32 version; + int32 fxID; // fx unique id + int32 fxVersion; + int32 numParams; char prgName[28]; float params[1]; // variable no. of parameters }; struct fxSet { - VstInt32 chunkMagic; // 'CcnK' - VstInt32 byteSize; // of this chunk, excl. magic + byteSize - VstInt32 fxMagic; // 'FxBk' - VstInt32 version; - VstInt32 fxID; // fx unique id - VstInt32 fxVersion; - VstInt32 numPrograms; + int32 chunkMagic; // 'CcnK' + int32 byteSize; // of this chunk, excl. magic + byteSize + int32 fxMagic; // 'FxBk' + int32 version; + int32 fxID; // fx unique id + int32 fxVersion; + int32 numPrograms; char future[128]; fxProgram programs[1]; // variable no. of programs }; struct fxChunkSet { - VstInt32 chunkMagic; // 'CcnK' - VstInt32 byteSize; // of this chunk, excl. magic + byteSize - VstInt32 fxMagic; // 'FxCh', 'FPCh', or 'FBCh' - VstInt32 version; - VstInt32 fxID; // fx unique id - VstInt32 fxVersion; - VstInt32 numPrograms; + int32 chunkMagic; // 'CcnK' + int32 byteSize; // of this chunk, excl. magic + byteSize + int32 fxMagic; // 'FxCh', 'FPCh', or 'FBCh' + int32 version; + int32 fxID; // fx unique id + int32 fxVersion; + int32 numPrograms; char future[128]; - VstInt32 chunkSize; + int32 chunkSize; char chunk[8]; // variable }; struct fxProgramSet { - VstInt32 chunkMagic; // 'CcnK' - VstInt32 byteSize; // of this chunk, excl. magic + byteSize - VstInt32 fxMagic; // 'FxCh', 'FPCh', or 'FBCh' - VstInt32 version; - VstInt32 fxID; // fx unique id - VstInt32 fxVersion; - VstInt32 numPrograms; + int32 chunkMagic; // 'CcnK' + int32 byteSize; // of this chunk, excl. magic + byteSize + int32 fxMagic; // 'FxCh', 'FPCh', or 'FBCh' + int32 version; + int32 fxID; // fx unique id + int32 fxVersion; + int32 numPrograms; char name[28]; - VstInt32 chunkSize; + int32 chunkSize; char chunk[8]; // variable }; // Compares a magic value in either endianness. - static bool compareMagic (VstInt32 magic, const char* name) noexcept + static bool compareMagic (int32 magic, const char* name) noexcept { - return magic == (VstInt32) ByteOrder::littleEndianInt (name) - || magic == (VstInt32) ByteOrder::bigEndianInt (name); + return magic == (int32) ByteOrder::littleEndianInt (name) + || magic == (int32) ByteOrder::bigEndianInt (name); } - static VstInt32 fxbName (const char* name) noexcept { return (VstInt32) ByteOrder::littleEndianInt (name); } - static VstInt32 fxbSwap (const VstInt32 x) noexcept { return (VstInt32) ByteOrder::swapIfLittleEndian ((uint32) x); } + static int32 fxbName (const char* name) noexcept { return (int32) ByteOrder::littleEndianInt (name); } + static int32 fxbSwap (const int32 x) noexcept { return (int32) ByteOrder::swapIfLittleEndian ((uint32) x); } static float fxbSwapFloat (const float x) noexcept { @@ -206,8 +202,8 @@ namespace } //============================================================================== -typedef AEffect* (VSTCALLBACK *MainCall) (audioMasterCallback); -static VstIntPtr VSTCALLBACK audioMaster (AEffect* effect, VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt); +typedef VstEffectInterface* (VSTINTERFACECALL *MainCall) (VstHostCallback); +static pointer_sized_int VSTINTERFACECALL audioMaster (VstEffectInterface* effect, int32 opcode, int32 index, pointer_sized_int value, void* ptr, float opt); //============================================================================== // Change this to disable logging of various VST activities @@ -437,9 +433,9 @@ public: module.close(); } - void closeEffect (AEffect* eff) + void closeEffect (VstEffectInterface* eff) { - eff->dispatcher (eff, effClose, 0, 0, 0, 0); + eff->dispatchFunction (eff, plugInOpcodeClose, 0, 0, 0, 0); } #if JUCE_WINDOWS @@ -564,9 +560,9 @@ public: } } - void closeEffect (AEffect* eff) + void closeEffect (VstEffectInterface* eff) { - eff->dispatcher (eff, effClose, 0, 0, 0, 0); + eff->dispatchFunction (eff, plugInOpcodeClose, 0, 0, 0, 0); } #endif @@ -615,12 +611,12 @@ public: JUCE_VST_WRAPPER_INVOKE_MAIN } - if (effect != nullptr && effect->magic == kEffectMagic) + if (effect != nullptr && effect->interfaceIdentifier == juceVstInterfaceIdentifier) { - jassert (effect->resvd2 == 0); - jassert (effect->object != 0); + jassert (effect->hostSpace2 == 0); + jassert (effect->effectPointer != 0); - _fpreset(); // some dodgy plugs fuck around with this + _fpreset(); // some dodgy plugs mess around with this } else { @@ -636,7 +632,7 @@ public: const ScopedLock sl (lock); stopTimer(); - if (effect != nullptr && effect->magic == kEffectMagic) + if (effect != nullptr && effect->interfaceIdentifier == juceVstInterfaceIdentifier) { #if JUCE_MAC if (module->resFileId != 0) @@ -660,10 +656,10 @@ public: desc.name = name; { - char buffer [512] = { 0 }; - dispatch (effGetEffectName, 0, 0, buffer, 0); + char buffer[512] = { 0 }; + dispatch (plugInOpcodeGetPlugInName, 0, 0, buffer, 0); - desc.descriptiveName = String::fromUTF8 (buffer).trim(); + desc.descriptiveName = String::createStringFromData (buffer, (int) sizeof (buffer)).trim(); if (desc.descriptiveName.isEmpty()) desc.descriptiveName = name; @@ -677,22 +673,22 @@ public: desc.category = getCategory(); { - char buffer [kVstMaxVendorStrLen + 8] = { 0 }; - dispatch (effGetVendorString, 0, 0, buffer, 0); - desc.manufacturerName = String::fromUTF8 (buffer); + char buffer[512] = { 0 }; + dispatch (plugInOpcodeGetManufacturerName, 0, 0, buffer, 0); + desc.manufacturerName = String::createStringFromData (buffer, (int) sizeof (buffer)).trim(); } desc.version = getVersion(); desc.numInputChannels = getTotalNumInputChannels(); desc.numOutputChannels = getTotalNumOutputChannels(); - desc.isInstrument = (effect != nullptr && (effect->flags & effFlagsIsSynth) != 0); + desc.isInstrument = (effect != nullptr && (effect->flags & vstEffectFlagIsSynth) != 0); } bool initialiseEffect (double initialSampleRate, int initialBlockSize) { if (effect != nullptr) { - effect->resvd2 = (VstIntPtr) (pointer_sized_int) this; + effect->hostSpace2 = (pointer_sized_int) (pointer_sized_int) this; initialise (initialSampleRate, initialBlockSize); return true; } @@ -716,29 +712,29 @@ public: JUCE_VST_LOG ("Initialising VST: " + module->pluginName + " (" + getVersion() + ")"); initialised = true; - setPlayConfigDetails (effect->numInputs, effect->numOutputs, + setPlayConfigDetails (effect->numInputChannels, effect->numOutputChannels, initialSampleRate, initialBlockSize); - dispatch (effIdentify, 0, 0, 0, 0); + dispatch (plugInOpcodeIdentify, 0, 0, 0, 0); if (getSampleRate() > 0) - dispatch (effSetSampleRate, 0, 0, 0, (float) getSampleRate()); + dispatch (plugInOpcodeSetSampleRate, 0, 0, 0, (float) getSampleRate()); if (getBlockSize() > 0) - dispatch (effSetBlockSize, 0, jmax (32, getBlockSize()), 0, 0); + dispatch (plugInOpcodeSetBlockSize, 0, jmax (32, getBlockSize()), 0, 0); - dispatch (effOpen, 0, 0, 0, 0); + dispatch (plugInOpcodeOpen, 0, 0, 0, 0); - setPlayConfigDetails (effect->numInputs, effect->numOutputs, + setPlayConfigDetails (effect->numInputChannels, effect->numOutputChannels, getSampleRate(), getBlockSize()); if (getNumPrograms() > 1) setCurrentProgram (0); else - dispatch (effSetProgram, 0, 0, 0, 0); + dispatch (plugInOpcodeSetCurrentProgram, 0, 0, 0, 0); - for (int i = effect->numInputs; --i >= 0;) dispatch (effConnectInput, i, 1, 0, 0); - for (int i = effect->numOutputs; --i >= 0;) dispatch (effConnectOutput, i, 1, 0, 0); + for (int i = effect->numInputChannels; --i >= 0;) dispatch (plugInOpcodeConnectInput, i, 1, 0, 0); + for (int i = effect->numOutputChannels; --i >= 0;) dispatch (plugInOpcodeConnectOutput, i, 1, 0, 0); if (getVstCategory() != kPlugCategShell) // (workaround for Waves 5 plugins which crash during this call) updateStoredProgramNames(); @@ -749,15 +745,32 @@ public: usesCocoaNSView = ((unsigned int) pluginCanDo ("hasCockosViewAsConfig") & 0xffff0000ul) == 0xbeef0000ul; #endif - setLatencySamples (effect->initialDelay); + setLatencySamples (effect->latency); } void* getPlatformSpecificData() override { return effect; } - const String getName() const override { return name; } + + const String getName() const override + { + if (effect != nullptr) + { + char buffer[512] = { 0 }; + + if (dispatch (plugInOpcodeGetManufacturerProductName, 0, 0, buffer, 0) != 0) + { + String productName = String::createStringFromData (buffer, (int) sizeof (buffer)); + + if (productName.isNotEmpty()) + return productName; + } + } + + return name; + } int getUID() const { - int uid = effect != nullptr ? effect->uniqueID : 0; + int uid = effect != nullptr ? effect->plugInIdentifier : 0; if (uid == 0) uid = module->file.hashCode(); @@ -775,7 +788,7 @@ public: if (sampleRate <= 0) return 0.0; - VstIntPtr samples = dispatch (effGetTailSize, 0, 0, 0, 0); + pointer_sized_int samples = dispatch (plugInOpcodeGetTailSize, 0, 0, 0, 0); return samples / sampleRate; } @@ -783,21 +796,23 @@ public: bool producesMidi() const override { return pluginCanDo ("sendVstMidiEvent") > 0; } bool supportsMPE() const override { return pluginCanDo ("MPE") > 0; } - VstPlugCategory getVstCategory() const noexcept { return (VstPlugCategory) dispatch (effGetPlugCategory, 0, 0, 0, 0); } + VstPlugInCategory getVstCategory() const noexcept { return (VstPlugInCategory) dispatch (plugInOpcodeGetPlugInCategory, 0, 0, 0, 0); } - int pluginCanDo (const char* text) const { return (int) dispatch (effCanDo, 0, 0, (void*) text, 0); } + int pluginCanDo (const char* text) const { return (int) dispatch (plugInOpcodeCanPlugInDo, 0, 0, (void*) text, 0); } //============================================================================== void prepareToPlay (double rate, int samplesPerBlockExpected) override { - setPlayConfigDetails (effect->numInputs, effect->numOutputs, rate, samplesPerBlockExpected); + setPlayConfigDetails (effect->numInputChannels, effect->numOutputChannels, rate, samplesPerBlockExpected); - vstHostTime.tempo = 120.0; - vstHostTime.timeSigNumerator = 4; - vstHostTime.timeSigDenominator = 4; + vstHostTime.tempoBPM = 120.0; + vstHostTime.timeSignatureNumerator = 4; + vstHostTime.timeSignatureDenominator = 4; vstHostTime.sampleRate = rate; - vstHostTime.samplePos = 0; - vstHostTime.flags = kVstNanosValid | kVstAutomationWriting | kVstAutomationReading; + vstHostTime.samplePosition = 0; + vstHostTime.flags = vstTimingInfoFlagNanosecondsValid + | vstTimingInfoFlagAutomationWriteModeActive + | vstTimingInfoFlagAutomationReadModeActive; initialise (rate, samplesPerBlockExpected); @@ -812,22 +827,22 @@ public: incomingMidi.clear(); - dispatch (effSetSampleRate, 0, 0, 0, (float) rate); - dispatch (effSetBlockSize, 0, jmax (16, samplesPerBlockExpected), 0, 0); + dispatch (plugInOpcodeSetSampleRate, 0, 0, 0, (float) rate); + dispatch (plugInOpcodeSetBlockSize, 0, jmax (16, samplesPerBlockExpected), 0, 0); if (supportsDoublePrecisionProcessing()) { - VstInt32 vstPrecision = isUsingDoublePrecision() ? kVstProcessPrecision64 - : kVstProcessPrecision32; + int32 vstPrecision = isUsingDoublePrecision() ? vstProcessingSampleTypeDouble + : vstProcessingSampleTypeFloat; // if you get an assertion here then your plug-in claims it supports double precision // but returns an error when we try to change the precision - VstIntPtr err = dispatch (effSetProcessPrecision, 0, (VstIntPtr) vstPrecision, 0, 0); + pointer_sized_int err = dispatch (plugInOpcodeSetSampleFloatType, 0, (pointer_sized_int) vstPrecision, 0, 0); jassert (err > 0); ignoreUnused (err); } - tempBuffer.setSize (jmax (1, effect->numOutputs), samplesPerBlockExpected); + tempBuffer.setSize (jmax (1, effect->numInputChannels), samplesPerBlockExpected); if (! isPowerOn) setPower (true); @@ -840,9 +855,9 @@ public: setParameter (0, old); } - dispatch (effStartProcess, 0, 0, 0, 0); + dispatch (plugInOpcodeStartProcess, 0, 0, 0, 0); - setLatencySamples (effect->initialDelay); + setLatencySamples (effect->latency); } } @@ -850,7 +865,7 @@ public: { if (initialised) { - dispatch (effStopProcess, 0, 0, 0, 0); + dispatch (plugInOpcodeStopProcess, 0, 0, 0, 0); setPower (false); } @@ -883,15 +898,15 @@ public: bool supportsDoublePrecisionProcessing() const override { - return ((effect->flags & effFlagsCanReplacing) != 0 - && (effect->flags & effFlagsCanDoubleReplacing) != 0); + return ((effect->flags & vstEffectFlagInplaceAudio) != 0 + && (effect->flags & vstEffectFlagInplaceDoubleAudio) != 0); } //============================================================================== #if JUCE_IOS bool hasEditor() const override { return false; } #else - bool hasEditor() const override { return effect != nullptr && (effect->flags & effFlagsHasEditor) != 0; } + bool hasEditor() const override { return effect != nullptr && (effect->flags & vstEffectFlagHasEditor) != 0; } #endif AudioProcessorEditor* createEditor() override; @@ -901,9 +916,9 @@ public: { if (isValidChannel (index, true)) { - VstPinProperties pinProps; - if (dispatch (effGetInputProperties, index, 0, &pinProps, 0.0f) != 0) - return String (pinProps.label, sizeof (pinProps.label)); + VstPinInfo pinProps; + if (dispatch (plugInOpcodeGetInputPinProperties, index, 0, &pinProps, 0.0f) != 0) + return String (pinProps.text, sizeof (pinProps.text)); } return String(); @@ -914,9 +929,9 @@ public: if (! isValidChannel (index, true)) return false; - VstPinProperties pinProps; - if (dispatch (effGetInputProperties, index, 0, &pinProps, 0.0f) != 0) - return (pinProps.flags & kVstPinIsStereo) != 0; + VstPinInfo pinProps; + if (dispatch (plugInOpcodeGetInputPinProperties, index, 0, &pinProps, 0.0f) != 0) + return (pinProps.flags & vstPinInfoFlagIsStereo) != 0; return true; } @@ -925,9 +940,9 @@ public: { if (isValidChannel (index, false)) { - VstPinProperties pinProps; - if (dispatch (effGetOutputProperties, index, 0, &pinProps, 0.0f) != 0) - return String (pinProps.label, sizeof (pinProps.label)); + VstPinInfo pinProps; + if (dispatch (plugInOpcodeGetOutputPinProperties, index, 0, &pinProps, 0.0f) != 0) + return String (pinProps.text, sizeof (pinProps.text)); } return String(); @@ -938,9 +953,9 @@ public: if (! isValidChannel (index, false)) return false; - VstPinProperties pinProps; - if (dispatch (effGetOutputProperties, index, 0, &pinProps, 0.0f) != 0) - return (pinProps.flags & kVstPinIsStereo) != 0; + VstPinInfo pinProps; + if (dispatch (plugInOpcodeGetOutputPinProperties, index, 0, &pinProps, 0.0f) != 0) + return (pinProps.flags & vstPinInfoFlagIsStereo) != 0; return true; } @@ -952,14 +967,14 @@ public: } //============================================================================== - int getNumParameters() override { return effect != nullptr ? effect->numParams : 0; } + int getNumParameters() override { return effect != nullptr ? effect->numParameters : 0; } float getParameter (int index) override { - if (effect != nullptr && isPositiveAndBelow (index, (int) effect->numParams)) + if (effect != nullptr && isPositiveAndBelow (index, (int) effect->numParameters)) { const ScopedLock sl (lock); - return effect->getParameter (effect, index); + return effect->getParameterValueFunction (effect, index); } return 0.0f; @@ -967,25 +982,25 @@ public: void setParameter (int index, float newValue) override { - if (effect != nullptr && isPositiveAndBelow (index, (int) effect->numParams)) + if (effect != nullptr && isPositiveAndBelow (index, (int) effect->numParameters)) { const ScopedLock sl (lock); - if (effect->getParameter (effect, index) != newValue) - effect->setParameter (effect, index, newValue); + if (effect->getParameterValueFunction (effect, index) != newValue) + effect->setParameterValueFunction (effect, index, newValue); } } - const String getParameterName (int index) override { return getTextForOpcode (index, effGetParamName); } - const String getParameterText (int index) override { return getTextForOpcode (index, effGetParamDisplay); } - String getParameterLabel (int index) const override { return getTextForOpcode (index, effGetParamLabel); } + const String getParameterName (int index) override { return getTextForOpcode (index, plugInOpcodeGetParameterName); } + const String getParameterText (int index) override { return getTextForOpcode (index, plugInOpcodeGetParameterText); } + String getParameterLabel (int index) const override { return getTextForOpcode (index, plugInOpcodeGetParameterLabel); } bool isParameterAutomatable (int index) const override { if (effect != nullptr) { - jassert (index >= 0 && index < effect->numParams); - return dispatch (effCanBeAutomated, index, 0, 0, 0) != 0; + jassert (index >= 0 && index < effect->numParameters); + return dispatch (plugInOpcodeIsParameterAutomatable, index, 0, 0, 0) != 0; } return false; @@ -995,12 +1010,12 @@ public: int getNumPrograms() override { return effect != nullptr ? jmax (0, effect->numPrograms) : 0; } // NB: some plugs return negative numbers from this function. - int getCurrentProgram() override { return (int) dispatch (effGetProgram, 0, 0, 0, 0); } + int getCurrentProgram() override { return (int) dispatch (plugInOpcodeGetCurrentProgram, 0, 0, 0, 0); } void setCurrentProgram (int newIndex) override { if (getNumPrograms() > 0 && newIndex != getCurrentProgram()) - dispatch (effSetProgram, 0, jlimit (0, getNumPrograms() - 1, newIndex), 0, 0); + dispatch (plugInOpcodeSetCurrentProgram, 0, jlimit (0, getNumPrograms() - 1, newIndex), 0, 0); } const String getProgramName (int index) override @@ -1014,7 +1029,7 @@ public: { char nm[264] = { 0 }; - if (dispatch (effGetProgramNameIndexed, jlimit (0, getNumPrograms(), index), -1, nm, 0) != 0) + if (dispatch (plugInOpcodeGetProgramName, jlimit (0, getNumPrograms(), index), -1, nm, 0) != 0) return String::fromUTF8 (nm).trim(); } } @@ -1027,7 +1042,7 @@ public: if (index >= 0 && index == getCurrentProgram()) { if (getNumPrograms() > 0 && newName != getCurrentProgramName()) - dispatch (effSetProgramName, 0, 0, (void*) newName.substring (0, 24).toRawUTF8(), 0.0f); + dispatch (plugInOpcodeSetCurrentProgramName, 0, 0, (void*) newName.substring (0, 24).toRawUTF8(), 0.0f); } else { @@ -1045,7 +1060,7 @@ public: //============================================================================== void timerCallback() override { - if (dispatch (effIdle, 0, 0, 0, 0) == 0) + if (dispatch (plugInOpcodeIdle, 0, 0, 0, 0) == 0) stopTimer(); } @@ -1055,30 +1070,30 @@ public: updateHostDisplay(); } - VstIntPtr handleCallback (VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt) + pointer_sized_int handleCallback (int32 opcode, int32 index, pointer_sized_int value, void* ptr, float opt) { switch (opcode) { - case audioMasterAutomate: sendParamChangeMessageToListeners (index, opt); break; - case audioMasterProcessEvents: handleMidiFromPlugin ((const VstEvents*) ptr); break; + case hostOpcodeParameterChanged: sendParamChangeMessageToListeners (index, opt); break; + case hostOpcodePreAudioProcessingEvents: handleMidiFromPlugin ((const VstEventBlock*) ptr); break; #if JUCE_MSVC #pragma warning (push) #pragma warning (disable: 4311) #endif - case audioMasterGetTime: return (VstIntPtr) &vstHostTime; + case hostOpcodeGetTimingInfo: return (pointer_sized_int) &vstHostTime; #if JUCE_MSVC #pragma warning (pop) #endif - case audioMasterIdle: + case hostOpcodeIdle: if (insideVSTCallback == 0 && MessageManager::getInstance()->isThisTheMessageThread()) { const IdleCallRecursionPreventer icrp; #if JUCE_MAC if (getActiveEditor() != nullptr) - dispatch (effEditIdle, 0, 0, 0, 0); + dispatch (plugInOpcodeEditorIdle, 0, 0, 0, 0); #endif Timer::callPendingTimersSynchronously(); @@ -1091,7 +1106,7 @@ public: } break; - case audioMasterSizeWindow: + case hostOpcodeWindowSize: if (AudioProcessorEditor* ed = getActiveEditor()) { #if JUCE_LINUX @@ -1102,53 +1117,54 @@ public: return 1; - case audioMasterUpdateDisplay: triggerAsyncUpdate(); break; - case audioMasterIOChanged: setLatencySamples (effect->initialDelay); break; - case audioMasterNeedIdle: startTimer (50); break; + case hostOpcodeUpdateView: triggerAsyncUpdate(); break; + case hostOpcodeIOModified: setLatencySamples (effect->latency); break; + case hostOpcodeNeedsIdle: startTimer (50); break; - case audioMasterGetSampleRate: return (VstIntPtr) (getSampleRate() > 0 ? getSampleRate() : defaultVSTSampleRateValue); - case audioMasterGetBlockSize: return (VstIntPtr) (getBlockSize() > 0 ? getBlockSize() : defaultVSTBlockSizeValue); - case audioMasterWantMidi: wantsMidiMessages = true; break; - case audioMasterGetDirectory: return getVstDirectory(); + case hostOpcodeGetSampleRate: return (pointer_sized_int) (getSampleRate() > 0 ? getSampleRate() : defaultVSTSampleRateValue); + case hostOpcodeGetBlockSize: return (pointer_sized_int) (getBlockSize() > 0 ? getBlockSize() : defaultVSTBlockSizeValue); + case hostOpcodePlugInWantsMidi: wantsMidiMessages = true; break; + case hostOpcodeGetDirectory: return getVstDirectory(); - case audioMasterTempoAt: + case hostOpcodeTempoAt: if (extraFunctions != nullptr) - return (VstIntPtr) extraFunctions->getTempoAt ((int64) value); + return (pointer_sized_int) extraFunctions->getTempoAt ((int64) value); break; - case audioMasterGetAutomationState: + case hostOpcodeGetAutomationState: if (extraFunctions != nullptr) - return (VstIntPtr) extraFunctions->getAutomationState(); + return (pointer_sized_int) extraFunctions->getAutomationState(); break; - case audioMasterPinConnected: + case hostOpcodePinConnected: return isValidChannel (index, value == 0) ? 0 : 1; // (yes, 0 = true) - case audioMasterGetCurrentProcessLevel: + case hostOpcodeGetCurrentAudioProcessingLevel: return isNonRealtime() ? 4 : 0; - // none of these are handled (yet).. - case audioMasterBeginEdit: - case audioMasterEndEdit: - case audioMasterSetTime: - case audioMasterGetParameterQuantization: - case audioMasterGetInputLatency: - case audioMasterGetOutputLatency: - case audioMasterGetPreviousPlug: - case audioMasterGetNextPlug: - case audioMasterWillReplaceOrAccumulate: - case audioMasterOfflineStart: - case audioMasterOfflineRead: - case audioMasterOfflineWrite: - case audioMasterOfflineGetCurrentPass: - case audioMasterOfflineGetCurrentMetaPass: - case audioMasterVendorSpecific: - case audioMasterSetIcon: - case audioMasterGetLanguage: - case audioMasterOpenWindow: - case audioMasterCloseWindow: + // none of these are handled (yet)... + case hostOpcodeSetTime: + case hostOpcodeGetParameterInterval: + case hostOpcodeGetInputLatency: + case hostOpcodeGetOutputLatency: + case hostOpcodeGetPreviousPlugIn: + case hostOpcodeGetNextPlugIn: + case hostOpcodeWillReplace: + case hostOpcodeOfflineStart: + case hostOpcodeOfflineReadSource: + case hostOpcodeOfflineWrite: + case hostOpcodeOfflineGetCurrentPass: + case hostOpcodeOfflineGetCurrentMetaPass: + case hostOpcodeGetOutputSpeakerConfiguration: + case hostOpcodeManufacturerSpecific: + case hostOpcodeSetIcon: + case hostOpcodeGetLanguage: + case hostOpcodeOpenEditorWindow: + case hostOpcodeCloseEditorWindow: + case hostOpcodeParameterChangeGestureBegin: + case hostOpcodeParameterChangeGestureEnd: break; default: @@ -1159,11 +1175,11 @@ public: } // handles non plugin-specific callbacks.. - static VstIntPtr handleGeneralCallback (VstInt32 opcode, VstInt32 /*index*/, VstIntPtr /*value*/, void *ptr, float /*opt*/) + static pointer_sized_int handleGeneralCallback (int32 opcode, int32 /*index*/, pointer_sized_int /*value*/, void *ptr, float /*opt*/) { switch (opcode) { - case audioMasterCanDo: + case hostOpcodeCanHostDo: { static const char* canDos[] = { "supplyIdle", "sendVstEvents", @@ -1182,27 +1198,27 @@ public: return 0; } - case audioMasterVersion: return 2400; - case audioMasterCurrentId: return shellUIDToCreate; - case audioMasterGetNumAutomatableParameters: return 0; - case audioMasterGetAutomationState: return 1; - case audioMasterGetVendorVersion: return 0x0101; + case hostOpcodeVstVersion: return 2400; + case hostOpcodeCurrentId: return shellUIDToCreate; + case hostOpcodeGetNumberOfAutomatableParameters: return 0; + case hostOpcodeGetAutomationState: return 1; + case hostOpcodeGetManufacturerVersion: return 0x0101; - case audioMasterGetVendorString: - case audioMasterGetProductString: + case hostOpcodeGetManufacturerName: + case hostOpcodeGetProductName: { String hostName ("Juce VST Host"); if (JUCEApplicationBase* app = JUCEApplicationBase::getInstance()) hostName = app->getApplicationName(); - hostName.copyToUTF8 ((char*) ptr, (size_t) jmin (kVstMaxVendorStrLen, kVstMaxProductStrLen) - 1); + hostName.copyToUTF8 ((char*) ptr, (size_t) jmin (vstMaxManufacturerStringLength, vstMaxPlugInNameStringLength) - 1); break; } - case audioMasterGetSampleRate: return (VstIntPtr) defaultVSTSampleRateValue; - case audioMasterGetBlockSize: return (VstIntPtr) defaultVSTBlockSizeValue; - case audioMasterSetOutputSampleRate: return 0; + case hostOpcodeGetSampleRate: return (pointer_sized_int) defaultVSTSampleRateValue; + case hostOpcodeGetBlockSize: return (pointer_sized_int) defaultVSTBlockSizeValue; + case hostOpcodeSetOutputSampleRate: return 0; default: DBG ("*** Unhandled VST Callback: " + String ((int) opcode)); @@ -1213,9 +1229,9 @@ public: } //============================================================================== - VstIntPtr dispatch (const int opcode, const int index, const VstIntPtr value, void* const ptr, float opt) const + pointer_sized_int dispatch (const int opcode, const int index, const pointer_sized_int value, void* const ptr, float opt) const { - VstIntPtr result = 0; + pointer_sized_int result = 0; if (effect != nullptr) { @@ -1231,7 +1247,7 @@ public: UseResFile (module->resFileId); #endif - result = effect->dispatcher (effect, opcode, index, value, ptr, opt); + result = effect->dispatchFunction (effect, opcode, index, value, ptr, opt); #if JUCE_MAC const ResFileRefNum newResFile = CurResFile(); @@ -1361,7 +1377,7 @@ public: set->fxID = fxbSwap (getUID()); set->fxVersion = fxbSwap (getVersionNumber()); set->numPrograms = fxbSwap (numPrograms); - set->chunkSize = fxbSwap ((VstInt32) chunk.getSize()); + set->chunkSize = fxbSwap ((int32) chunk.getSize()); chunk.copyTo (set->chunk, 0, chunk.getSize()); } @@ -1378,7 +1394,7 @@ public: set->fxID = fxbSwap (getUID()); set->fxVersion = fxbSwap (getVersionNumber()); set->numPrograms = fxbSwap (numPrograms); - set->chunkSize = fxbSwap ((VstInt32) chunk.getSize()); + set->chunkSize = fxbSwap ((int32) chunk.getSize()); getCurrentProgramName().copyToUTF8 (set->name, sizeof (set->name) - 1); chunk.copyTo (set->chunk, 0, chunk.getSize()); @@ -1433,14 +1449,14 @@ public: return true; } - bool usesChunks() const noexcept { return effect != nullptr && (effect->flags & effFlagsProgramChunks) != 0; } + bool usesChunks() const noexcept { return effect != nullptr && (effect->flags & vstEffectFlagDataInChunks) != 0; } bool getChunkData (MemoryBlock& mb, bool isPreset, int maxSizeMB) const { if (usesChunks()) { void* data = nullptr; - const size_t bytes = (size_t) dispatch (effGetChunk, isPreset ? 1 : 0, 0, &data, 0.0f); + const size_t bytes = (size_t) dispatch (plugInOpcodeGetData, isPreset ? 1 : 0, 0, &data, 0.0f); if (data != nullptr && bytes <= (size_t) maxSizeMB * 1024 * 1024) { @@ -1458,7 +1474,7 @@ public: { if (size > 0 && usesChunks()) { - dispatch (effSetChunk, isPreset ? 1 : 0, size, (void*) data, 0.0f); + dispatch (plugInOpcodeSetData, isPreset ? 1 : 0, size, (void*) data, 0.0f); if (! isPreset) updateStoredProgramNames(); @@ -1469,7 +1485,7 @@ public: return false; } - AEffect* effect; + VstEffectInterface* effect; ModuleHandle::Ptr module; ScopedPointer extraFunctions; @@ -1484,7 +1500,7 @@ private: CriticalSection midiInLock; MidiBuffer incomingMidi; VSTMidiEventList midiEventsToSend; - VstTimeInfo vstHostTime; + VstTimingInformation vstHostTime; //============================================================================== template @@ -1501,22 +1517,26 @@ private: if (currentPlayHead->getCurrentPosition (position)) { - vstHostTime.samplePos = (double) position.timeInSamples; - vstHostTime.tempo = position.bpm; - vstHostTime.timeSigNumerator = position.timeSigNumerator; - vstHostTime.timeSigDenominator = position.timeSigDenominator; - vstHostTime.ppqPos = position.ppqPosition; - vstHostTime.barStartPos = position.ppqPositionOfLastBarStart; - vstHostTime.flags |= kVstTempoValid | kVstTimeSigValid | kVstPpqPosValid | kVstBarsValid; - - VstInt32 newTransportFlags = 0; - if (position.isPlaying) newTransportFlags |= kVstTransportPlaying; - if (position.isRecording) newTransportFlags |= kVstTransportRecording; - - if (newTransportFlags != (vstHostTime.flags & (kVstTransportPlaying | kVstTransportRecording))) - vstHostTime.flags = (vstHostTime.flags & ~(kVstTransportPlaying | kVstTransportRecording)) | newTransportFlags | kVstTransportChanged; + vstHostTime.samplePosition = (double) position.timeInSamples; + vstHostTime.tempoBPM = position.bpm; + vstHostTime.timeSignatureNumerator = position.timeSigNumerator; + vstHostTime.timeSignatureDenominator = position.timeSigDenominator; + vstHostTime.musicalPosition = position.ppqPosition; + vstHostTime.lastBarPosition = position.ppqPositionOfLastBarStart; + vstHostTime.flags |= vstTimingInfoFlagTempoValid + | vstTimingInfoFlagTimeSignatureValid + | vstTimingInfoFlagMusicalPositionValid + | vstTimingInfoFlagLastBarPositionValid; + + int32 newTransportFlags = 0; + if (position.isPlaying) newTransportFlags |= vstTimingInfoFlagCurrentlyPlaying; + if (position.isRecording) newTransportFlags |= vstTimingInfoFlagCurrentlyRecording; + + if (newTransportFlags != (vstHostTime.flags & (vstTimingInfoFlagCurrentlyPlaying + | vstTimingInfoFlagCurrentlyRecording))) + vstHostTime.flags = (vstHostTime.flags & ~(vstTimingInfoFlagCurrentlyPlaying | vstTimingInfoFlagCurrentlyRecording)) | newTransportFlags | vstTimingInfoFlagTransportChanged; else - vstHostTime.flags &= ~kVstTransportChanged; + vstHostTime.flags &= ~vstTimingInfoFlagTransportChanged; switch (position.frameRate) { @@ -1531,18 +1551,18 @@ private: if (position.isLooping) { - vstHostTime.cycleStartPos = position.ppqLoopStart; - vstHostTime.cycleEndPos = position.ppqLoopEnd; - vstHostTime.flags |= (kVstCyclePosValid | kVstTransportCycleActive); + vstHostTime.loopStartPosition = position.ppqLoopStart; + vstHostTime.loopEndPosition = position.ppqLoopEnd; + vstHostTime.flags |= (vstTimingInfoFlagLoopPositionValid | vstTimingInfoFlagLoopActive); } else { - vstHostTime.flags &= ~(kVstCyclePosValid | kVstTransportCycleActive); + vstHostTime.flags &= ~(vstTimingInfoFlagLoopPositionValid | vstTimingInfoFlagLoopActive); } } } - vstHostTime.nanoSeconds = getVSTHostTimeNanoseconds(); + vstHostTime.systemTimeNanoseconds = getVSTHostTimeNanoseconds(); if (wantsMidiMessages) { @@ -1559,7 +1579,7 @@ private: jlimit (0, numSamples - 1, samplePosition)); } - effect->dispatcher (effect, effProcessEvents, 0, 0, midiEventsToSend.events, 0); + effect->dispatchFunction (effect, plugInOpcodePreAudioProcessingEvents, 0, 0, midiEventsToSend.events, 0); } _clearfp(); @@ -1583,35 +1603,35 @@ private: } //============================================================================== - inline void invokeProcessFunction (AudioBuffer& buffer, VstInt32 sampleFrames) + inline void invokeProcessFunction (AudioBuffer& buffer, int32 sampleFrames) { - if ((effect->flags & effFlagsCanReplacing) != 0) + if ((effect->flags & vstEffectFlagInplaceAudio) != 0) { - effect->processReplacing (effect, buffer.getArrayOfWritePointers(), buffer.getArrayOfWritePointers(), sampleFrames); + effect->processAudioInplaceFunction (effect, buffer.getArrayOfWritePointers(), buffer.getArrayOfWritePointers(), sampleFrames); } else { - tempBuffer.setSize (effect->numOutputs, sampleFrames); + tempBuffer.setSize (effect->numOutputChannels, sampleFrames); tempBuffer.clear(); - effect->process (effect, buffer.getArrayOfWritePointers(), tempBuffer.getArrayOfWritePointers(), sampleFrames); + effect->processAudioFunction (effect, buffer.getArrayOfWritePointers(), tempBuffer.getArrayOfWritePointers(), sampleFrames); - for (int i = effect->numOutputs; --i >= 0;) + for (int i = effect->numOutputChannels; --i >= 0;) buffer.copyFrom (i, 0, tempBuffer.getReadPointer (i), sampleFrames); } } - inline void invokeProcessFunction (AudioBuffer& buffer, VstInt32 sampleFrames) + inline void invokeProcessFunction (AudioBuffer& buffer, int32 sampleFrames) { - effect->processDoubleReplacing (effect, buffer.getArrayOfWritePointers(), buffer.getArrayOfWritePointers(), sampleFrames); + effect->processDoubleAudioInplaceFunction (effect, buffer.getArrayOfWritePointers(), buffer.getArrayOfWritePointers(), sampleFrames); } //============================================================================== void setHostTimeFrameRate (long frameRateIndex, double frameRate, double currentTime) noexcept { - vstHostTime.flags |= kVstSmpteValid; - vstHostTime.smpteFrameRate = (VstInt32) frameRateIndex; - vstHostTime.smpteOffset = (VstInt32) (currentTime * 80.0 * frameRate + 0.5); + vstHostTime.flags |= vstTimingInfoFlagSmpteValid; + vstHostTime.smpteRate = (int32) frameRateIndex; + vstHostTime.smpteOffset = (int32) (currentTime * 80.0 * frameRate + 0.5); } bool restoreProgramSettings (const fxProgram* const prog) @@ -1630,13 +1650,13 @@ private: return false; } - String getTextForOpcode (const int index, const AEffectOpcodes opcode) const + String getTextForOpcode (const int index, const VstHostToPlugInOpcodes opcode) const { if (effect == nullptr) return String(); - jassert (index >= 0 && index < effect->numParams); - char nm [256] = { 0 }; + jassert (index >= 0 && index < effect->numParameters); + char nm[256] = { 0 }; dispatch (opcode, index, 0, nm, 0); return String::createStringFromData (nm, (int) sizeof (nm)).trim(); } @@ -1649,7 +1669,7 @@ private: { { char nm[256] = { 0 }; - dispatch (effGetProgramName, 0, 0, nm, 0); + dispatch (plugInOpcodeGetCurrentProgramName, 0, 0, nm, 0); progName = String::createStringFromData (nm, (int) sizeof (nm)).trim(); } @@ -1692,7 +1712,7 @@ private: char nm[256] = { 0 }; // only do this if the plugin can't use indexed names.. - if (dispatch (effGetProgramNameIndexed, 0, -1, nm, 0) == 0) + if (dispatch (plugInOpcodeGetProgramName, 0, -1, nm, 0) == 0) { const int oldProgram = getCurrentProgram(); MemoryBlock oldSettings; @@ -1710,7 +1730,7 @@ private: } } - void handleMidiFromPlugin (const VstEvents* const events) + void handleMidiFromPlugin (const VstEventBlock* const events) { if (events != nullptr) { @@ -1741,21 +1761,21 @@ private: setParameter (i, p[i]); } - VstIntPtr getVstDirectory() const + pointer_sized_int getVstDirectory() const { #if JUCE_MAC - return (VstIntPtr) (void*) &module->parentDirFSSpec; + return (pointer_sized_int) (void*) &module->parentDirFSSpec; #else - return (VstIntPtr) (pointer_sized_uint) module->fullParentDirectoryPathName.toRawUTF8(); + return (pointer_sized_int) (pointer_sized_uint) module->fullParentDirectoryPathName.toRawUTF8(); #endif } //============================================================================== - int getVersionNumber() const noexcept { return effect != nullptr ? effect->version : 0; } + int getVersionNumber() const noexcept { return effect != nullptr ? effect->plugInVersion : 0; } String getVersion() const { - unsigned int v = (unsigned int) dispatch (effGetVendorVersion, 0, 0, 0, 0); + unsigned int v = (unsigned int) dispatch (plugInOpcodeGetManufacturerVersion, 0, 0, 0, 0); String s; @@ -1816,7 +1836,7 @@ private: void setPower (const bool on) { - dispatch (effMainsChanged, 0, on ? 1 : 0, 0, 0); + dispatch (plugInOpcodeResumeSuspend, 0, on ? 1 : 0, 0, 0); isPowerOn = on; } @@ -1857,6 +1877,8 @@ public: pluginProc = None; #elif JUCE_MAC + ignoreUnused (recursiveResize, pluginRefusesToResize, alreadyInside); + #if JUCE_SUPPORT_CARBON if (! plug.usesCocoaNSView) addAndMakeVisible (carbonWrapper = new CarbonWrapperComponent (*this)); @@ -2022,7 +2044,7 @@ public: if (! reentrantGuard) { reentrantGuard = true; - plugin.dispatch (effEditIdle, 0, 0, 0, 0); + plugin.dispatch (plugInOpcodeEditorIdle, 0, 0, 0, 0); reentrantGuard = false; } @@ -2066,7 +2088,7 @@ public: activeVSTWindows.add (this); #if JUCE_MAC - dispatch (effEditTop, 0, 0, 0, 0); + dispatch (plugInOpcodeeffEditorTop, 0, 0, 0, 0); #endif } @@ -2109,24 +2131,24 @@ private: isOpen = true; - ERect* rect = nullptr; - dispatch (effEditGetRect, 0, 0, &rect, 0); - dispatch (effEditOpen, 0, 0, parentWindow, 0); + VstEditorBounds* rect = nullptr; + dispatch (plugInOpcodeGetEditorBounds, 0, 0, &rect, 0); + dispatch (plugInOpcodeOpenEditor, 0, 0, parentWindow, 0); // do this before and after like in the steinberg example - dispatch (effEditGetRect, 0, 0, &rect, 0); - dispatch (effGetProgram, 0, 0, 0, 0); // also in steinberg code + dispatch (plugInOpcodeGetEditorBounds, 0, 0, &rect, 0); + dispatch (plugInOpcodeGetCurrentProgram, 0, 0, 0, 0); // also in steinberg code // Install keyboard hooks - pluginWantsKeys = (dispatch (effKeysRequired, 0, 0, 0, 0) == 0); + pluginWantsKeys = (dispatch (plugInOpcodeKeyboardFocusRequired, 0, 0, 0, 0) == 0); // double-check it's not too tiny int w = 250, h = 150; if (rect != nullptr) { - w = rect->right - rect->left; - h = rect->bottom - rect->top; + w = rect->rightmost - rect->leftmost; + h = rect->lower - rect->upper; if (w == 0 || h == 0) { @@ -2153,16 +2175,16 @@ private: JUCE_VST_LOG ("Opening VST UI: " + plugin.getName()); isOpen = true; - ERect* rect = nullptr; - dispatch (effEditGetRect, 0, 0, &rect, 0); - dispatch (effEditOpen, 0, 0, getWindowHandle(), 0); + VstEditorBounds* rect = nullptr; + dispatch (plugInOpcodeGetEditorBounds, 0, 0, &rect, 0); + dispatch (plugInOpcodeOpenEditor, 0, 0, getWindowHandle(), 0); // do this before and after like in the steinberg example - dispatch (effEditGetRect, 0, 0, &rect, 0); - dispatch (effGetProgram, 0, 0, 0, 0); // also in steinberg code + dispatch (plugInOpcodeGetEditorBounds, 0, 0, &rect, 0); + dispatch (plugInOpcodeGetCurrentProgram, 0, 0, 0, 0); // also in steinberg code // Install keyboard hooks - pluginWantsKeys = (dispatch (effKeysRequired, 0, 0, 0, 0) == 0); + pluginWantsKeys = (dispatch (plugInOpcodeKeyboardFocusRequired, 0, 0, 0, 0) == 0); #if JUCE_WINDOWS originalWndProc = 0; @@ -2193,8 +2215,8 @@ private: if (rect != nullptr) { - const int rw = rect->right - rect->left; - const int rh = rect->bottom - rect->top; + const int rw = rect->rightmost - rect->leftmost; + const int rh = rect->lower - rect->upper; if ((rw > 50 && rh > 50 && rw < 2000 && rh < 2000 && rw != w && rh != h) || ((w == 0 && rw > 0) || (h == 0 && rh > 0))) @@ -2226,8 +2248,8 @@ private: if (rect != nullptr) { - w = rect->right - rect->left; - h = rect->bottom - rect->top; + w = rect->rightmost - rect->leftmost; + h = rect->lower - rect->upper; if (w == 0 || h == 0) { @@ -2266,7 +2288,7 @@ private: JUCE_VST_LOG ("Closing VST UI: " + plugin.getName()); isOpen = false; - dispatch (effEditClose, 0, 0, 0, 0); + dispatch (plugInOpcodeCloseEditor, 0, 0, 0, 0); stopTimer(); #if JUCE_WINDOWS @@ -2286,7 +2308,7 @@ private: } //============================================================================== - VstIntPtr dispatch (const int opcode, const int index, const int value, void* const ptr, float opt) + pointer_sized_int dispatch (const int opcode, const int index, const int value, void* const ptr, float opt) { return plugin.dispatch (opcode, index, value, ptr, opt); } @@ -2492,17 +2514,17 @@ private: if (owner.isOpen) { owner.isOpen = false; - owner.dispatch (effEditClose, 0, 0, 0, 0); - owner.dispatch (effEditSleep, 0, 0, 0, 0); + owner.dispatch (plugInOpcodeCloseEditor, 0, 0, 0, 0); + owner.dispatch (plugInOpcodeSleepEditor, 0, 0, 0, 0); } } bool getEmbeddedViewSize (int& w, int& h) override { - ERect* rect = nullptr; - owner.dispatch (effEditGetRect, 0, 0, &rect, 0); - w = rect->right - rect->left; - h = rect->bottom - rect->top; + VstEditorBounds* rect = nullptr; + owner.dispatch (plugInOpcodeGetEditorBounds, 0, 0, &rect, 0); + w = rect->rightmost - rect->leftmost; + h = rect->lower - rect->upper; return true; } @@ -2512,7 +2534,7 @@ private: { alreadyInside = true; getTopLevelComponent()->toFront (true); - owner.dispatch (effEditMouse, x, y, 0, 0); + owner.dispatch (plugInOpcodeGetMouse, x, y, 0, 0); alreadyInside = false; } else @@ -2526,13 +2548,13 @@ private: if (ComponentPeer* const peer = getPeer()) { const Point pos (peer->globalToLocal (getScreenPosition())); - ERect r; - r.left = (VstInt16) pos.getX(); - r.top = (VstInt16) pos.getY(); - r.right = (VstInt16) (r.left + getWidth()); - r.bottom = (VstInt16) (r.top + getHeight()); + VstEditorBounds r; + r.leftmost = (int16) pos.getX(); + r.upper = (int16) pos.getY(); + r.rightmost = (int16) (r.leftmost + getWidth()); + r.lower = (int16) (r.upper + getHeight()); - owner.dispatch (effEditDraw, 0, 0, &r, 0); + owner.dispatch (plugInOpcodeDrawEditor, 0, 0, &r, 0); } } @@ -2581,10 +2603,10 @@ AudioProcessorEditor* VSTPluginInstance::createEditor() //============================================================================== // entry point for all callbacks from the plugin -static VstIntPtr VSTCALLBACK audioMaster (AEffect* effect, VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt) +static pointer_sized_int VSTINTERFACECALL audioMaster (VstEffectInterface* effect, int32 opcode, int32 index, pointer_sized_int value, void* ptr, float opt) { if (effect != nullptr) - if (VSTPluginInstance* instance = (VSTPluginInstance*) (effect->resvd2)) + if (VSTPluginInstance* instance = (VSTPluginInstance*) (effect->hostSpace2)) return instance->handleCallback (opcode, index, value, ptr, opt); return VSTPluginInstance::handleGeneralCallback (opcode, index, value, ptr, opt); @@ -2635,7 +2657,7 @@ void VSTPluginFormat::findAllTypesForFile (OwnedArray& result // Normal plugin... results.add (new PluginDescription (desc)); - instance->dispatch (effOpen, 0, 0, 0, 0); + instance->dispatch (plugInOpcodeOpen, 0, 0, 0, 0); } else { @@ -2643,7 +2665,7 @@ void VSTPluginFormat::findAllTypesForFile (OwnedArray& result for (;;) { char shellEffectName [256] = { 0 }; - const int uid = (int) instance->dispatch (effShellGetNextPlugin, 0, 0, shellEffectName, 0); + const int uid = (int) instance->dispatch (plugInOpcodeNextPlugInUniqueID, 0, 0, shellEffectName, 0); if (uid == 0) break; @@ -2869,7 +2891,7 @@ void VSTPluginFormat::setExtraFunctions (AudioPluginInstance* plugin, ExtraFunct vst->extraFunctions = f; } -VSTPluginFormat::VstIntPtr JUCE_CALLTYPE VSTPluginFormat::dispatcher (AudioPluginInstance* plugin, int32 opcode, int32 index, VstIntPtr value, void* ptr, float opt) +pointer_sized_int JUCE_CALLTYPE VSTPluginFormat::dispatcher (AudioPluginInstance* plugin, int32 opcode, int32 index, pointer_sized_int value, void* ptr, float opt) { if (VSTPluginInstance* vst = dynamic_cast (plugin)) return vst->dispatch (opcode, index, value, ptr, opt); diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.h b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.h index 02f4a57f..5bfa58c6 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.h +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.h @@ -82,14 +82,8 @@ public: static void setExtraFunctions (AudioPluginInstance* plugin, ExtraFunctions* functions); //============================================================================== - #if JUCE_64BIT - typedef int64 VstIntPtr; - #else - typedef int32 VstIntPtr; - #endif - /** This simply calls directly to the VST's AEffect::dispatcher() function. */ - static VstIntPtr JUCE_CALLTYPE dispatcher (AudioPluginInstance*, int32, int32, VstIntPtr, void*, float); + static pointer_sized_int JUCE_CALLTYPE dispatcher (AudioPluginInstance*, int32, int32, pointer_sized_int, void*, float); //============================================================================== String getName() const override { return "VST"; } diff --git a/modules/juce_audio_processors/juce_audio_processors.h b/modules/juce_audio_processors/juce_audio_processors.h index 3d72d4b0..ff73be0c 100644 --- a/modules/juce_audio_processors/juce_audio_processors.h +++ b/modules/juce_audio_processors/juce_audio_processors.h @@ -33,7 +33,7 @@ ID: juce_audio_processors vendor: juce - version: 4.2.3 + version: 4.2.4 name: JUCE audio processor classes description: Classes for loading and playing VST, AU, or internally-generated audio processors. website: http://www.juce.com/juce @@ -57,8 +57,7 @@ //============================================================================== /** Config: JUCE_PLUGINHOST_VST - Enables the VST audio plugin hosting classes. This requires the Steinberg VST SDK to be - installed on your machine. + Enables the VST audio plugin hosting classes. @see VSTPluginFormat, VST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU, JUCE_PLUGINHOST_VST3 */ @@ -89,7 +88,7 @@ // #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!" #endif -#if ! (defined (JUCE_SUPPORT_CARBON) || JUCE_64BIT) +#if ! (defined (JUCE_SUPPORT_CARBON) || JUCE_64BIT || JUCE_IOS) #define JUCE_SUPPORT_CARBON 1 #endif diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp index b7eed3b5..cfba0622 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp @@ -62,7 +62,9 @@ AudioProcessor::AudioProcessor() #endif ignoreUnused (maxOutChannels); - #if ! JucePlugin_IsMidiEffect + #if JucePlugin_IsMidiEffect + ignoreUnused (channelConfigs); + #else #if ! JucePlugin_IsSynth const int numInChannels = jmin (maxInChannels, (int) channelConfigs[0][0]); diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h index e28de0a3..e6be249b 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h @@ -85,14 +85,22 @@ public: virtual int getControlParameterIndex (Component&); //============================================================================== - /** Make the editor resizable or fixed. - - @param shouldBeResizable whether it's resizable at all + /** Marks the host's editor window as resizable + + @param allowHostToResize whether the editor's parent window can be resized + by the user or the host. Even if this is false, you + can still resize your window yourself by calling + setBounds (for example, when a user clicks on a button + in your editor to drop out a panel) which will bypass any + resizable/constraints checks. If you are using + your own corner resizer than this will also bypass + any checks. + @param useBottomRightCornerResizer @see setResizeLimits, isResizable */ - void setResizable (bool shouldBeResizable, bool useBottomRightCornerResizer); + void setResizable (bool allowHostToResize, bool useBottomRightCornerResizer); - /** Returns true if resizing is enabled. + /** Returns true if the host is allowed to resize editor's parent window @see setResizable */ diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp index 75bab69a..a493ce1d 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp @@ -264,7 +264,14 @@ struct ProcessBufferOp : public AudioGraphRenderingOp AudioBuffer buffer (channels, totalChans, numSamples); - callProcess (buffer, *sharedMidiBuffers.getUnchecked (midiBufferToUse)); + { + ScopedLock callbackLock (processor->getCallbackLock()); + + if (processor->isSuspended()) + buffer.clear(); + else + callProcess (buffer, *sharedMidiBuffers.getUnchecked (midiBufferToUse)); + } } void callProcess (AudioBuffer& buffer, MidiBuffer& midiMessages) @@ -1035,7 +1042,7 @@ struct AudioProcessorGraph::AudioProcessorGraphBufferHelpers //============================================================================== AudioProcessorGraph::AudioProcessorGraph() : lastNodeId (0), audioBuffers (new AudioProcessorGraphBufferHelpers), - currentMidiInputBuffer (nullptr) + currentMidiInputBuffer (nullptr), isPrepared (false) { } @@ -1102,7 +1109,9 @@ AudioProcessorGraph::Node* AudioProcessorGraph::addNode (AudioProcessor* const n Node* const n = new Node (nodeId, newProcessor); nodes.add (n); - triggerAsyncUpdate(); + + if (isPrepared) + triggerAsyncUpdate(); n->setParentGraph (this); return n; @@ -1117,7 +1126,9 @@ bool AudioProcessorGraph::removeNode (const uint32 nodeId) if (nodes.getUnchecked(i)->nodeId == nodeId) { nodes.remove (i); - triggerAsyncUpdate(); + + if (isPrepared) + triggerAsyncUpdate(); return true; } @@ -1203,14 +1214,19 @@ bool AudioProcessorGraph::addConnection (const uint32 sourceNodeId, GraphRenderingOps::ConnectionSorter sorter; connections.addSorted (sorter, new Connection (sourceNodeId, sourceChannelIndex, destNodeId, destChannelIndex)); - triggerAsyncUpdate(); + + if (isPrepared) + triggerAsyncUpdate(); + return true; } void AudioProcessorGraph::removeConnection (const int index) { connections.remove (index); - triggerAsyncUpdate(); + + if (isPrepared) + triggerAsyncUpdate(); } bool AudioProcessorGraph::removeConnection (const uint32 sourceNodeId, const int sourceChannelIndex, @@ -1392,6 +1408,8 @@ void AudioProcessorGraph::prepareToPlay (double /*sampleRate*/, int estimatedSam clearRenderingSequence(); buildRenderingSequence(); + + isPrepared = true; } bool AudioProcessorGraph::supportsDoublePrecisionProcessing() const @@ -1401,6 +1419,8 @@ bool AudioProcessorGraph::supportsDoublePrecisionProcessing() const void AudioProcessorGraph::releaseResources() { + isPrepared = false; + for (int i = 0; i < nodes.size(); ++i) nodes.getUnchecked(i)->unprepare(); diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h index 00c09d98..b3676e00 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h @@ -392,6 +392,8 @@ private: MidiBuffer* currentMidiInputBuffer; MidiBuffer currentMidiOutputBuffer; + bool isPrepared; + void handleAsyncUpdate() override; void clearRenderingSequence(); void buildRenderingSequence(); diff --git a/modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.h b/modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.h index 9bbfdab8..4f40981b 100644 --- a/modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.h +++ b/modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.h @@ -44,12 +44,11 @@ public: @param formatToLookFor this is the type of format that you want to look for @param directoriesToSearch the path to search @param searchRecursively true to search recursively - @param deadMansPedalFile if this isn't File::nonexistent, then it will - be used as a file to store the names of any plugins - that crash during initialisation. If there are - any plugins listed in it, then these will always - be scanned after all other possible files have - been tried - in this way, even if there's a few + @param deadMansPedalFile if this isn't File(), then it will be used as a file + to store the names of any plugins that crash during + initialisation. If there are any plugins listed in it, + then these will always be scanned after all other possible + files have been tried - in this way, even if there's a few dodgy plugins in your path, then a couple of rescans will still manage to find all the proper plugins. It's probably best to choose a file in the user's diff --git a/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp b/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp index a321a5da..790ee1e1 100644 --- a/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp +++ b/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp @@ -336,7 +336,7 @@ public: bool allowPluginsWhichRequireAsynchronousInstantiation, int threads, const String& title, const String& text) : owner (plc), formatToScan (format), propertiesToUse (properties), - pathChooserWindow (TRANS("Select folders to scan..."), String::empty, AlertWindow::NoIcon), + pathChooserWindow (TRANS("Select folders to scan..."), String(), AlertWindow::NoIcon), progressWindow (title, text, AlertWindow::NoIcon), progress (0.0), numThreads (threads), allowAsync (allowPluginsWhichRequireAsynchronousInstantiation), finished (false) @@ -422,7 +422,7 @@ private: + TRANS ("Are you sure you want to scan the folder \"XYZ\"?") .replace ("XYZ", f.getFullPathName()), TRANS ("Scan"), - String::empty, + String(), nullptr, ModalCallbackFunction::create (warnAboutStupidPathsCallback, this)); return; diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h b/modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h index a1d877a2..8fd62d1a 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h @@ -44,9 +44,10 @@ public: /** Provides access to the parameter's name. */ const String name; -private: - String label; + /** Provides access to the parameter's label. */ + const String label; +private: String getName (int) const override; String getLabel() const override; diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp index 1cbbadd9..b7ed1f9a 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp @@ -66,6 +66,14 @@ struct AudioProcessorValueTreeState::Parameter : public AudioProcessorParamete : AudioProcessorParameter::getText (v, length); } + int getNumSteps () const override + { + if (range.interval > 0) + return (static_cast ((range.end - range.start) / range.interval) + 1); + else + return AudioProcessor::getDefaultNumParameterSteps (); + } + void setValue (float newValue) override { newValue = range.snapToLegalValue (range.convertFrom0to1 (newValue)); @@ -358,6 +366,18 @@ struct AttachedControlBase : public AudioProcessorValueTreeState::Listener, } } + void beginParameterChange() + { + if (AudioProcessorParameter* p = state.getParameter (paramID)) + p->beginChangeGesture(); + } + + void endParameterChange() + { + if (AudioProcessorParameter* p = state.getParameter (paramID)) + p->endChangeGesture(); + } + void handleAsyncUpdate() override { setValue (lastValue); @@ -381,6 +401,7 @@ struct AudioProcessorValueTreeState::SliderAttachment::Pimpl : private Attached { NormalisableRange range (s.getParameterRange (paramID)); slider.setRange (range.start, range.end, range.interval); + slider.setSkewFactor (range.skew, range.symmetricSkew); if (AudioProcessorParameter* param = state.getParameter (paramID)) slider.setDoubleClickReturnValue (true, range.convertFrom0to1 (param->getDefaultValue())); @@ -406,17 +427,8 @@ struct AudioProcessorValueTreeState::SliderAttachment::Pimpl : private Attached setNewUnnormalisedValue ((float) s->getValue()); } - void sliderDragStarted (Slider*) override - { - if (AudioProcessorParameter* p = state.getParameter (paramID)) - p->beginChangeGesture(); - } - - void sliderDragEnded (Slider*) override - { - if (AudioProcessorParameter* p = state.getParameter (paramID)) - p->endChangeGesture(); - } + void sliderDragStarted (Slider*) override { beginParameterChange(); } + void sliderDragEnded (Slider*) override { endParameterChange(); } Slider& slider; @@ -454,7 +466,9 @@ struct AudioProcessorValueTreeState::ComboBoxAttachment::Pimpl : private Attach void comboBoxChanged (ComboBox* comboBox) override { + beginParameterChange(); setNewUnnormalisedValue ((float) comboBox->getSelectedId() - 1.0f); + endParameterChange(); } ComboBox& combo; @@ -493,7 +507,9 @@ struct AudioProcessorValueTreeState::ButtonAttachment::Pimpl : private Attached void buttonClicked (Button* b) override { + beginParameterChange(); setNewUnnormalisedValue (b->getToggleState() ? 1.0f : 0.0f); + endParameterChange(); } Button& button; diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h index d5e53d6a..0f26106e 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h @@ -158,7 +158,7 @@ public: /** An object of this class maintains a connection between a ComboBox and a parameter in an AudioProcessorValueTreeState. - During the lifetime of this SliderAttachment object, it keeps the two things in + During the lifetime of this ComboBoxAttachment object, it keeps the two things in sync, making it easy to connect a combo box to a parameter. When this object is deleted, the connection is broken. Make sure that your AudioProcessorValueTreeState and ComboBox aren't deleted before this object! @@ -182,7 +182,7 @@ public: /** An object of this class maintains a connection between a Button and a parameter in an AudioProcessorValueTreeState. - During the lifetime of this SliderAttachment object, it keeps the two things in + During the lifetime of this ButtonAttachment object, it keeps the two things in sync, making it easy to connect a button to a parameter. When this object is deleted, the connection is broken. Make sure that your AudioProcessorValueTreeState and Button aren't deleted before this object! diff --git a/modules/juce_audio_utils/gui/juce_AudioAppComponent.h b/modules/juce_audio_utils/gui/juce_AudioAppComponent.h index eaf43b2c..ffae2bca 100644 --- a/modules/juce_audio_utils/gui/juce_AudioAppComponent.h +++ b/modules/juce_audio_utils/gui/juce_AudioAppComponent.h @@ -34,8 +34,8 @@ getNextAudioBlock(). The base class provides a basic AudioDeviceManager object and runs audio through the default output device. */ -class AudioAppComponent : public Component, - public AudioSource +class JUCE_API AudioAppComponent : public Component, + public AudioSource { public: AudioAppComponent(); diff --git a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp index 3cd89420..3c2615cd 100644 --- a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp @@ -76,7 +76,7 @@ class AudioDeviceSelectorComponent::MidiInputSelectorComponentListBox : public { public: MidiInputSelectorComponentListBox (AudioDeviceManager& dm, const String& noItems) - : ListBox (String::empty, nullptr), + : ListBox (String(), nullptr), deviceManager (dm), noItemsMessage (noItems) { @@ -340,11 +340,11 @@ public: || comboBoxThatHasChanged == inputDeviceDropDown) { if (outputDeviceDropDown != nullptr) - config.outputDeviceName = outputDeviceDropDown->getSelectedId() < 0 ? String::empty + config.outputDeviceName = outputDeviceDropDown->getSelectedId() < 0 ? String() : outputDeviceDropDown->getText(); if (inputDeviceDropDown != nullptr) - config.inputDeviceName = inputDeviceDropDown->getSelectedId() < 0 ? String::empty + config.inputDeviceName = inputDeviceDropDown->getSelectedId() < 0 ? String() : inputDeviceDropDown->getText(); if (! type.hasSeparateInputsAndOutputs()) @@ -390,7 +390,7 @@ public: { if (AudioIODevice* const device = setup.manager->getCurrentAudioDevice()) { - Component modalWindow (String::empty); + Component modalWindow; modalWindow.setOpaque (true); modalWindow.addToDesktop (0); modalWindow.enterModalState(); @@ -445,7 +445,7 @@ public: addAndMakeVisible (outputChanList = new ChannelSelectorListBox (setup, ChannelSelectorListBox::audioOutputType, TRANS ("(no audio output channels found)"))); - outputChanLabel = new Label (String::empty, TRANS("Active output channels:")); + outputChanLabel = new Label (String(), TRANS("Active output channels:")); outputChanLabel->setJustificationType (Justification::centredRight); outputChanLabel->attachToComponent (outputChanList, true); } @@ -466,7 +466,7 @@ public: addAndMakeVisible (inputChanList = new ChannelSelectorListBox (setup, ChannelSelectorListBox::audioInputType, TRANS("(no audio input channels found)"))); - inputChanLabel = new Label (String::empty, TRANS("Active input channels:")); + inputChanLabel = new Label (String(), TRANS("Active input channels:")); inputChanLabel->setJustificationType (Justification::centredRight); inputChanLabel->attachToComponent (inputChanList, true); } @@ -605,11 +605,11 @@ private: { if (outputDeviceDropDown == nullptr) { - outputDeviceDropDown = new ComboBox (String::empty); + outputDeviceDropDown = new ComboBox (String()); outputDeviceDropDown->addListener (this); addAndMakeVisible (outputDeviceDropDown); - outputDeviceLabel = new Label (String::empty, + outputDeviceLabel = new Label (String(), type.hasSeparateInputsAndOutputs() ? TRANS("Output:") : TRANS("Device:")); outputDeviceLabel->attachToComponent (outputDeviceDropDown, true); @@ -634,11 +634,11 @@ private: { if (inputDeviceDropDown == nullptr) { - inputDeviceDropDown = new ComboBox (String::empty); + inputDeviceDropDown = new ComboBox (String()); inputDeviceDropDown->addListener (this); addAndMakeVisible (inputDeviceDropDown); - inputDeviceLabel = new Label (String::empty, TRANS("Input:")); + inputDeviceLabel = new Label (String(), TRANS("Input:")); inputDeviceLabel->attachToComponent (inputDeviceDropDown, true); addAndMakeVisible (inputLevelMeter @@ -655,9 +655,9 @@ private: { if (sampleRateDropDown == nullptr) { - addAndMakeVisible (sampleRateDropDown = new ComboBox (String::empty)); + addAndMakeVisible (sampleRateDropDown = new ComboBox (String())); - sampleRateLabel = new Label (String::empty, TRANS("Sample rate:")); + sampleRateLabel = new Label (String(), TRANS("Sample rate:")); sampleRateLabel->attachToComponent (sampleRateDropDown, true); } else @@ -682,9 +682,9 @@ private: { if (bufferSizeDropDown == nullptr) { - addAndMakeVisible (bufferSizeDropDown = new ComboBox (String::empty)); + addAndMakeVisible (bufferSizeDropDown = new ComboBox (String())); - bufferSizeLabel = new Label (String::empty, TRANS("Audio buffer size:")); + bufferSizeLabel = new Label (String(), TRANS("Audio buffer size:")); bufferSizeLabel->attachToComponent (bufferSizeDropDown, true); } else @@ -724,7 +724,7 @@ public: //============================================================================== ChannelSelectorListBox (const AudioDeviceSetupDetails& setupDetails, const BoxType boxType, const String& noItemsText) - : ListBox (String::empty, nullptr), + : ListBox (String(), nullptr), setup (setupDetails), type (boxType), noItemsMessage (noItemsText) { refresh(); @@ -993,7 +993,7 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager& if (types.size() > 1) { - deviceTypeDropDown = new ComboBox (String::empty); + deviceTypeDropDown = new ComboBox (String()); for (int i = 0; i < types.size(); ++i) deviceTypeDropDown->addItem (types.getUnchecked(i)->getTypeName(), i + 1); @@ -1001,7 +1001,7 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager& addAndMakeVisible (deviceTypeDropDown); deviceTypeDropDown->addListener (this); - deviceTypeDropDownLabel = new Label (String::empty, TRANS("Audio device type:")); + deviceTypeDropDownLabel = new Label (String(), TRANS("Audio device type:")); deviceTypeDropDownLabel->setJustificationType (Justification::centredRight); deviceTypeDropDownLabel->attachToComponent (deviceTypeDropDown, true); } @@ -1012,7 +1012,7 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager& = new MidiInputSelectorComponentListBox (deviceManager, "(" + TRANS("No MIDI inputs available") + ")")); - midiInputsLabel = new Label (String::empty, TRANS ("Active MIDI inputs:")); + midiInputsLabel = new Label (String(), TRANS ("Active MIDI inputs:")); midiInputsLabel->setJustificationType (Justification::topRight); midiInputsLabel->attachToComponent (midiInputsList, true); @@ -1032,7 +1032,7 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager& if (showMidiOutputSelector) { - addAndMakeVisible (midiOutputSelector = new ComboBox (String::empty)); + addAndMakeVisible (midiOutputSelector = new ComboBox (String())); midiOutputSelector->addListener (this); midiOutputLabel = new Label ("lm", TRANS("MIDI Output:")); diff --git a/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.h b/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.h index 00039eb9..61744f0a 100644 --- a/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.h +++ b/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.h @@ -40,8 +40,8 @@ real-world app that requires more powerful waveform display, you'll probably want to create your own component instead. */ -class AudioVisualiserComponent : public Component, - private Timer +class JUCE_API AudioVisualiserComponent : public Component, + private Timer { public: /** Creates a visualiser with the given number of channels. */ diff --git a/modules/juce_audio_utils/gui/juce_BluetoothMidiDevicePairingDialogue.h b/modules/juce_audio_utils/gui/juce_BluetoothMidiDevicePairingDialogue.h index 1f7e7614..d6a3e946 100644 --- a/modules/juce_audio_utils/gui/juce_BluetoothMidiDevicePairingDialogue.h +++ b/modules/juce_audio_utils/gui/juce_BluetoothMidiDevicePairingDialogue.h @@ -42,7 +42,7 @@ supported. */ -class BluetoothMidiDevicePairingDialogue +class JUCE_API BluetoothMidiDevicePairingDialogue { public: diff --git a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp index 1c1c9d9d..23016d07 100644 --- a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp @@ -26,7 +26,7 @@ class MidiKeyboardUpDownButton : public Button { public: MidiKeyboardUpDownButton (MidiKeyboardComponent& comp, const int d) - : Button (String::empty), owner (comp), delta (d) + : Button (String()), owner (comp), delta (d) { } diff --git a/modules/juce_audio_utils/juce_audio_utils.h b/modules/juce_audio_utils/juce_audio_utils.h index 2de78b5e..9da124e2 100644 --- a/modules/juce_audio_utils/juce_audio_utils.h +++ b/modules/juce_audio_utils/juce_audio_utils.h @@ -33,7 +33,7 @@ ID: juce_audio_utils vendor: juce - version: 4.2.3 + version: 4.2.4 name: JUCE extra audio utility classes description: Classes for audio-related GUI and miscellaneous tasks. website: http://www.juce.com/juce diff --git a/modules/juce_box2d/juce_box2d.h b/modules/juce_box2d/juce_box2d.h index bf5f9da8..dc3e53af 100644 --- a/modules/juce_box2d/juce_box2d.h +++ b/modules/juce_box2d/juce_box2d.h @@ -33,7 +33,7 @@ ID: juce_box2d vendor: juce - version: 4.2.3 + version: 4.2.4 name: JUCE wrapper for the Box2D physics engine description: The Box2D physics engine and some utility classes. website: http://www.juce.com/juce diff --git a/modules/juce_core/containers/juce_Array.h b/modules/juce_core/containers/juce_Array.h index 7b536e26..b5881b86 100644 --- a/modules/juce_core/containers/juce_Array.h +++ b/modules/juce_core/containers/juce_Array.h @@ -519,7 +519,7 @@ public: { insertPos += indexToInsertAt; const int numberToMove = numUsed - indexToInsertAt; - memmove (insertPos + numberOfElements, insertPos, numberToMove * sizeof (ElementType)); + memmove (insertPos + numberOfElements, insertPos, (size_t) numberToMove * sizeof (ElementType)); } else { @@ -791,6 +791,26 @@ public: } //============================================================================== + /** Removes an element from the array. + + This will remove the element at a given index, and move back + all the subsequent elements to close the gap. + If the index passed in is out-of-range, nothing will happen. + + @param indexToRemove the index of the element to remove + @see removeAndReturn, removeFirstMatchingValue, removeAllInstancesOf, removeRange + */ + void remove (int indexToRemove) + { + const ScopedLockType lock (getLock()); + + if (isPositiveAndBelow (indexToRemove, numUsed)) + { + jassert (data.elements != nullptr); + removeInternal (indexToRemove); + } + } + /** Removes an element from the array. This will remove the element at a given index, and move back @@ -801,7 +821,7 @@ public: @returns the element that has been removed @see removeFirstMatchingValue, removeAllInstancesOf, removeRange */ - ElementType remove (const int indexToRemove) + ElementType removeAndReturn (const int indexToRemove) { const ScopedLockType lock (getLock()); @@ -824,7 +844,7 @@ public: array, behaviour is undefined. @param elementToRemove a pointer to the element to remove - @see removeFirstMatchingValue, removeAllInstancesOf, removeRange + @see removeFirstMatchingValue, removeAllInstancesOf, removeRange, removeIf */ void remove (const ElementType* elementToRemove) { @@ -844,7 +864,7 @@ public: If the item isn't found, no action is taken. @param valueToRemove the object to try to remove - @see remove, removeRange + @see remove, removeRange, removeIf */ void removeFirstMatchingValue (ParameterType valueToRemove) { @@ -861,21 +881,59 @@ public: } } - /** Removes an item from the array. + /** Removes items from the array. This will remove all occurrences of the given element from the array. If no such items are found, no action is taken. @param valueToRemove the object to try to remove - @see remove, removeRange + @return how many objects were removed. + @see remove, removeRange, removeIf */ - void removeAllInstancesOf (ParameterType valueToRemove) + int removeAllInstancesOf (ParameterType valueToRemove) { + int numRemoved = 0; const ScopedLockType lock (getLock()); for (int i = numUsed; --i >= 0;) + { if (valueToRemove == data.elements[i]) + { removeInternal (i); + ++numRemoved; + } + } + + return numRemoved; + } + + /** Removes items from the array. + + This will remove all objects from the array that match a condition. + If no such items are found, no action is taken. + + @param predicate the condition when to remove an item. Must be a callable + type that takes an ElementType and returns a bool + + @return how many objects were removed. + @see remove, removeRange, removeAllInstancesOf + */ + template + int removeIf (PredicateType predicate) + { + int numRemoved = 0; + const ScopedLockType lock (getLock()); + + for (int i = numUsed; --i >= 0;) + { + if (predicate (data.elements[i]) == true) + { + removeInternal (i); + ++numRemoved; + } + } + + return numRemoved; } /** Removes a range of elements from the array. @@ -888,7 +946,7 @@ public: @param startIndex the index of the first element to remove @param numberToRemove how many elements should be removed - @see remove, removeFirstMatchingValue, removeAllInstancesOf + @see remove, removeFirstMatchingValue, removeAllInstancesOf, removeIf */ void removeRange (int startIndex, int numberToRemove) { diff --git a/modules/juce_core/containers/juce_ListenerList.h b/modules/juce_core/containers/juce_ListenerList.h index edc08771..405ddc87 100644 --- a/modules/juce_core/containers/juce_ListenerList.h +++ b/modules/juce_core/containers/juce_ListenerList.h @@ -292,10 +292,9 @@ public: /** A dummy bail-out checker that always returns false. See the ListenerList notes for more info about bail-out checkers. */ - class DummyBailOutChecker + struct DummyBailOutChecker { - public: - inline bool shouldBailOut() const noexcept { return false; } + bool shouldBailOut() const noexcept { return false; } }; //============================================================================== diff --git a/modules/juce_core/containers/juce_NamedValueSet.cpp b/modules/juce_core/containers/juce_NamedValueSet.cpp index 1c3efa4a..68afddde 100644 --- a/modules/juce_core/containers/juce_NamedValueSet.cpp +++ b/modules/juce_core/containers/juce_NamedValueSet.cpp @@ -26,40 +26,6 @@ ============================================================================== */ -struct NamedValueSet::NamedValue -{ - NamedValue() noexcept {} - NamedValue (const Identifier& n, const var& v) : name (n), value (v) {} - NamedValue (const NamedValue& other) : name (other.name), value (other.value) {} - - #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS - NamedValue (NamedValue&& other) noexcept - : name (static_cast (other.name)), - value (static_cast (other.value)) - { - } - - NamedValue (Identifier&& n, var&& v) noexcept - : name (static_cast (n)), - value (static_cast (v)) - { - } - - NamedValue& operator= (NamedValue&& other) noexcept - { - name = static_cast (other.name); - value = static_cast (other.value); - return *this; - } - #endif - - bool operator== (const NamedValue& other) const noexcept { return name == other.name && value == other.value; } - bool operator!= (const NamedValue& other) const noexcept { return ! operator== (other); } - - Identifier name; - var value; -}; - //============================================================================== NamedValueSet::NamedValueSet() noexcept { @@ -119,12 +85,22 @@ bool NamedValueSet::isEmpty() const noexcept return values.isEmpty(); } +static const var& getNullVarRef() noexcept +{ + #if JUCE_ALLOW_STATIC_NULL_VARIABLES + return var::null; + #else + static var nullVar; + return nullVar; + #endif +} + const var& NamedValueSet::operator[] (const Identifier& name) const noexcept { if (const var* v = getVarPointer (name)) return *v; - return var::null; + return getNullVarRef(); } var NamedValueSet::getWithDefault (const Identifier& name, const var& defaultReturnValue) const @@ -223,7 +199,7 @@ const var& NamedValueSet::getValueAt (const int index) const noexcept return values.getReference (index).value; jassertfalse; - return var::null; + return getNullVarRef(); } var* NamedValueSet::getVarPointerAt (int index) const noexcept diff --git a/modules/juce_core/containers/juce_NamedValueSet.h b/modules/juce_core/containers/juce_NamedValueSet.h index 80f99ed1..a62ffc23 100644 --- a/modules/juce_core/containers/juce_NamedValueSet.h +++ b/modules/juce_core/containers/juce_NamedValueSet.h @@ -60,6 +60,45 @@ public: bool operator!= (const NamedValueSet&) const; //============================================================================== + struct NamedValue + { + NamedValue() noexcept {} + NamedValue (const Identifier& n, const var& v) : name (n), value (v) {} + NamedValue (const NamedValue& other) : name (other.name), value (other.value) {} + + #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS + NamedValue (NamedValue&& other) noexcept + : name (static_cast (other.name)), + value (static_cast (other.value)) + { + } + + NamedValue (Identifier&& n, var&& v) noexcept + : name (static_cast (n)), + value (static_cast (v)) + { + } + + NamedValue& operator= (NamedValue&& other) noexcept + { + name = static_cast (other.name); + value = static_cast (other.value); + return *this; + } + #endif + + bool operator== (const NamedValue& other) const noexcept { return name == other.name && value == other.value; } + bool operator!= (const NamedValue& other) const noexcept { return ! operator== (other); } + + Identifier name; + var value; + }; + + NamedValueSet::NamedValue* begin() { return values.begin(); } + NamedValueSet::NamedValue* end() { return values.end(); } + + //============================================================================== + /** Returns the total number of values that the set contains. */ int size() const noexcept; @@ -140,7 +179,6 @@ public: private: //============================================================================== - struct NamedValue; Array values; }; diff --git a/modules/juce_core/containers/juce_PropertySet.h b/modules/juce_core/containers/juce_PropertySet.h index 88284e6d..310810f7 100644 --- a/modules/juce_core/containers/juce_PropertySet.h +++ b/modules/juce_core/containers/juce_PropertySet.h @@ -131,8 +131,8 @@ public: /** Sets a named property to an XML element. @param keyName the name of the property to set. (This mustn't be an empty string) - @param xml the new element to set it to. If this is zero, the value will be set to - an empty string + @param xml the new element to set it to. If this is a nullptr, the value will + be set to an empty string @see getXmlValue */ void setValue (const String& keyName, const XmlElement* xml); diff --git a/modules/juce_core/containers/juce_Variant.cpp b/modules/juce_core/containers/juce_Variant.cpp index 01c65edf..52a8e81a 100644 --- a/modules/juce_core/containers/juce_Variant.cpp +++ b/modules/juce_core/containers/juce_Variant.cpp @@ -434,7 +434,9 @@ var::var() noexcept : type (&VariantType_Void::instance) {} var::var (const VariantType& t) noexcept : type (&t) {} var::~var() noexcept { type->cleanUp (value); } +#if JUCE_ALLOW_STATIC_NULL_VARIABLES const var var::null; +#endif //============================================================================== var::var (const var& valueToCopy) : type (valueToCopy.type) @@ -582,7 +584,7 @@ const var& var::operator[] (const Identifier& propertyName) const if (DynamicObject* const o = getDynamicObject()) return o->getProperty (propertyName); - return var::null; + return getNullVarRef(); } const var& var::operator[] (const char* const propertyName) const diff --git a/modules/juce_core/containers/juce_Variant.h b/modules/juce_core/containers/juce_Variant.h index 4b57c6a3..f5c77cb6 100644 --- a/modules/juce_core/containers/juce_Variant.h +++ b/modules/juce_core/containers/juce_Variant.h @@ -70,8 +70,10 @@ public: /** Destructor. */ ~var() noexcept; + #if JUCE_ALLOW_STATIC_NULL_VARIABLES /** A static var object that can be used where you need an empty variant object. */ static const var null; + #endif var (const var& valueToCopy); var (int value) noexcept; diff --git a/modules/juce_core/files/juce_File.cpp b/modules/juce_core/files/juce_File.cpp index bebdeed5..e2a23beb 100644 --- a/modules/juce_core/files/juce_File.cpp +++ b/modules/juce_core/files/juce_File.cpp @@ -68,7 +68,9 @@ File& File::operator= (File&& other) noexcept } #endif +#if JUCE_ALLOW_STATIC_NULL_VARIABLES const File File::nonexistent; +#endif //============================================================================== static String removeEllipsis (const String& path) @@ -300,6 +302,21 @@ bool File::copyFileTo (const File& newFile) const || (exists() && newFile.deleteFile() && copyInternal (newFile)); } +bool File::replaceFileIn (const File& newFile) const +{ + if (newFile.fullPath == fullPath) + return true; + + if (! newFile.exists()) + return moveFileTo (newFile); + + if (! replaceInternal (newFile)) + return false; + + deleteFile(); + return true; +} + bool File::copyDirectoryTo (const File& newDirectory) const { if (isDirectory() && newDirectory.createDirectory()) @@ -966,16 +983,16 @@ bool File::createSymbolicLink (const File& linkFileToCreate, bool overwriteExist } //============================================================================== -MemoryMappedFile::MemoryMappedFile (const File& file, MemoryMappedFile::AccessMode mode) +MemoryMappedFile::MemoryMappedFile (const File& file, MemoryMappedFile::AccessMode mode, bool exclusive) : address (nullptr), range (0, file.getSize()), fileHandle (0) { - openInternal (file, mode); + openInternal (file, mode, exclusive); } -MemoryMappedFile::MemoryMappedFile (const File& file, const Range& fileRange, AccessMode mode) +MemoryMappedFile::MemoryMappedFile (const File& file, const Range& fileRange, AccessMode mode, bool exclusive) : address (nullptr), range (fileRange.getIntersectionWith (Range (0, file.getSize()))), fileHandle (0) { - openInternal (file, mode); + openInternal (file, mode, exclusive); } @@ -994,9 +1011,9 @@ public: const File home (File::getSpecialLocation (File::userHomeDirectory)); const File temp (File::getSpecialLocation (File::tempDirectory)); - expect (! File::nonexistent.exists()); - expect (! File::nonexistent.existsAsFile()); - expect (! File::nonexistent.isDirectory()); + expect (! File().exists()); + expect (! File().existsAsFile()); + expect (! File().isDirectory()); #if ! JUCE_WINDOWS expect (File("/").isDirectory()); #endif diff --git a/modules/juce_core/files/juce_File.h b/modules/juce_core/files/juce_File.h index 9848c13d..dbe01c5a 100644 --- a/modules/juce_core/files/juce_File.h +++ b/modules/juce_core/files/juce_File.h @@ -49,8 +49,7 @@ public: /** Creates an (invalid) file object. The file is initially set to an empty path, so getFullPathName() will return - an empty string, and comparing the file to File::nonexistent will return - true. + an empty string. You can use its operator= method to point it at a proper file. */ @@ -95,8 +94,13 @@ public: #endif //============================================================================== - /** This static constant is used for referring to an 'invalid' file. */ + #if JUCE_ALLOW_STATIC_NULL_VARIABLES + /** This static constant is used for referring to an 'invalid' file. + Bear in mind that you should avoid this kind of static variable, and always prefer + to use File() or {} if you need a default-constructed File object. + */ static const File nonexistent; + #endif //============================================================================== /** Checks whether the file actually exists. @@ -503,6 +507,18 @@ public: */ bool copyFileTo (const File& targetLocation) const; + /** Replaces a file. + + Replace the file in the given location, assuming the replaced files identity. + Depending on the file system this will preserve file attributes such as + creation date, short file name, etc. + + If replacement succeeds the original file is deleted. + + @returns true if the operation succeeds + */ + bool replaceFileIn (const File& targetLocation) const; + /** Copies a directory. Tries to copy an entire directory, recursively. @@ -982,6 +998,7 @@ private: Result createDirectoryInternal (const String&) const; bool copyInternal (const File&) const; bool moveInternal (const File&) const; + bool replaceInternal (const File&) const; bool setFileTimesInternal (int64 m, int64 a, int64 c) const; void getFileTimesInternal (int64& m, int64& a, int64& c) const; bool setFileReadOnlyInternal (bool) const; diff --git a/modules/juce_core/files/juce_MemoryMappedFile.h b/modules/juce_core/files/juce_MemoryMappedFile.h index 48e0eb6a..fdfae689 100644 --- a/modules/juce_core/files/juce_MemoryMappedFile.h +++ b/modules/juce_core/files/juce_MemoryMappedFile.h @@ -56,8 +56,13 @@ public: will lazily pull the data into memory when blocks are accessed. If the file can't be opened for some reason, the getData() method will return a null pointer. + + If exclusive is false then other apps can also open the same memory mapped file and use this + mapping as an effective way of communicating. If exclusive is true then the mapped file will + be opened exclusively - preventing other apps to access the file which may improve the + performance of accessing the file. */ - MemoryMappedFile (const File& file, AccessMode mode); + MemoryMappedFile (const File& file, AccessMode mode, bool exclusive = false); /** Opens a section of a file and maps it to an area of virtual memory. @@ -77,7 +82,8 @@ public: */ MemoryMappedFile (const File& file, const Range& fileRange, - AccessMode mode); + AccessMode mode, + bool exclusive = false); /** Destructor. */ ~MemoryMappedFile(); @@ -106,7 +112,7 @@ private: int fileHandle; #endif - void openInternal (const File&, AccessMode); + void openInternal (const File&, AccessMode, bool); JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MemoryMappedFile) }; diff --git a/modules/juce_core/files/juce_TemporaryFile.cpp b/modules/juce_core/files/juce_TemporaryFile.cpp index acb1af0c..337f7f3b 100644 --- a/modules/juce_core/files/juce_TemporaryFile.cpp +++ b/modules/juce_core/files/juce_TemporaryFile.cpp @@ -86,7 +86,7 @@ bool TemporaryFile::overwriteTargetFileWithTemporary() const // Have a few attempts at overwriting the file before giving up.. for (int i = 5; --i >= 0;) { - if (temporaryFile.moveFileTo (targetFile)) + if (temporaryFile.replaceFileIn (targetFile)) return true; Thread::sleep (100); diff --git a/modules/juce_core/javascript/juce_JSON.cpp b/modules/juce_core/javascript/juce_JSON.cpp index 455412c4..4a4e1344 100644 --- a/modules/juce_core/javascript/juce_JSON.cpp +++ b/modules/juce_core/javascript/juce_JSON.cpp @@ -625,7 +625,7 @@ public: beginTest ("JSON"); Random r = getRandom(); - expect (JSON::parse (String::empty) == var()); + expect (JSON::parse (String()) == var()); expect (JSON::parse ("{}").isObject()); expect (JSON::parse ("[]").isArray()); expect (JSON::parse ("[ 1234 ]")[0].isInt()); diff --git a/modules/juce_core/javascript/juce_Javascript.cpp b/modules/juce_core/javascript/juce_Javascript.cpp index 2fa845fa..13d572c3 100644 --- a/modules/juce_core/javascript/juce_Javascript.cpp +++ b/modules/juce_core/javascript/juce_Javascript.cpp @@ -412,9 +412,16 @@ struct JavascriptEngine::RootObject : public DynamicObject var getResult (const Scope& s) const override { var arrayVar (object->getResult (s)); // must stay alive for the scope of this method + var key = index->getResult (s); if (const Array* array = arrayVar.getArray()) - return (*array) [static_cast (index->getResult (s))]; + if (key.isInt() || key.isInt64() || key.isDouble()) + return (*array) [static_cast (key)]; + + if (DynamicObject* o = arrayVar.getDynamicObject()) + if (key.isString()) + if (const var* v = getPropertyPointer (o, Identifier (key))) + return *v; return var::undefined(); } @@ -422,15 +429,28 @@ struct JavascriptEngine::RootObject : public DynamicObject void assign (const Scope& s, const var& newValue) const override { var arrayVar (object->getResult (s)); // must stay alive for the scope of this method + var key = index->getResult (s); if (Array* array = arrayVar.getArray()) { - const int i = index->getResult (s); - while (array->size() < i) - array->add (var::undefined()); + if (key.isInt() || key.isInt64() || key.isDouble()) + { + const int i = key; + while (array->size() < i) + array->add (var::undefined()); + + array->set (i, newValue); + return; + } + } - array->set (i, newValue); - return; + if (DynamicObject* o = arrayVar.getDynamicObject()) + { + if (key.isString()) + { + o->setProperty (Identifier (key), newValue); + return; + } } Expression::assign (s, newValue); diff --git a/modules/juce_core/juce_core.h b/modules/juce_core/juce_core.h index e27cdc89..b1ed23b2 100644 --- a/modules/juce_core/juce_core.h +++ b/modules/juce_core/juce_core.h @@ -38,7 +38,7 @@ ID: juce_core vendor: juce - version: 4.2.3 + version: 4.2.4 name: JUCE core classes description: The essential set of basic JUCE classes, as required by all the other JUCE modules. Includes text, container, memory, threading and i/o functionality. website: http://www.juce.com/juce @@ -48,6 +48,7 @@ OSXFrameworks: Cocoa IOKit iOSFrameworks: Foundation linuxLibs: rt dl pthread + linuxPackages: libcurl mingwLibs: uuid wsock32 wininet version ole32 ws2_32 oleaut32 imm32 comdlg32 shlwapi rpcrt4 winmm END_JUCE_MODULE_DECLARATION @@ -138,7 +139,7 @@ /** Config: JUCE_USE_CURL Enables http/https support via libcurl (Linux only). Enabling this will add an additional - run-time dynmic dependency to libcurl. + run-time dynamic dependency to libcurl. If you disable this then https/ssl support will not be available on linux. */ @@ -147,7 +148,7 @@ #endif -/* Config: JUCE_CATCH_UNHANDLED_EXCEPTIONS +/** Config: JUCE_CATCH_UNHANDLED_EXCEPTIONS If enabled, this will add some exception-catching code to forward unhandled exceptions to your JUCEApplicationBase::unhandledException() callback. */ @@ -155,6 +156,16 @@ //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 #endif +/** Config: JUCE_ALLOW_STATIC_NULL_VARIABLES + If disabled, this will turn off dangerous static globals like String::empty, var::null, etc + which can cause nasty order-of-initialisation problems if they are referenced during static + constructor code. +*/ +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + #define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + + #ifndef JUCE_STRING_UTF_TYPE #define JUCE_STRING_UTF_TYPE 8 #endif diff --git a/modules/juce_core/maths/juce_BigInteger.cpp b/modules/juce_core/maths/juce_BigInteger.cpp index d5512450..96819cac 100644 --- a/modules/juce_core/maths/juce_BigInteger.cpp +++ b/modules/juce_core/maths/juce_BigInteger.cpp @@ -28,76 +28,110 @@ namespace { - inline size_t bitToIndex (const int bit) noexcept { return (size_t) (bit >> 5); } - inline uint32 bitToMask (const int bit) noexcept { return (uint32) 1 << (bit & 31); } + inline uint32 bitToMask (const int bit) noexcept { return (uint32) 1 << (bit & 31); } + inline size_t bitToIndex (const int bit) noexcept { return (size_t) (bit >> 5); } + inline size_t sizeNeededToHold (int highestBit) noexcept { return (size_t) (highestBit >> 5) + 1; } + + inline int highestBitInInt (uint32 n) noexcept + { + jassert (n != 0); // (the built-in functions may not work for n = 0) + + #if JUCE_GCC || JUCE_CLANG + return 31 - __builtin_clz (n); + #elif JUCE_MSVC + unsigned long highest; + _BitScanReverse (&highest, n); + return (int) highest; + #else + n |= (n >> 1); + n |= (n >> 2); + n |= (n >> 4); + n |= (n >> 8); + n |= (n >> 16); + return countBitsInInt32 (n >> 1); + #endif + } } //============================================================================== BigInteger::BigInteger() - : numValues (4), + : allocatedSize (numPreallocatedInts), highestBit (-1), negative (false) { - values.calloc (numValues + 1); + for (int i = 0; i < numPreallocatedInts; ++i) + preallocated[i] = 0; } BigInteger::BigInteger (const int32 value) - : numValues (4), + : allocatedSize (numPreallocatedInts), highestBit (31), negative (value < 0) { - values.calloc (numValues + 1); - values[0] = (uint32) std::abs (value); + preallocated[0] = (uint32) std::abs (value); + + for (int i = 1; i < numPreallocatedInts; ++i) + preallocated[i] = 0; + highestBit = getHighestBit(); } BigInteger::BigInteger (const uint32 value) - : numValues (4), + : allocatedSize (numPreallocatedInts), highestBit (31), negative (false) { - values.calloc (numValues + 1); - values[0] = value; + preallocated[0] = value; + + for (int i = 1; i < numPreallocatedInts; ++i) + preallocated[i] = 0; + highestBit = getHighestBit(); } BigInteger::BigInteger (int64 value) - : numValues (4), + : allocatedSize (numPreallocatedInts), highestBit (63), negative (value < 0) { - values.calloc (numValues + 1); - if (value < 0) value = -value; - values[0] = (uint32) value; - values[1] = (uint32) (value >> 32); + preallocated[0] = (uint32) value; + preallocated[1] = (uint32) (value >> 32); + + for (int i = 2; i < numPreallocatedInts; ++i) + preallocated[i] = 0; + highestBit = getHighestBit(); } BigInteger::BigInteger (const BigInteger& other) - : numValues ((size_t) jmax ((size_t) 4, bitToIndex (other.highestBit) + 1)), + : allocatedSize (other.allocatedSize), highestBit (other.getHighestBit()), negative (other.negative) { - values.malloc (numValues + 1); - memcpy (values, other.values, sizeof (uint32) * (numValues + 1)); + if (allocatedSize > numPreallocatedInts) + heapAllocation.malloc (allocatedSize); + + memcpy (getValues(), other.getValues(), sizeof (uint32) * allocatedSize); } #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS BigInteger::BigInteger (BigInteger&& other) noexcept - : values (static_cast&&> (other.values)), - numValues (other.numValues), + : heapAllocation (static_cast&&> (other.heapAllocation)), + allocatedSize (other.allocatedSize), highestBit (other.highestBit), negative (other.negative) { + memcpy (preallocated, other.preallocated, sizeof (preallocated)); } BigInteger& BigInteger::operator= (BigInteger&& other) noexcept { - values = static_cast&&> (other.values); - numValues = other.numValues; + heapAllocation = static_cast&&> (other.heapAllocation); + memcpy (preallocated, other.preallocated, sizeof (preallocated)); + allocatedSize = other.allocatedSize; highestBit = other.highestBit; negative = other.negative; return *this; @@ -110,8 +144,11 @@ BigInteger::~BigInteger() void BigInteger::swapWith (BigInteger& other) noexcept { - values.swapWith (other.values); - std::swap (numValues, other.numValues); + for (int i = 0; i < numPreallocatedInts; ++i) + std::swap (preallocated[i], other.preallocated[i]); + + heapAllocation.swapWith (other.heapAllocation); + std::swap (allocatedSize, other.allocatedSize); std::swap (highestBit, other.highestBit); std::swap (negative, other.negative); } @@ -121,44 +158,68 @@ BigInteger& BigInteger::operator= (const BigInteger& other) if (this != &other) { highestBit = other.getHighestBit(); - jassert (other.numValues >= 4); - numValues = (size_t) jmax ((size_t) 4, bitToIndex (highestBit) + 1); + allocatedSize = (size_t) jmax ((size_t) numPreallocatedInts, sizeNeededToHold (highestBit)); + + if (allocatedSize <= numPreallocatedInts) + heapAllocation.free(); + else + heapAllocation.malloc (allocatedSize); + + memcpy (getValues(), other.getValues(), sizeof (uint32) * allocatedSize); negative = other.negative; - values.malloc (numValues + 1); - memcpy (values, other.values, sizeof (uint32) * (numValues + 1)); } return *this; } -void BigInteger::ensureSize (const size_t numVals) +uint32* BigInteger::getValues() const noexcept { - if (numVals + 2 >= numValues) + jassert (heapAllocation != nullptr || allocatedSize <= numPreallocatedInts); + + return heapAllocation != nullptr ? heapAllocation + : (uint32*) preallocated; +} + +uint32* BigInteger::ensureSize (const size_t numVals) +{ + if (numVals > allocatedSize) { - size_t oldSize = numValues; - numValues = ((numVals + 2) * 3) / 2; - values.realloc (numValues + 1); + size_t oldSize = allocatedSize; + allocatedSize = ((numVals + 2) * 3) / 2; + + if (heapAllocation == nullptr) + { + heapAllocation.calloc (allocatedSize); + memcpy (heapAllocation, preallocated, sizeof (uint32) * numPreallocatedInts); + } + else + { + heapAllocation.realloc (allocatedSize); - while (oldSize < numValues) - values [oldSize++] = 0; + for (uint32* values = getValues(); oldSize < allocatedSize; ++oldSize) + values[oldSize] = 0; + } } + + return getValues(); } //============================================================================== bool BigInteger::operator[] (const int bit) const noexcept { return bit <= highestBit && bit >= 0 - && ((values [bitToIndex (bit)] & bitToMask (bit)) != 0); + && ((getValues() [bitToIndex (bit)] & bitToMask (bit)) != 0); } int BigInteger::toInteger() const noexcept { - const int n = (int) (values[0] & 0x7fffffff); + const int n = (int) (getValues()[0] & 0x7fffffff); return negative ? -n : n; } int64 BigInteger::toInt64() const noexcept { + const uint32* values = getValues(); const int64 n = (((int64) (values[1] & 0x7fffffff)) << 32) | values[0]; return negative ? -n : n; } @@ -167,13 +228,12 @@ BigInteger BigInteger::getBitRange (int startBit, int numBits) const { BigInteger r; numBits = jmin (numBits, getHighestBit() + 1 - startBit); - r.ensureSize ((size_t) bitToIndex (numBits)); + uint32* const destValues = r.ensureSize (sizeNeededToHold (numBits)); r.highestBit = numBits; - int i = 0; - while (numBits > 0) + for (int i = 0; numBits > 0;) { - r.values[i++] = getBitRangeAsInt (startBit, (int) jmin (32, numBits)); + destValues[i++] = getBitRangeAsInt (startBit, (int) jmin (32, numBits)); numBits -= 32; startBit += 32; } @@ -198,6 +258,7 @@ uint32 BigInteger::getBitRangeAsInt (const int startBit, int numBits) const noex const size_t pos = bitToIndex (startBit); const int offset = startBit & 31; const int endSpace = 32 - numBits; + const uint32* values = getValues(); uint32 n = ((uint32) values [pos]) >> offset; @@ -223,20 +284,15 @@ void BigInteger::setBitRangeAsInt (const int startBit, int numBits, uint32 value } //============================================================================== -void BigInteger::clear() +void BigInteger::clear() noexcept { - if (numValues > 16) - { - numValues = 4; - values.calloc (numValues + 1); - } - else - { - values.clear (numValues + 1); - } - + heapAllocation.free(); + allocatedSize = numPreallocatedInts; highestBit = -1; negative = false; + + for (int i = 0; i < numPreallocatedInts; ++i) + preallocated[i] = 0; } void BigInteger::setBit (const int bit) @@ -245,11 +301,11 @@ void BigInteger::setBit (const int bit) { if (bit > highestBit) { - ensureSize (bitToIndex (bit)); + ensureSize (sizeNeededToHold (bit)); highestBit = bit; } - values [bitToIndex (bit)] |= bitToMask (bit); + getValues() [bitToIndex (bit)] |= bitToMask (bit); } } @@ -264,7 +320,12 @@ void BigInteger::setBit (const int bit, const bool shouldBeSet) void BigInteger::clearBit (const int bit) noexcept { if (bit >= 0 && bit <= highestBit) - values [bitToIndex (bit)] &= ~bitToMask (bit); + { + getValues() [bitToIndex (bit)] &= ~bitToMask (bit); + + if (bit == highestBit) + highestBit = getHighestBit(); + } } void BigInteger::setRange (int startBit, int numBits, const bool shouldBeSet) @@ -311,31 +372,12 @@ void BigInteger::negate() noexcept #pragma intrinsic (_BitScanReverse) #endif -inline static int highestBitInInt (uint32 n) noexcept -{ - jassert (n != 0); // (the built-in functions may not work for n = 0) - - #if JUCE_GCC || JUCE_CLANG - return 31 - __builtin_clz (n); - #elif JUCE_MSVC - unsigned long highest; - _BitScanReverse (&highest, n); - return (int) highest; - #else - n |= (n >> 1); - n |= (n >> 2); - n |= (n >> 4); - n |= (n >> 8); - n |= (n >> 16); - return countBitsInInt32 (n >> 1); - #endif -} - int BigInteger::countNumberOfSetBits() const noexcept { int total = 0; + const uint32* values = getValues(); - for (int i = (int) bitToIndex (highestBit) + 1; --i >= 0;) + for (int i = (int) sizeNeededToHold (highestBit); --i >= 0;) total += countNumberOfBits (values[i]); return total; @@ -343,19 +385,19 @@ int BigInteger::countNumberOfSetBits() const noexcept int BigInteger::getHighestBit() const noexcept { - for (int i = (int) bitToIndex (highestBit + 1); i >= 0; --i) - { - const uint32 n = values[i]; + const uint32* values = getValues(); - if (n != 0) + for (int i = (int) bitToIndex (highestBit); i >= 0; --i) + if (uint32 n = values[i]) return highestBitInInt (n) + (i << 5); - } return -1; } int BigInteger::findNextSetBit (int i) const noexcept { + const uint32* values = getValues(); + for (; i <= highestBit; ++i) if ((values [bitToIndex (i)] & bitToMask (i)) != 0) return i; @@ -365,6 +407,8 @@ int BigInteger::findNextSetBit (int i) const noexcept int BigInteger::findNextClearBit (int i) const noexcept { + const uint32* values = getValues(); + for (; i <= highestBit; ++i) if ((values [bitToIndex (i)] & bitToMask (i)) == 0) break; @@ -375,6 +419,9 @@ int BigInteger::findNextClearBit (int i) const noexcept //============================================================================== BigInteger& BigInteger::operator+= (const BigInteger& other) { + if (this == &other) + return operator+= (BigInteger (other)); + if (other.isNegative()) return operator-= (-other); @@ -396,23 +443,19 @@ BigInteger& BigInteger::operator+= (const BigInteger& other) } else { - if (other.highestBit > highestBit) - highestBit = other.highestBit; - - ++highestBit; - - const size_t numInts = bitToIndex (highestBit) + 1; - ensureSize (numInts); + highestBit = jmax (highestBit, other.highestBit) + 1; + const size_t numInts = sizeNeededToHold (highestBit); + uint32* const values = ensureSize (numInts); + const uint32* const otherValues = other.getValues(); int64 remainder = 0; - for (size_t i = 0; i <= numInts; ++i) + for (size_t i = 0; i < numInts; ++i) { - if (i < numValues) - remainder += values[i]; + remainder += values[i]; - if (i < other.numValues) - remainder += other.values[i]; + if (i < other.allocatedSize) + remainder += otherValues[i]; values[i] = (uint32) remainder; remainder >>= 32; @@ -427,21 +470,16 @@ BigInteger& BigInteger::operator+= (const BigInteger& other) BigInteger& BigInteger::operator-= (const BigInteger& other) { + if (this == &other) + { + clear(); + return *this; + } + if (other.isNegative()) return operator+= (-other); - if (! isNegative()) - { - if (compareAbsolute (other) < 0) - { - BigInteger temp (other); - swapWith (temp); - *this -= temp; - negate(); - return *this; - } - } - else + if (isNegative()) { negate(); *this += other; @@ -449,14 +487,26 @@ BigInteger& BigInteger::operator-= (const BigInteger& other) return *this; } - const size_t numInts = bitToIndex (highestBit) + 1; - const size_t maxOtherInts = bitToIndex (other.highestBit) + 1; + if (compareAbsolute (other) < 0) + { + BigInteger temp (other); + swapWith (temp); + *this -= temp; + negate(); + return *this; + } + + const size_t numInts = sizeNeededToHold (getHighestBit()); + const size_t maxOtherInts = sizeNeededToHold (other.getHighestBit()); + jassert (numInts >= maxOtherInts); + uint32* const values = getValues(); + const uint32* const otherValues = other.getValues(); int64 amountToSubtract = 0; - for (size_t i = 0; i <= numInts; ++i) + for (size_t i = 0; i < numInts; ++i) { - if (i <= maxOtherInts) - amountToSubtract += (int64) other.values[i]; + if (i < maxOtherInts) + amountToSubtract += (int64) otherValues[i]; if (values[i] >= amountToSubtract) { @@ -471,11 +521,15 @@ BigInteger& BigInteger::operator-= (const BigInteger& other) } } + highestBit = getHighestBit(); return *this; } BigInteger& BigInteger::operator*= (const BigInteger& other) { + if (this == &other) + return operator*= (BigInteger (other)); + int n = getHighestBit(); int t = other.getHighestBit(); @@ -484,29 +538,32 @@ BigInteger& BigInteger::operator*= (const BigInteger& other) BigInteger total; total.highestBit = n + t + 1; + uint32* const totalValues = total.ensureSize (sizeNeededToHold (total.highestBit) + 1); n >>= 5; t >>= 5; - total.ensureSize ((size_t) (n + t + 2)); - BigInteger m (other); m.setNegative (false); + const uint32* const mValues = m.getValues(); + const uint32* const values = getValues(); + for (int i = 0; i <= t; ++i) { uint32 c = 0; for (int j = 0; j <= n; ++j) { - uint64 uv = (uint64) total.values[i + j] + (uint64) values[j] * (uint64) m.values[i] + (uint64) c; - total.values[i + j] = (uint32) uv; + uint64 uv = (uint64) totalValues[i + j] + (uint64) values[j] * (uint64) mValues[i] + (uint64) c; + totalValues[i + j] = (uint32) uv; c = uv >> 32; } - total.values[i + n + 1] = c; + totalValues[i + n + 1] = c; } + total.highestBit = total.getHighestBit(); total.setNegative (wasNegative ^ other.isNegative()); swapWith (total); @@ -515,6 +572,9 @@ BigInteger& BigInteger::operator*= (const BigInteger& other) void BigInteger::divideBy (const BigInteger& divisor, BigInteger& remainder) { + if (this == &divisor) + return divideBy (BigInteger (divisor), remainder); + jassert (this != &remainder); // (can't handle passing itself in to get the remainder) const int divHB = divisor.getHighestBit(); @@ -566,17 +626,21 @@ BigInteger& BigInteger::operator/= (const BigInteger& other) BigInteger& BigInteger::operator|= (const BigInteger& other) { + if (this == &other) + return *this; + // this operation doesn't take into account negative values.. jassert (isNegative() == other.isNegative()); if (other.highestBit >= 0) { - ensureSize (bitToIndex (other.highestBit)); + uint32* const values = ensureSize (sizeNeededToHold (other.highestBit)); + const uint32* const otherValues = other.getValues(); int n = (int) bitToIndex (other.highestBit) + 1; while (--n >= 0) - values[n] |= other.values[n]; + values[n] |= otherValues[n]; if (other.highestBit > highestBit) highestBit = other.highestBit; @@ -589,16 +653,22 @@ BigInteger& BigInteger::operator|= (const BigInteger& other) BigInteger& BigInteger::operator&= (const BigInteger& other) { + if (this == &other) + return *this; + // this operation doesn't take into account negative values.. jassert (isNegative() == other.isNegative()); - int n = (int) numValues; + uint32* const values = getValues(); + const uint32* const otherValues = other.getValues(); + + int n = (int) allocatedSize; - while (n > (int) other.numValues) + while (n > (int) other.allocatedSize) values[--n] = 0; while (--n >= 0) - values[n] &= other.values[n]; + values[n] &= otherValues[n]; if (other.highestBit < highestBit) highestBit = other.highestBit; @@ -609,17 +679,24 @@ BigInteger& BigInteger::operator&= (const BigInteger& other) BigInteger& BigInteger::operator^= (const BigInteger& other) { + if (this == &other) + { + clear(); + return *this; + } + // this operation will only work with the absolute values jassert (isNegative() == other.isNegative()); if (other.highestBit >= 0) { - ensureSize (bitToIndex (other.highestBit)); + uint32* const values = ensureSize (sizeNeededToHold (other.highestBit)); + const uint32* const otherValues = other.getValues(); int n = (int) bitToIndex (other.highestBit) + 1; while (--n >= 0) - values[n] ^= other.values[n]; + values[n] ^= otherValues[n]; if (other.highestBit > highestBit) highestBit = other.highestBit; @@ -679,9 +756,12 @@ int BigInteger::compareAbsolute (const BigInteger& other) const noexcept if (h1 > h2) return 1; if (h1 < h2) return -1; - for (int i = (int) bitToIndex (h1) + 1; --i >= 0;) - if (values[i] != other.values[i]) - return (values[i] > other.values[i]) ? 1 : -1; + const uint32* const values = getValues(); + const uint32* const otherValues = other.getValues(); + + for (int i = (int) bitToIndex (h1); i >= 0; --i) + if (values[i] != otherValues[i]) + return values[i] > otherValues[i] ? 1 : -1; return 0; } @@ -698,7 +778,7 @@ void BigInteger::shiftLeft (int bits, const int startBit) { if (startBit > 0) { - for (int i = highestBit + 1; --i >= startBit;) + for (int i = highestBit; i >= startBit; --i) setBit (i + bits, (*this) [i]); while (--bits >= 0) @@ -706,19 +786,19 @@ void BigInteger::shiftLeft (int bits, const int startBit) } else { - ensureSize (bitToIndex (highestBit + bits) + 1); + uint32* const values = ensureSize (sizeNeededToHold (highestBit + bits)); const size_t wordsToMove = bitToIndex (bits); - size_t top = 1 + bitToIndex (highestBit); + size_t numOriginalInts = bitToIndex (highestBit); highestBit += bits; if (wordsToMove > 0) { - for (int i = (int) top; --i >= 0;) - values [(size_t) i + wordsToMove] = values [i]; + for (int i = (int) numOriginalInts; i >= 0; --i) + values[(size_t) i + wordsToMove] = values[i]; for (size_t j = 0; j < wordsToMove; ++j) - values [j] = 0; + values[j] = 0; bits &= 31; } @@ -727,10 +807,10 @@ void BigInteger::shiftLeft (int bits, const int startBit) { const int invBits = 32 - bits; - for (size_t i = top + 1 + wordsToMove; --i > wordsToMove;) - values[i] = (values[i] << bits) | (values [i - 1] >> invBits); + for (size_t i = bitToIndex (highestBit); i > wordsToMove; --i) + values[i] = (values[i] << bits) | (values[i - 1] >> invBits); - values [wordsToMove] = values [wordsToMove] << bits; + values[wordsToMove] = values[wordsToMove] << bits; } highestBit = getHighestBit(); @@ -757,15 +837,16 @@ void BigInteger::shiftRight (int bits, const int startBit) const size_t wordsToMove = bitToIndex (bits); size_t top = 1 + bitToIndex (highestBit) - wordsToMove; highestBit -= bits; + uint32* const values = getValues(); if (wordsToMove > 0) { size_t i; for (i = 0; i < top; ++i) - values [i] = values [i + wordsToMove]; + values[i] = values[i + wordsToMove]; for (i = 0; i < wordsToMove; ++i) - values [top + i] = 0; + values[top + i] = 0; bits &= 31; } @@ -773,10 +854,10 @@ void BigInteger::shiftRight (int bits, const int startBit) if (bits != 0) { const int invBits = 32 - bits; - --top; + for (size_t i = 0; i < top; ++i) - values[i] = (values[i] >> bits) | (values [i + 1] << invBits); + values[i] = (values[i] >> bits) | (values[i + 1] << invBits); values[top] = (values[top] >> bits); } @@ -1112,6 +1193,7 @@ MemoryBlock BigInteger::toMemoryBlock() const { const int numBytes = (getHighestBit() + 8) >> 3; MemoryBlock mb ((size_t) numBytes); + const uint32* const values = getValues(); for (int i = 0; i < numBytes; ++i) mb[i] = (char) ((values[i / 4] >> ((i & 3) * 8)) & 0xff); @@ -1122,14 +1204,13 @@ MemoryBlock BigInteger::toMemoryBlock() const void BigInteger::loadFromMemoryBlock (const MemoryBlock& data) { const size_t numBytes = data.getSize(); - numValues = 1 + (numBytes / sizeof (uint32)); - values.malloc (numValues + 1); + const size_t numInts = 1 + (numBytes / sizeof (uint32)); + uint32* const values = ensureSize (numInts); - for (int i = 0; i < (int) numValues - 1; ++i) + for (int i = 0; i < (int) numInts - 1; ++i) values[i] = (uint32) ByteOrder::littleEndianInt (addBytesToPointer (data.getData(), sizeof (uint32) * (size_t) i)); - values[numValues - 1] = 0; - values[numValues] = 0; + values[numInts - 1] = 0; for (int i = (int) (numBytes & ~3u); i < (int) numBytes; ++i) this->setBitRangeAsInt (i << 3, 8, (uint32) data [i]); @@ -1138,6 +1219,76 @@ void BigInteger::loadFromMemoryBlock (const MemoryBlock& data) highestBit = getHighestBit(); } +//============================================================================== +void writeLittleEndianBitsInBuffer (void* buffer, uint32 startBit, uint32 numBits, uint32 value) noexcept +{ + jassert (buffer != nullptr); + jassert (numBits > 0 && numBits <= 32); + jassert (numBits == 32 || (value >> numBits) == 0); + + uint8* data = static_cast (buffer) + startBit / 8; + + if (const uint32 offset = (startBit & 7)) + { + const uint32 bitsInByte = 8 - offset; + const uint8 current = *data; + + if (bitsInByte >= numBits) + { + *data = (uint8) ((current & ~(((1u << numBits) - 1u) << offset)) | (value << offset)); + return; + } + + *data++ = current ^ (uint8) (((value << offset) ^ current) & (((1u << bitsInByte) - 1u) << offset)); + numBits -= bitsInByte; + value >>= bitsInByte; + } + + while (numBits >= 8) + { + *data++ = (uint8) value; + value >>= 8; + numBits -= 8; + } + + if (numBits > 0) + *data = (uint8) ((*data & (0xff << numBits)) | value); +} + +uint32 readLittleEndianBitsInBuffer (const void* buffer, uint32 startBit, uint32 numBits) noexcept +{ + jassert (buffer != nullptr); + jassert (numBits > 0 && numBits <= 32); + + uint32 result = 0; + uint32 bitsRead = 0; + const uint8* data = static_cast (buffer) + startBit / 8; + + if (const uint32 offset = (startBit & 7)) + { + const uint32 bitsInByte = 8 - offset; + result = (*data >> offset); + + if (bitsInByte >= numBits) + return result & ((1u << numBits) - 1u); + + numBits -= bitsInByte; + bitsRead += bitsInByte; + ++data; + } + + while (numBits >= 8) + { + result |= (((uint32) *data++) << bitsRead); + bitsRead += 8; + numBits -= 8; + } + + if (numBits > 0) + result |= ((*data & ((1u << numBits) - 1u)) << bitsRead); + + return result; +} //============================================================================== //============================================================================== @@ -1160,33 +1311,64 @@ public: void runTest() override { - beginTest ("BigInteger"); + { + beginTest ("BigInteger"); - Random r = getRandom(); + Random r = getRandom(); - expect (BigInteger().isZero()); - expect (BigInteger(1).isOne()); + expect (BigInteger().isZero()); + expect (BigInteger(1).isOne()); + + for (int j = 10000; --j >= 0;) + { + BigInteger b1 (getBigRandom(r)), + b2 (getBigRandom(r)); + + BigInteger b3 = b1 + b2; + expect (b3 > b1 && b3 > b2); + expect (b3 - b1 == b2); + expect (b3 - b2 == b1); + + BigInteger b4 = b1 * b2; + expect (b4 > b1 && b4 > b2); + expect (b4 / b1 == b2); + expect (b4 / b2 == b1); + expect (((b4 << 1) >> 1) == b4); + expect (((b4 << 10) >> 10) == b4); + expect (((b4 << 100) >> 100) == b4); + + // TODO: should add tests for other ops (although they also get pretty well tested in the RSA unit test) + + BigInteger b5; + b5.loadFromMemoryBlock (b3.toMemoryBlock()); + expect (b3 == b5); + } + } - for (int j = 10000; --j >= 0;) { - BigInteger b1 (getBigRandom(r)), - b2 (getBigRandom(r)); + beginTest ("Bit setting"); - BigInteger b3 = b1 + b2; - expect (b3 > b1 && b3 > b2); - expect (b3 - b1 == b2); - expect (b3 - b2 == b1); + Random r = getRandom(); + static uint8 test[2048]; - BigInteger b4 = b1 * b2; - expect (b4 > b1 && b4 > b2); - expect (b4 / b1 == b2); - expect (b4 / b2 == b1); + for (int j = 100000; --j >= 0;) + { + uint32 offset = static_cast (r.nextInt (200) + 10); + uint32 num = static_cast (r.nextInt (32) + 1); + uint32 value = static_cast (r.nextInt()); + + if (num < 32) + value &= ((1u << num) - 1); - // TODO: should add tests for other ops (although they also get pretty well tested in the RSA unit test) + auto old1 = readLittleEndianBitsInBuffer (test, offset - 6, 6); + auto old2 = readLittleEndianBitsInBuffer (test, offset + num, 6); + writeLittleEndianBitsInBuffer (test, offset, num, value); + auto result = readLittleEndianBitsInBuffer (test, offset, num); - BigInteger b5; - b5.loadFromMemoryBlock (b3.toMemoryBlock()); - expect (b3 == b5); + expect (result == value); + expect (old1 == readLittleEndianBitsInBuffer (test, offset - 6, 6)); + expect (old2 == readLittleEndianBitsInBuffer (test, offset + num, 6)); + } } } }; diff --git a/modules/juce_core/maths/juce_BigInteger.h b/modules/juce_core/maths/juce_BigInteger.h index ada0e89e..4a663317 100644 --- a/modules/juce_core/maths/juce_BigInteger.h +++ b/modules/juce_core/maths/juce_BigInteger.h @@ -106,7 +106,7 @@ public: //============================================================================== /** Resets the value to 0. */ - void clear(); + void clear() noexcept; /** Clears a particular bit in the number. */ void clearBit (int bitNumber) noexcept; @@ -325,12 +325,15 @@ public: private: //============================================================================== - HeapBlock values; - size_t numValues; + enum { numPreallocatedInts = 4 }; + HeapBlock heapAllocation; + uint32 preallocated[numPreallocatedInts]; + size_t allocatedSize; int highestBit; bool negative; - void ensureSize (size_t); + uint32* getValues() const noexcept; + uint32* ensureSize (size_t); void shiftLeft (int bits, int startBit); void shiftRight (int bits, int startBit); diff --git a/modules/juce_core/maths/juce_MathsFunctions.h b/modules/juce_core/maths/juce_MathsFunctions.h index e7a8c39b..7de74a31 100644 --- a/modules/juce_core/maths/juce_MathsFunctions.h +++ b/modules/juce_core/maths/juce_MathsFunctions.h @@ -545,6 +545,25 @@ NumericType square (NumericType n) noexcept return n * n; } +//============================================================================== +/** Writes a number of bits into a memory buffer at a given bit index. + The buffer is treated as a sequence of 8-bit bytes, and the value is encoded in little-endian order, + so for example if startBit = 10, and numBits = 11 then the lower 6 bits of the value would be written + into bits 2-8 of targetBuffer[1], and the upper 5 bits of value into bits 0-5 of targetBuffer[2]. + + @see readLittleEndianBitsInBuffer +*/ +void writeLittleEndianBitsInBuffer (void* targetBuffer, uint32 startBit, uint32 numBits, uint32 value) noexcept; + +/** Reads a number of bits from a buffer at a given bit index. + The buffer is treated as a sequence of 8-bit bytes, and the value is encoded in little-endian order, + so for example if startBit = 10, and numBits = 11 then the lower 6 bits of the result would be read + from bits 2-8 of sourceBuffer[1], and the upper 5 bits of the result from bits 0-5 of sourceBuffer[2]. + + @see writeLittleEndianBitsInBuffer +*/ +uint32 readLittleEndianBitsInBuffer (const void* sourceBuffer, uint32 startBit, uint32 numBits) noexcept; + //============================================================================== #if JUCE_INTEL || defined (DOXYGEN) diff --git a/modules/juce_core/maths/juce_NormalisableRange.h b/modules/juce_core/maths/juce_NormalisableRange.h index 81fbb8c4..694a83e8 100644 --- a/modules/juce_core/maths/juce_NormalisableRange.h +++ b/modules/juce_core/maths/juce_NormalisableRange.h @@ -45,12 +45,13 @@ class NormalisableRange { public: /** Creates a continuous range that performs a dummy mapping. */ - NormalisableRange() noexcept : start(), end (1), interval(), skew (static_cast (1)) {} + NormalisableRange() noexcept : start(), end (1), interval(), skew (static_cast (1)), symmetricSkew (false) {} /** Creates a copy of another range. */ NormalisableRange (const NormalisableRange& other) noexcept : start (other.start), end (other.end), - interval (other.interval), skew (other.skew) + interval (other.interval), skew (other.skew), + symmetricSkew (other.symmetricSkew) { checkInvariants(); } @@ -62,6 +63,7 @@ public: end = other.end; interval = other.interval; skew = other.skew; + symmetricSkew = other.symmetricSkew; checkInvariants(); return *this; } @@ -70,9 +72,10 @@ public: NormalisableRange (ValueType rangeStart, ValueType rangeEnd, ValueType intervalValue, - ValueType skewFactor) noexcept - : start (rangeStart), end (rangeEnd), - interval (intervalValue), skew (skewFactor) + ValueType skewFactor, + bool useSymmetricSkew = false) noexcept + : start (rangeStart), end (rangeEnd), interval (intervalValue), + skew (skewFactor), symmetricSkew (useSymmetricSkew) { checkInvariants(); } @@ -81,8 +84,8 @@ public: NormalisableRange (ValueType rangeStart, ValueType rangeEnd, ValueType intervalValue) noexcept - : start (rangeStart), end (rangeEnd), - interval (intervalValue), skew (static_cast (1)) + : start (rangeStart), end (rangeEnd), interval (intervalValue), + skew (static_cast (1)), symmetricSkew (false) { checkInvariants(); } @@ -90,8 +93,8 @@ public: /** Creates a NormalisableRange with a given range, continuous interval, but a dummy skew-factor. */ NormalisableRange (ValueType rangeStart, ValueType rangeEnd) noexcept - : start (rangeStart), end (rangeEnd), - interval(), skew (static_cast (1)) + : start (rangeStart), end (rangeEnd), interval(), + skew (static_cast (1)), symmetricSkew (false) { checkInvariants(); } @@ -103,10 +106,18 @@ public: { ValueType proportion = (v - start) / (end - start); - if (skew != static_cast (1)) - proportion = std::pow (proportion, skew); + if (skew == static_cast (1)) + return proportion; - return proportion; + if (! symmetricSkew) + return std::pow (proportion, skew); + + ValueType distanceFromMiddle = static_cast (2) * proportion - static_cast (1); + + return (static_cast (1) + std::pow (std::abs (distanceFromMiddle), skew) + * (distanceFromMiddle < static_cast (0) ? static_cast (-1) + : static_cast (1))) + / static_cast (2); } /** Uses the properties of this mapping to convert a normalised 0->1 value to @@ -114,10 +125,22 @@ public: */ ValueType convertFrom0to1 (ValueType proportion) const noexcept { - if (skew != static_cast (1) && proportion > ValueType()) - proportion = std::exp (std::log (proportion) / skew); + if (! symmetricSkew) + { + if (skew != static_cast (1) && proportion > ValueType()) + proportion = std::exp (std::log (proportion) / skew); + + return start + (end - start) * proportion; + } - return start + (end - start) * proportion; + ValueType distanceFromMiddle = static_cast (2) * proportion - static_cast (1); + + if (skew != static_cast (1) && distanceFromMiddle != static_cast (0)) + distanceFromMiddle = std::exp (std::log (std::abs (distanceFromMiddle)) / skew) + * (distanceFromMiddle < static_cast (0) ? static_cast (-1) + : static_cast (1)); + + return start + (end - start) / static_cast (2) * (static_cast (1) + distanceFromMiddle); } /** Takes a non-normalised value and snaps it based on the interval property of @@ -158,6 +181,9 @@ public: */ ValueType skew; + /** If true, the skew factor applies from the middle of the slider to each of its ends. */ + bool symmetricSkew; + private: void checkInvariants() const { diff --git a/modules/juce_core/maths/juce_Range.h b/modules/juce_core/maths/juce_Range.h index 67a4324b..5f9d409e 100644 --- a/modules/juce_core/maths/juce_Range.h +++ b/modules/juce_core/maths/juce_Range.h @@ -172,6 +172,15 @@ public: return Range (start, start + newLength); } + /** Returns a range which has its start moved down and its end moved up by the + given amount. + @returns The returned range will be (start - amount, end + amount) + */ + Range expanded (ValueType amount) const noexcept + { + return Range (start - amount, end + amount); + } + //============================================================================== /** Adds an amount to the start and end of the range. */ inline Range operator+= (const ValueType amountToAdd) noexcept diff --git a/modules/juce_core/memory/juce_ScopedPointer.h b/modules/juce_core/memory/juce_ScopedPointer.h index 3db0c1cf..581471b5 100644 --- a/modules/juce_core/memory/juce_ScopedPointer.h +++ b/modules/juce_core/memory/juce_ScopedPointer.h @@ -160,6 +160,7 @@ public: ScopedPointer& operator= (ScopedPointer&& other) noexcept { + ContainerDeletePolicy::destroy (object); object = other.object; other.object = nullptr; return *this; diff --git a/modules/juce_core/memory/juce_SharedResourcePointer.h b/modules/juce_core/memory/juce_SharedResourcePointer.h index 307b5595..12a63ba4 100644 --- a/modules/juce_core/memory/juce_SharedResourcePointer.h +++ b/modules/juce_core/memory/juce_SharedResourcePointer.h @@ -122,7 +122,7 @@ public: SharedObjectType& get() const noexcept { return *sharedObject; } /** Returns the object that this pointer references. - The pointer returned may be zero, of course. + The pointer returned may be a nullptr, of course. */ SharedObjectType& getObject() const noexcept { return *sharedObject; } diff --git a/modules/juce_core/native/juce_BasicNativeHeaders.h b/modules/juce_core/native/juce_BasicNativeHeaders.h index 5f778827..6b050335 100644 --- a/modules/juce_core/native/juce_BasicNativeHeaders.h +++ b/modules/juce_core/native/juce_BasicNativeHeaders.h @@ -117,6 +117,10 @@ #include #endif + #ifndef S_FALSE + #define S_FALSE (1) // (apparently some obscure win32 dev environments don't define this) + #endif + #undef PACKED #if JUCE_MSVC diff --git a/modules/juce_core/native/juce_curl_Network.cpp b/modules/juce_core/native/juce_curl_Network.cpp index 5d6a2415..8051ed4a 100644 --- a/modules/juce_core/native/juce_curl_Network.cpp +++ b/modules/juce_core/native/juce_curl_Network.cpp @@ -133,10 +133,17 @@ private: const int maxRedirects, const String& headers, bool isPost, const String& httpRequest, size_t postSize) { + curl_version_info_data* data = curl_version_info (CURLVERSION_NOW); + jassert (data != nullptr); + + String userAgent = String ("curl/") + data->version; + if (curl_easy_setopt (curl, CURLOPT_URL, address.toRawUTF8()) == CURLE_OK && curl_easy_setopt (curl, CURLOPT_WRITEDATA, this) == CURLE_OK && curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, StaticCurlWrite) == CURLE_OK - && curl_easy_setopt (curl, CURLOPT_MAXREDIRS, static_cast (maxRedirects)) == CURLE_OK) + && curl_easy_setopt (curl, CURLOPT_MAXREDIRS, static_cast (maxRedirects)) == CURLE_OK + && curl_easy_setopt (curl, CURLOPT_USERAGENT, userAgent.toRawUTF8()) == CURLE_OK + && curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, (maxRedirects > 0 ? 1 : 0)) == CURLE_OK) { if (isPost) { @@ -434,10 +441,17 @@ private: size_t len = size * nmemb; - curlHeaders += String (ptr, len); + String header (ptr, len); + + if (! header.contains (":") && header.startsWithIgnoreCase ("HTTP/")) + curlHeaders.clear(); + else + curlHeaders += header; + return len; } + //============================================================================== // Static method wrappers static size_t StaticCurlWrite (char* ptr, size_t size, size_t nmemb, void* userdata) diff --git a/modules/juce_core/native/juce_mac_Files.mm b/modules/juce_core/native/juce_mac_Files.mm index 564ccc7e..35d8629f 100644 --- a/modules/juce_core/native/juce_mac_Files.mm +++ b/modules/juce_core/native/juce_mac_Files.mm @@ -218,7 +218,7 @@ File File::getSpecialLocation (const SpecialLocationType type) case invokedExecutableFile: if (juce_argv != nullptr && juce_argc > 0) - return File (CharPointer_UTF8 (juce_argv[0])); + return File::getCurrentWorkingDirectory().getChildFile (CharPointer_UTF8 (juce_argv[0])); // deliberate fall-through... case currentExecutableFile: @@ -229,13 +229,13 @@ File File::getSpecialLocation (const SpecialLocationType type) const File exe (juce_getExecutableFile()); const File parent (exe.getParentDirectory()); - #if JUCE_IOS + #if JUCE_IOS return parent; - #else + #else return parent.getFullPathName().endsWithIgnoreCase ("Contents/MacOS") ? parent.getParentDirectory().getParentDirectory() : exe; - #endif + #endif } case hostApplicationPath: diff --git a/modules/juce_core/native/juce_mac_Network.mm b/modules/juce_core/native/juce_mac_Network.mm index afde564f..64e9324e 100644 --- a/modules/juce_core/native/juce_mac_Network.mm +++ b/modules/juce_core/native/juce_mac_Network.mm @@ -130,12 +130,24 @@ public: ~URLConnectionState() { - stop(); - [data release]; + signalThreadShouldExit(); + + { + const ScopedLock sl (dataLock); + isBeingDeleted = true; + [task cancel]; + DelegateClass::setState (delegate, nullptr); + } + + stopThread (10000); + [task release]; [request release]; [headers release]; [session release]; + + const ScopedLock sl (dataLock); [delegate release]; + [data release]; } bool start (URL::OpenStreamProgressCallback* callback, void* context) @@ -145,7 +157,8 @@ public: while (isThreadRunning() && ! initialised) { if (callback != nullptr) - callback (context, (int) latestTotalBytes, (int) [[request HTTPBody] length]); + if (! callback (context, (int) latestTotalBytes, (int) [[request HTTPBody] length])) + return false; Thread::sleep (1); } @@ -153,18 +166,6 @@ public: return true; } - void stop() - { - { - const ScopedLock sl (dataLock); - [task cancel]; - } - - stopThread (10000); - [task release]; - task = nil; - } - int read (char* dest, int numBytes) { int numDone = 0; @@ -199,6 +200,9 @@ public: { { const ScopedLock sl (dataLock); + if (isBeingDeleted) + return; + [data setLength: 0]; } @@ -225,10 +229,18 @@ public: } } - void didBecomeInvalidWithError (NSError* error) + void didComplete (NSError* error) { - DBG (nsStringToJuce ([error description])); ignoreUnused (error); - hasFailed = true; + const ScopedLock sl (dataLock); + if (isBeingDeleted) + return; + + #if JUCE_DEBUG + if (error != nullptr) + DBG (nsStringToJuce ([error description])); + #endif + + hasFailed = (error != nullptr); initialised = true; signalThreadShouldExit(); } @@ -236,6 +248,9 @@ public: void didReceiveData (NSData* newData) { const ScopedLock sl (dataLock); + if (isBeingDeleted) + return; + [data appendData: newData]; initialised = true; } @@ -245,10 +260,15 @@ public: latestTotalBytes = static_cast (totalBytesWritten); } - void willPerformHTTPRedirection (NSURLRequest* aRequest, void (^completionHandler)(NSURLRequest *)) + void willPerformHTTPRedirection (NSURLRequest* urlRequest, void (^completionHandler)(NSURLRequest *)) { - NSURLRequest* newRequest = (numRedirects++ < numRedirectsToFollow ? aRequest : nullptr); - completionHandler (newRequest); + { + const ScopedLock sl (dataLock); + if (isBeingDeleted) + return; + } + + completionHandler (numRedirects++ < numRedirectsToFollow ? urlRequest : nil); } void run() override @@ -268,13 +288,8 @@ public: [task resume]; while (! threadShouldExit()) - { wait (5); - if (task.state != NSURLSessionTaskStateRunning) - break; - } - hasFinished = true; initialised = true; } @@ -288,7 +303,7 @@ public: NSMutableData* data = nil; NSDictionary* headers = nil; int statusCode = 0; - bool initialised = false, hasFailed = false, hasFinished = false; + bool initialised = false, hasFailed = false, hasFinished = false, isBeingDeleted = false; const int numRedirectsToFollow; int numRedirects = 0; int64 latestTotalBytes = 0; @@ -309,6 +324,9 @@ private: didSendBodyData, "v@:@@qqq"); addMethod (@selector (URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:), willPerformHTTPRedirection, "v@:@@@@@"); + + addMethod (@selector (URLSession:task:didCompleteWithError:), didCompleteWithError, "v@:@@@"); + registerClass(); } @@ -318,28 +336,33 @@ private: private: static void didReceiveResponse (id self, SEL, NSURLSession*, NSURLSessionDataTask*, NSURLResponse* response, id completionHandler) { - getState (self)->didReceiveResponse (response, completionHandler); + if (auto state = getState (self)) state->didReceiveResponse (response, completionHandler); } static void didBecomeInvalidWithError (id self, SEL, NSURLSession*, NSError* error) { - getState (self)->didBecomeInvalidWithError (error); + if (auto state = getState (self)) state->didComplete (error); } static void didReceiveData (id self, SEL, NSURLSession*, NSURLSessionDataTask*, NSData* newData) { - getState (self)->didReceiveData (newData); + if (auto state = getState (self)) state->didReceiveData (newData); } static void didSendBodyData (id self, SEL, NSURLSession*, NSURLSessionTask*, int64_t, int64_t totalBytesWritten, int64_t) { - getState (self)->didSendBodyData (totalBytesWritten); + if (auto state = getState (self)) state->didSendBodyData (totalBytesWritten); } static void willPerformHTTPRedirection (id self, SEL, NSURLSession*, NSURLSessionTask*, NSHTTPURLResponse*, NSURLRequest* request, void (^completionHandler)(NSURLRequest *)) { - getState (self)->willPerformHTTPRedirection (request, completionHandler); + if (auto state = getState (self)) state->willPerformHTTPRedirection (request, completionHandler); + } + + static void didCompleteWithError (id self, SEL, NSURLConnection*, NSURLSessionTask*, NSError* error) + { + if (auto state = getState (self)) state->didComplete (error); } }; @@ -385,10 +408,10 @@ public: { stop(); [connection release]; - [data release]; [request release]; [headers release]; [delegate release]; + [data release]; } bool start (URL::OpenStreamProgressCallback* callback, void* context) @@ -398,7 +421,8 @@ public: while (isThreadRunning() && ! initialised) { if (callback != nullptr) - callback (context, latestTotalBytes, (int) [[request HTTPBody] length]); + if (! callback (context, latestTotalBytes, (int) [[request HTTPBody] length])) + return false; Thread::sleep (1); } diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h index 033e4378..5dd2888d 100644 --- a/modules/juce_core/native/juce_posix_SharedCode.h +++ b/modules/juce_core/native/juce_posix_SharedCode.h @@ -440,6 +440,11 @@ bool File::moveInternal (const File& dest) const return false; } +bool File::replaceInternal (const File& dest) const +{ + return moveInternal (dest); +} + Result File::createDirectoryInternal (const String& fileName) const { return getResultForReturnValue (mkdir (fileName.toUTF8(), 0777)); @@ -586,7 +591,7 @@ String SystemStats::getEnvironmentVariable (const String& name, const String& de } //============================================================================== -void MemoryMappedFile::openInternal (const File& file, AccessMode mode) +void MemoryMappedFile::openInternal (const File& file, AccessMode mode, bool exclusive) { jassert (mode == readOnly || mode == readWrite); @@ -603,7 +608,7 @@ void MemoryMappedFile::openInternal (const File& file, AccessMode mode) { void* m = mmap (0, (size_t) range.getLength(), mode == readWrite ? (PROT_READ | PROT_WRITE) : PROT_READ, - MAP_SHARED, fileHandle, + exclusive ? MAP_PRIVATE : MAP_SHARED, fileHandle, (off_t) range.getStart()); if (m != MAP_FAILED) diff --git a/modules/juce_core/native/juce_win32_ComSmartPtr.h b/modules/juce_core/native/juce_win32_ComSmartPtr.h index 380e9d84..d8c96c2c 100644 --- a/modules/juce_core/native/juce_win32_ComSmartPtr.h +++ b/modules/juce_core/native/juce_win32_ComSmartPtr.h @@ -29,9 +29,23 @@ #ifndef JUCE_WIN32_COMSMARTPTR_H_INCLUDED #define JUCE_WIN32_COMSMARTPTR_H_INCLUDED -#if ! (defined (_MSC_VER) || defined (__uuidof)) +#if JUCE_MINGW || (! (defined (_MSC_VER) || defined (__uuidof))) +#ifdef __uuidof + #undef __uuidof +#endif + template struct UUIDGetter { static CLSID get() { jassertfalse; return CLSID(); } }; #define __uuidof(x) UUIDGetter::get() + + template <> + struct UUIDGetter<::IUnknown> + { + static CLSID get() + { + GUID g = { 0, 0, 0, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } }; + return g; + } + }; #endif inline GUID uuidFromString (const char* const s) noexcept @@ -135,7 +149,7 @@ protected: JUCE_COMRESULT QueryInterface (REFIID refId, void** result) { - if (refId == IID_IUnknown) + if (refId == __uuidof (IUnknown)) return castToType (result); *result = 0; diff --git a/modules/juce_core/native/juce_win32_Files.cpp b/modules/juce_core/native/juce_win32_Files.cpp index 69835624..9edd8690 100644 --- a/modules/juce_core/native/juce_win32_Files.cpp +++ b/modules/juce_core/native/juce_win32_Files.cpp @@ -220,6 +220,15 @@ bool File::moveInternal (const File& dest) const return MoveFile (fullPath.toWideCharPointer(), dest.getFullPathName().toWideCharPointer()) != 0; } +bool File::replaceInternal (const File& dest) const +{ + void* lpExclude = 0; + void* lpReserved = 0; + + return ReplaceFile (dest.getFullPathName().toWideCharPointer(), fullPath.toWideCharPointer(), + 0, REPLACEFILE_IGNORE_MERGE_ERRORS, lpExclude, lpReserved) != 0; +} + Result File::createDirectoryInternal (const String& fileName) const { return CreateDirectory (fileName.toWideCharPointer(), 0) ? Result::ok() @@ -325,7 +334,7 @@ Result FileOutputStream::truncate() } //============================================================================== -void MemoryMappedFile::openInternal (const File& file, AccessMode mode) +void MemoryMappedFile::openInternal (const File& file, AccessMode mode, bool exclusive) { jassert (mode == readOnly || mode == readWrite); @@ -348,7 +357,8 @@ void MemoryMappedFile::openInternal (const File& file, AccessMode mode) access = FILE_MAP_ALL_ACCESS; } - HANDLE h = CreateFile (file.getFullPathName().toWideCharPointer(), accessMode, FILE_SHARE_READ, 0, + HANDLE h = CreateFile (file.getFullPathName().toWideCharPointer(), accessMode, + exclusive ? 0 : (FILE_SHARE_READ | (mode == readWrite ? FILE_SHARE_WRITE : 0)), 0, createType, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, 0); if (h != INVALID_HANDLE_VALUE) diff --git a/modules/juce_core/native/juce_win32_SystemStats.cpp b/modules/juce_core/native/juce_win32_SystemStats.cpp index e07e6a09..beb8dcf4 100644 --- a/modules/juce_core/native/juce_win32_SystemStats.cpp +++ b/modules/juce_core/native/juce_win32_SystemStats.cpp @@ -41,10 +41,28 @@ void Logger::outputDebugString (const String& text) #pragma intrinsic (__cpuid) #pragma intrinsic (__rdtsc) +#if JUCE_MINGW +static void callCPUID (int result[4], uint32 type) +{ + uint32 la = result[0], lb = result[1], lc = result[2], ld = result[3]; + + asm ("mov %%ebx, %%esi \n\t" + "cpuid \n\t" + "xchg %%esi, %%ebx" + : "=a" (la), "=S" (lb), "=c" (lc), "=d" (ld) : "a" (type) + #if JUCE_64BIT + , "b" (lb), "c" (lc), "d" (ld) + #endif + ); + + result[0] = la; result[1] = lb; result[2] = lc; result[3] = ld; +} +#else static void callCPUID (int result[4], int infoType) { __cpuid (result, infoType); } +#endif String SystemStats::getCpuVendor() { diff --git a/modules/juce_core/network/juce_URL.cpp b/modules/juce_core/network/juce_URL.cpp index 2350e8a1..46b1d3cf 100644 --- a/modules/juce_core/network/juce_URL.cpp +++ b/modules/juce_core/network/juce_URL.cpp @@ -222,6 +222,13 @@ int URL::getPort() const return colonPos > 0 ? url.substring (colonPos + 1).getIntValue() : 0; } +URL URL::withNewDomainAndPath (const String& newURL) const +{ + URL u (*this); + u.url = newURL; + return u; +} + URL URL::withNewSubPath (const String& newPath) const { const int startOfPath = URLHelpers::findStartOfPath (url); diff --git a/modules/juce_core/network/juce_URL.h b/modules/juce_core/network/juce_URL.h index a2b3cb76..c68afe16 100644 --- a/modules/juce_core/network/juce_URL.h +++ b/modules/juce_core/network/juce_URL.h @@ -106,10 +106,19 @@ public: */ int getPort() const; - /** Returns a new version of this URL that uses a different sub-path. + /** Returns a new version of this URL with a different domain and path. + + E.g. if the URL is "http://www.xyz.com/foo?x=1" and you call this with + "abc.com/zzz", it'll return "http://abc.com/zzz?x=1". + @see withNewSubPath + */ + URL withNewDomainAndPath (const String& newFullPath) const; + + /** Returns a new version of this URL with a different sub-path. E.g. if the URL is "http://www.xyz.com/foo?x=1" and you call this with "bar", it'll return "http://www.xyz.com/bar?x=1". + @see withNewDomainAndPath */ URL withNewSubPath (const String& newPath) const; @@ -274,7 +283,7 @@ public: if the parameter httpRequestCmd is not specified (or empty) then this parameter will determine which HTTP request command will be used (POST or GET). - @param progressCallback if this is non-zero, it lets you supply a callback function + @param progressCallback if this is not a nullptr, it lets you supply a callback function to keep track of the operation's progress. This can be useful for lengthy POST operations, so that you can provide user feedback. @param progressCallbackContext if a callback is specified, this value will be passed to diff --git a/modules/juce_core/system/juce_StandardHeader.h b/modules/juce_core/system/juce_StandardHeader.h index 2234f27e..55d6ea60 100644 --- a/modules/juce_core/system/juce_StandardHeader.h +++ b/modules/juce_core/system/juce_StandardHeader.h @@ -36,7 +36,7 @@ */ #define JUCE_MAJOR_VERSION 4 #define JUCE_MINOR_VERSION 2 -#define JUCE_BUILDNUMBER 3 +#define JUCE_BUILDNUMBER 4 /** Current Juce version number. diff --git a/modules/juce_core/system/juce_SystemStats.cpp b/modules/juce_core/system/juce_SystemStats.cpp index 9edbb165..a451b386 100644 --- a/modules/juce_core/system/juce_SystemStats.cpp +++ b/modules/juce_core/system/juce_SystemStats.cpp @@ -198,11 +198,9 @@ bool SystemStats::isRunningInAppExtensionSandbox() noexcept bundle = bundle.getParentDirectory().getParentDirectory(); #endif - if (! bundle.isDirectory()) - return false; + if (bundle.isDirectory()) + return (bundle.getFileExtension() == ".appex"); + #endif - return (bundle.getFileExtension() == ".appex"); - #else return false; - #endif } diff --git a/modules/juce_core/text/juce_String.cpp b/modules/juce_core/text/juce_String.cpp index 13975ed5..b025dde5 100644 --- a/modules/juce_core/text/juce_String.cpp +++ b/modules/juce_core/text/juce_String.cpp @@ -237,7 +237,9 @@ private: } }; +#if JUCE_ALLOW_STATIC_NULL_VARIABLES const String String::empty; +#endif //============================================================================== String::String() noexcept : text (&(emptyString.text)) @@ -2270,7 +2272,7 @@ public: beginTest ("Basics"); expect (String().length() == 0); - expect (String() == String::empty); + expect (String() == String()); String s1, s2 ("abcd"); expect (s1.isEmpty() && ! s1.isNotEmpty()); expect (s2.isNotEmpty() && ! s2.isEmpty()); @@ -2282,16 +2284,16 @@ public: expect (String ("abcdefg", 4) == L"abcd"); expect (String ("abcdefg", 4) == String (L"abcdefg", 4)); expect (String::charToString ('x') == "x"); - expect (String::charToString (0) == String::empty); + expect (String::charToString (0) == String()); expect (s2 + "e" == "abcde" && s2 + 'e' == "abcde"); expect (s2 + L'e' == "abcde" && s2 + L"e" == "abcde"); expect (s1.equalsIgnoreCase ("abcD") && s1 < "abce" && s1 > "abbb"); expect (s1.startsWith ("ab") && s1.startsWith ("abcd") && ! s1.startsWith ("abcde")); expect (s1.startsWithIgnoreCase ("aB") && s1.endsWithIgnoreCase ("CD")); expect (s1.endsWith ("bcd") && ! s1.endsWith ("aabcd")); - expectEquals (s1.indexOf (String::empty), 0); - expectEquals (s1.indexOfIgnoreCase (String::empty), 0); - expect (s1.startsWith (String::empty) && s1.endsWith (String::empty) && s1.contains (String::empty)); + expectEquals (s1.indexOf (String()), 0); + expectEquals (s1.indexOfIgnoreCase (String()), 0); + expect (s1.startsWith (String()) && s1.endsWith (String()) && s1.contains (String())); expect (s1.contains ("cd") && s1.contains ("ab") && s1.contains ("abcd")); expect (s1.containsChar ('a')); expect (! s1.containsChar ('x')); @@ -2472,9 +2474,9 @@ public: } beginTest ("Numeric conversions"); - expect (String::empty.getIntValue() == 0); - expect (String::empty.getDoubleValue() == 0.0); - expect (String::empty.getFloatValue() == 0.0f); + expect (String().getIntValue() == 0); + expect (String().getDoubleValue() == 0.0); + expect (String().getFloatValue() == 0.0f); expect (s.getIntValue() == 12345678); expect (s.getLargeIntValue() == (int64) 12345678); expect (s.getDoubleValue() == 12345678.0); @@ -2511,11 +2513,11 @@ public: expect (s3.containsAnyOf (String (L"zzzFs"))); expect (s3.startsWith ("abcd")); expect (s3.startsWithIgnoreCase (String (L"abCD"))); - expect (s3.startsWith (String::empty)); + expect (s3.startsWith (String())); expect (s3.startsWithChar ('a')); expect (s3.endsWith (String ("HIJ"))); expect (s3.endsWithIgnoreCase (String (L"Hij"))); - expect (s3.endsWith (String::empty)); + expect (s3.endsWith (String())); expect (s3.endsWithChar (L'J')); expect (s3.indexOf ("HIJ") == 7); expect (s3.indexOf (String (L"HIJK")) == -1); @@ -2565,28 +2567,28 @@ public: expect (! String ("xx?y").matchesWildcard ("xx?y?", true)); expect (String ("xx?y").matchesWildcard ("xx??", true)); - expectEquals (s5.fromFirstOccurrenceOf (String::empty, true, false), s5); + expectEquals (s5.fromFirstOccurrenceOf (String(), true, false), s5); expectEquals (s5.fromFirstOccurrenceOf ("xword2", true, false), s5.substring (100)); expectEquals (s5.fromFirstOccurrenceOf (String (L"word2"), true, false), s5.substring (5)); expectEquals (s5.fromFirstOccurrenceOf ("Word2", true, true), s5.substring (5)); expectEquals (s5.fromFirstOccurrenceOf ("word2", false, false), s5.getLastCharacters (6)); expectEquals (s5.fromFirstOccurrenceOf ("Word2", false, true), s5.getLastCharacters (6)); - expectEquals (s5.fromLastOccurrenceOf (String::empty, true, false), s5); + expectEquals (s5.fromLastOccurrenceOf (String(), true, false), s5); expectEquals (s5.fromLastOccurrenceOf ("wordx", true, false), s5); expectEquals (s5.fromLastOccurrenceOf ("word", true, false), s5.getLastCharacters (5)); expectEquals (s5.fromLastOccurrenceOf ("worD", true, true), s5.getLastCharacters (5)); expectEquals (s5.fromLastOccurrenceOf ("word", false, false), s5.getLastCharacters (1)); expectEquals (s5.fromLastOccurrenceOf ("worD", false, true), s5.getLastCharacters (1)); - expect (s5.upToFirstOccurrenceOf (String::empty, true, false).isEmpty()); + expect (s5.upToFirstOccurrenceOf (String(), true, false).isEmpty()); expectEquals (s5.upToFirstOccurrenceOf ("word4", true, false), s5); expectEquals (s5.upToFirstOccurrenceOf ("word2", true, false), s5.substring (0, 10)); expectEquals (s5.upToFirstOccurrenceOf ("Word2", true, true), s5.substring (0, 10)); expectEquals (s5.upToFirstOccurrenceOf ("word2", false, false), s5.substring (0, 5)); expectEquals (s5.upToFirstOccurrenceOf ("Word2", false, true), s5.substring (0, 5)); - expectEquals (s5.upToLastOccurrenceOf (String::empty, true, false), s5); + expectEquals (s5.upToLastOccurrenceOf (String(), true, false), s5); expectEquals (s5.upToLastOccurrenceOf ("zword", true, false), s5); expectEquals (s5.upToLastOccurrenceOf ("word", true, false), s5.dropLastCharacters (1)); expectEquals (s5.dropLastCharacters(1).upToLastOccurrenceOf ("word", true, false), s5.dropLastCharacters (1)); @@ -2604,9 +2606,9 @@ public: expect (s5.replaceCharacters ("wo", "xy") != s5); expectEquals (s5.replaceCharacters ("wo", "xy").replaceCharacters ("xy", "wo"), s5); expectEquals (s5.retainCharacters ("1wordxya"), String ("wordwordword")); - expect (s5.retainCharacters (String::empty).isEmpty()); + expect (s5.retainCharacters (String()).isEmpty()); expect (s5.removeCharacters ("1wordxya") == " 2 3"); - expectEquals (s5.removeCharacters (String::empty), s5); + expectEquals (s5.removeCharacters (String()), s5); expect (s5.initialSectionContainingOnly ("word") == L"word"); expect (String ("word").initialSectionContainingOnly ("word") == L"word"); expectEquals (s5.initialSectionNotContaining (String ("xyz ")), String ("word")); @@ -2647,9 +2649,9 @@ public: expectEquals (s.joinIntoString ("-"), String ("4-3-2-1-0")); s.remove (2); expectEquals (s.joinIntoString ("--"), String ("4--3--1--0")); - expectEquals (s.joinIntoString (String::empty), String ("4310")); + expectEquals (s.joinIntoString (StringRef()), String ("4310")); s.clear(); - expectEquals (s.joinIntoString ("x"), String::empty); + expectEquals (s.joinIntoString ("x"), String()); StringArray toks; toks.addTokens ("x,,", ";,", ""); diff --git a/modules/juce_core/text/juce_String.h b/modules/juce_core/text/juce_String.h index e60bcbde..0a3b8bcc 100644 --- a/modules/juce_core/text/juce_String.h +++ b/modules/juce_core/text/juce_String.h @@ -147,13 +147,15 @@ public: ~String() noexcept; //============================================================================== + #if JUCE_ALLOW_STATIC_NULL_VARIABLES /** This is a static empty string object that can be used if you need a reference to one. The value of String::empty is exactly the same as String(), and in almost all cases - it's better to avoid String::empty and just use String() instead, so that the compiler + it's better to avoid String::empty and just use String() or {} instead, so that the compiler only has to reason about locally-constructed objects, rather than taking into account the fact that you're referencing a global shared static memory address. */ static const String empty; + #endif /** This is the character encoding type used internally to store the string. diff --git a/modules/juce_core/text/juce_StringArray.cpp b/modules/juce_core/text/juce_StringArray.cpp index f31c8470..3df28610 100644 --- a/modules/juce_core/text/juce_StringArray.cpp +++ b/modules/juce_core/text/juce_StringArray.cpp @@ -127,7 +127,12 @@ const String& StringArray::operator[] (const int index) const noexcept if (isPositiveAndBelow (index, strings.size())) return strings.getReference (index); + #if JUCE_ALLOW_STATIC_NULL_VARIABLES return String::empty; + #else + static String empty; + return empty; + #endif } String& StringArray::getReference (const int index) noexcept diff --git a/modules/juce_core/text/juce_TextDiff.cpp b/modules/juce_core/text/juce_TextDiff.cpp index a8bff4e7..5044780b 100644 --- a/modules/juce_core/text/juce_TextDiff.cpp +++ b/modules/juce_core/text/juce_TextDiff.cpp @@ -262,9 +262,9 @@ public: Random r = getRandom(); - testDiff (String::empty, String::empty); - testDiff ("x", String::empty); - testDiff (String::empty, "x"); + testDiff (String(), String()); + testDiff ("x", String()); + testDiff (String(), "x"); testDiff ("x", "x"); testDiff ("x", "y"); testDiff ("xxx", "x"); diff --git a/modules/juce_core/threads/juce_ThreadPool.h b/modules/juce_core/threads/juce_ThreadPool.h index 3934215e..8d67a010 100644 --- a/modules/juce_core/threads/juce_ThreadPool.h +++ b/modules/juce_core/threads/juce_ThreadPool.h @@ -237,8 +237,8 @@ public: methods called to try to interrupt them @param timeOutMilliseconds the length of time this method should wait for all the jobs to finish before giving up and returning false - @param selectedJobsToRemove if this is non-zero, the JobSelector object is asked to decide which - jobs should be removed. If it is zero, all jobs are removed + @param selectedJobsToRemove if this is not a nullptr, the JobSelector object is asked to decide + which jobs should be removed. If it is a nullptr, all jobs are removed @returns true if all jobs are successfully stopped and removed; false if the timeout period expires while waiting for one or more jobs to stop */ diff --git a/modules/juce_core/time/juce_PerformanceCounter.h b/modules/juce_core/time/juce_PerformanceCounter.h index 5426636a..7d279d88 100644 --- a/modules/juce_core/time/juce_PerformanceCounter.h +++ b/modules/juce_core/time/juce_PerformanceCounter.h @@ -60,7 +60,7 @@ public: @param counterName the name used when printing out the statistics @param runsPerPrintout the number of start/stop iterations before calling printStatistics() - @param loggingFile a file to dump the results to - if this is File::nonexistent, + @param loggingFile a file to dump the results to - if this is File(), the results are just written to the debugger output */ PerformanceCounter (const String& counterName, diff --git a/modules/juce_core/xml/juce_XmlElement.cpp b/modules/juce_core/xml/juce_XmlElement.cpp index 5e636200..73d4ccf2 100644 --- a/modules/juce_core/xml/juce_XmlElement.cpp +++ b/modules/juce_core/xml/juce_XmlElement.cpp @@ -460,12 +460,22 @@ int XmlElement::getNumAttributes() const noexcept return attributes.size(); } +static const String& getEmptyStringRef() noexcept +{ + #if JUCE_ALLOW_STATIC_NULL_VARIABLES + return String::empty; + #else + static String empty; + return empty; + #endif +} + const String& XmlElement::getAttributeName (const int index) const noexcept { if (const XmlAttributeNode* const att = attributes [index]) return att->name.toString(); - return String::empty; + return getEmptyStringRef(); } const String& XmlElement::getAttributeValue (const int index) const noexcept @@ -473,7 +483,7 @@ const String& XmlElement::getAttributeValue (const int index) const noexcept if (const XmlAttributeNode* const att = attributes [index]) return att->value; - return String::empty; + return getEmptyStringRef(); } XmlElement::XmlAttributeNode* XmlElement::getAttribute (StringRef attributeName) const noexcept @@ -496,7 +506,7 @@ const String& XmlElement::getStringAttribute (StringRef attributeName) const noe if (const XmlAttributeNode* att = getAttribute (attributeName)) return att->value; - return String::empty; + return getEmptyStringRef(); } String XmlElement::getStringAttribute (StringRef attributeName, const String& defaultReturnValue) const diff --git a/modules/juce_core/xml/juce_XmlElement.h b/modules/juce_core/xml/juce_XmlElement.h index 2d23c6b7..e114aa70 100644 --- a/modules/juce_core/xml/juce_XmlElement.h +++ b/modules/juce_core/xml/juce_XmlElement.h @@ -457,8 +457,8 @@ public: Also, it's much easier and neater to use this method indirectly via the forEachXmlChildElement macro. - @returns the sibling element that follows this one, or zero if this is the last - element in its parent + @returns the sibling element that follows this one, or a nullptr if + this is the last element in its parent @see getNextElement, isTextElement, forEachXmlChildElement */ diff --git a/modules/juce_core/zip/juce_ZipFile.h b/modules/juce_core/zip/juce_ZipFile.h index b253eeb7..84f7336d 100644 --- a/modules/juce_core/zip/juce_ZipFile.h +++ b/modules/juce_core/zip/juce_ZipFile.h @@ -91,7 +91,7 @@ public: int getNumEntries() const noexcept; /** Returns a structure that describes one of the entries in the zip file. - This may return zero if the index is out of range. + This may return a nullptr if the index is out of range. @see ZipFile::ZipEntry */ const ZipEntry* getEntry (int index) const noexcept; @@ -120,7 +120,7 @@ public: /** Creates a stream that can read from one of the zip file's entries. The stream that is returned must be deleted by the caller (and - zero might be returned if a stream can't be opened for some reason). + a nullptr might be returned if a stream can't be opened for some reason). The stream must not be used after the ZipFile object that created has been deleted. @@ -135,7 +135,7 @@ public: /** Creates a stream that can read from one of the zip file's entries. The stream that is returned must be deleted by the caller (and - zero might be returned if a stream can't be opened for some reason). + a nullptr might be returned if a stream can't be opened for some reason). The stream must not be used after the ZipFile object that created has been deleted. diff --git a/modules/juce_cryptography/juce_cryptography.h b/modules/juce_cryptography/juce_cryptography.h index 047172a4..67e76140 100644 --- a/modules/juce_cryptography/juce_cryptography.h +++ b/modules/juce_cryptography/juce_cryptography.h @@ -33,7 +33,7 @@ ID: juce_cryptography vendor: juce - version: 4.2.3 + version: 4.2.4 name: JUCE cryptography classes description: Classes for various basic cryptography functions, including RSA, Blowfish, MD5, SHA, etc. website: http://www.juce.com/juce diff --git a/modules/juce_data_structures/juce_data_structures.h b/modules/juce_data_structures/juce_data_structures.h index fd8b0c32..67aa3128 100644 --- a/modules/juce_data_structures/juce_data_structures.h +++ b/modules/juce_data_structures/juce_data_structures.h @@ -33,7 +33,7 @@ ID: juce_data_structures vendor: juce - version: 4.2.3 + version: 4.2.4 name: JUCE data model helper classes description: Classes for undo/redo management, and smart data structures. website: http://www.juce.com/juce diff --git a/modules/juce_data_structures/undomanager/juce_UndoManager.cpp b/modules/juce_data_structures/undomanager/juce_UndoManager.cpp index 4dc27b87..819d55a1 100644 --- a/modules/juce_data_structures/undomanager/juce_UndoManager.cpp +++ b/modules/juce_data_structures/undomanager/juce_UndoManager.cpp @@ -153,7 +153,8 @@ bool UndoManager::perform (UndoableAction* const newAction) actionSet->actions.add (action.release()); newTransaction = false; - clearFutureTransactions(); + moveFutureTransactionsToStash(); + dropOldTransactionsIfTooLarge(); sendChangeMessage(); return true; } @@ -162,14 +163,41 @@ bool UndoManager::perform (UndoableAction* const newAction) return false; } -void UndoManager::clearFutureTransactions() +void UndoManager::moveFutureTransactionsToStash() +{ + if (nextIndex < transactions.size()) + { + stashedFutureTransactions.clear(); + + while (nextIndex < transactions.size()) + { + ActionSet* removed = transactions.removeAndReturn (nextIndex); + stashedFutureTransactions.add (removed); + totalUnitsStored -= removed->getTotalSize(); + } + } +} + +void UndoManager::restoreStashedFutureTransactions() { while (nextIndex < transactions.size()) { - totalUnitsStored -= transactions.getLast()->getTotalSize(); - transactions.removeLast(); + totalUnitsStored -= transactions.getUnchecked (nextIndex)->getTotalSize(); + transactions.remove (nextIndex); } + for (int i = 0; i < stashedFutureTransactions.size(); ++i) + { + ActionSet* action = stashedFutureTransactions.removeAndReturn (i); + totalUnitsStored += action->getTotalSize(); + transactions.add (action); + } + + stashedFutureTransactions.clearQuick (false); +} + +void UndoManager::dropOldTransactionsIfTooLarge() +{ while (nextIndex > 0 && totalUnitsStored > maxNumUnitsToKeep && transactions.size() > minimumTransactionsToKeep) @@ -290,7 +318,13 @@ Time UndoManager::getTimeOfRedoTransaction() const bool UndoManager::undoCurrentTransactionOnly() { - return newTransaction ? false : undo(); + if ((! newTransaction) && undo()) + { + restoreStashedFutureTransactions(); + return true; + } + + return false; } void UndoManager::getActionsInCurrentTransaction (Array& actionsFound) const diff --git a/modules/juce_data_structures/undomanager/juce_UndoManager.h b/modules/juce_data_structures/undomanager/juce_UndoManager.h index 1e740eea..4bb9cf99 100644 --- a/modules/juce_data_structures/undomanager/juce_UndoManager.h +++ b/modules/juce_data_structures/undomanager/juce_UndoManager.h @@ -229,13 +229,15 @@ private: //============================================================================== struct ActionSet; friend struct ContainerDeletePolicy; - OwnedArray transactions; + OwnedArray transactions, stashedFutureTransactions; String newTransactionName; int totalUnitsStored, maxNumUnitsToKeep, minimumTransactionsToKeep, nextIndex; bool newTransaction, reentrancyCheck; ActionSet* getCurrentSet() const noexcept; ActionSet* getNextSet() const noexcept; - void clearFutureTransactions(); + void moveFutureTransactionsToStash(); + void restoreStashedFutureTransactions(); + void dropOldTransactionsIfTooLarge(); JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UndoManager) }; diff --git a/modules/juce_data_structures/undomanager/juce_UndoableAction.h b/modules/juce_data_structures/undomanager/juce_UndoableAction.h index 479dd769..c2bdd81e 100644 --- a/modules/juce_data_structures/undomanager/juce_UndoableAction.h +++ b/modules/juce_data_structures/undomanager/juce_UndoableAction.h @@ -90,7 +90,7 @@ public: If possible, this method should create and return a single action that does the same job as this one followed by the supplied action. - If it's not possible to merge the two actions, the method should return zero. + If it's not possible to merge the two actions, the method should return a nullptr. */ virtual UndoableAction* createCoalescedAction (UndoableAction* nextAction) { ignoreUnused (nextAction); return nullptr; } }; diff --git a/modules/juce_data_structures/values/juce_CachedValue.cpp b/modules/juce_data_structures/values/juce_CachedValue.cpp index becf90cb..5ef33734 100644 --- a/modules/juce_data_structures/values/juce_CachedValue.cpp +++ b/modules/juce_data_structures/values/juce_CachedValue.cpp @@ -149,4 +149,4 @@ public: static CachedValueTests cachedValueTests; -#endif \ No newline at end of file +#endif diff --git a/modules/juce_data_structures/values/juce_ValueTree.cpp b/modules/juce_data_structures/values/juce_ValueTree.cpp index a76a0c48..51b041ca 100644 --- a/modules/juce_data_structures/values/juce_ValueTree.cpp +++ b/modules/juce_data_structures/values/juce_ValueTree.cpp @@ -627,7 +627,9 @@ ValueTree::ValueTree() noexcept { } +#if JUCE_ALLOW_STATIC_NULL_VARIABLES const ValueTree ValueTree::invalid; +#endif ValueTree::ValueTree (const Identifier& type) : object (new ValueTree::SharedObject (type)) { @@ -721,20 +723,30 @@ ValueTree ValueTree::getParent() const noexcept ValueTree ValueTree::getSibling (const int delta) const noexcept { if (object == nullptr || object->parent == nullptr) - return invalid; + return ValueTree(); const int index = object->parent->indexOf (*this) + delta; return ValueTree (object->parent->children.getObjectPointer (index)); } +static const var& getNullVarRef() noexcept +{ + #if JUCE_ALLOW_STATIC_NULL_VARIABLES + return var::null; + #else + static var nullVar; + return nullVar; + #endif +} + const var& ValueTree::operator[] (const Identifier& name) const noexcept { - return object == nullptr ? var::null : object->properties[name]; + return object == nullptr ? getNullVarRef() : object->properties[name]; } const var& ValueTree::getProperty (const Identifier& name) const noexcept { - return object == nullptr ? var::null : object->properties[name]; + return object == nullptr ? getNullVarRef() : object->properties[name]; } var ValueTree::getProperty (const Identifier& name, const var& defaultReturnValue) const @@ -858,6 +870,29 @@ ValueTree ValueTree::getChild (int index) const : static_cast (nullptr)); } +ValueTree::Iterator::Iterator (const ValueTree& v, bool isEnd) noexcept + : internal (v.object != nullptr ? (isEnd ? v.object->children.end() : v.object->children.begin()) : nullptr) +{} + +ValueTree::Iterator& ValueTree::Iterator::operator++() noexcept +{ + internal = static_cast (internal) + 1; + return *this; +} + +bool ValueTree::Iterator::operator!= (const Iterator& other) const noexcept +{ + return internal != other.internal; +} + +ValueTree ValueTree::Iterator::operator*() const +{ + return ValueTree (*static_cast (internal)); +} + +ValueTree::Iterator ValueTree::begin() const noexcept { return Iterator (*this, false); } +ValueTree::Iterator ValueTree::end() const noexcept { return Iterator (*this, true); } + ValueTree ValueTree::getChildWithName (const Identifier& type) const { return object != nullptr ? object->getChildWithName (type) : ValueTree(); diff --git a/modules/juce_data_structures/values/juce_ValueTree.h b/modules/juce_data_structures/values/juce_ValueTree.h index edb611dd..52bb8d3c 100644 --- a/modules/juce_data_structures/values/juce_ValueTree.h +++ b/modules/juce_data_structures/values/juce_ValueTree.h @@ -328,6 +328,25 @@ public: */ ValueTree getSibling (int delta) const noexcept; + //============================================================================== + struct Iterator + { + Iterator (const ValueTree&, bool isEnd) noexcept; + Iterator& operator++() noexcept; + + bool operator!= (const Iterator&) const noexcept; + ValueTree operator*() const; + + private: + void* internal; + }; + + /** Returns a start iterator for the children in this tree. */ + Iterator begin() const noexcept; + + /** Returns an end iterator for the children in this tree. */ + Iterator end() const noexcept; + //============================================================================== /** Creates an XmlElement that holds a complete image of this node and all its children. @@ -504,10 +523,13 @@ public: } } + #if JUCE_ALLOW_STATIC_NULL_VARIABLES /** An invalid ValueTree that can be used if you need to return one as an error condition, etc. - This invalid object is equivalent to ValueTree created with its default constructor. + This invalid object is equivalent to ValueTree created with its default constructor, but + you should always prefer to avoid it and use ValueTree() or {} instead. */ static const ValueTree invalid; + #endif /** Returns the total number of references to the shared underlying data structure that this ValueTree is using. diff --git a/modules/juce_events/juce_events.h b/modules/juce_events/juce_events.h index b2e6c5e4..fec2a4f9 100644 --- a/modules/juce_events/juce_events.h +++ b/modules/juce_events/juce_events.h @@ -33,14 +33,14 @@ ID: juce_events vendor: juce - version: 4.2.3 + version: 4.2.4 name: JUCE message and event handling classes description: Classes for running an application's main event loop and sending/receiving messages, timers, etc. website: http://www.juce.com/juce license: GPL/Commercial dependencies: juce_core - linuxLibs: X11 + linuxPackages: x11 END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_events/messages/juce_ApplicationBase.cpp b/modules/juce_events/messages/juce_ApplicationBase.cpp index f130bf41..5a2e3c37 100644 --- a/modules/juce_events/messages/juce_ApplicationBase.cpp +++ b/modules/juce_events/messages/juce_ApplicationBase.cpp @@ -257,13 +257,17 @@ bool JUCEApplicationBase::initialiseApp() } #endif - #if JUCE_WINDOWS && JUCE_STANDALONE_APPLICATION && ! defined (_CONSOLE) + #if JUCE_WINDOWS && JUCE_STANDALONE_APPLICATION && (! defined (_CONSOLE)) && (! JUCE_MINGW) if (AttachConsole (ATTACH_PARENT_PROCESS) != 0) { // if we've launched a GUI app from cmd.exe or PowerShell, we need this to enable printf etc. - freopen("CON", "w", stdout); - freopen("CON", "w", stderr); - freopen("CON", "r", stdin); + // However, only reassign stdout, stderr, stdin if they have not been already opened by + // a redirect or similar. + FILE* ignore; + + if (_fileno(stdout) < 0) freopen_s (&ignore, "CONOUT$", "w", stdout); + if (_fileno(stderr) < 0) freopen_s (&ignore, "CONOUT$", "w", stderr); + if (_fileno(stdin) < 0) freopen_s (&ignore, "CONIN$", "r", stdin); } #endif diff --git a/modules/juce_graphics/contexts/juce_GraphicsContext.h b/modules/juce_graphics/contexts/juce_GraphicsContext.h index 98205394..52b428be 100644 --- a/modules/juce_graphics/contexts/juce_GraphicsContext.h +++ b/modules/juce_graphics/contexts/juce_GraphicsContext.h @@ -462,7 +462,7 @@ public: //============================================================================== /** Types of rendering quality that can be specified when drawing images. - @see blendImage, Graphics::setImageResamplingQuality + @see Graphics::setImageResamplingQuality */ enum ResamplingQuality { diff --git a/modules/juce_graphics/geometry/juce_AffineTransform.cpp b/modules/juce_graphics/geometry/juce_AffineTransform.cpp index a4c1a7e4..f58fe315 100644 --- a/modules/juce_graphics/geometry/juce_AffineTransform.cpp +++ b/modules/juce_graphics/geometry/juce_AffineTransform.cpp @@ -79,7 +79,9 @@ bool AffineTransform::isIdentity() const noexcept && (mat11 == 1.0f); } +#if JUCE_ALLOW_STATIC_NULL_VARIABLES const AffineTransform AffineTransform::identity; +#endif //============================================================================== AffineTransform AffineTransform::followedBy (const AffineTransform& other) const noexcept diff --git a/modules/juce_graphics/geometry/juce_AffineTransform.h b/modules/juce_graphics/geometry/juce_AffineTransform.h index 77bb8ab7..7562aedb 100644 --- a/modules/juce_graphics/geometry/juce_AffineTransform.h +++ b/modules/juce_graphics/geometry/juce_AffineTransform.h @@ -67,15 +67,13 @@ public: /** Compares two transforms. */ bool operator!= (const AffineTransform& other) const noexcept; - /** A ready-to-use identity transform, which you can use to append other - transformations to. - - e.g. @code - AffineTransform myTransform = AffineTransform().rotated (.5f) - .scaled (2.0f); - @endcode + #if JUCE_ALLOW_STATIC_NULL_VARIABLES + /** A ready-to-use identity transform. + Note that you should always avoid using a static variable like this, and + prefer AffineTransform() or {} if you need a default-constructed instance. */ static const AffineTransform identity; + #endif //============================================================================== /** Transforms a 2D coordinate using this matrix. */ diff --git a/modules/juce_graphics/geometry/juce_Line.h b/modules/juce_graphics/geometry/juce_Line.h index a6dfadf3..3223f836 100644 --- a/modules/juce_graphics/geometry/juce_Line.h +++ b/modules/juce_graphics/geometry/juce_Line.h @@ -50,23 +50,20 @@ public: /** Creates a copy of another line. */ Line (const Line& other) noexcept - : start (other.start), - end (other.end) + : start (other.start), end (other.end) { } /** Creates a line based on the coordinates of its start and end points. */ Line (ValueType startX, ValueType startY, ValueType endX, ValueType endY) noexcept - : start (startX, startY), - end (endX, endY) + : start (startX, startY), end (endX, endY) { } /** Creates a line from its start and end points. */ - Line (const Point startPoint, - const Point endPoint) noexcept - : start (startPoint), - end (endPoint) + Line (Point startPoint, + Point endPoint) noexcept + : start (startPoint), end (endPoint) { } @@ -113,7 +110,7 @@ public: void setEnd (const Point newEnd) noexcept { end = newEnd; } /** Returns a line that is the same as this one, but with the start and end reversed, */ - const Line reversed() const noexcept { return Line (end, start); } + Line reversed() const noexcept { return Line (end, start); } /** Applies an affine transform to the line's start and end points. */ void applyTransform (const AffineTransform& transform) noexcept @@ -142,6 +139,17 @@ public: */ typename Point::FloatType getAngle() const noexcept { return start.getAngleToPoint (end); } + /** Creates a line from a start point, length and angle. + + This angle is the number of radians clockwise from the 12 o'clock direction, + where the line's start point is considered to be at the centre. + */ + static Line fromStartAndAngle (Point startPoint, ValueType length, ValueType angle) noexcept + { + return Line (startPoint, startPoint.getPointOnCircumference (length, angle)); + } + + //============================================================================== /** Casts this line to float coordinates. */ Line toFloat() const noexcept { return Line (start.toFloat(), end.toFloat()); } @@ -150,10 +158,10 @@ public: //============================================================================== /** Compares two lines. */ - bool operator== (const Line& other) const noexcept { return start == other.start && end == other.end; } + bool operator== (Line other) const noexcept { return start == other.start && end == other.end; } /** Compares two lines. */ - bool operator!= (const Line& other) const noexcept { return start != other.start || end != other.end; } + bool operator!= (Line other) const noexcept { return start != other.start || end != other.end; } //============================================================================== /** Finds the intersection between two lines. @@ -161,7 +169,7 @@ public: @param line the line to intersect with @returns the point at which the lines intersect, even if this lies beyond the end of the lines */ - Point getIntersection (const Line& line) const noexcept + Point getIntersection (Line line) const noexcept { Point p; findIntersection (start, end, line.start, line.end, p); @@ -180,13 +188,13 @@ public: don't intersect, the intersection coordinates returned will still be valid */ - bool intersects (const Line& line, Point& intersection) const noexcept + bool intersects (Line line, Point& intersection) const noexcept { return findIntersection (start, end, line.start, line.end, intersection); } /** Returns true if this line intersects another. */ - bool intersects (const Line& other) const noexcept + bool intersects (Line other) const noexcept { Point ignored; return findIntersection (start, end, other.start, other.end, ignored); @@ -257,7 +265,7 @@ public: @returns the point's distance from the line @see getPositionAlongLineOfNearestPoint */ - ValueType getDistanceFromPoint (const Point targetPoint, + ValueType getDistanceFromPoint (Point targetPoint, Point& pointOnLine) const noexcept { const Point delta (end - start); @@ -298,7 +306,7 @@ public: turn this number into a position, use getPointAlongLineProportionally(). @see getDistanceFromPoint, getPointAlongLineProportionally */ - ValueType findNearestProportionalPositionTo (const Point point) const noexcept + ValueType findNearestProportionalPositionTo (Point point) const noexcept { const Point delta (end - start); const double length = delta.x * delta.x + delta.y * delta.y; @@ -312,7 +320,7 @@ public: /** Finds the point on this line which is nearest to a given point. @see getDistanceFromPoint, findNearestProportionalPositionTo */ - Point findNearestPointTo (const Point point) const noexcept + Point findNearestPointTo (Point point) const noexcept { return getPointAlongLineProportionally (findNearestProportionalPositionTo (point)); } @@ -323,7 +331,7 @@ public: coordinate of this line at the given x (assuming the line extends infinitely in both directions). */ - bool isPointAbove (const Point point) const noexcept + bool isPointAbove (Point point) const noexcept { return start.x != end.x && point.y < ((end.y - start.y) @@ -380,19 +388,22 @@ private: intersection = p1.withX (p3.x + along * d2.x); return along >= 0 && along <= static_cast (1); } - else if (d2.y == 0 && d1.y != 0) + + if (d2.y == 0 && d1.y != 0) { const ValueType along = (p3.y - p1.y) / d1.y; intersection = p3.withX (p1.x + along * d1.x); return along >= 0 && along <= static_cast (1); } - else if (d1.x == 0 && d2.x != 0) + + if (d1.x == 0 && d2.x != 0) { const ValueType along = (p1.x - p3.x) / d2.x; intersection = p1.withY (p3.y + along * d2.y); return along >= 0 && along <= static_cast (1); } - else if (d2.x == 0 && d1.x != 0) + + if (d2.x == 0 && d1.x != 0) { const ValueType along = (p3.x - p1.x) / d1.x; intersection = p3.withY (p1.y + along * d1.y); diff --git a/modules/juce_graphics/geometry/juce_Rectangle.h b/modules/juce_graphics/geometry/juce_Rectangle.h index 8f00a811..d37062c6 100644 --- a/modules/juce_graphics/geometry/juce_Rectangle.h +++ b/modules/juce_graphics/geometry/juce_Rectangle.h @@ -538,6 +538,53 @@ public: return r; } + //============================================================================== + /** Returns the nearest point to the specified point that lies within this rectangle. */ + Point getConstrainedPoint (Point point) const noexcept + { + return Point (jlimit (pos.x, pos.x + w, point.x), + jlimit (pos.y, pos.y + h, point.y)); + } + + /** Returns a point within this rectangle, specified as proportional coordinates. + The relative X and Y values should be between 0 and 1, where 0 is the left or + top of this rectangle, and 1 is the right or bottom. (Out-of-bounds values + will return a point outside the rectangle). + */ + template + Point getRelativePoint (FloatType relativeX, FloatType relativeY) const noexcept + { + return Point (pos.x + static_cast (w * relativeX), + pos.y + static_cast (h * relativeY)); + } + + /** Returns a proportion of the width of this rectangle. */ + template + ValueType proportionOfWidth (FloatType proportion) const noexcept + { + return static_cast (w * proportion); + } + + /** Returns a proportion of the height of this rectangle. */ + template + ValueType proportionOfHeight (FloatType proportion) const noexcept + { + return static_cast (h * proportion); + } + + /** Returns a rectangle based on some proportional coordinates relative to this one. + So for example getProportion ({ 0.25f, 0.25f, 0.5f, 0.5f }) would return a rectangle + of half the original size, with the same centre. + */ + template + Rectangle getProportion (Rectangle proportionalRect) const noexcept + { + return Rectangle (pos.x + static_cast (w * proportionalRect.pos.x), + pos.y + static_cast (h * proportionalRect.pos.y), + proportionOfWidth (proportionalRect.w), + proportionOfHeight (proportionalRect.h)); + } + //============================================================================== /** Returns true if the two rectangles are identical. */ bool operator== (const Rectangle& other) const noexcept { return pos == other.pos && w == other.w && h == other.h; } @@ -564,24 +611,6 @@ public: && pos.x + w >= other.pos.x + other.w && pos.y + h >= other.pos.y + other.h; } - /** Returns the nearest point to the specified point that lies within this rectangle. */ - Point getConstrainedPoint (Point point) const noexcept - { - return Point (jlimit (pos.x, pos.x + w, point.x), - jlimit (pos.y, pos.y + h, point.y)); - } - - /** Returns a point within this rectangle, specified as proportional coordinates. - The relative X and Y values should be between 0 and 1, where 0 is the left or - top of this rectangle, and 1 is the right or bottom. (Out-of-bounds values - will return a point outside the rectangle). - */ - Point getRelativePoint (double relativeX, double relativeY) const noexcept - { - return Point (pos.x + static_cast (w * relativeX), - pos.y + static_cast (h * relativeY)); - } - /** Returns true if any part of another rectangle overlaps this one. */ bool intersects (const Rectangle& other) const noexcept { diff --git a/modules/juce_graphics/images/juce_Image.cpp b/modules/juce_graphics/images/juce_Image.cpp index 2bf79eb8..4e6f4c63 100644 --- a/modules/juce_graphics/images/juce_Image.cpp +++ b/modules/juce_graphics/images/juce_Image.cpp @@ -259,7 +259,9 @@ Image::~Image() { } +#if JUCE_ALLOW_STATIC_NULL_VARIABLES const Image Image::null; +#endif int Image::getReferenceCount() const noexcept { return image == nullptr ? 0 : image->getSharedCount(); } int Image::getWidth() const noexcept { return image == nullptr ? 0 : image->width; } diff --git a/modules/juce_graphics/images/juce_Image.h b/modules/juce_graphics/images/juce_Image.h index d246739c..e817cc7f 100644 --- a/modules/juce_graphics/images/juce_Image.h +++ b/modules/juce_graphics/images/juce_Image.h @@ -146,10 +146,13 @@ public: */ inline bool isNull() const noexcept { return image == nullptr; } + #if JUCE_ALLOW_STATIC_NULL_VARIABLES /** A null Image object that can be used when you need to return an invalid image. - This object is the equivalient to an Image created with the default constructor. + This object is the equivalient to an Image created with the default constructor, and + you should always prefer to use Image() or {} when you need an empty image object. */ static const Image null; + #endif //============================================================================== /** Returns the image's width (in pixels). */ diff --git a/modules/juce_graphics/juce_graphics.h b/modules/juce_graphics/juce_graphics.h index e367bde0..7c3dbe10 100644 --- a/modules/juce_graphics/juce_graphics.h +++ b/modules/juce_graphics/juce_graphics.h @@ -33,7 +33,7 @@ ID: juce_graphics vendor: juce - version: 4.2.3 + version: 4.2.4 name: JUCE graphics classes description: Classes for 2D vector graphics, image loading/saving, font handling, etc. website: http://www.juce.com/juce @@ -42,7 +42,7 @@ dependencies: juce_events OSXFrameworks: Cocoa QuartzCore iOSFrameworks: CoreGraphics CoreText QuartzCore - linuxLibs: X11 Xinerama Xext freetype + linuxPackages: x11 xinerama xext freetype2 END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_gui_basics/buttons/juce_Button.cpp b/modules/juce_gui_basics/buttons/juce_Button.cpp index e33ab267..81a49d39 100644 --- a/modules/juce_gui_basics/buttons/juce_Button.cpp +++ b/modules/juce_gui_basics/buttons/juce_Button.cpp @@ -175,8 +175,15 @@ void Button::setToggleState (const bool shouldBeOn, const NotificationType notif return; } - if (getToggleState() != shouldBeOn) // this test means that if the value is void rather than explicitly set to - isOn = shouldBeOn; // false, it won't be changed unless the required value is true. + // This test is done so that if the value is void rather than explicitly set to + // false, the value won't be changed unless the required value is true. + if (getToggleState() != shouldBeOn) + { + isOn = shouldBeOn; + + if (deletionWatcher == nullptr) + return; + } lastToggleState = shouldBeOn; repaint(); @@ -456,7 +463,7 @@ void Button::mouseUp (const MouseEvent& e) { const bool wasDown = isDown(); const bool wasOver = isOver(); - updateState (isMouseOver(), false); + updateState (isMouseOrTouchOver (e), false); if (wasDown && wasOver && ! triggerOnMouseDown) { @@ -467,15 +474,23 @@ void Button::mouseUp (const MouseEvent& e) } } -void Button::mouseDrag (const MouseEvent&) +void Button::mouseDrag (const MouseEvent& e) { const ButtonState oldState = buttonState; - updateState (isMouseOver(), true); + updateState (isMouseOrTouchOver (e), true); if (autoRepeatDelay >= 0 && buttonState != oldState && isDown()) callbackHelper->startTimer (autoRepeatSpeed); } +bool Button::isMouseOrTouchOver (const MouseEvent& e) +{ + if (e.source.isTouch()) + return getLocalBounds().toFloat().contains (e.position); + + return isMouseOver(); +} + void Button::focusGained (FocusChangeType) { updateState(); diff --git a/modules/juce_gui_basics/buttons/juce_Button.h b/modules/juce_gui_basics/buttons/juce_Button.h index 39d0d5a7..47c6fab5 100644 --- a/modules/juce_gui_basics/buttons/juce_Button.h +++ b/modules/juce_gui_basics/buttons/juce_Button.h @@ -503,6 +503,8 @@ private: void sendClickMessage (const ModifierKeys&); void sendStateMessage(); + bool isMouseOrTouchOver (const MouseEvent& e); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Button) }; diff --git a/modules/juce_gui_basics/buttons/juce_HyperlinkButton.cpp b/modules/juce_gui_basics/buttons/juce_HyperlinkButton.cpp index d2da022f..dd52f6f2 100644 --- a/modules/juce_gui_basics/buttons/juce_HyperlinkButton.cpp +++ b/modules/juce_gui_basics/buttons/juce_HyperlinkButton.cpp @@ -35,7 +35,7 @@ HyperlinkButton::HyperlinkButton (const String& linkText, } HyperlinkButton::HyperlinkButton() - : Button (String::empty), + : Button (String()), font (14.0f, Font::underlined), resizeFont (true), justification (Justification::centred) diff --git a/modules/juce_gui_basics/buttons/juce_ImageButton.h b/modules/juce_gui_basics/buttons/juce_ImageButton.h index fed3cad4..e2669800 100644 --- a/modules/juce_gui_basics/buttons/juce_ImageButton.h +++ b/modules/juce_gui_basics/buttons/juce_ImageButton.h @@ -46,7 +46,7 @@ public: @param name the name to give the component */ - explicit ImageButton (const String& name = String::empty); + explicit ImageButton (const String& name = String()); /** Destructor. */ ~ImageButton(); diff --git a/modules/juce_gui_basics/buttons/juce_ToggleButton.cpp b/modules/juce_gui_basics/buttons/juce_ToggleButton.cpp index c9a68d73..fd838075 100644 --- a/modules/juce_gui_basics/buttons/juce_ToggleButton.cpp +++ b/modules/juce_gui_basics/buttons/juce_ToggleButton.cpp @@ -23,7 +23,7 @@ */ ToggleButton::ToggleButton() - : Button (String::empty) + : Button (String()) { setClickingTogglesState (true); } diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index f96dadcc..3f13fbbe 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -805,7 +805,7 @@ public: if (! owner.isOpaque()) { lg.setFill (Colours::transparentBlack); - lg.fillRect (imageBounds, true); + lg.fillRect (compBounds, true); lg.setFill (Colours::black); } @@ -2489,7 +2489,7 @@ void Component::internalMouseDown (MouseInputSource source, Point relativ } void Component::internalMouseUp (MouseInputSource source, Point relativePos, - Time time, const ModifierKeys oldModifiers) + Time time, const ModifierKeys oldModifiers, float pressure) { if (flags.mouseDownWasBlocked && isCurrentlyBlockedByAnotherModalComponent()) return; @@ -2500,7 +2500,7 @@ void Component::internalMouseUp (MouseInputSource source, Point relativeP repaint(); const MouseEvent me (source, relativePos, - oldModifiers, MouseInputSource::invalidPressure, this, this, time, + oldModifiers, pressure, this, this, time, getLocalPoint (nullptr, source.getLastMouseDownPosition()), source.getLastMouseDownTime(), source.getNumberOfMultipleClicks(), diff --git a/modules/juce_gui_basics/components/juce_Component.h b/modules/juce_gui_basics/components/juce_Component.h index 4f7750f4..3852448e 100644 --- a/modules/juce_gui_basics/components/juce_Component.h +++ b/modules/juce_gui_basics/components/juce_Component.h @@ -2301,7 +2301,7 @@ private: void internalMouseEnter (MouseInputSource, Point, Time); void internalMouseExit (MouseInputSource, Point, Time); void internalMouseDown (MouseInputSource, Point, Time, float); - void internalMouseUp (MouseInputSource, Point, Time, const ModifierKeys oldModifiers); + void internalMouseUp (MouseInputSource, Point, Time, const ModifierKeys oldModifiers, float); void internalMouseDrag (MouseInputSource, Point, Time, float); void internalMouseMove (MouseInputSource, Point, Time); void internalMouseWheel (MouseInputSource, Point, Time, const MouseWheelDetails&); diff --git a/modules/juce_gui_basics/components/juce_Desktop.cpp b/modules/juce_gui_basics/components/juce_Desktop.cpp index 26cc3c9d..1a591b48 100644 --- a/modules/juce_gui_basics/components/juce_Desktop.cpp +++ b/modules/juce_gui_basics/components/juce_Desktop.cpp @@ -36,6 +36,7 @@ Desktop::Desktop() Desktop::~Desktop() { setScreenSaverEnabled (true); + animator.cancelAllAnimations (false); jassert (instance == this); instance = nullptr; diff --git a/modules/juce_gui_basics/drawables/juce_DrawableRectangle.cpp b/modules/juce_gui_basics/drawables/juce_DrawableRectangle.cpp index 034953bc..c9cb67b4 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableRectangle.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableRectangle.cpp @@ -31,6 +31,7 @@ DrawableRectangle::DrawableRectangle (const DrawableRectangle& other) bounds (other.bounds), cornerSize (other.cornerSize) { + rebuildPath(); } DrawableRectangle::~DrawableRectangle() diff --git a/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.h b/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.h index 2c015de8..3e2258fe 100644 --- a/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.h +++ b/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.h @@ -179,7 +179,7 @@ public: /** Returns one of the files in the list. @param index should be less than getNumFiles(). If this is out-of-range, the - return value will be File::nonexistent + return value will be a default File() object @see getNumFiles, getFileInfo */ File getFile (int index) const; diff --git a/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.cpp b/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.cpp index afe498a2..6c6e57f6 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.cpp @@ -26,7 +26,7 @@ FileBrowserComponent::FileBrowserComponent (int flags_, const File& initialFileOrDirectory, const FileFilter* fileFilter_, FilePreviewComponent* previewComp_) - : FileFilter (String::empty), + : FileFilter (String()), fileFilter (fileFilter_), flags (flags_), previewComp (previewComp_), @@ -44,7 +44,7 @@ FileBrowserComponent::FileBrowserComponent (int flags_, String filename; - if (initialFileOrDirectory == File::nonexistent) + if (initialFileOrDirectory == File()) { currentRoot = File::getCurrentWorkingDirectory(); } @@ -391,7 +391,7 @@ void FileBrowserComponent::fileDoubleClicked (const File& f) setRoot (f); if ((flags & canSelectDirectories) != 0 && (flags & doNotClearFileNameOnRootChange) == 0) - filenameBox.setText (String::empty); + filenameBox.setText (String()); } else { @@ -535,8 +535,8 @@ void FileBrowserComponent::getDefaultRoots (StringArray& rootNames, StringArray& rootNames.add (name); } - rootPaths.add (String::empty); - rootNames.add (String::empty); + rootPaths.add (String()); + rootNames.add (String()); rootPaths.add (File::getSpecialLocation (File::userDocumentsDirectory).getFullPathName()); rootNames.add (TRANS("Documents")); @@ -559,8 +559,8 @@ void FileBrowserComponent::getDefaultRoots (StringArray& rootNames, StringArray& rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName()); rootNames.add (TRANS("Desktop")); - rootPaths.add (String::empty); - rootNames.add (String::empty); + rootPaths.add (String()); + rootNames.add (String()); Array volumes; File vol ("/Volumes"); diff --git a/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h b/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h index b4431fbd..058a36de 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h +++ b/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h @@ -74,7 +74,7 @@ public: specify the component's behaviour. The flags must contain either openMode or saveMode, and canSelectFiles and/or canSelectDirectories. @param initialFileOrDirectory The file or directory that should be selected when the component begins. - If this is File::nonexistent, a default directory will be chosen. + If this is File(), a default directory will be chosen. @param fileFilter an optional filter to use to determine which files are shown. If this is nullptr then all files are displayed. Note that a pointer is kept internally to this object, so make sure that it is not deleted diff --git a/modules/juce_gui_basics/filebrowser/juce_FileChooser.h b/modules/juce_gui_basics/filebrowser/juce_FileChooser.h index f7399751..e6a35d50 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileChooser.h +++ b/modules/juce_gui_basics/filebrowser/juce_FileChooser.h @@ -64,8 +64,8 @@ public: tell the user what's going on @param initialFileOrDirectory the file or directory that should be selected when the dialog box opens. If this parameter is - set to File::nonexistent, a sensible default - directory will be used instead. + set to File(), a sensible default directory will + be used instead. @param filePatternsAllowed a set of file patterns to specify which files can be selected - each pattern should be separated by a comma or semi-colon, e.g. "*" or @@ -82,8 +82,8 @@ public: @see browseForFileToOpen, browseForFileToSave, browseForDirectory */ FileChooser (const String& dialogBoxTitle, - const File& initialFileOrDirectory = File::nonexistent, - const String& filePatternsAllowed = String::empty, + const File& initialFileOrDirectory = File(), + const String& filePatternsAllowed = String(), bool useOSNativeDialogBox = true, bool treatFilePackagesAsDirectories = false); diff --git a/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp b/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp index 52fa0079..ef851cbf 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp @@ -238,7 +238,7 @@ void FileChooserDialogBox::createNewFolder() TRANS("Please enter the name for the folder"), AlertWindow::NoIcon, this); - aw->addTextEditor ("Folder Name", String::empty, String::empty, false); + aw->addTextEditor ("Folder Name", String(), String(), false); aw->addButton (TRANS("Create Folder"), 1, KeyPress (KeyPress::returnKey)); aw->addButton (TRANS("Cancel"), 0, KeyPress (KeyPress::escapeKey)); diff --git a/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.h b/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.h index 2f1a993c..f0e82bb4 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.h +++ b/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.h @@ -37,10 +37,10 @@ @code { - WildcardFileFilter wildcardFilter ("*.foo", String::empty, "Foo files"); + WildcardFileFilter wildcardFilter ("*.foo", String(), "Foo files"); FileBrowserComponent browser (FileBrowserComponent::canSelectFiles, - File::nonexistent, + File(), &wildcardFilter, nullptr); diff --git a/modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp b/modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp index d12dd41a..2333dcc8 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp @@ -27,7 +27,7 @@ Image juce_createIconForFile (const File& file); //============================================================================== FileListComponent::FileListComponent (DirectoryContentsList& listToShow) - : ListBox (String::empty, nullptr), + : ListBox (String(), nullptr), DirectoryContentsDisplayComponent (listToShow) { setModel (this); @@ -159,7 +159,7 @@ public: repaint(); } - if (file != File::nonexistent && icon.isNull() && ! isDirectory) + if (file != File() && icon.isNull() && ! isDirectory) { updateIcon (true); diff --git a/modules/juce_gui_basics/filebrowser/juce_FilePreviewComponent.h b/modules/juce_gui_basics/filebrowser/juce_FilePreviewComponent.h index d09d5638..a1c342b9 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FilePreviewComponent.h +++ b/modules/juce_gui_basics/filebrowser/juce_FilePreviewComponent.h @@ -51,7 +51,7 @@ public: /** Called to indicate that the user's currently selected file has changed. @param newSelectedFile the newly selected file or directory, which may be - File::nonexistent if none is selected. + a defualt File() object if none is selected. */ virtual void selectedFileChanged (const File& newSelectedFile) = 0; diff --git a/modules/juce_gui_basics/filebrowser/juce_FileSearchPathListComponent.cpp b/modules/juce_gui_basics/filebrowser/juce_FileSearchPathListComponent.cpp index 3239085f..6c9364ef 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileSearchPathListComponent.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileSearchPathListComponent.cpp @@ -26,8 +26,8 @@ FileSearchPathListComponent::FileSearchPathListComponent() : addButton ("+"), removeButton ("-"), changeButton (TRANS ("change...")), - upButton (String::empty, DrawableButton::ImageOnButtonBackground), - downButton (String::empty, DrawableButton::ImageOnButtonBackground) + upButton (String(), DrawableButton::ImageOnButtonBackground), + downButton (String(), DrawableButton::ImageOnButtonBackground) { listBox.setModel (this); addAndMakeVisible (listBox); @@ -222,10 +222,10 @@ void FileSearchPathListComponent::buttonClicked (Button* button) { File start (defaultBrowseTarget); - if (start == File::nonexistent) + if (start == File()) start = path [0]; - if (start == File::nonexistent) + if (start == File()) start = File::getCurrentWorkingDirectory(); #if JUCE_MODAL_LOOPS_PERMITTED diff --git a/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp b/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp index 178a10b3..6565ba46 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp @@ -172,7 +172,7 @@ public: void paintItem (Graphics& g, int width, int height) override { - if (file != File::nonexistent) + if (file != File()) { updateIcon (true); @@ -285,7 +285,7 @@ File FileTreeComponent::getSelectedFile (const int index) const if (const FileListTreeItem* const item = dynamic_cast (getSelectedItem (index))) return item->file; - return File::nonexistent; + return File(); } void FileTreeComponent::deselectAllFiles() diff --git a/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.h b/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.h index 833556fd..7f45f67d 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.h +++ b/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.h @@ -54,23 +54,23 @@ public: /** Returns the number of files the user has got selected. @see getSelectedFile */ - int getNumSelectedFiles() const { return TreeView::getNumSelectedItems(); } + int getNumSelectedFiles() const override { return TreeView::getNumSelectedItems(); } /** Returns one of the files that the user has currently selected. The index should be in the range 0 to (getNumSelectedFiles() - 1). @see getNumSelectedFiles */ - File getSelectedFile (int index = 0) const; + File getSelectedFile (int index = 0) const override; /** Deselects any files that are currently selected. */ - void deselectAllFiles(); + void deselectAllFiles() override; /** Scrolls the list to the top. */ - void scrollToTop(); + void scrollToTop() override; /** If the specified file is in the list, it will become the only selected item (and if the file isn't in the list, all other items will be deselected). */ - void setSelectedFile (const File&); + void setSelectedFile (const File&) override; /** Updates the files in the list. */ void refresh(); diff --git a/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.cpp b/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.cpp index 2a69425e..6cfc09b7 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.cpp @@ -105,8 +105,8 @@ void FilenameComponent::setDefaultBrowseTarget (const File& newDefaultDirectory) File FilenameComponent::getLocationToBrowse() { - return getCurrentFile() == File::nonexistent ? defaultBrowseFile - : getCurrentFile(); + return getCurrentFile() == File() ? defaultBrowseFile + : getCurrentFile(); } void FilenameComponent::buttonClicked (Button*) diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp index 462d8f8e..4358c7be 100644 --- a/modules/juce_gui_basics/juce_gui_basics.cpp +++ b/modules/juce_gui_basics/juce_gui_basics.cpp @@ -253,6 +253,11 @@ extern bool juce_areThereAnyAlwaysOnTopWindows(); #include "misc/juce_BubbleComponent.cpp" #include "misc/juce_DropShadower.cpp" +// these classes are C++11-only +#if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS && JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS && JUCE_COMPILER_SUPPORTS_LAMBDAS + #include "layout/juce_FlexBox.cpp" +#endif + #if JUCE_IOS || JUCE_WINDOWS #include "native/juce_MultiTouchMapper.h" #endif diff --git a/modules/juce_gui_basics/juce_gui_basics.h b/modules/juce_gui_basics/juce_gui_basics.h index b0e31ed6..3c31f1f8 100644 --- a/modules/juce_gui_basics/juce_gui_basics.h +++ b/modules/juce_gui_basics/juce_gui_basics.h @@ -33,7 +33,7 @@ ID: juce_gui_basics vendor: juce - version: 4.2.3 + version: 4.2.4 name: JUCE GUI core classes description: Basic user-interface components and related classes. website: http://www.juce.com/juce @@ -42,7 +42,7 @@ dependencies: juce_events juce_graphics juce_data_structures OSXFrameworks: Cocoa Carbon QuartzCore iOSFrameworks: UIKit - linuxLibs: X11 Xinerama Xext + linuxPackages: x11 xinerama xext END_JUCE_MODULE_DECLARATION @@ -153,6 +153,7 @@ class BubbleComponent; class KeyPressMappingSet; class ApplicationCommandManagerListener; class DrawableButton; +class FlexBox; #include "mouse/juce_MouseCursor.h" #include "mouse/juce_MouseListener.h" @@ -281,6 +282,12 @@ class DrawableButton; #include "lookandfeel/juce_LookAndFeel_V1.h" #include "lookandfeel/juce_LookAndFeel_V3.h" +// these classes are C++11-only +#if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS && JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS && JUCE_COMPILER_SUPPORTS_LAMBDAS +#include "layout/juce_FlexItem.h" +#include "layout/juce_FlexBox.h" +#endif + } #endif // JUCE_GUI_BASICS_H_INCLUDED diff --git a/modules/juce_gui_basics/layout/juce_FlexBox.cpp b/modules/juce_gui_basics/layout/juce_FlexBox.cpp new file mode 100644 index 00000000..31ab92de --- /dev/null +++ b/modules/juce_gui_basics/layout/juce_FlexBox.cpp @@ -0,0 +1,831 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2015 - ROLI Ltd. + + Permission is granted to use this software under the terms of either: + a) the GPL v2 (or any later version) + b) the Affero GPL v3 + + Details of these licenses can be found at: www.gnu.org/licenses + + JUCE is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + ------------------------------------------------------------------------------ + + To release a closed-source product which uses JUCE, commercial licenses are + available: visit www.juce.com for more information. + + ============================================================================== +*/ + +struct FlexBoxLayoutCalculation +{ + using Coord = double; + + FlexBoxLayoutCalculation (const FlexBox& fb, Coord w, Coord h) + : owner (fb), parentWidth (w), parentHeight (h), numItems (owner.items.size()), + isRowDirection (fb.flexDirection == FlexBox::Direction::row + || fb.flexDirection == FlexBox::Direction::rowReverse), + containerLineLength (isRowDirection ? parentWidth : parentHeight) + { + lineItems.calloc ((size_t) (numItems * numItems)); + lineInfo.calloc ((size_t) numItems); + } + + struct ItemWithState + { + ItemWithState (FlexItem& source) noexcept : item (&source) {} + + FlexItem* item; + Coord lockedWidth = 0, lockedHeight = 0; + Coord lockedMarginLeft = 0, lockedMarginRight = 0, lockedMarginTop = 0, lockedMarginBottom = 0; + Coord preferredWidth = 0, preferredHeight = 0; + bool locked = false; + + void resetItemLockedSize() noexcept + { + lockedWidth = preferredWidth; + lockedHeight = preferredHeight; + lockedMarginLeft = getValueOrZeroIfAuto (item->margin.left); + lockedMarginRight = getValueOrZeroIfAuto (item->margin.right); + lockedMarginTop = getValueOrZeroIfAuto (item->margin.top); + lockedMarginBottom = getValueOrZeroIfAuto (item->margin.bottom); + } + + void setWidthChecked (Coord newWidth) noexcept + { + if (isAssigned (item->maxWidth)) newWidth = jmin (newWidth, static_cast (item->maxWidth)); + if (isAssigned (item->minWidth)) newWidth = jmax (newWidth, static_cast (item->minWidth)); + + lockedWidth = newWidth; + } + + void setHeightChecked (Coord newHeight) noexcept + { + if (isAssigned (item->maxHeight)) newHeight = jmin (newHeight, (Coord) item->maxHeight); + if (isAssigned (item->minHeight)) newHeight = jmax (newHeight, (Coord) item->minHeight); + + lockedHeight = newHeight; + } + }; + + struct RowInfo + { + int numItems; + Coord crossSize, lineY, totalLength; + }; + + const FlexBox& owner; + const Coord parentWidth, parentHeight; + const int numItems; + const bool isRowDirection; + const Coord containerLineLength; + + int numberOfRows = 1; + Coord containerCrossLength = 0; + + HeapBlock lineItems; + HeapBlock lineInfo; + Array itemStates; + + ItemWithState& getItem (int x, int y) const noexcept { return *lineItems[y * numItems + x]; } + + static bool isAuto (Coord value) noexcept { return value == FlexItem::autoValue; } + static bool isAssigned (Coord value) noexcept { return value != FlexItem::notAssigned; } + static Coord getValueOrZeroIfAuto (Coord value) noexcept { return isAuto (value) ? Coord() : value; } + + //============================================================================== + void createStates() + { + itemStates.ensureStorageAllocated (numItems); + + for (auto& item : owner.items) + itemStates.add (item); + + itemStates.sort (*this, true); + + for (auto& item : itemStates) + { + item.preferredWidth = getPreferredWidth (item); + item.preferredHeight = getPreferredHeight (item); + } + } + + void initialiseItems() noexcept + { + if (owner.flexWrap == FlexBox::Wrap::noWrap) // for single-line, all items go in line 1 + { + lineInfo[0].numItems = numItems; + int i = 0; + + for (auto& item : itemStates) + { + item.resetItemLockedSize(); + lineItems[i++] = &item; + } + } + else // if multi-line, group the flexbox items into multiple lines + { + auto currentLength = containerLineLength; + int column = 0, row = 0; + + for (auto& item : itemStates) + { + item.resetItemLockedSize(); + + const auto flexitemLength = getItemLength (item); + + if (flexitemLength > currentLength) + { + if (++row >= numItems) + break; + + column = 0; + currentLength = containerLineLength; + numberOfRows = jmax (numberOfRows, row + 1); + } + + currentLength -= flexitemLength; + lineItems[row * numItems + column] = &item; + ++column; + lineInfo[row].numItems = jmax (lineInfo[row].numItems, column); + } + } + } + + void resolveFlexibleLengths() noexcept + { + for (int row = 0; row < numberOfRows; ++row) + { + resetRowItems (row); + + for (int maxLoops = numItems; --maxLoops >= 0;) + { + resetUnlockedRowItems (row); + + if (layoutRowItems (row)) + break; + } + } + } + + void resolveAutoMarginsOnMainAxis() noexcept + { + for (int row = 0; row < numberOfRows; ++row) + { + Coord allFlexGrow = 0; + const auto numColumns = lineInfo[row].numItems; + const auto remainingLength = containerLineLength - lineInfo[row].totalLength; + + for (int column = 0; column < numColumns; ++column) + { + auto& item = getItem (column, row); + + if (isRowDirection) + { + if (isAuto (item.item->margin.left)) ++allFlexGrow; + if (isAuto (item.item->margin.right)) ++allFlexGrow; + } + else + { + if (isAuto (item.item->margin.top)) ++allFlexGrow; + if (isAuto (item.item->margin.bottom)) ++allFlexGrow; + } + } + + auto changeUnitWidth = remainingLength / allFlexGrow; + + if (changeUnitWidth > 0) + { + for (int column = 0; column < numColumns; ++column) + { + auto& item = getItem (column, row); + + if (isRowDirection) + { + if (isAuto (item.item->margin.left)) item.lockedMarginLeft = changeUnitWidth; + if (isAuto (item.item->margin.right)) item.lockedMarginRight = changeUnitWidth; + } + else + { + if (isAuto (item.item->margin.top)) item.lockedMarginTop = changeUnitWidth; + if (isAuto (item.item->margin.bottom)) item.lockedMarginBottom = changeUnitWidth; + } + } + } + } + } + + void calculateCrossSizesByLine() noexcept + { + for (int row = 0; row < numberOfRows; ++row) + { + Coord maxSize = 0; + const auto numColumns = lineInfo[row].numItems; + + for (int column = 0; column < numColumns; ++column) + { + auto& item = getItem (column, row); + + maxSize = jmax (maxSize, isRowDirection ? item.lockedHeight + item.lockedMarginTop + item.lockedMarginBottom + : item.lockedWidth + item.lockedMarginLeft + item.lockedMarginRight); + } + + lineInfo[row].crossSize = maxSize; + } + } + + void calculateCrossSizeOfAllItems() noexcept + { + for (int row = 0; row < numberOfRows; ++row) + { + const auto numColumns = lineInfo[row].numItems; + + for (int column = 0; column < numColumns; ++column) + { + auto& item = getItem (column, row); + + if (isAssigned (item.item->maxHeight) && item.lockedHeight > item.item->maxHeight) + item.lockedHeight = item.item->maxHeight; + + if (isAssigned (item.item->maxWidth) && item.lockedWidth > item.item->maxWidth) + item.lockedWidth = item.item->maxWidth; + } + } + } + + void alignLinesPerAlignContent() noexcept + { + containerCrossLength = isRowDirection ? parentHeight : parentWidth; + + if (owner.alignContent == FlexBox::AlignContent::flexStart) + { + for (int row = 0; row < numberOfRows; ++row) + for (int row2 = row; row2 < numberOfRows; ++row2) + lineInfo[row].lineY = row == 0 ? 0 : lineInfo[row - 1].lineY + lineInfo[row - 1].crossSize; + } + else if (owner.alignContent == FlexBox::AlignContent::flexEnd) + { + for (int row = 0; row < numberOfRows; ++row) + { + Coord crossHeights = 0; + + for (int row2 = row; row2 < numberOfRows; ++row2) + crossHeights += lineInfo[row2].crossSize; + + lineInfo[row].lineY = containerCrossLength - crossHeights; + } + } + else + { + Coord totalHeight = 0; + + for (int row = 0; row < numberOfRows; ++row) + totalHeight += lineInfo[row].crossSize; + + if (owner.alignContent == FlexBox::AlignContent::stretch) + { + const auto difference = jmax (Coord(), (containerCrossLength - totalHeight) / numberOfRows); + + for (int row = 0; row < numberOfRows; ++row) + { + lineInfo[row].crossSize += difference; + lineInfo[row].lineY = row == 0 ? 0 : lineInfo[row - 1].lineY + lineInfo[row - 1].crossSize; + } + } + else if (owner.alignContent == FlexBox::AlignContent::center) + { + const auto additionalength = (containerCrossLength - totalHeight) / 2; + + for (int row = 0; row < numberOfRows; ++row) + lineInfo[row].lineY = row == 0 ? additionalength : lineInfo[row - 1].lineY + lineInfo[row - 1].crossSize; + } + else if (owner.alignContent == FlexBox::AlignContent::spaceBetween) + { + const auto additionalength = numberOfRows <= 1 ? Coord() : jmax (Coord(), (containerCrossLength - totalHeight) + / static_cast (numberOfRows - 1)); + lineInfo[0].lineY = 0; + + for (int row = 1; row < numberOfRows; ++row) + lineInfo[row].lineY += additionalength + lineInfo[row - 1].lineY + lineInfo[row - 1].crossSize; + } + else if (owner.alignContent == FlexBox::AlignContent::spaceAround) + { + const auto additionalength = numberOfRows <= 1 ? Coord() : jmax (Coord(), (containerCrossLength - totalHeight) + / static_cast (2 + (2 * (numberOfRows - 1)))); + + lineInfo[0].lineY = additionalength; + + for (int row = 1; row < numberOfRows; ++row) + lineInfo[row].lineY += (2 * additionalength) + lineInfo[row - 1].lineY + lineInfo[row - 1].crossSize; + } + } + } + + void resolveAutoMarginsOnCrossAxis() noexcept + { + for (int row = 0; row < numberOfRows; ++row) + { + const auto numColumns = lineInfo[row].numItems; + const auto crossSizeForLine = lineInfo[row].crossSize; + + for (int column = 0; column < numColumns; ++column) + { + auto& item = getItem (column, row); + + if (isRowDirection) + { + if (isAuto (item.item->margin.top) && isAuto (item.item->margin.bottom)) + item.lockedMarginTop = (crossSizeForLine - item.lockedHeight) / 2; + else if (isAuto (item.item->margin.top)) + item.lockedMarginTop = crossSizeForLine - item.lockedHeight - item.item->margin.bottom; + } + else if (isAuto (item.item->margin.left) && isAuto (item.item->margin.right)) + { + item.lockedMarginLeft = jmax (Coord(), (crossSizeForLine - item.lockedWidth) / 2); + } + else if (isAuto (item.item->margin.top)) + { + item.lockedMarginLeft = jmax (Coord(), crossSizeForLine - item.lockedHeight - item.item->margin.bottom); + } + } + } + } + + void alignItemsInCrossAxisInLinesPerAlignItems() noexcept + { + for (int row = 0; row < numberOfRows; ++row) + { + const auto numColumns = lineInfo[row].numItems; + const auto lineSize = lineInfo[row].crossSize; + + for (int column = 0; column < numColumns; ++column) + { + auto& item = getItem (column, row); + + if (item.item->alignSelf == FlexItem::AlignSelf::autoAlign) + { + if (owner.alignItems == FlexBox::AlignItems::stretch) + { + item.lockedMarginTop = item.item->margin.top; + + if (isRowDirection) + item.setHeightChecked (lineSize - item.item->margin.top - item.item->margin.bottom); + } + else if (owner.alignItems == FlexBox::AlignItems::flexStart) + { + item.lockedMarginTop = item.item->margin.top; + } + else if (owner.alignItems == FlexBox::AlignItems::flexEnd) + { + item.lockedMarginTop = lineSize - item.lockedHeight - item.item->margin.bottom; + } + else if (owner.alignItems == FlexBox::AlignItems::center) + { + item.lockedMarginTop = (lineSize - item.lockedHeight - item.item->margin.top - item.item->margin.bottom) / 2; + } + } + } + } + } + + void alignLinesPerAlignSelf() noexcept + { + for (int row = 0; row < numberOfRows; ++row) + { + const auto numColumns = lineInfo[row].numItems; + const auto lineSize = lineInfo[row].crossSize; + + for (int column = 0; column < numColumns; ++column) + { + auto& item = getItem (column, row); + + if (! isAuto (item.item->margin.top)) + { + if (item.item->alignSelf == FlexItem::AlignSelf::flexStart) + { + if (isRowDirection) + item.lockedMarginTop = item.item->margin.top; + else + item.lockedMarginLeft = item.item->margin.left; + } + else if (item.item->alignSelf == FlexItem::AlignSelf::flexEnd) + { + if (isRowDirection) + item.lockedMarginTop = lineSize - item.lockedHeight - item.item->margin.bottom; + else + item.lockedMarginLeft = lineSize - item.lockedWidth - item.item->margin.right; + } + else if (item.item->alignSelf == FlexItem::AlignSelf::center) + { + if (isRowDirection) + item.lockedMarginTop = item.item->margin.top + (lineSize - item.lockedHeight - item.item->margin.top - item.item->margin.bottom) / 2; + else + item.lockedMarginLeft = item.item->margin.left + (lineSize - item.lockedWidth - item.item->margin.left - item.item->margin.right) / 2; + } + else if (item.item->alignSelf == FlexItem::AlignSelf::stretch) + { + item.lockedMarginTop = item.item->margin.top; + item.lockedMarginLeft = item.item->margin.left; + + if (isRowDirection) + item.setHeightChecked (isAssigned (item.item->height) ? getPreferredHeight (item) + : lineSize - item.item->margin.top - item.item->margin.bottom); + else + item.setWidthChecked (isAssigned (item.item->width) ? getPreferredWidth (item) + : lineSize - item.item->margin.left - item.item->margin.right); + } + } + } + } + } + + void alignItemsByJustifyContent() noexcept + { + Coord additionalMarginRight = 0, additionalMarginLeft = 0; + + recalculateTotalItemLengthPerLineArray(); + + for (int row = 0; row < numberOfRows; ++row) + { + const auto numColumns = lineInfo[row].numItems; + Coord x = 0; + + if (owner.justifyContent == FlexBox::JustifyContent::flexEnd) + { + x = containerLineLength - lineInfo[row].totalLength; + } + else if (owner.justifyContent == FlexBox::JustifyContent::center) + { + x = (containerLineLength - lineInfo[row].totalLength) / 2; + } + else if (owner.justifyContent == FlexBox::JustifyContent::spaceBetween) + { + additionalMarginRight + = jmax (Coord(), (containerLineLength - lineInfo[row].totalLength) / jmax (1, numColumns - 1)); + } + else if (owner.justifyContent == FlexBox::JustifyContent::spaceAround) + { + additionalMarginLeft = additionalMarginRight + = jmax (Coord(), (containerLineLength - lineInfo[row].totalLength) / jmax (1, 2 * numColumns)); + } + + for (int column = 0; column < numColumns; ++column) + { + auto& item = getItem (column, row); + + if (isRowDirection) + { + item.lockedMarginLeft += additionalMarginLeft; + item.lockedMarginRight += additionalMarginRight; + item.item->currentBounds.setPosition ((float) (x + item.lockedMarginLeft), (float) item.lockedMarginTop); + x += item.lockedWidth + item.lockedMarginLeft + item.lockedMarginRight; + } + else + { + item.lockedMarginTop += additionalMarginLeft; + item.lockedMarginBottom += additionalMarginRight; + item.item->currentBounds.setPosition ((float) item.lockedMarginLeft, (float) (x + item.lockedMarginTop)); + x += item.lockedHeight + item.lockedMarginTop + item.lockedMarginBottom; + } + } + } + } + + void layoutAllItems() noexcept + { + for (int row = 0; row < numberOfRows; ++row) + { + const auto lineY = lineInfo[row].lineY; + const auto numColumns = lineInfo[row].numItems; + + for (int column = 0; column < numColumns; ++column) + { + auto& item = getItem (column, row); + + if (isRowDirection) + item.item->currentBounds.setY ((float) (lineY + item.lockedMarginTop)); + else + item.item->currentBounds.setX ((float) (lineY + item.lockedMarginLeft)); + + item.item->currentBounds.setSize ((float) item.lockedWidth, + (float) item.lockedHeight); + } + } + + reverseLocations(); + reverseWrap(); + } + + static int compareElements (const ItemWithState& i1, const ItemWithState& i2) noexcept + { + return i1.item->order < i2.item->order ? -1 : (i2.item->order < i1.item->order ? 1 : 0); + } + +private: + void resetRowItems (const int row) noexcept + { + const auto numColumns = lineInfo[row].numItems; + + for (int column = 0; column < numColumns; ++column) + resetItem (getItem (column, row)); + } + + void resetUnlockedRowItems (const int row) noexcept + { + const auto numColumns = lineInfo[row].numItems; + + for (int column = 0; column < numColumns; ++column) + { + auto& item = getItem (column, row); + + if (! item.locked) + resetItem (item); + } + } + + void resetItem (ItemWithState& item) noexcept + { + item.locked = false; + item.lockedWidth = getPreferredWidth (item); + item.lockedHeight = getPreferredHeight (item); + } + + bool layoutRowItems (const int row) noexcept + { + const auto numColumns = lineInfo[row].numItems; + auto flexContainerLength = containerLineLength; + Coord totalItemsLength = 0, totalFlexGrow = 0, totalFlexShrink = 0; + + for (int column = 0; column < numColumns; ++column) + { + const auto& item = getItem (column, row); + + if (item.locked) + { + flexContainerLength -= getItemLength (item); + } + else + { + totalItemsLength += getItemLength (item); + totalFlexGrow += item.item->flexGrow; + totalFlexShrink += item.item->flexShrink; + } + } + + Coord changeUnit = 0; + const auto difference = flexContainerLength - totalItemsLength; + const bool positiveFlexibility = difference > 0; + + if (positiveFlexibility) + { + if (totalFlexGrow != 0) + changeUnit = difference / totalFlexGrow; + } + else + { + if (totalFlexShrink != 0) + changeUnit = difference / totalFlexShrink; + } + + bool ok = true; + + for (int column = 0; column < numColumns; ++column) + { + auto& item = getItem (column, row); + + if (! item.locked) + if (! addToItemLength (item, (positiveFlexibility ? item.item->flexGrow + : item.item->flexShrink) * changeUnit, row)) + ok = false; + } + + return ok; + } + + void recalculateTotalItemLengthPerLineArray() noexcept + { + for (int row = 0; row < numberOfRows; ++row) + { + lineInfo[row].totalLength = 0; + const auto numColumns = lineInfo[row].numItems; + + for (int column = 0; column < numColumns; ++column) + { + const auto& item = getItem (column, row); + + lineInfo[row].totalLength += isRowDirection ? item.lockedWidth + item.lockedMarginLeft + item.lockedMarginRight + : item.lockedHeight + item.lockedMarginTop + item.lockedMarginBottom; + } + } + } + + void reverseLocations() noexcept + { + if (owner.flexDirection == FlexBox::Direction::rowReverse) + { + for (auto& item : owner.items) + item.currentBounds.setX ((float) (containerLineLength - item.currentBounds.getRight())); + } + else if (owner.flexDirection == FlexBox::Direction::columnReverse) + { + for (auto& item : owner.items) + item.currentBounds.setY ((float) (containerLineLength - item.currentBounds.getBottom())); + } + } + + void reverseWrap() noexcept + { + if (owner.flexWrap == FlexBox::Wrap::wrapReverse) + { + if (isRowDirection) + { + for (auto& item : owner.items) + item.currentBounds.setY ((float) (containerCrossLength - item.currentBounds.getBottom())); + } + else + { + for (auto& item : owner.items) + item.currentBounds.setX ((float) (containerCrossLength - item.currentBounds.getRight())); + } + } + } + + Coord getItemLength (const ItemWithState& item) const noexcept + { + return isRowDirection ? item.lockedWidth + item.lockedMarginLeft + item.lockedMarginRight + : item.lockedHeight + item.lockedMarginTop + item.lockedMarginBottom; + } + + Coord getItemCrossSize (const ItemWithState& item) const noexcept + { + return isRowDirection ? item.lockedHeight + item.lockedMarginTop + item.lockedMarginBottom + : item.lockedWidth + item.lockedMarginLeft + item.lockedMarginRight; + } + + bool addToItemLength (ItemWithState& item, const Coord length, int row) const noexcept + { + bool ok = false; + + if (isRowDirection) + { + const auto prefWidth = getPreferredWidth (item); + + if (isAssigned (item.item->maxWidth) && item.item->maxWidth < prefWidth + length) + { + item.lockedWidth = item.item->maxWidth; + item.locked = true; + } + else if (isAssigned (prefWidth) && item.item->minWidth > prefWidth + length) + { + item.lockedWidth = item.item->minWidth; + item.locked = true; + } + else + { + ok = true; + item.lockedWidth = prefWidth + length; + } + + lineInfo[row].totalLength += item.lockedWidth + item.lockedMarginLeft + item.lockedMarginRight; + } + else + { + const auto prefHeight = getPreferredHeight (item); + + if (isAssigned (item.item->maxHeight) && item.item->maxHeight < prefHeight + length) + { + item.lockedHeight = item.item->maxHeight; + item.locked = true; + } + else if (isAssigned (prefHeight) && item.item->minHeight > prefHeight + length) + { + item.lockedHeight = item.item->minHeight; + item.locked = true; + } + else + { + ok = true; + item.lockedHeight = prefHeight + length; + } + + lineInfo[row].totalLength += item.lockedHeight + item.lockedMarginTop + item.lockedMarginBottom; + } + + return ok; + } + + Coord getPreferredWidth (const ItemWithState& itemWithState) const noexcept + { + const auto& item = *itemWithState.item; + auto preferredWidth = (item.flexBasis > 0 && isRowDirection) + ? item.flexBasis + : (isAssigned (item.width) ? item.width : item.minWidth); + + if (isAssigned (item.minWidth) && preferredWidth < item.minWidth) return item.minWidth; + if (isAssigned (item.maxWidth) && preferredWidth > item.maxWidth) return item.maxWidth; + + return preferredWidth; + } + + Coord getPreferredHeight (const ItemWithState& itemWithState) const noexcept + { + const auto& item = *itemWithState.item; + auto preferredHeight = (item.flexBasis > 0 && ! isRowDirection) + ? item.flexBasis + : (isAssigned (item.height) ? item.height : item.minHeight); + + if (isAssigned (item.minHeight) && preferredHeight < item.minHeight) return item.minHeight; + if (isAssigned (item.maxHeight) && preferredHeight > item.maxHeight) return item.maxHeight; + + return preferredHeight; + } +}; + +//============================================================================== +FlexBox::FlexBox() noexcept {} +FlexBox::~FlexBox() noexcept {} + +FlexBox::FlexBox (JustifyContent jc) noexcept : justifyContent (jc) {} + +FlexBox::FlexBox (Direction d, Wrap w, AlignContent ac, AlignItems ai, JustifyContent jc) noexcept + : flexDirection (d), flexWrap (w), alignContent (ac), alignItems (ai), justifyContent (jc) +{} + +void FlexBox::performLayout (Rectangle targetArea) +{ + if (! items.isEmpty()) + { + FlexBoxLayoutCalculation layout (*this, targetArea.getWidth(), targetArea.getHeight()); + + layout.createStates(); + layout.initialiseItems(); + layout.resolveFlexibleLengths(); + layout.resolveAutoMarginsOnMainAxis(); + layout.calculateCrossSizesByLine(); + layout.calculateCrossSizeOfAllItems(); + layout.alignLinesPerAlignContent(); + layout.resolveAutoMarginsOnCrossAxis(); + layout.alignItemsInCrossAxisInLinesPerAlignItems(); + layout.alignLinesPerAlignSelf(); + layout.alignItemsByJustifyContent(); + layout.layoutAllItems(); + + for (auto& item : items) + { + item.currentBounds += targetArea.getPosition(); + + if (auto comp = item.associatedComponent) + comp->setBounds (item.currentBounds.getSmallestIntegerContainer()); + + if (auto box = item.associatedFlexBox) + box->performLayout (item.currentBounds); + } + } +} + +void FlexBox::performLayout (Rectangle targetArea) +{ + performLayout (targetArea.toFloat()); +} + +//============================================================================== +FlexItem::FlexItem() noexcept {} +FlexItem::FlexItem (float w, float h) noexcept : currentBounds (w, h), minWidth (w), minHeight (h) {} +FlexItem::FlexItem (float w, float h, Component& c) noexcept : FlexItem (w, h) { associatedComponent = &c; } +FlexItem::FlexItem (float w, float h, FlexBox& fb) noexcept : FlexItem (w, h) { associatedFlexBox = &fb; } +FlexItem::FlexItem (Component& c) noexcept : associatedComponent (&c) {} +FlexItem::FlexItem (FlexBox& fb) noexcept : associatedFlexBox (&fb) {} + +FlexItem::Margin::Margin() noexcept : left(), right(), top(), bottom() {} +FlexItem::Margin::Margin (float v) noexcept : left (v), right (v), top (v), bottom (v) {} + +//============================================================================== +FlexItem FlexItem::withFlex (float newFlexGrow) const noexcept +{ + auto fi = *this; + fi.flexGrow = newFlexGrow; + return fi; +} + +FlexItem FlexItem::withFlex (float newFlexGrow, float newFlexShrink) const noexcept +{ + auto fi = withFlex (newFlexGrow); + fi.flexShrink = newFlexShrink; + return fi; +} + +FlexItem FlexItem::withFlex (float newFlexGrow, float newFlexShrink, float newFlexBasis) const noexcept +{ + auto fi = withFlex (newFlexGrow, newFlexShrink); + fi.flexBasis = newFlexBasis; + return fi; +} + +FlexItem FlexItem::withWidth (float newWidth) const noexcept { auto fi = *this; fi.width = newWidth; return fi; } +FlexItem FlexItem::withHeight (float newHeight) const noexcept { auto fi = *this; fi.height = newHeight; return fi; } +FlexItem FlexItem::withMargin (Margin m) const noexcept { auto fi = *this; fi.margin = m; return fi; } diff --git a/modules/juce_gui_basics/layout/juce_FlexBox.h b/modules/juce_gui_basics/layout/juce_FlexBox.h new file mode 100644 index 00000000..7057192d --- /dev/null +++ b/modules/juce_gui_basics/layout/juce_FlexBox.h @@ -0,0 +1,102 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2015 - ROLI Ltd. + + Permission is granted to use this software under the terms of either: + a) the GPL v2 (or any later version) + b) the Affero GPL v3 + + Details of these licenses can be found at: www.gnu.org/licenses + + JUCE is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + ------------------------------------------------------------------------------ + + To release a closed-source product which uses JUCE, commercial licenses are + available: visit www.juce.com for more information. + + ============================================================================== +*/ + + +/** + Represents a FlexBox container, which contains and manages the layout of a set + of FlexItem objects. + + To use this class, set its parameters appropriately (you can search online for + more help on exactly how the FlexBox protocol works!), then add your sub-items + to the items array, and call performLayout(). + + @see FlexItem +*/ +class JUCE_API FlexBox +{ +public: + /** Possible values for the flexDirection property. */ + enum class Direction { row, rowReverse, column, columnReverse }; + /** Possible values for the flexWrap property. */ + enum class Wrap { noWrap, wrap, wrapReverse }; + /** Possible values for the alignContent property. */ + enum class AlignContent { stretch, flexStart, flexEnd, center, spaceBetween, spaceAround }; + /** Possible values for the alignItems property. */ + enum class AlignItems { stretch, flexStart, flexEnd, center }; + /** Possible values for the justifyContent property. */ + enum class JustifyContent { flexStart, flexEnd, center, spaceBetween, spaceAround }; + + //============================================================================== + /** Creates an empty FlexBox container with default parameters. */ + FlexBox() noexcept; + + /** Creates an empty FlexBox container with these parameters. */ + FlexBox (Direction, Wrap, AlignContent, AlignItems, JustifyContent) noexcept; + + /** Creates an empty FlexBox container with the given content-justification mode. */ + FlexBox (JustifyContent) noexcept; + + /** Destructor. */ + ~FlexBox() noexcept; + + //============================================================================== + /** Lays-out the box's items within the given rectangle. */ + void performLayout (Rectangle targetArea); + + /** Lays-out the box's items within the given rectangle. */ + void performLayout (Rectangle targetArea); + + //============================================================================== + /** Specifies how flex items are placed in the flex container, and defines the + direction of the main axis. + */ + Direction flexDirection = Direction::row; + + /** Specifies whether items are forced into a single line or can be wrapped onto multiple lines. + If wrapping is allowed, this property also controls the direction in which lines are stacked. + */ + Wrap flexWrap = Wrap::noWrap; + + /** Specifies how a flex container's lines are placed within the flex container when + there is extra space on the cross-axis. + This property has no effect on single line layouts. + */ + AlignContent alignContent = AlignContent::stretch; + + /** Specifies the alignment of flex items along the cross-axis of each line. */ + AlignItems alignItems = AlignItems::stretch; + + /** Defines how the container distributes space between and around items along the main-axis. + The alignment is done after the lengths and auto margins are applied, so that if there is at + least one flexible element, with flex-grow different from 0, it will have no effect as there + won't be any available space. + */ + JustifyContent justifyContent = JustifyContent::flexStart; + + /** The set of items to lay-out. */ + Array items; + +private: + JUCE_LEAK_DETECTOR (FlexBox) +}; diff --git a/modules/juce_gui_basics/layout/juce_FlexItem.h b/modules/juce_gui_basics/layout/juce_FlexItem.h new file mode 100644 index 00000000..83903105 --- /dev/null +++ b/modules/juce_gui_basics/layout/juce_FlexItem.h @@ -0,0 +1,142 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2015 - ROLI Ltd. + + Permission is granted to use this software under the terms of either: + a) the GPL v2 (or any later version) + b) the Affero GPL v3 + + Details of these licenses can be found at: www.gnu.org/licenses + + JUCE is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + ------------------------------------------------------------------------------ + + To release a closed-source product which uses JUCE, commercial licenses are + available: visit www.juce.com for more information. + + ============================================================================== +*/ + + +/** + Describes the properties of an item inside a FlexBox container. + + @see FlexBox +*/ +class JUCE_API FlexItem +{ +public: + //============================================================================== + /** Creates an item with default parameters, and zero size. */ + FlexItem() noexcept; + + /** Creates an item with the given size. */ + FlexItem (float width, float height) noexcept; + + /** Creates an item with the given size and target component. */ + FlexItem (float width, float height, Component& targetComponent) noexcept; + + /** Creates an item that represents an embedded FlexBox with a given size. */ + FlexItem (float width, float height, FlexBox& flexBoxToControl) noexcept; + + /** Creates an item with a given target component. */ + FlexItem (Component& componentToControl) noexcept; + + /** Creates an item that represents an embedded FlexBox. */ + FlexItem (FlexBox& flexBoxToControl) noexcept; + + //============================================================================== + /** The item's current bounds. */ + Rectangle currentBounds; + + /** If this is non-null, it represents a Component whose bounds are controlled by this item. */ + Component* associatedComponent = nullptr; + + /** If this is non-null, it represents a FlexBox whose bounds are controlled by this item. */ + FlexBox* associatedFlexBox = nullptr; + + /** Determines the order used to lay out items in their flex container. + Elements are laid out in ascending order of thus order value. Elements with the same order value + are laid out in the order in which they appear in the array. + */ + int order = 0; + + /** Specifies the flex grow factor of this item. + This indicates the amount of space inside the flex container the item should take up. + */ + float flexGrow = 0.0f; + + /** Specifies the flex shrink factor of the item. + This indicates the rate at which the item shrinks if there is insufficient space in + the container. + */ + float flexShrink = 1.0f; + + /** Specifies the flex-basis of the item. + This is the initial main size of a flex item in the direction of flow. It determines the size + of the content-box unless specified otherwise using box-sizing. + */ + float flexBasis = 0.0f; + + /** Possible value for the alignSelf property */ + enum class AlignSelf { autoAlign, flexStart, flexEnd, center, stretch }; + + /** This is the aligh-self property of the item. + This determines the alignment of the item along the corss-axis (perpendicular to the direction + of flow). + */ + AlignSelf alignSelf = AlignSelf::stretch; + + //============================================================================== + /** This constant can be used for sizes to indicate that 'auto' mode should be used. */ + static const int autoValue = -2; + /** This constant can be used for sizes to indicate that no value has been set. */ + static const int notAssigned = -1; + + float width = (float) notAssigned; /**< The item's width. */ + float minWidth = 0.0f; /**< The item's minimum width */ + float maxWidth = (float) notAssigned; /**< The item's maximum width */ + + float height = (float) notAssigned; /**< The item's height */ + float minHeight = 0.0f; /**< The item's minimum height */ + float maxHeight = (float) notAssigned; /**< The item's maximum height */ + + /** Represents a margin. */ + struct Margin + { + Margin() noexcept; /**< Creates a margin of size zero. */ + Margin (float size) noexcept; /**< Creates a margin with this size on all sides. */ + + float left; /**< Left margin size */ + float right; /**< Right margin size */ + float top; /**< Top margin size */ + float bottom; /**< Bottom margin size */ + }; + + /** The margin to leave around this item. */ + Margin margin; + + //============================================================================== + /** Returns a copy of this object with a new flex-grow value. */ + FlexItem withFlex (float newFlexGrow) const noexcept; + + /** Returns a copy of this object with new flex-grow and flex-shrink values. */ + FlexItem withFlex (float newFlexGrow, float newFlexShrink) const noexcept; + + /** Returns a copy of this object with new flex-grow, flex-shrink and flex-basis values. */ + FlexItem withFlex (float newFlexGrow, float newFlexShrink, float newFlexBasis) const noexcept; + + /** Returns a copy of this object with a new width. */ + FlexItem withWidth (float newWidth) const noexcept; + + /** Returns a copy of this object with a new height. */ + FlexItem withHeight (float newHeight) const noexcept; + + /** Returns a copy of this object with a new margin. */ + FlexItem withMargin (Margin) const noexcept; +}; diff --git a/modules/juce_gui_basics/layout/juce_GroupComponent.h b/modules/juce_gui_basics/layout/juce_GroupComponent.h index 02ba492c..8ad22e93 100644 --- a/modules/juce_gui_basics/layout/juce_GroupComponent.h +++ b/modules/juce_gui_basics/layout/juce_GroupComponent.h @@ -41,8 +41,8 @@ public: @param componentName the name to give the component @param labelText the text to show at the top of the outline */ - GroupComponent (const String& componentName = String::empty, - const String& labelText = String::empty); + GroupComponent (const String& componentName = String(), + const String& labelText = String()); /** Destructor. */ ~GroupComponent(); diff --git a/modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp b/modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp index 69c40bb9..b81a3f1a 100644 --- a/modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp +++ b/modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp @@ -23,7 +23,7 @@ */ MultiDocumentPanelWindow::MultiDocumentPanelWindow (Colour backgroundColour) - : DocumentWindow (String::empty, backgroundColour, + : DocumentWindow (String(), backgroundColour, DocumentWindow::maximiseButton | DocumentWindow::closeButton, false) { } diff --git a/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h b/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h index bd7b5784..ffafc987 100644 --- a/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h +++ b/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h @@ -57,9 +57,9 @@ public: Remember that when the target component is resized, it'll need to move and resize this component to keep it in place, as this won't happen automatically. - If the constrainer parameter is non-zero, then this object will be used to enforce - limits on the size and position that the component can be stretched to. Make sure - that the constrainer isn't deleted while still in use by this object. + If the constrainer parameter is not a nullptr, then this object will be used to + enforce limits on the size and position that the component can be stretched to. + Make sure that the constrainer isn't deleted while still in use by this object. @see ComponentBoundsConstrainer */ diff --git a/modules/juce_gui_basics/layout/juce_ResizableEdgeComponent.h b/modules/juce_gui_basics/layout/juce_ResizableEdgeComponent.h index 23c3689e..9ebab668 100644 --- a/modules/juce_gui_basics/layout/juce_ResizableEdgeComponent.h +++ b/modules/juce_gui_basics/layout/juce_ResizableEdgeComponent.h @@ -60,9 +60,9 @@ public: Remember that when the target component is resized, it'll need to move and resize this component to keep it in place, as this won't happen automatically. - If the constrainer parameter is non-zero, then this object will be used to enforce - limits on the size and position that the component can be stretched to. Make sure - that the constrainer isn't deleted while still in use by this object. + If the constrainer parameter is not a nullptr, then this object will be used to + enforce limits on the size and position that the component can be stretched to. + Make sure that the constrainer isn't deleted while still in use by this object. @see ComponentBoundsConstrainer */ diff --git a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp index 04907cff..ee9d2029 100644 --- a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp +++ b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp @@ -321,7 +321,7 @@ int TabbedButtonBar::getNumTabs() const String TabbedButtonBar::getCurrentTabName() const { TabInfo* tab = tabs [currentTabIndex]; - return tab == nullptr ? String::empty : tab->name; + return tab == nullptr ? String() : tab->name; } StringArray TabbedButtonBar::getTabNames() const diff --git a/modules/juce_gui_basics/layout/juce_Viewport.cpp b/modules/juce_gui_basics/layout/juce_Viewport.cpp index bc8a8c92..edb0ba25 100644 --- a/modules/juce_gui_basics/layout/juce_Viewport.cpp +++ b/modules/juce_gui_basics/layout/juce_Viewport.cpp @@ -110,8 +110,13 @@ int Viewport::getMaximumVisibleHeight() const { return contentHolder.getHeight Point Viewport::viewportPosToCompPos (Point pos) const { jassert (contentComp != nullptr); - return Point (jmax (jmin (0, contentHolder.getWidth() - contentComp->getWidth()), jmin (0, -(pos.x))), - jmax (jmin (0, contentHolder.getHeight() - contentComp->getHeight()), jmin (0, -(pos.y)))); + + Rectangle contentBounds = contentHolder.getLocalArea (contentComp, contentComp->getLocalBounds()); + Point p (jmax (jmin (0, contentHolder.getWidth() - contentBounds.getWidth()), jmin (0, -(pos.x))), + jmax (jmin (0, contentHolder.getHeight() - contentBounds.getHeight()), jmin (0, -(pos.y)))); + + + return p.transformedBy (contentComp->getTransform().inverted()); } void Viewport::setViewPosition (const int xPixelsOffset, const int yPixelsOffset) diff --git a/modules/juce_gui_basics/layout/juce_Viewport.h b/modules/juce_gui_basics/layout/juce_Viewport.h index fe3d5fb4..ee73e277 100644 --- a/modules/juce_gui_basics/layout/juce_Viewport.h +++ b/modules/juce_gui_basics/layout/juce_Viewport.h @@ -50,7 +50,7 @@ public: The viewport is initially empty - use the setViewedComponent() method to add a child component for it to manage. */ - explicit Viewport (const String& componentName = String::empty); + explicit Viewport (const String& componentName = String()); /** Destructor. */ ~Viewport(); diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp index 718496c6..17c4c604 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp @@ -1080,6 +1080,8 @@ Component* LookAndFeel_V2::getParentComponentForMenuOptions (const PopupMenu::Op return options.getParentComponent(); } +void LookAndFeel_V2::preparePopupMenuWindow (Component&) {} + //============================================================================== void LookAndFeel_V2::fillTextEditorBackground (Graphics& g, int /*width*/, int /*height*/, TextEditor& textEditor) { @@ -1174,7 +1176,7 @@ Font LookAndFeel_V2::getComboBoxFont (ComboBox& box) Label* LookAndFeel_V2::createComboBoxTextBox (ComboBox&) { - return new Label (String::empty, String::empty); + return new Label (String(), String()); } void LookAndFeel_V2::positionComboBoxText (ComboBox& box, Label& label) @@ -1452,13 +1454,13 @@ void LookAndFeel_V2::drawRotarySlider (Graphics& g, int x, int y, int width, int Button* LookAndFeel_V2::createSliderButton (Slider&, const bool isIncrement) { - return new TextButton (isIncrement ? "+" : "-", String::empty); + return new TextButton (isIncrement ? "+" : "-", String()); } class LookAndFeel_V2::SliderLabelComp : public Label { public: - SliderLabelComp() : Label (String::empty, String::empty) {} + SliderLabelComp() : Label (String(), String()) {} void mouseWheelMove (const MouseEvent&, const MouseWheelDetails&) {} }; @@ -1726,6 +1728,9 @@ void LookAndFeel_V2::drawDocumentWindowTitleBar (DocumentWindow& window, Graphic int w, int h, int titleSpaceX, int titleSpaceW, const Image* icon, bool drawTitleTextOnLeft) { + if (w * h == 0) + return; + const bool isActive = window.isActiveWindow(); g.setGradientFill (ColourGradient (window.getBackgroundColour(), diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h index 1633bfd0..2468edeb 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h @@ -162,6 +162,7 @@ public: void getIdealPopupMenuItemSize (const String& text, bool isSeparator, int standardMenuItemHeight, int& idealWidth, int& idealHeight) override; int getMenuWindowFlags() override; + void preparePopupMenuWindow (Component&) override; void drawMenuBarBackground (Graphics&, int width, int height, bool isMouseOverBar, MenuBarComponent&) override; int getMenuBarItemWidth (MenuBarComponent&, int itemIndex, const String& itemText) override; diff --git a/modules/juce_gui_basics/menus/juce_MenuBarComponent.cpp b/modules/juce_gui_basics/menus/juce_MenuBarComponent.cpp index 8d746c4f..b979ba48 100644 --- a/modules/juce_gui_basics/menus/juce_MenuBarComponent.cpp +++ b/modules/juce_gui_basics/menus/juce_MenuBarComponent.cpp @@ -143,6 +143,11 @@ void MenuBarComponent::setOpenItem (int index) { if (currentPopupIndex != index) { + if (currentPopupIndex < 0 && index >= 0) + model->handleMenuBarActivate (true); + else if (currentPopupIndex >= 0 && index < 0) + model->handleMenuBarActivate (false); + repaintMenuItem (currentPopupIndex); currentPopupIndex = index; repaintMenuItem (currentPopupIndex); diff --git a/modules/juce_gui_basics/menus/juce_MenuBarModel.cpp b/modules/juce_gui_basics/menus/juce_MenuBarModel.cpp index d93642ff..ccfcbc49 100644 --- a/modules/juce_gui_basics/menus/juce_MenuBarModel.cpp +++ b/modules/juce_gui_basics/menus/juce_MenuBarModel.cpp @@ -82,3 +82,12 @@ void MenuBarModel::applicationCommandListChanged() { menuItemsChanged(); } + +void MenuBarModel::handleMenuBarActivate (bool isActive) +{ + menuBarActivated (isActive); + listeners.call (&MenuBarModel::Listener::menuBarActivated, this, isActive); +} + +void MenuBarModel::menuBarActivated (bool) {} +void MenuBarModel::Listener::menuBarActivated (MenuBarModel*, bool) {} diff --git a/modules/juce_gui_basics/menus/juce_MenuBarModel.h b/modules/juce_gui_basics/menus/juce_MenuBarModel.h index 0fc06e7f..4267661f 100644 --- a/modules/juce_gui_basics/menus/juce_MenuBarModel.h +++ b/modules/juce_gui_basics/menus/juce_MenuBarModel.h @@ -88,6 +88,10 @@ public: */ virtual void menuCommandInvoked (MenuBarModel* menuBarModel, const ApplicationCommandTarget::InvocationInfo& info) = 0; + + /** Called when the menu bar is first activated or when the user finished interacting + with the menu bar. */ + virtual void menuBarActivated (MenuBarModel* menuBarModel, bool isActive); }; /** Registers a listener for callbacks when the menu items in this model change. @@ -126,6 +130,12 @@ public: virtual void menuItemSelected (int menuItemID, int topLevelMenuIndex) = 0; + /** This is called when the user starts/stops navigating the maenu bar. + + @param isActive true when the user starts navigating the menu bar + */ + virtual void menuBarActivated (bool isActive); + //============================================================================== #if JUCE_MAC || DOXYGEN /** OSX ONLY - Sets the model that is currently being shown as the main @@ -147,7 +157,7 @@ public: */ static void setMacMainMenu (MenuBarModel* newMenuBarModel, const PopupMenu* extraAppleMenuItems = nullptr, - const String& recentItemsMenuName = String::empty); + const String& recentItemsMenuName = String()); /** OSX ONLY - Returns the menu model that is currently being shown as the main menu bar. @@ -167,7 +177,8 @@ public: void applicationCommandListChanged() override; /** @internal */ void handleAsyncUpdate() override; - + /** @internal */ + void handleMenuBarActivate (bool isActive); private: ApplicationCommandManager* manager; ListenerList listeners; diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp index 004bfff3..248cfd47 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp @@ -221,9 +221,11 @@ public: setLookAndFeel (parent != nullptr ? &(parent->getLookAndFeel()) : menu.lookAndFeel.get()); - parentComponent = getLookAndFeel().getParentComponentForMenuOptions (options); + LookAndFeel& lf = getLookAndFeel(); + + parentComponent = lf.getParentComponentForMenuOptions (options); - setOpaque (getLookAndFeel().findColour (PopupMenu::backgroundColourId).isOpaque() + setOpaque (lf.findColour (PopupMenu::backgroundColourId).isOpaque() || ! Desktop::canUseSemiTransparentWindows()); for (int i = 0; i < menu.items.size(); ++i) @@ -259,11 +261,13 @@ public: { addToDesktop (ComponentPeer::windowIsTemporary | ComponentPeer::windowIgnoresKeyPresses - | getLookAndFeel().getMenuWindowFlags()); + | lf.getMenuWindowFlags()); getActiveWindows().add (this); Desktop::getInstance().addGlobalMouseListener (this); } + + lf.preparePopupMenuWindow (*this); } ~MenuWindow() @@ -321,13 +325,25 @@ public: *managerOfChosenCommand = item->commandManager; } - exitModalState (item != nullptr ? item->itemID : 0); + exitModalState (getResultItemID (item)); if (makeInvisible && (deletionChecker != nullptr)) setVisible (false); } } + static int getResultItemID (const PopupMenu::Item* item) + { + if (item == nullptr) + return 0; + + if (CustomCallback* cc = item->customCallback) + if (! cc->menuItemTriggered()) + return 0; + + return item->itemID; + } + void dismissMenu (const PopupMenu::Item* const item) { if (parent != nullptr) @@ -1279,6 +1295,7 @@ PopupMenu::Item::Item (const Item& other) subMenu (createCopyIfNotNull (other.subMenu.get())), image (other.image != nullptr ? other.image->createCopy() : nullptr), customComponent (other.customComponent), + customCallback (other.customCallback), commandManager (other.commandManager), shortcutKeyDescription (other.shortcutKeyDescription), colour (other.colour), @@ -1296,6 +1313,7 @@ PopupMenu::Item& PopupMenu::Item::operator= (const Item& other) subMenu = createCopyIfNotNull (other.subMenu.get()); image = (other.image != nullptr ? other.image->createCopy() : nullptr); customComponent = other.customComponent; + customCallback = other.customCallback; commandManager = other.commandManager; shortcutKeyDescription = other.shortcutKeyDescription; colour = other.colour; @@ -1777,6 +1795,10 @@ void PopupMenu::CustomComponent::triggerMenuItem() } } +//============================================================================== +PopupMenu::CustomCallback::CustomCallback() {} +PopupMenu::CustomCallback::~CustomCallback() {} + //============================================================================== PopupMenu::MenuItemIterator::MenuItemIterator (const PopupMenu& m) : menu (m), index (0) {} PopupMenu::MenuItemIterator::~MenuItemIterator() {} diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.h b/modules/juce_gui_basics/menus/juce_PopupMenu.h index 0a7f2778..76b18a2e 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.h +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.h @@ -81,6 +81,7 @@ private: public: class CustomComponent; + class CustomCallback; //============================================================================== /** Creates an empty popup menu. */ @@ -134,6 +135,9 @@ public: /** A custom component for the item to display, or nullptr if there isn't one. */ ReferenceCountedObjectPtr customComponent; + /** A custom callback for the item to use, or nullptr if there isn't one. */ + ReferenceCountedObjectPtr customCallback; + /** A command manager to use to automatically invoke the command, or nullptr if none is specified. */ ApplicationCommandManager* commandManager; @@ -238,7 +242,7 @@ public: */ void addCommandItem (ApplicationCommandManager* commandManager, CommandID commandID, - const String& displayName = String::empty, + const String& displayName = String(), Drawable* iconToUse = nullptr); @@ -435,12 +439,12 @@ public: in zero. @param standardItemHeight if this is non-zero, it will be used as the standard height for menu items (apart from custom items) - @param callback if this is non-zero, the menu will be launched asynchronously, - returning immediately, and the callback will receive a - call when the menu is either dismissed or has an item - selected. This object will be owned and deleted by the - system, so make sure that it works safely and that any - pointers that it uses are safely within scope. + @param callback if this is not a nullptr, the menu will be launched + asynchronously, returning immediately, and the callback + will receive a call when the menu is either dismissed or + has an item selected. This object will be owned and + deleted by the system, so make sure that it works safely + and that any pointers that it uses are safely within scope. @see showAt */ int show (int itemIDThatMustBeVisible = 0, @@ -625,6 +629,26 @@ public: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CustomComponent) }; + //============================================================================== + /** A user-defined callback that can be used for specific items in a popup menu. + @see PopupMenu::Item::customCallback + */ + class JUCE_API CustomCallback : public SingleThreadedReferenceCountedObject + { + public: + CustomCallback(); + ~CustomCallback(); + + /** Callback to indicate this item has been triggered. + @returns true if the itemID should be sent to the exitModalState method, or + false if it should send 0, indicating no further action should be taken + */ + virtual bool menuItemTriggered() = 0; + + private: + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CustomCallback) + }; + //============================================================================== /** This abstract base class is implemented by LookAndFeel classes to provide menu drawing functionality. @@ -683,6 +707,8 @@ public: MenuBarComponent&) = 0; virtual Component* getParentComponentForMenuOptions (const PopupMenu::Options& options) = 0; + + virtual void preparePopupMenuWindow (Component& newWindow) = 0; }; private: diff --git a/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp b/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp index 3f83081a..bcc4e848 100644 --- a/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp +++ b/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp @@ -146,7 +146,7 @@ public: void sendMouseUp (Component& comp, Point screenPos, Time time, const ModifierKeys oldMods) { JUCE_MOUSE_EVENT_DBG ("up") - comp.internalMouseUp (MouseInputSource (this), screenPosToLocalPos (comp, screenPos), time, oldMods); + comp.internalMouseUp (MouseInputSource (this), screenPosToLocalPos (comp, screenPos), time, oldMods, pressure); } void sendMouseWheel (Component& comp, Point screenPos, Time time, const MouseWheelDetails& wheel) diff --git a/modules/juce_gui_basics/mouse/juce_SelectedItemSet.h b/modules/juce_gui_basics/mouse/juce_SelectedItemSet.h index 764191b8..6535e829 100644 --- a/modules/juce_gui_basics/mouse/juce_SelectedItemSet.h +++ b/modules/juce_gui_basics/mouse/juce_SelectedItemSet.h @@ -75,7 +75,7 @@ public: for (int i = selectedItems.size(); --i >= 0;) if (! other.isSelected (selectedItems.getReference (i))) - itemDeselected (selectedItems.remove (i)); + itemDeselected (selectedItems.removeAndReturn (i)); for (SelectableItemType* i = other.selectedItems.begin(), *e = other.selectedItems.end(); i != e; ++i) { @@ -235,7 +235,7 @@ public: if (i >= 0) { changed(); - itemDeselected (selectedItems.remove (i)); + itemDeselected (selectedItems.removeAndReturn (i)); } } @@ -248,7 +248,7 @@ public: for (int i = selectedItems.size(); --i >= 0;) { - itemDeselected (selectedItems.remove (i)); + itemDeselected (selectedItems.removeAndReturn (i)); i = jmin (i, selectedItems.size()); } } diff --git a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm index 0e52b974..9183004f 100644 --- a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm @@ -787,6 +787,7 @@ static float getMaximumTouchForce (UITouch* touch) noexcept return (float) touch.maximumPossibleForce; #endif + ignoreUnused (touch); return 0.0f; } @@ -797,6 +798,7 @@ static float getTouchForce (UITouch* touch) noexcept return (float) touch.force; #endif + ignoreUnused (touch); return 0.0f; } diff --git a/modules/juce_gui_basics/native/juce_linux_Windowing.cpp b/modules/juce_gui_basics/native/juce_linux_Windowing.cpp index 5896787c..e81872b7 100644 --- a/modules/juce_gui_basics/native/juce_linux_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_linux_Windowing.cpp @@ -3513,7 +3513,7 @@ private: if (Atoms::isMimeTypeFile (dragAndDropCurrentMimeType)) { for (int i = 0; i < lines.size(); ++i) - dragInfo.files.add (URL::removeEscapeChars (lines[i].replace ("file://", String::empty, true))); + dragInfo.files.add (URL::removeEscapeChars (lines[i].replace ("file://", String(), true))); dragInfo.files.trim(); dragInfo.files.removeEmptyStrings(); @@ -4159,7 +4159,7 @@ void JUCE_CALLTYPE NativeMessageBox::showMessageBoxAsync (AlertWindow::AlertIcon Component* associatedComponent, ModalComponentManager::Callback* callback) { - AlertWindow::showMessageBoxAsync (iconType, title, message, String::empty, associatedComponent, callback); + AlertWindow::showMessageBoxAsync (iconType, title, message, String(), associatedComponent, callback); } bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType iconType, @@ -4167,7 +4167,7 @@ bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType Component* associatedComponent, ModalComponentManager::Callback* callback) { - return AlertWindow::showOkCancelBox (iconType, title, message, String::empty, String::empty, + return AlertWindow::showOkCancelBox (iconType, title, message, String(), String(), associatedComponent, callback); } @@ -4177,7 +4177,7 @@ int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconTy ModalComponentManager::Callback* callback) { return AlertWindow::showYesNoCancelBox (iconType, title, message, - String::empty, String::empty, String::empty, + String(), String(), String(), associatedComponent, callback); } diff --git a/modules/juce_gui_basics/native/juce_mac_FileChooser.mm b/modules/juce_gui_basics/native/juce_mac_FileChooser.mm index 42cfd93a..69f4a64b 100644 --- a/modules/juce_gui_basics/native/juce_mac_FileChooser.mm +++ b/modules/juce_gui_basics/native/juce_mac_FileChooser.mm @@ -151,7 +151,7 @@ void FileChooser::showPlatformDialog (Array& results, tempMenu = new TemporaryMainMenuWithStandardCommands(); StringArray* filters = new StringArray(); - filters->addTokens (filter.replaceCharacters (",:", ";;"), ";", String::empty); + filters->addTokens (filter.replaceCharacters (",:", ";;"), ";", String()); filters->trim(); filters->removeEmptyStrings(); diff --git a/modules/juce_gui_basics/native/juce_mac_MainMenu.mm b/modules/juce_gui_basics/native/juce_mac_MainMenu.mm index 9888a8e6..10de90b7 100644 --- a/modules/juce_gui_basics/native/juce_mac_MainMenu.mm +++ b/modules/juce_gui_basics/native/juce_mac_MainMenu.mm @@ -39,7 +39,7 @@ public: ~JuceMainMenuHandler() { - setMenu (nullptr, nullptr, String::empty); + setMenu (nullptr, nullptr, String()); jassert (instance == this); instance = nullptr; @@ -69,23 +69,20 @@ public: extraAppleMenuItems = createCopyIfNotNull (newExtraAppleMenuItems); } - void addTopLevelMenu (NSMenu* parent, const PopupMenu& child, - const String& name, const int menuId, const int tag) + void addTopLevelMenu (NSMenu* parent, const PopupMenu& child, const String& name, int menuId, int topLevelIndex) { NSMenuItem* item = [parent addItemWithTitle: juceStringToNS (name) action: nil keyEquivalent: nsEmptyString()]; - [item setTag: tag]; - NSMenu* sub = createMenu (child, name, menuId, tag, true); + NSMenu* sub = createMenu (child, name, menuId, topLevelIndex, true); [parent setSubmenu: sub forItem: item]; [sub setAutoenablesItems: false]; [sub release]; } - void updateTopLevelMenu (NSMenuItem* parentItem, const PopupMenu& menuToCopy, - const String& name, const int menuId, const int tag) + void updateTopLevelMenu (NSMenuItem* parentItem, const PopupMenu& menuToCopy, const String& name, int menuId, int topLevelIndex) { // Note: This method used to update the contents of the existing menu in-place, but that caused // weird side-effects which messed-up keyboard focus when switching between windows. By creating @@ -93,11 +90,10 @@ public: NSMenu* menu = [[NSMenu alloc] initWithTitle: juceStringToNS (name)]; for (PopupMenu::MenuItemIterator iter (menuToCopy); iter.next();) - addMenuItem (iter, menu, menuId, tag); + addMenuItem (iter, menu, menuId, topLevelIndex); [menu setAutoenablesItems: false]; [menu update]; - [parentItem setTag: tag]; [parentItem setSubmenu: menu]; [menu release]; } @@ -138,8 +134,10 @@ public: void menuCommandInvoked (MenuBarModel*, const ApplicationCommandTarget::InvocationInfo& info) { - if (NSMenuItem* item = findMenuItem ([NSApp mainMenu], info)) - flashMenuBar ([item menu]); + if ((info.commandFlags & ApplicationCommandInfo::dontTriggerVisualFeedback) == 0 + && info.invocationMethod != ApplicationCommandTarget::InvocationInfo::fromKeyPress) + if (NSMenuItem* item = findMenuItemWithTag ([NSApp mainMenu], info.commandID)) + flashMenuBar ([item menu]); } void updateMenus (NSMenu* menu) @@ -156,7 +154,7 @@ public: (new AsyncMenuUpdater())->post(); } - void invoke (const int commandId, ApplicationCommandManager* const commandManager, const int topLevelIndex) const + void invoke (int commandId, ApplicationCommandManager* commandManager, int topLevelIndex) const { if (currentModel != nullptr) { @@ -172,7 +170,7 @@ public: } } - void invokeDirectly (const int commandId, const int topLevelIndex) + void invokeDirectly (int commandId, int topLevelIndex) { if (currentModel != nullptr) currentModel->menuItemSelected (commandId, topLevelIndex); @@ -356,16 +354,16 @@ private: ScopedPointer recent; //============================================================================== - static NSMenuItem* findMenuItem (NSMenu* const menu, const ApplicationCommandTarget::InvocationInfo& info) + static NSMenuItem* findMenuItemWithTag (NSMenu* const menu, int tag) { for (NSInteger i = [menu numberOfItems]; --i >= 0;) { NSMenuItem* m = [menu itemAtIndex: i]; - if ([m tag] == info.commandID) + if ([m tag] == tag) return m; if (NSMenu* sub = [m submenu]) - if (NSMenuItem* found = findMenuItem (sub, info)) + if (NSMenuItem* found = findMenuItemWithTag (sub, tag)) return found; } @@ -421,9 +419,8 @@ private: return m; } - class AsyncMenuUpdater : public CallbackMessage + struct AsyncMenuUpdater : public CallbackMessage { - public: AsyncMenuUpdater() {} void messageCallback() override @@ -432,14 +429,12 @@ private: instance->menuBarItemsChanged (nullptr); } - private: JUCE_DECLARE_NON_COPYABLE (AsyncMenuUpdater) }; - class AsyncCommandInvoker : public CallbackMessage + struct AsyncCommandInvoker : public CallbackMessage { - public: - AsyncCommandInvoker (const int commandId_, const int topLevelIndex_) + AsyncCommandInvoker (int commandId_, int topLevelIndex_) : commandId (commandId_), topLevelIndex (topLevelIndex_) {} @@ -449,9 +444,7 @@ private: instance->invokeDirectly (commandId, topLevelIndex); } - private: const int commandId, topLevelIndex; - JUCE_DECLARE_NON_COPYABLE (AsyncCommandInvoker) }; @@ -581,9 +574,8 @@ private: // This override is also important because it stops the base class // calling ModalComponentManager::bringToFront, which can get // recursive when file dialogs are involved - class SilentDummyModalComp : public Component + struct SilentDummyModalComp : public Component { - public: SilentDummyModalComp() {} void inputAttemptWhenModal() override {} }; @@ -728,6 +720,9 @@ static void mainMenuTrackingChanged (bool isTracking) { menuHandler->isOpen = isTracking; + if (MenuBarModel* model = menuHandler->currentModel) + model->handleMenuBarActivate (isTracking); + if (menuHandler->defferedUpdateRequested && ! isTracking) { menuHandler->defferedUpdateRequested = false; diff --git a/modules/juce_gui_basics/native/juce_mac_MouseCursor.mm b/modules/juce_gui_basics/native/juce_mac_MouseCursor.mm index 09a63d8a..434bcf2c 100644 --- a/modules/juce_gui_basics/native/juce_mac_MouseCursor.mm +++ b/modules/juce_gui_basics/native/juce_mac_MouseCursor.mm @@ -27,25 +27,24 @@ //============================================================================== namespace MouseCursorHelpers { - NSImage* createNSImage (const Image&); - NSImage* createNSImage (const Image& image) + NSImage* createNSImage (const Image&, float scaleFactor = 1.f); + NSImage* createNSImage (const Image& image, float scaleFactor) { JUCE_AUTORELEASEPOOL { NSImage* im = [[NSImage alloc] init]; - [im setSize: NSMakeSize (image.getWidth(), image.getHeight())]; - [im lockFocus]; + const NSSize requiredSize = NSMakeSize (image.getWidth() / scaleFactor, image.getHeight() / scaleFactor); + [im setSize: requiredSize]; CGColorSpaceRef colourSpace = CGColorSpaceCreateDeviceRGB(); - CGImageRef imageRef = juce_createCoreGraphicsImage (image, colourSpace, false); + CGImageRef imageRef = juce_createCoreGraphicsImage (image, colourSpace, true); CGColorSpaceRelease (colourSpace); - CGContextRef cg = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort]; - CGContextDrawImage (cg, convertToCGRect (image.getBounds()), imageRef); - + NSBitmapImageRep* imageRep = [[NSBitmapImageRep alloc] initWithCGImage: imageRef]; + [imageRep setSize: requiredSize]; + [im addRepresentation: imageRep]; + [imageRep release]; CGImageRelease (imageRef); - [im unlockFocus]; - return im; } } @@ -92,6 +91,8 @@ namespace MouseCursorHelpers } } + [originalImage release]; + NSDictionary* info = [NSDictionary dictionaryWithContentsOfFile: juceStringToNS (cursorPath + "/info.plist")]; const float hotspotX = (float) [[info valueForKey: nsStringLiteral ("hotx")] doubleValue]; @@ -104,7 +105,7 @@ namespace MouseCursorHelpers void* CustomMouseCursorInfo::create() const { - return MouseCursorHelpers::fromNSImage (MouseCursorHelpers::createNSImage (image), + return MouseCursorHelpers::fromNSImage (MouseCursorHelpers::createNSImage (image, scaleFactor), NSMakePoint (hotspot.x, hotspot.y)); } diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm index a4cea29e..e98a7b0b 100644 --- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm @@ -58,6 +58,10 @@ static NSRect flippedScreenRect (NSRect r) noexcept return r; } +#if JUCE_MODULE_AVAILABLE_juce_opengl +void componentPeerAboutToBeRemovedFromScreen (ComponentPeer&); +#endif + //============================================================================== class NSViewComponentPeer : public ComponentPeer, private AsyncUpdater @@ -75,7 +79,10 @@ public: usingCoreGraphics (false), #endif isZooming (false), + isFirstLiveResize (false), textWasInserted (false), + isStretchingTop (false), isStretchingLeft (false), + isStretchingBottom (false), isStretchingRight (false), notificationCenter (nil) { appFocusChangeCallback = appFocusChanged; @@ -235,9 +242,9 @@ public: void setRepresentedFile (const File& file) override { if (! isSharedWindow) - [window setRepresentedFilename: juceStringToNS (file != File::nonexistent + [window setRepresentedFilename: juceStringToNS (file != File() ? file.getFullPathName() - : String::empty)]; + : String())]; } void setBounds (const Rectangle& newBounds, bool isNowFullScreen) override @@ -669,6 +676,16 @@ public: void redirectPaste (NSObject*) { handleKeyPress (KeyPress ('v', ModifierKeys (ModifierKeys::commandModifier), 'v')); } void redirectCut (NSObject*) { handleKeyPress (KeyPress ('x', ModifierKeys (ModifierKeys::commandModifier), 'x')); } + void redirectWillMoveToWindow (NSWindow* newWindow) + { + #if JUCE_MODULE_AVAILABLE_juce_opengl + if ([view window] == window && newWindow == nullptr) + componentPeerAboutToBeRemovedFromScreen (*this); + #else + ignoreUnused (newWindow); + #endif + } + void sendMouseEvent (NSEvent* ev) { updateModifiers (ev); @@ -874,9 +891,16 @@ public: void handleAsyncUpdate() override { + #if JucePlugin_Build_AAX || JucePlugin_Build_RTAS || JucePlugin_Build_AUv3 || JucePlugin_Build_AU || JucePlugin_Build_VST3 || JucePlugin_Build_VST + const bool shouldThrottle = true; + #else + const bool shouldThrottle = areAnyWindowsInLiveResize(); + #endif + // When windows are being resized, artificially throttling high-frequency repaints helps - // to stop the event queue getting clogged, and keeps everything working smoothly - if (areAnyWindowsInLiveResize() + // to stop the event queue getting clogged, and keeps everything working smoothly. + // For some reason Logic also needs this throttling to recored parameter events correctly. + if (shouldThrottle && Time::getCurrentTime() < lastRepaintTime + RelativeTime::milliseconds (1000 / 30)) { triggerAsyncUpdate(); @@ -886,6 +910,7 @@ public: for (const Rectangle* i = deferredRepaints.begin(), *e = deferredRepaints.end(); i != e; ++i) [view setNeedsDisplayInRect: makeNSRect (*i)]; + lastRepaintTime = Time::getCurrentTime(); deferredRepaints.clear(); } @@ -903,7 +928,6 @@ public: void invokePaint (LowLevelGraphicsContext& context) { - lastRepaintTime = Time::getCurrentTime(); handlePaint (context); } @@ -986,7 +1010,10 @@ public: void liveResizingStart() { if (constrainer != nullptr) + { constrainer->resizeStart(); + isFirstLiveResize = true; + } } void liveResizingEnd() @@ -1007,26 +1034,26 @@ public: const Rectangle screenBounds (Desktop::getInstance().getDisplays().getTotalBounds (true)); #if defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 - if ([window inLiveResize]) + const bool inLiveResize = [window inLiveResize]; #else - if ([window respondsToSelector: @selector (inLiveResize)] - && [window performSelector: @selector (inLiveResize)]) + const bool inLiveResize = [window respondsToSelector: @selector (inLiveResize)] + && [window performSelector: @selector (inLiveResize)]; #endif + + if (! inLiveResize || isFirstLiveResize) { - constrainer->checkBounds (pos, original, screenBounds, - false, false, true, true); - } - else - { - constrainer->checkBounds (pos, original, screenBounds, - pos.getY() != original.getY() && pos.getBottom() == original.getBottom(), - pos.getX() != original.getX() && pos.getRight() == original.getRight(), - pos.getY() == original.getY() && pos.getBottom() != original.getBottom(), - pos.getX() == original.getX() && pos.getRight() != original.getRight()); + isFirstLiveResize = false; + + isStretchingTop = (pos.getY() != original.getY() && pos.getBottom() == original.getBottom()); + isStretchingLeft = (pos.getX() != original.getX() && pos.getRight() == original.getRight()); + isStretchingBottom = (pos.getY() == original.getY() && pos.getBottom() != original.getBottom()); + isStretchingRight = (pos.getX() == original.getX() && pos.getRight() != original.getRight()); } - pos = ScalingHelpers::scaledScreenPosToUnscaled (scale, pos); + constrainer->checkBounds (pos, original, screenBounds, + isStretchingTop, isStretchingLeft, isStretchingBottom, isStretchingRight); + pos = ScalingHelpers::scaledScreenPosToUnscaled (scale, pos); r = flippedScreenRect (makeNSRect (pos)); } @@ -1318,7 +1345,8 @@ public: NSWindow* window; NSView* view; bool isSharedWindow, fullScreen; - bool usingCoreGraphics, isZooming, textWasInserted; + bool usingCoreGraphics, isZooming, isFirstLiveResize, textWasInserted; + bool isStretchingTop, isStretchingLeft, isStretchingBottom, isStretchingRight; String stringBeingComposed; NSNotificationCenter* notificationCenter; @@ -1522,6 +1550,8 @@ struct JuceNSViewClass : public ObjCClass addMethod (@selector (copy:), copy, "v@:@"); addMethod (@selector (cut:), cut, "v@:@"); + addMethod (@selector (viewWillMoveToWindow:), willMoveToWindow, "v@:@"); + addProtocol (@protocol (NSTextInput)); registerClass(); @@ -1571,6 +1601,11 @@ private: static void paste (id self, SEL, NSObject* s) { if (NSViewComponentPeer* p = getOwner (self)) p->redirectPaste (s); } static void cut (id self, SEL, NSObject* s) { if (NSViewComponentPeer* p = getOwner (self)) p->redirectCut (s); } + static void willMoveToWindow (id self, SEL, NSWindow* window) + { + if (NSViewComponentPeer* p = getOwner (self)) p->redirectWillMoveToWindow (window); + } + static BOOL acceptsFirstMouse (id, SEL, NSEvent*) { return YES; } static BOOL wantsDefaultClipping (id, SEL) { return YES; } // (this is the default, but may want to customise it in future) static BOOL worksWhenModal (id self, SEL) { if (NSViewComponentPeer* p = getOwner (self)) return p->worksWhenModal(); return NO; }; diff --git a/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp b/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp index ad11d406..a6076a42 100644 --- a/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp +++ b/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp @@ -147,7 +147,7 @@ void FileChooser::showPlatformDialog (Array& results, const String& title_ // use a modal window as the parent for this dialog box // to block input from other app windows - Component parentWindow (String::empty); + Component parentWindow; const Rectangle mainMon (Desktop::getInstance().getDisplays().getMainDisplay().userArea); parentWindow.setBounds (mainMon.getX() + mainMon.getWidth() / 4, mainMon.getY() + mainMon.getHeight() / 4, diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index 264b81bd..cada40a6 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -782,6 +782,9 @@ public: if (isFullScreen() != shouldBeFullScreen) { + if (constrainer != nullptr) + constrainer->resizeStart(); + fullScreen = shouldBeFullScreen; const WeakReference deletionChecker (&component); @@ -805,6 +808,9 @@ public: if (deletionChecker != nullptr) handleMovedOrResized(); + + if (constrainer != nullptr) + constrainer->resizeEnd(); } } @@ -1117,14 +1123,6 @@ public: ownerInfo->dragInfo.clear(); - DroppedData textData (dataObject, CF_UNICODETEXT); - - if (SUCCEEDED (textData.error)) - { - ownerInfo->dragInfo.text = String (CharPointer_UTF16 ((const WCHAR*) textData.data), - CharPointer_UTF16 ((const WCHAR*) addBytesToPointer (textData.data, textData.dataSize))); - } - else { DroppedData fileData (dataObject, CF_HDROP); @@ -1137,14 +1135,21 @@ public: ownerInfo->parseFileList (static_cast (names), fileData.dataSize); else ownerInfo->parseFileList (static_cast (names), fileData.dataSize); - } - else - { - return fileData.error; + + return S_OK; } } - return S_OK; + DroppedData textData (dataObject, CF_UNICODETEXT); + + if (SUCCEEDED (textData.error)) + { + ownerInfo->dragInfo.text = String (CharPointer_UTF16 ((const WCHAR*) textData.data), + CharPointer_UTF16 ((const WCHAR*) addBytesToPointer (textData.data, textData.dataSize))); + return S_OK; + } + + return textData.error; } JUCE_DECLARE_NON_COPYABLE (JuceDropTarget) @@ -1967,6 +1972,7 @@ private: bool handleTouchInput (const TOUCHINPUT& touch, const bool isDown, const bool isUp) { bool isCancel = false; + const int touchIndex = currentTouches.getIndexOfTouch (touch.dwID); const int64 time = getMouseEventTime(); const Point pos (globalToLocal (Point (touch.x / 100.0f, @@ -2697,6 +2703,16 @@ private: break; case SC_KEYMENU: + #if ! JUCE_WINDOWS_ALT_KEY_TRIGGERS_MENU + // This test prevents a press of the ALT key from triggering the ancient top-left window menu. + // By default we suppress this behaviour because it's unlikely that more than a tiny subset of + // our users will actually want it, and it causes problems if you're trying to use the ALT key + // as a modifier for mouse actions. If you really need the old behaviour, then just define + // JUCE_WINDOWS_ALT_KEY_TRIGGERS_MENU=1 in your app. + if ((lParam >> 16) <= 0) // Values above zero indicate that a mouse-click triggered the menu + return 0; + #endif + // (NB mustn't call sendInputAttemptWhenModalMessage() here because of very obscure // situations that can arise if a modal loop is started from an alt-key keypress). if (hasTitleBar() && h == GetCapture()) diff --git a/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp b/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp index 99eccbd9..d13fa0e4 100644 --- a/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp +++ b/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp @@ -238,7 +238,7 @@ void PropertyPanel::addProperties (const Array& newPropertie if (isEmpty()) repaint(); - propertyHolderComponent->insertSection (-1, new SectionComponent (String::empty, newProperties, true)); + propertyHolderComponent->insertSection (-1, new SectionComponent (String(), newProperties, true)); updatePropHolderLayout(); } diff --git a/modules/juce_gui_basics/properties/juce_PropertyPanel.h b/modules/juce_gui_basics/properties/juce_PropertyPanel.h index 43615b95..aca85988 100644 --- a/modules/juce_gui_basics/properties/juce_PropertyPanel.h +++ b/modules/juce_gui_basics/properties/juce_PropertyPanel.h @@ -149,6 +149,10 @@ public: */ const String& getMessageWhenEmpty() const noexcept; + //============================================================================== + /** Returns the PropertyPanel's internal Viewport. */ + Viewport& getViewport() noexcept { return viewport; } + //============================================================================== /** @internal */ void paint (Graphics&) override; diff --git a/modules/juce_gui_basics/properties/juce_SliderPropertyComponent.cpp b/modules/juce_gui_basics/properties/juce_SliderPropertyComponent.cpp index 75c4581d..46ee985a 100644 --- a/modules/juce_gui_basics/properties/juce_SliderPropertyComponent.cpp +++ b/modules/juce_gui_basics/properties/juce_SliderPropertyComponent.cpp @@ -26,13 +26,14 @@ SliderPropertyComponent::SliderPropertyComponent (const String& name, const double rangeMin, const double rangeMax, const double interval, - const double skewFactor) + const double skewFactor, + bool symmetricSkew) : PropertyComponent (name) { addAndMakeVisible (slider); slider.setRange (rangeMin, rangeMax, interval); - slider.setSkewFactor (skewFactor); + slider.setSkewFactor (skewFactor, symmetricSkew); slider.setSliderStyle (Slider::LinearBar); slider.addListener (this); @@ -43,13 +44,14 @@ SliderPropertyComponent::SliderPropertyComponent (const Value& valueToControl, const double rangeMin, const double rangeMax, const double interval, - const double skewFactor) + const double skewFactor, + bool symmetricSkew) : PropertyComponent (name) { addAndMakeVisible (slider); slider.setRange (rangeMin, rangeMax, interval); - slider.setSkewFactor (skewFactor); + slider.setSkewFactor (skewFactor, symmetricSkew); slider.setSliderStyle (Slider::LinearBar); slider.getValueObject().referTo (valueToControl); diff --git a/modules/juce_gui_basics/properties/juce_SliderPropertyComponent.h b/modules/juce_gui_basics/properties/juce_SliderPropertyComponent.h index 35983df6..d45e448b 100644 --- a/modules/juce_gui_basics/properties/juce_SliderPropertyComponent.h +++ b/modules/juce_gui_basics/properties/juce_SliderPropertyComponent.h @@ -48,7 +48,8 @@ protected: double rangeMin, double rangeMax, double interval, - double skewFactor = 1.0); + double skewFactor = 1.0, + bool symmetricSkew = false); public: //============================================================================== @@ -68,7 +69,8 @@ public: double rangeMin, double rangeMax, double interval, - double skewFactor = 1.0); + double skewFactor = 1.0, + bool symmetricSkew = false); /** Destructor. */ ~SliderPropertyComponent(); diff --git a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp index f765cd0a..5a52f9c6 100644 --- a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp +++ b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp @@ -27,7 +27,7 @@ class TextPropertyComponent::LabelComp : public Label, { public: LabelComp (TextPropertyComponent& tpc, const int charLimit, const bool multiline) - : Label (String::empty, String::empty), + : Label (String(), String()), owner (tpc), maxChars (charLimit), isMultiline (multiline) diff --git a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h index 2b16bbdc..de9d467d 100644 --- a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h +++ b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h @@ -38,8 +38,10 @@ protected: //============================================================================== /** Creates a text property component. - The maxNumChars is used to set the length of string allowable, and isMultiLine - sets whether the text editor allows carriage returns. + @param propertyName The name of the property + @param maxNumChars If not zero, then this specifies the maximum allowable length of + the string. If zero, then the string will have no length limit. + @param isMultiLine isMultiLine sets whether the text editor allows carriage returns. @see TextEditor */ @@ -50,8 +52,11 @@ protected: public: /** Creates a text property component. - The maxNumChars is used to set the length of string allowable, and isMultiLine - sets whether the text editor allows carriage returns. + @param valueToControl The Value that is controlled by the TextPropertyCOmponent + @param propertyName The name of the property + @param maxNumChars If not zero, then this specifies the maximum allowable length of + the string. If zero, then the string will have no length limit. + @param isMultiLine isMultiLine sets whether the text editor allows carriage returns. @see TextEditor */ diff --git a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp index 68e1c238..13fc1644 100644 --- a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp @@ -46,7 +46,8 @@ ComboBox::ComboBox (const String& name) menuActive (false), scrollWheelEnabled (false), mouseWheelAccumulator (0), - noChoicesMessage (TRANS("(no choices)")) + noChoicesMessage (TRANS("(no choices)")), + labelEditableState (editableUnknown) { setRepaintsOnMouseActivity (true); lookAndFeelChanged(); @@ -66,7 +67,9 @@ void ComboBox::setEditableText (const bool isEditable) if (label->isEditableOnSingleClick() != isEditable || label->isEditableOnDoubleClick() != isEditable) { label->setEditable (isEditable, isEditable, false); - setWantsKeyboardFocus (! isEditable); + labelEditableState = (isEditable ? labelIsEditable : labelIsNotEditable); + + setWantsKeyboardFocus (labelEditableState == labelIsNotEditable); resized(); } } @@ -109,7 +112,7 @@ void ComboBox::addItem (const String& newItemText, const int newItemId) if (separatorPending) { separatorPending = false; - items.add (new ItemInfo (String::empty, 0, false, false)); + items.add (new ItemInfo (String(), 0, false, false)); } items.add (new ItemInfo (newItemText, newItemId, true, false)); @@ -137,7 +140,7 @@ void ComboBox::addSectionHeading (const String& headingName) if (separatorPending) { separatorPending = false; - items.add (new ItemInfo (String::empty, 0, false, false)); + items.add (new ItemInfo (String(), 0, false, false)); } items.add (new ItemInfo (headingName, 0, true, true)); @@ -216,7 +219,7 @@ String ComboBox::getItemText (const int index) const if (const ItemInfo* const item = getItemForIndex (index)) return item->name; - return String::empty; + return String(); } int ComboBox::getItemId (const int index) const noexcept @@ -271,7 +274,7 @@ int ComboBox::getSelectedId() const noexcept void ComboBox::setSelectedId (const int newItemId, const NotificationType notification) { const ItemInfo* const item = getItemForId (newItemId); - const String newItemText (item != nullptr ? item->name : String::empty); + const String newItemText (item != nullptr ? item->name : String()); if (lastCurrentId != newItemId || label->getText() != newItemText) { @@ -437,7 +440,14 @@ void ComboBox::lookAndFeelChanged() } addAndMakeVisible (label); - setWantsKeyboardFocus (! label->isEditable()); + + EditableState newEditableState = (label->isEditable() ? labelIsEditable : labelIsNotEditable); + + if (newEditableState != labelEditableState) + { + labelEditableState = newEditableState; + setWantsKeyboardFocus (labelEditableState == labelIsNotEditable); + } label->addListener (this); label->addMouseListener (this, false); diff --git a/modules/juce_gui_basics/widgets/juce_ComboBox.h b/modules/juce_gui_basics/widgets/juce_ComboBox.h index 515e5d2e..ca05da6c 100644 --- a/modules/juce_gui_basics/widgets/juce_ComboBox.h +++ b/modules/juce_gui_basics/widgets/juce_ComboBox.h @@ -57,7 +57,7 @@ public: @param componentName the name to set for the component (see Component::setName()) */ - explicit ComboBox (const String& componentName = String::empty); + explicit ComboBox (const String& componentName = String()); /** Destructor. */ ~ComboBox(); @@ -427,6 +427,13 @@ private: bool isEnabled : 1, isHeading : 1; }; + enum EditableState + { + editableUnknown, + labelIsNotEditable, + labelIsEditable + }; + OwnedArray items; Value currentId; int lastCurrentId; @@ -435,6 +442,7 @@ private: ListenerList listeners; ScopedPointer